Hello community,
here is the log from the commit of package yast2-ycp-ui-bindings for
openSUSE:Factory checked in at 2020-10-29 09:22:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ycp-ui-bindings (Old)
and /work/SRC/openSUSE:Factory/.yast2-ycp-ui-bindings.new.3463 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ycp-ui-bindings"
Thu Oct 29 09:22:21 2020 rev:82 rq:844668 version:4.3.5
Changes:
--------
---
/work/SRC/openSUSE:Factory/yast2-ycp-ui-bindings/yast2-ycp-ui-bindings.changes
2020-10-18 16:21:11.716484788 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-ycp-ui-bindings.new.3463/yast2-ycp-ui-bindings.changes
2020-10-29 09:22:23.770692927 +0100
@@ -1,0 +2,12 @@
+Wed Oct 28 16:52:12 UTC 2020 - Stefan Hundhammer <[email protected]>
+
+- Added example for more in-depth MultiSelectionBox testing
+- 4.3.5
+
+-------------------------------------------------------------------
+Thu Oct 15 13:45:24 UTC 2020 - Stefan Hundhammer <[email protected]>
+
+- Added support for OpenItems property for (nested) tables (bsc#1176402)
+- 4.3.4
+
+-------------------------------------------------------------------
Old:
----
yast2-ycp-ui-bindings-4.3.3.tar.bz2
New:
----
yast2-ycp-ui-bindings-4.3.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ycp-ui-bindings.spec ++++++
--- /var/tmp/diff_new_pack.oaWLCO/_old 2020-10-29 09:22:24.838693951 +0100
+++ /var/tmp/diff_new_pack.oaWLCO/_new 2020-10-29 09:22:24.842693955 +0100
@@ -21,7 +21,7 @@
%define yui_so 14
Name: yast2-ycp-ui-bindings
-Version: 4.3.3
+Version: 4.3.5
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-ycp-ui-bindings-4.3.3.tar.bz2 ->
yast2-ycp-ui-bindings-4.3.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ycp-ui-bindings-4.3.3/.travis.yml
new/yast2-ycp-ui-bindings-4.3.5/.travis.yml
--- old/yast2-ycp-ui-bindings-4.3.3/.travis.yml 2020-10-09 16:50:33.000000000
+0200
+++ new/yast2-ycp-ui-bindings-4.3.5/.travis.yml 2020-10-28 20:43:24.000000000
+0100
@@ -8,7 +8,7 @@
script:
# the "yast-travis-cpp" script is included in the base yastdevel/cpp image
# see https://github.com/yast/docker-yast-cpp/blob/master/yast-travis-cpp
- - docker run -it -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID"
yast-ycp-ui-bindings-image yast-travis-cpp
+ - docker run -it -e TRAVIS=1 --privileged -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID"
yast-ycp-ui-bindings-image yast-travis-cpp
after_success:
- ./.surge.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ycp-ui-bindings-4.3.3/examples/Image1.rb
new/yast2-ycp-ui-bindings-4.3.5/examples/Image1.rb
--- old/yast2-ycp-ui-bindings-4.3.3/examples/Image1.rb 2020-10-09
16:50:33.000000000 +0200
+++ new/yast2-ycp-ui-bindings-4.3.5/examples/Image1.rb 2020-10-28
20:43:24.000000000 +0100
@@ -10,21 +10,13 @@
VBox(
Image(
Id("image"),
- "/usr/share/YaST2/theme/current/wallpapers/welcome.jpg",
+ "/usr/share/grub2/themes/openSUSE/logo.png",
"fallback text"
),
PushButton(Opt(:default), "&OK")
)
)
UI.UserInput
- if UI.WidgetExists(Id("image"))
- UI.ChangeWidget(Id("image"), :Enabled, false)
- UI.UserInput
- UI.ChangeWidget(Id("image"), :Enabled, true)
- UI.UserInput
- else
- Builtins.y2error("No such widget id")
- end
UI.CloseDialog
nil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ycp-ui-bindings-4.3.3/examples/MultiSelectionBox-test.rb
new/yast2-ycp-ui-bindings-4.3.5/examples/MultiSelectionBox-test.rb
--- old/yast2-ycp-ui-bindings-4.3.3/examples/MultiSelectionBox-test.rb
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-ycp-ui-bindings-4.3.5/examples/MultiSelectionBox-test.rb
2020-10-28 20:43:24.000000000 +0100
@@ -0,0 +1,146 @@
+# encoding: utf-8
+
+# Example for table with single-selection and nested items
+#
+# This is also used in the NCurses UI test suite.
+# When changing this example, make sure that test suite does not fail!
+
+module Yast
+ class MultiSelectionBoxTest < Client
+ Yast.import "UI"
+ include Yast::Logger
+
+ def main
+ UI.OpenDialog(main_dialog)
+ update_output_fields
+ handle_events
+ UI.CloseDialog
+ end
+
+ def main_dialog
+ MinSize(
+ 75, 16,
+ MarginBox(
+ 1, 0.4,
+ VBox(
+ Left(
+ Heading("Pizza Selector")
+ ),
+ VSpacing(0.2),
+ multi_selection_box,
+ VSpacing(0.2),
+ Left(
+ CheckBox(Id(:veggie), Opt(:notify), "&Vegetarian", false)
+ ),
+ VSpacing(1),
+ output_fields,
+ VSpacing(0.3),
+ Right(
+ PushButton(Id(:close), "&Close")
+ )
+ )
+ )
+ )
+ end
+
+ def multi_selection_box
+ MultiSelectionBox(
+ Id(:multi_sel),
+ Opt(:notify),
+ "Select toppings:",
+ all_toppings
+ )
+ end
+
+ def all_toppings
+ [
+ Item(Id(:cheese), "Cheese", true),
+ Item(Id(:tomatoes), "Tomatoes", true),
+ Item(Id(:mushrooms), "Mushrooms"),
+ Item(Id(:onions), "Onions"),
+ Item(Id(:salami), "Salami"),
+ Item(Id(:ham), "Ham")
+ ]
+ end
+
+ def veggie_toppings
+ [
+ Item(Id(:cheese), "Cheese", true),
+ Item(Id(:tomatoes), "Tomatoes", true),
+ Item(Id(:mushrooms), "Mushrooms"),
+ Item(Id(:onions), "Onions")
+ ]
+ end
+
+ def output_fields
+ VBox(
+ HBox(
+ # Putting both in one line to enable grepping for NCurses UI tests
+ HSquash(MinWidth(12, Label("Selected: "))),
+ Label(Id(:selected_items), Opt(:outputField, :hstretch), "...")
+ ),
+ HBox(
+ # Putting both in one line to enable grepping for NCurses UI tests
+ HSquash(MinWidth(12, Label("Current: "))),
+ Label(Id(:current_item), Opt(:outputField, :hstretch), "...")
+ )
+ )
+ end
+
+ def handle_events
+ while true
+ id = UI.UserInput
+ case id
+
+ when :close, :cancel # :cancel is WM_CLOSE
+ break # leave event loop
+ when :multi_sel
+ update_output_fields
+ when :veggie
+ change_toppings
+ end
+ id
+ end
+ end
+
+ def current_item
+ UI.QueryWidget(Id(:multi_sel), :CurrentItem)
+ end
+
+ def selected_items
+ UI.QueryWidget(Id(:multi_sel), :SelectedItems)
+ end
+
+ def update_current_item(id)
+ UI.ChangeWidget(Id(:current_item), :Value, id.inspect)
+ end
+
+ def update_selected_items(ids)
+ UI.ChangeWidget(Id(:selected_items), :Value, ids.inspect)
+ end
+
+ def update_output_fields
+ update_selected_items(selected_items)
+ update_current_item(current_item)
+ end
+
+ def veggie?
+ UI.QueryWidget(Id(:veggie), :Value)
+ end
+
+ def change_toppings
+ veg = veggie?
+ UI.ChangeWidget(Id(:multi_sel), :Items, veg ? veggie_toppings :
all_toppings)
+
+ # Select one extra topping and make it the current item
+ extra = veg ? :mushrooms : :salami
+ UI.ChangeWidget(Id(:multi_sel), :SelectedItems, selected_items << extra )
+ UI.ChangeWidget(Id(:multi_sel), :CurrentItem, extra)
+
+ update_output_fields
+ UI.SetFocus(Id(:multi_sel))
+ end
+ end
+end
+
+Yast::MultiSelectionBoxTest.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ycp-ui-bindings-4.3.3/examples/Table-nested-items.rb
new/yast2-ycp-ui-bindings-4.3.5/examples/Table-nested-items.rb
--- old/yast2-ycp-ui-bindings-4.3.3/examples/Table-nested-items.rb
2020-10-09 16:50:33.000000000 +0200
+++ new/yast2-ycp-ui-bindings-4.3.5/examples/Table-nested-items.rb
2020-10-28 20:43:24.000000000 +0100
@@ -5,10 +5,12 @@
module Yast
class TableNestedItems < Client
Yast.import "UI"
+ include Yast::Logger
def main
UI.OpenDialog(main_dialog)
update_selected(current_table_item)
+ update_open_items(open_items)
handle_events
UI.CloseDialog
end
@@ -25,8 +27,16 @@
VSpacing(0.2),
table,
VSpacing(0.2),
- Left(Label("Selected:")),
- Label(Id(:selected), Opt(:outputField, :hstretch), "..."),
+ HBox(
+ # Putting both in one line to enable grepping for NCurses UI
tests
+ HSquash(MinWidth(12, Label("Selected: "))),
+ Label(Id(:selected), Opt(:outputField, :hstretch), "...")
+ ),
+ HBox(
+ # Putting both in one line to enable grepping for NCurses UI
tests
+ HSquash(MinWidth(12, Label("Open Items: "))),
+ Label(Id(:open_items), Opt(:outputField, :hstretch), "...")
+ ),
VSpacing(0.3),
Right(
PushButton(Id(:close), "&Close")
@@ -87,6 +97,7 @@
break # leave event loop
when :table
update_selected(current_table_item)
+ update_open_items(open_items)
end
id
end
@@ -100,6 +111,14 @@
id ||= "<nil>"
UI.ChangeWidget(Id(:selected), :Value, id.to_s)
end
+
+ def open_items
+ UI.QueryWidget(Id(:table), :OpenItems).keys
+ end
+
+ def update_open_items(ids)
+ UI.ChangeWidget(Id(:open_items), :Value, ids.inspect)
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ycp-ui-bindings-4.3.3/package/yast2-ycp-ui-bindings.changes
new/yast2-ycp-ui-bindings-4.3.5/package/yast2-ycp-ui-bindings.changes
--- old/yast2-ycp-ui-bindings-4.3.3/package/yast2-ycp-ui-bindings.changes
2020-10-09 16:50:33.000000000 +0200
+++ new/yast2-ycp-ui-bindings-4.3.5/package/yast2-ycp-ui-bindings.changes
2020-10-28 20:43:24.000000000 +0100
@@ -1,4 +1,16 @@
-------------------------------------------------------------------
+Wed Oct 28 16:52:12 UTC 2020 - Stefan Hundhammer <[email protected]>
+
+- Added example for more in-depth MultiSelectionBox testing
+- 4.3.5
+
+-------------------------------------------------------------------
+Thu Oct 15 13:45:24 UTC 2020 - Stefan Hundhammer <[email protected]>
+
+- Added support for OpenItems property for (nested) tables (bsc#1176402)
+- 4.3.4
+
+-------------------------------------------------------------------
Fri Oct 9 12:04:21 UTC 2020 - José Iván López González <[email protected]>
- Added Nested Tables (bsc#1176402)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ycp-ui-bindings-4.3.3/package/yast2-ycp-ui-bindings.spec
new/yast2-ycp-ui-bindings-4.3.5/package/yast2-ycp-ui-bindings.spec
--- old/yast2-ycp-ui-bindings-4.3.3/package/yast2-ycp-ui-bindings.spec
2020-10-09 16:50:33.000000000 +0200
+++ new/yast2-ycp-ui-bindings-4.3.5/package/yast2-ycp-ui-bindings.spec
2020-10-28 20:43:24.000000000 +0100
@@ -20,7 +20,7 @@
%define yui_so 14
Name: yast2-ycp-ui-bindings
-Version: 4.3.3
+Version: 4.3.5
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ycp-ui-bindings-4.3.3/src/YCPPropertyHandler.cc
new/yast2-ycp-ui-bindings-4.3.5/src/YCPPropertyHandler.cc
--- old/yast2-ycp-ui-bindings-4.3.3/src/YCPPropertyHandler.cc 2020-10-09
16:50:33.000000000 +0200
+++ new/yast2-ycp-ui-bindings-4.3.5/src/YCPPropertyHandler.cc 2020-10-28
20:43:24.000000000 +0100
@@ -1,7 +1,7 @@
/****************************************************************************
Copyright (c) 2000 - 2010 Novell, Inc.
-Copyright (c) 2019 SUSE LLC
+Copyright (c) 2019 - 2020 SUSE LLC
All Rights Reserved.
This program is free software; you can redistribute it and/or
@@ -220,7 +220,7 @@
}
else if ( propertyName == YUIProperty_OpenItems )
{
- val = tryGetTreeOpenItems ( widget ); if ( ! val.isNull() )
return val;
+ val = tryGetOpenItems ( widget ); if ( ! val.isNull() )
return val;
}
else if ( propertyName == YUIProperty_CurrentBranch )
{
@@ -1261,24 +1261,24 @@
YCPValue
-YCPPropertyHandler::tryGetTreeOpenItems( YWidget * widget )
+YCPPropertyHandler::tryGetOpenItems( YWidget * widget )
{
- YTree * tree = dynamic_cast<YTree *> (widget);
+ YSelectionWidget * selWidget = dynamic_cast<YSelectionWidget *> (widget);
- if ( ! tree )
+ if ( ! selWidget )
return YCPNull();
YCPMap openItems;
- getTreeOpenItems( openItems, tree->itemsBegin(), tree->itemsEnd() );
+ getOpenItems( openItems, selWidget->itemsBegin(), selWidget->itemsEnd() );
return openItems;
}
void
-YCPPropertyHandler::getTreeOpenItems( YCPMap & openItems,
- YItemConstIterator begin,
- YItemConstIterator end )
+YCPPropertyHandler::getOpenItems( YCPMap & openItems,
+ YItemConstIterator begin,
+ YItemConstIterator end )
{
for ( YItemConstIterator it = begin; it != end; ++it )
{
@@ -1286,18 +1286,35 @@
if ( item )
{
- YCPTreeItem * ycpTreeItem = dynamic_cast<YCPTreeItem *> (item);
+ YTreeItem * yTreeItem = dynamic_cast<YTreeItem *> (item);
- if ( item->isOpen() )
+ if ( yTreeItem->isOpen() )
{
- if ( ycpTreeItem && ycpTreeItem->hasId() )
- openItems.add( ycpTreeItem->id(), YCPString( "ID" ) );
- else
- openItems.add( YCPString( item->label() ), YCPString(
"Text" ) );
+ YCPTableItem * ycpTableItem = dynamic_cast<YCPTableItem *>
(item);
+
+ if ( ycpTableItem )
+ {
+ if ( ycpTableItem->hasId() )
+ openItems.add( ycpTableItem->id(), YCPString( "ID" ) );
+ else
+ openItems.add( ycpTableItem->label( 0 ), YCPString(
"Text" ) );
+ }
+ else
+ {
+ YCPTreeItem * ycpTreeItem = dynamic_cast<YCPTreeItem *>
(item);
+
+ if ( ycpTreeItem )
+ {
+ if ( ycpTreeItem->hasId() )
+ openItems.add( ycpTreeItem->id(), YCPString( "ID"
) );
+ else
+ openItems.add( ycpTreeItem->label(), YCPString(
"Text" ) );
+ }
+ }
}
if ( item->hasChildren() )
- getTreeOpenItems( openItems, item->childrenBegin(),
item->childrenEnd() );
+ getOpenItems( openItems, item->childrenBegin(),
item->childrenEnd() );
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ycp-ui-bindings-4.3.3/src/YCPPropertyHandler.h
new/yast2-ycp-ui-bindings-4.3.5/src/YCPPropertyHandler.h
--- old/yast2-ycp-ui-bindings-4.3.3/src/YCPPropertyHandler.h 2020-10-09
16:50:33.000000000 +0200
+++ new/yast2-ycp-ui-bindings-4.3.5/src/YCPPropertyHandler.h 2020-10-28
20:43:24.000000000 +0100
@@ -1,7 +1,7 @@
/****************************************************************************
Copyright (c) 2000 - 2010 Novell, Inc.
-Copyright (c) 2019 SUSE LLC
+Copyright (c) 2019 - 2020 SUSE LLC
All Rights Reserved.
This program is free software; you can redistribute it and/or
@@ -148,7 +148,7 @@
static YCPValue tryGetTableSelectedItems ( YWidget * widget );
static YCPValue tryGetTreeSelectedItems ( YWidget * widget );
static YCPValue tryGetMultiSelectionBoxCurrentItem ( YWidget * widget );
- static YCPValue tryGetTreeOpenItems ( YWidget *
widget );
+ static YCPValue tryGetOpenItems ( YWidget * widget );
static YCPValue tryGetTreeCurrentBranch ( YWidget * widget );
static YCPValue tryGetWizardCurrentItem ( YWidget * widget );
static YCPValue tryGetTableCell ( YWidget * widget,
const YCPTerm & propertyTerm );
@@ -180,12 +180,12 @@
const YCPValue & newEnabled );
/**
- * Helper function for tryGetTreeOpenItems(): Get any open tree items
+ * Helper function for tryGetOpenItems(): Get any open tree items
* between iterators 'begin' and 'end' and add them to the 'openItems' map.
**/
- static void getTreeOpenItems( YCPMap & openItems,
- YItemConstIterator begin,
- YItemConstIterator end );
+ static void getOpenItems( YCPMap & openItems,
+ YItemConstIterator begin,
+ YItemConstIterator end );
/**
* Helper function for tryGetMenuWidgetEnabledItems(): Get the enabled /
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ycp-ui-bindings-4.3.3/src/YCP_UI.cc
new/yast2-ycp-ui-bindings-4.3.5/src/YCP_UI.cc
--- old/yast2-ycp-ui-bindings-4.3.3/src/YCP_UI.cc 2020-10-09
16:50:33.000000000 +0200
+++ new/yast2-ycp-ui-bindings-4.3.5/src/YCP_UI.cc 2020-10-28
20:43:24.000000000 +0100
@@ -681,16 +681,16 @@
idValue->toString().c_str() ) );
}
- YCPValue id = YCPDialogParser::parseIdTerm( idValue );
- YWidget * widget = YCPDialogParser::findWidgetWithId( id,
- true ); //
throw if not found
+ YCPValue id = YCPDialogParser::parseIdTerm( idValue );
+ YWidget * widget = YCPDialogParser::findWidgetWithId( id,
+ true ); //
throw if not found
YPropertySet propSet = widget->propertySet();
if ( property->isSymbol() )
{
string oldShortcutString = widget->shortcutString();
- string propertyName = property->asSymbol()->symbol();
+ string propertyName = property->asSymbol()->symbol();
YPropertyValue val;
@@ -715,8 +715,8 @@
}
else if ( property->isTerm() )
{
- bool success = YCPPropertyHandler::setComplexProperty(
widget, property->asTerm(), newValue );
- ret = YCPBoolean( success );
+ bool success = YCPPropertyHandler::setComplexProperty( widget,
property->asTerm(), newValue );
+ ret = YCPBoolean( success );
}
else
{