[yast-commit] r63016 - in /trunk/ycp-ui-bindings: VERSION package/yast2-ycp-ui-bindings.changes src/YCPDialogParser.cc src/YCPPropertyHandler.cc src/YCPPropertyHandler.h yast2-ycp-ui-bindings.spec.in
![](https://seccdn.libravatar.org/avatar/8ea7e9df6cc79a33898e71283aa37a3c.jpg?s=120&d=mm&r=g)
Author: tgoettlicher
Date: Mon Dec 20 16:59:59 2010
New Revision: 63016
URL: http://svn.opensuse.org/viewcvs/yast?rev=63016&view=rev
Log:
- Added support for check boxes in tree widgets
Modified:
trunk/ycp-ui-bindings/VERSION
trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes
trunk/ycp-ui-bindings/src/YCPDialogParser.cc
trunk/ycp-ui-bindings/src/YCPPropertyHandler.cc
trunk/ycp-ui-bindings/src/YCPPropertyHandler.h
trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in
Modified: trunk/ycp-ui-bindings/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/VERSION?rev=63016&r1=63015&r2=63016&view=diff
==============================================================================
--- trunk/ycp-ui-bindings/VERSION (original)
+++ trunk/ycp-ui-bindings/VERSION Mon Dec 20 16:59:59 2010
@@ -1 +1 @@
-2.18.5
+2.19.1
Modified: trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes?rev=63016&r1=63015&r2=63016&view=diff
==============================================================================
--- trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes (original)
+++ trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes Mon Dec 20 16:59:59 2010
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Dec 20 16:51:52 CET 2010 - tgoettlicher@suse.de
+
+- Added support for check boxes in tree widgets
+- V 2.19.1
+
+-------------------------------------------------------------------
Wed Feb 10 17:25:22 CET 2010 - tgoettlicher@suse.de
- added license headers
Modified: trunk/ycp-ui-bindings/src/YCPDialogParser.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/src/YCPDialogParser.cc?rev=63016&r1=63015&r2=63016&view=diff
==============================================================================
--- trunk/ycp-ui-bindings/src/YCPDialogParser.cc (original)
+++ trunk/ycp-ui-bindings/src/YCPDialogParser.cc Mon Dec 20 16:59:59 2010
@@ -2139,6 +2139,7 @@
* and opening subtrees. If the UI cannot handle this, all
* subtrees will always be open.
*
+ * @option multiSelection user can select multiple items at once
* @option immediate make `notify trigger immediately when the selected item changes
* @usage `Tree( `id( `treeID ), "treeLabel", [ "top1", "top2", "top3" ] );
* @examples Tree1.ycp
@@ -2180,16 +2181,18 @@
}
bool immediate = false;
+ bool multiSelection = false;
for ( int o=0; o < optList->size(); o++ )
{
if ( optList->value(o)->isSymbol() && optList->value(o)->asSymbol()->symbol() == YUIOpt_immediate ) immediate = true;
+ else if ( optList->value(o)->isSymbol() && optList->value(o)->asSymbol()->symbol() == YUIOpt_multiSelection ) multiSelection = true;
else logUnknownOption( term, optList->value(o) );
}
string label = term->value ( argnr )->asString()->value();
- YTree * tree = YUI::widgetFactory()->createTree( parent, label );
+ YTree * tree = YUI::widgetFactory()->createTree( parent, label, multiSelection );
if ( numArgs > 1 )
{
Modified: trunk/ycp-ui-bindings/src/YCPPropertyHandler.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/src/YCPPropertyHandler.cc?rev=63016&r1=63015&r2=63016&view=diff
==============================================================================
--- trunk/ycp-ui-bindings/src/YCPPropertyHandler.cc (original)
+++ trunk/ycp-ui-bindings/src/YCPPropertyHandler.cc Mon Dec 20 16:59:59 2010
@@ -138,6 +138,7 @@
{
if ( trySetMultiSelectionBoxSelectedItems( widget, val ) ) return true;
if ( trySetTableSelectedItems( widget, val ) ) return true;
+ if ( trySetTreeSelectedItems( widget, val ) ) return true;
}
y2error( "Can't handle property %s::%s - not changing anything",
@@ -207,6 +208,7 @@
{
val = tryGetMultiSelectionBoxSelectedItems( widget ); if ( ! val.isNull() ) return val;
val = tryGetTableSelectedItems( widget ); if ( ! val.isNull() ) return val;
+ val = tryGetTreeSelectedItems( widget ); if ( ! val.isNull() ) return val;
}
else if ( propertyName == YUIProperty_OpenItems )
{
@@ -684,6 +686,13 @@
bool
+YCPPropertyHandler::trySetTreeSelectedItems( YWidget * widget, const YCPValue & val )
+{
+ return trySetSelectionWidgetSelectedItems
participants (1)
-
tgoettlicher@svn2.opensuse.org