Hello community,
here is the log from the commit of package yast2-ycp-ui-bindings
checked in at Wed Jul 16 22:54:50 CEST 2008.
--------
--- yast2-ycp-ui-bindings/yast2-ycp-ui-bindings.changes 2008-05-16 13:25:11.000000000 +0200
+++ yast2-ycp-ui-bindings/yast2-ycp-ui-bindings.changes 2008-07-16 14:34:31.522307000 +0200
@@ -1,0 +2,6 @@
+Tue Jul 15 19:13:25 CEST 2008 - sh@suse.de
+
+- Implemented fate #303492: Multi selection for table widget
+- V 2.17.2
+
+-------------------------------------------------------------------
Old:
----
yast2-ycp-ui-bindings-2.16.47.tar.bz2
New:
----
yast2-ycp-ui-bindings-2.17.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ycp-ui-bindings.spec ++++++
--- /var/tmp/diff_new_pack.c26591/_old 2008-07-16 22:54:11.000000000 +0200
+++ /var/tmp/diff_new_pack.c26591/_new 2008-07-16 22:54:11.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-ycp-ui-bindings (Version 2.16.47)
+# spec file for package yast2-ycp-ui-bindings (Version 2.17.2)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,12 +12,12 @@
Name: yast2-ycp-ui-bindings
-Version: 2.16.47
+Version: 2.17.2
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-ycp-ui-bindings-2.16.47.tar.bz2
+Source0: yast2-ycp-ui-bindings-2.17.2.tar.bz2
Prefix: /usr
BuildRequires: gcc-c++
BuildRequires: yast2-devtools
@@ -31,8 +31,8 @@
# libycp includes crypto built-ins
BuildRequires: libxcrypt-devel
# YUIOpt_repoMgr value
-Requires: yast2-libyui >= 2.16.47
-BuildRequires: yast2-libyui-devel >= 2.16.47
+Requires: yast2-libyui >= 2.17.5
+BuildRequires: yast2-libyui-devel >= 2.17.5
# libyui ImplPtr
BuildRequires: boost-devel
Summary: YaST2 - YCP Bindings for the YaST2 User Interface Engine
@@ -78,7 +78,7 @@
Matthias Kettner
%prep
-%setup -n yast2-ycp-ui-bindings-2.16.47
+%setup -n yast2-ycp-ui-bindings-2.17.2
%build
%{prefix}/bin/y2tool y2autoconf
@@ -117,6 +117,9 @@
%{_libdir}/pkgconfig/yast2-ycp-ui-bindings.pc
%doc %{prefix}/share/doc/packages/yast2-ycp-ui-bindings
%changelog
+* Tue Jul 15 2008 sh@suse.de
+- Implemented fate #303492: Multi selection for table widget
+- V 2.17.2
* Fri May 16 2008 sh@suse.de
- Handle nonexistent widgets in UI::SetFocus() more gracefully
(bnc #389126)
++++++ yast2-ycp-ui-bindings-2.16.47.tar.bz2 -> yast2-ycp-ui-bindings-2.17.2.tar.bz2 ++++++
++++ 4128 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-ycp-ui-bindings-2.16.47/configure.in new/yast2-ycp-ui-bindings-2.17.2/configure.in
--- old/yast2-ycp-ui-bindings-2.16.47/configure.in 2008-05-19 20:12:44.000000000 +0200
+++ new/yast2-ycp-ui-bindings-2.17.2/configure.in 2008-07-11 11:53:57.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-ycp-ui-bindings
dnl
-dnl -- This file is generated by y2autoconf 2.16.8 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.16.7 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-ycp-ui-bindings, 2.16.47, http://bugs.opensuse.org/, yast2-ycp-ui-bindings)
+AC_INIT(yast2-ycp-ui-bindings, 2.17.1, http://bugs.opensuse.org/, yast2-ycp-ui-bindings)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.16.47"
+VERSION="2.17.1"
RPMNAME="yast2-ycp-ui-bindings"
MAINTAINER="Stefan Hundhammer "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-ycp-ui-bindings-2.16.47/examples/CheckBoxFrame3.ycp new/yast2-ycp-ui-bindings-2.17.2/examples/CheckBoxFrame3.ycp
--- old/yast2-ycp-ui-bindings-2.16.47/examples/CheckBoxFrame3.ycp 2007-06-25 18:24:54.000000000 +0200
+++ new/yast2-ycp-ui-bindings-2.17.2/examples/CheckBoxFrame3.ycp 2008-05-29 17:42:43.000000000 +0200
@@ -24,6 +24,7 @@
symbol widget = nil;
string old_server = "";
+ UI::FakeUserInput(`use_suse_server); // Use event loop to set up initial enabled/disabled states
repeat
{
@@ -31,6 +32,7 @@
if ( widget == `use_suse_server )
{
+ y2debug( "Changing enabled states" );
boolean use_suse_server = (boolean) UI::QueryWidget(`use_suse_server, `Value );
UI::ChangeWidget(`server, `Enabled, ! use_suse_server );
UI::ChangeWidget(`mode , `Enabled, ! use_suse_server );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-ycp-ui-bindings-2.16.47/examples/Enabling3.ycp new/yast2-ycp-ui-bindings-2.17.2/examples/Enabling3.ycp
--- old/yast2-ycp-ui-bindings-2.16.47/examples/Enabling3.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-ycp-ui-bindings-2.17.2/examples/Enabling3.ycp 2008-06-20 13:10:51.000000000 +0200
@@ -0,0 +1,23 @@
+{
+ UI::OpenDialog(
+ `VBox(
+ `VBox(
+ `id(`box), `opt(`disabled),
+ `InputField("TestEntry", ""),
+ `CheckBox("Looks fine")
+ ),
+ `PushButton(`id(`change), "&Change"),
+ `PushButton(`id(`cancel), "&Quit")
+ )
+ );
+
+ boolean enabled = false;
+
+ while (UI::UserInput() != `cancel)
+ {
+ enabled = !enabled;
+ UI::ChangeWidget(`id(`box), `Enabled, enabled);
+ }
+
+ UI::CloseDialog();
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-ycp-ui-bindings-2.16.47/examples/Events.ycp new/yast2-ycp-ui-bindings-2.17.2/examples/Events.ycp
--- old/yast2-ycp-ui-bindings-2.16.47/examples/Events.ycp 2008-05-16 12:33:48.000000000 +0200
+++ new/yast2-ycp-ui-bindings-2.17.2/examples/Events.ycp 2008-07-16 14:00:17.000000000 +0200
@@ -102,13 +102,13 @@
]
);
- term drink = `Table(`id(`drink), `opt(`notify, `immediate), `header( "Drink", "Contents" ),
+ term drink = `Table(`id(`drink), `opt(`notify, `immediate, `multiSelection), `header( "Drink", "Contents" ),
[
`item(`id(`coke), "Coca Cola", "Caffeine" ),
`item(`id(`sprite), "Sprite", "" ),
`item(`id(`water), "Mineral Water", "" ),
`item(`id(`beer), "Beer", "Alcohol" ),
- `item(`id(`beer), "Wine", "Alcohol" ),
+ `item(`id(`wine), "Wine", "Alcohol" ),
`item(`id(`coffee), "Coffee", "Caffeine" )
]
);
@@ -139,7 +139,8 @@
`item(`id(`doggie_bag ), "Order doggie bag" ),
`item(`id( "This is a dumb user who will click on everything. Nevermind." ),
"Order dog to eat the leftovers in the doggie bag" ),
- `item(`id(`cancel_order), "Cancel order" )
+ `item(`id(`cancel_order), "Cancel order" ),
+ `item(`id(`caffeine), "Give me caffeine" )
]
)
);
@@ -253,6 +254,10 @@
UI::ChangeWidget(`send_mafioso, `Value, nil );
UI::DumpWidgetTree();
}
+ else if ( event["ID"]:nil == `caffeine )
+ {
+ UI::ChangeWidget(`drink, `SelectedItems, [`coffee, `coke] );
+ }
else if ( event["ID"]:nil == `info )
{
UI::SetFocus(`bogus);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-ycp-ui-bindings-2.16.47/examples/MainDialog-popup.ycp new/yast2-ycp-ui-bindings-2.17.2/examples/MainDialog-popup.ycp
--- old/yast2-ycp-ui-bindings-2.16.47/examples/MainDialog-popup.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-ycp-ui-bindings-2.17.2/examples/MainDialog-popup.ycp 2008-05-27 17:18:26.000000000 +0200
@@ -0,0 +1,46 @@
+// Multiple Main Dialogs
+
+{
+ UI::OpenDialog(`opt(`defaultsize ),
+ `VBox(
+ `Heading( "Main Dialog" ),
+ `VStretch(),
+ `PushButton(`id(`doit1), "&Do Something" ),
+ `PushButton(`id(`doit2), "Do &More" ),
+ `PushButton(`id(`popup), "&Popup Main Dialog" ),
+ `VStretch(),
+ `Right(`PushButton(`id(`close), "&Close" ) )
+ )
+ );
+
+ while( true )
+ {
+ map event = UI::WaitForEvent();
+
+ y2milestone( "Got event: %1", event );
+
+ symbol widget = (symbol) event[ "ID" ]:`nil;
+
+ if ( widget == `close )
+ break;
+
+ if ( widget == `popup )
+ {
+ UI::OpenDialog(`opt(`defaultsize ),
+ `VBox(`id(`popupDialog),
+ `Heading("Popup Main Dialog"),
+ `VStretch(),
+ `PushButton(`id(`doit11), "&Do Something" ),
+ `PushButton(`id(`doit12), "Do &More" ),
+ `VStretch(),
+ `Right(`PushButton(`id(`popdown), "&Back" ) )
+ )
+ );
+ }
+
+ if ( widget == `popdown && UI::WidgetExists(`popupDialog) )
+ UI::CloseDialog();
+ }
+
+ UI::CloseDialog();
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-ycp-ui-bindings-2.16.47/examples/RichText1.ycp new/yast2-ycp-ui-bindings-2.17.2/examples/RichText1.ycp
--- old/yast2-ycp-ui-bindings-2.16.47/examples/RichText1.ycp 2004-01-22 18:01:50.000000000 +0100
+++ new/yast2-ycp-ui-bindings-2.17.2/examples/RichText1.ycp 2008-06-20 13:10:51.000000000 +0200
@@ -20,7 +20,7 @@
+ "<font color=blue> the </font>"
+ "<font color=red> UI. </font>"
+ "</p>"
- + "<p>The product name is automatically replaced by the UI."
+ + "<p>The product name is automatically replaced by the UI. "
+ "Use the special macro <b>&product;</b> for that."
+ "</p><p>"
+ "The current product name is <b>&product;</b>."
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-ycp-ui-bindings-2.16.47/examples/ShortcutConflict6.ycp new/yast2-ycp-ui-bindings-2.17.2/examples/ShortcutConflict6.ycp
--- old/yast2-ycp-ui-bindings-2.16.47/examples/ShortcutConflict6.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-ycp-ui-bindings-2.17.2/examples/ShortcutConflict6.ycp 2008-07-11 16:27:59.000000000 +0200
@@ -0,0 +1,19 @@
+{
+ // Demo for shortcut checking:
+ // Only exotic characters, not enough valid shortcut characters.
+
+ UI::OpenDialog(
+ `HBox(
+ `PushButton( "&§§" ),
+ `PushButton( "&???" ),
+ `PushButton( "?&??" ),
+ `PushButton( "&!!!" ),
+ `PushButton( "&***" ),
+ `PushButton( "&OK" )
+ )
+ );
+
+ UI::UserInput();
+ UI::CloseDialog();
+}
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-ycp-ui-bindings-2.16.47/examples/Table6-multiSel.ycp new/yast2-ycp-ui-bindings-2.17.2/examples/Table6-multiSel.ycp
--- old/yast2-ycp-ui-bindings-2.16.47/examples/Table6-multiSel.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-ycp-ui-bindings-2.17.2/examples/Table6-multiSel.ycp 2008-07-16 14:33:01.000000000 +0200
@@ -0,0 +1,30 @@
+{
+ UI::OpenDialog(
+ `VBox(
+ `Heading("Today's menu"),
+ `MinSize( 30, 10,
+ `Table(`id(`menu),
+ `opt(`multiSelection),
+ `header("Name", "Price"),
+ [
+ `item(`id(1), "Chili", 6),
+ `item(`id(2), "Salami Baguette", nil),
+ `item(`id(3), "Spaghetti", 8),
+ `item(`id(4), "Steak Sandwich", 12)
+ ]
+ )
+ ),
+ `PushButton("&OK")
+ )
+ );
+
+ UI::ChangeWidget(`menu, `SelectedItems, [ 1, 2 ]);
+
+ UI::UserInput();
+
+ any sel = UI::QueryWidget(`menu, `SelectedItems);
+ UI::CloseDialog();
+
+ y2milestone( "Selected: %1", sel );
+}
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-ycp-ui-bindings-2.16.47/examples/Wizard-popup.ycp new/yast2-ycp-ui-bindings-2.17.2/examples/Wizard-popup.ycp
--- old/yast2-ycp-ui-bindings-2.16.47/examples/Wizard-popup.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-ycp-ui-bindings-2.17.2/examples/Wizard-popup.ycp 2008-05-27 17:12:44.000000000 +0200
@@ -0,0 +1,81 @@
+// Example of using the Wizard widget.
+//
+// Note: YCP applications are discouraged from using the Wizard widget directly.
+// Use the Wizard module instead.
+
+{
+ if ( ! UI::HasSpecialWidget(`Wizard) )
+ {
+ y2error( "This works only with UIs that provide the wizard widget!" );
+ return;
+ }
+
+ string help_text =
+ "<p>This is a help text.</p>"
+ + "<p>It should be helpful.</p>"
+ + "<p>If it isn't helpful, it should rather not be called a <i>help text</i>.</p>";
+
+ UI::OpenDialog(`opt(`defaultsize ),
+ `Wizard(`opt(`stepsEnabled),
+ `back, "&Back",
+ `abort, "Ab&ort",
+ `next, "&Next" ) );
+
+ // UI::DumpWidgetTree();
+
+ UI::WizardCommand(`SetDialogIcon( "/usr/share/YaST2/theme/current/icons/22x22/apps/YaST.png" ) );
+ UI::WizardCommand(`SetDialogHeading( "Wizard with Pop-up Wizard" ) );
+ UI::WizardCommand(`SetHelpText( help_text ) );
+
+ UI::WizardCommand(`AddStepHeading( "Steps" ) );
+ UI::WizardCommand(`AddStep( "Step 1", "step1" ) );
+ UI::WizardCommand(`AddStep( "Step 2", "step2" ) );
+ UI::WizardCommand(`AddStep( "Step 3", "step3" ) );
+
+ UI::WizardCommand(`UpdateSteps() );
+
+ UI::ReplaceWidget( `contents,
+ `VBox(
+ `PushButton(`id(`doit1), "&Do Something" ),
+ `PushButton(`id(`doit2), "Do &More" ),
+ `PushButton(`id(`popup), "Popup &Wizard" )
+ )
+ );
+
+ UI::WizardCommand(`SetCurrentStep( "step1" ) );
+
+
+ while( true )
+ {
+ map event = UI::WaitForEvent();
+
+ y2milestone( "Got event: %1", event );
+
+ symbol widget = (symbol) event[ "ID" ]:`nil;
+
+ if ( widget == `abort )
+ break;
+
+ if ( widget == `popup )
+ {
+ UI::OpenDialog(`opt(`defaultsize ),
+ `Wizard(`bla, "",
+ `popdown, "&Cancel",
+ `accept, "&Acce&pt" ) );
+
+ UI::ReplaceWidget( `contents,
+ `VBox(`id(`popupWizard),
+ `Heading("Popup Wizard"),
+ `VSpacing(2),
+ `PushButton(`id(`doit11), "&Do Something" ),
+ `PushButton(`id(`doit12), "Do &More" )
+ )
+ );
+ }
+
+ if ( widget == `popdown && UI::WidgetExists(`popupWizard) )
+ UI::CloseDialog();
+ }
+
+ UI::CloseDialog();
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-ycp-ui-bindings-2.16.47/src/YCPDialogParser.cc new/yast2-ycp-ui-bindings-2.17.2/src/YCPDialogParser.cc
--- old/yast2-ycp-ui-bindings-2.16.47/src/YCPDialogParser.cc 2008-04-30 15:18:32.000000000 +0200
+++ new/yast2-ycp-ui-bindings-2.17.2/src/YCPDialogParser.cc 2008-07-15 17:53:12.000000000 +0200
@@ -1934,7 +1934,6 @@
*
* Note: The Qt version of the Wizard widget also provides a built-in tree with
* an API that is (sometimes) easier to use.
- *
**/
YWidget *
@@ -1989,13 +1988,17 @@
* @optarg list items the items contained in the selection box
* @option immediate make `notify trigger immediately when the selected item changes
* @option keepSorting keep the insertion order - don't let the user sort manually by clicking
+ * @option multiSelection user can select multiple items (rows) at once (shift-click, ctrl-click)
* @usage `Table( `header( "Game", "Highscore" ), [ `item( `id(1), "xkobo", "1708" ) ] )
* @examples Table1.ycp Table2.ycp Table3.ycp Table4.ycp Table5.ycp
*
* @description
*
- * The Table widget is a selection list with multiple columns. The user can
- * select exactly one row (with all its columns) from that list.
+ * The Table widget is a selection list with multiple columns. By default, the user can
+ * select exactly one row (with all its columns) from that list. With
+ * `opt(`multiSelection), the user can select one or more rows (with all their
+ * columns) from that list (In that case, use the `SelectedItems property, not
+ * `Value).
*
* Each cell (each column within each row) has a label text and an optional
* icon.
@@ -2077,17 +2080,19 @@
bool immediate = false;
bool keepSorting = 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_keepSorting ) keepSorting = true;
+ 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_keepSorting ) keepSorting = true;
+ else if ( optList->value(o)->isSymbol() && optList->value(o)->asSymbol()->symbol() == YUIOpt_multiSelection ) multiSelection = true;
else logUnknownOption( term, optList->value(o) );
}
YCPTerm headerTerm = term->value( argnr )->asTerm();
- YTable * table = YUI::widgetFactory()->createTable( parent, parseTableHeader( headerTerm ) );
+ YTable * table = YUI::widgetFactory()->createTable( parent, parseTableHeader( headerTerm ), multiSelection );
if ( keepSorting )
table->setKeepSorting( true );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-ycp-ui-bindings-2.16.47/src/YCPPropertyHandler.cc new/yast2-ycp-ui-bindings-2.17.2/src/YCPPropertyHandler.cc
--- old/yast2-ycp-ui-bindings-2.16.47/src/YCPPropertyHandler.cc 2008-04-18 17:19:05.000000000 +0200
+++ new/yast2-ycp-ui-bindings-2.17.2/src/YCPPropertyHandler.cc 2008-07-16 13:00:14.000000000 +0200
@@ -116,6 +116,7 @@
else if ( propertyName == YUIProperty_SelectedItems )
{
if ( trySetMultiSelectionBoxSelectedItems( widget, val ) ) return true;
+ if ( trySetTableSelectedItems( widget, val ) ) return true;
}
y2error( "Can't handle property %s::%s - not changing anything",
@@ -184,6 +185,7 @@
else if ( propertyName == YUIProperty_SelectedItems )
{
val = tryGetMultiSelectionBoxSelectedItems( widget ); if ( ! val.isNull() ) return val;
+ val = tryGetTableSelectedItems( widget ); if ( ! val.isNull() ) return val;
}
else if ( propertyName == YUIProperty_OpenItems )
{
@@ -604,12 +606,12 @@
}
-bool
-YCPPropertyHandler::trySetMultiSelectionBoxSelectedItems( YWidget * widget, const YCPValue & val )
+template
+bool trySetSelectionWidgetSelectedItems( YWidget * widget, const YCPValue & val )
{
- YMultiSelectionBox * multiSelBox = dynamic_cast (widget);
+ Widget_t * selWidget = dynamic_cast (widget);
- if ( ! multiSelBox )
+ if ( ! selWidget )
return false;
if ( ! val->isList() )
@@ -623,22 +625,22 @@
YCPList itemIdList = val->asList();
- multiSelBox->deselectAllItems();
+ selWidget->deselectAllItems();
for ( int i=0; i < itemIdList.size(); i++ )
{
- YCPItem * item = findItem<YCPItem>( multiSelBox, itemIdList->value( i ) );
+ Item_t * item = findItem( selWidget, itemIdList->value( i ) );
if ( ! item )
{
y2error( "%s \"%s\" has no item with ID %s",
- multiSelBox->widgetClass(),
- multiSelBox->debugLabel().c_str(),
+ selWidget->widgetClass(),
+ selWidget->debugLabel().c_str(),
itemIdList->value(i)->toString().c_str() );
}
else
{
- multiSelBox->selectItem( item );
+ selWidget->selectItem( item );
}
}
@@ -647,6 +649,20 @@
bool
+YCPPropertyHandler::trySetMultiSelectionBoxSelectedItems( YWidget * widget, const YCPValue & val )
+{
+ return trySetSelectionWidgetSelectedItems( widget, val );
+}
+
+
+bool
+YCPPropertyHandler::trySetTableSelectedItems( YWidget * widget, const YCPValue & val )
+{
+ return trySetSelectionWidgetSelectedItems( widget, val );
+}
+
+
+bool
YCPPropertyHandler::trySetMultiSelectionBoxCurrentItem( YWidget * widget, const YCPValue & val )
{
YMultiSelectionBox * multiSelBox = dynamic_cast (widget);
@@ -819,7 +835,8 @@
}
-template YCPValue tryGetSelectionWidgetValue( YWidget * widget )
+template
+YCPValue tryGetSelectionWidgetValue( YWidget * widget )
{
Widget_t * selWidget = dynamic_cast (widget);
@@ -920,29 +937,29 @@
}
-YCPValue
-YCPPropertyHandler::tryGetMultiSelectionBoxSelectedItems( YWidget * widget )
+template
+YCPValue tryGetSelectionWidgetSelectedItems( YWidget * widget )
{
- YMultiSelectionBox * multiSelBox = dynamic_cast (widget);
+ Widget_t * selWidget = dynamic_cast (widget);
- if ( ! multiSelBox )
+ if ( ! selWidget )
return YCPNull();
YCPList selectedItemsList;
- YItemCollection selectedItems = multiSelBox->selectedItems();
+ YItemCollection selectedItems = selWidget->selectedItems();
for ( YItemIterator it = selectedItems.begin();
it != selectedItems.end();
++it )
{
- const YCPItem * item = dynamic_cast (*it);
+ const Item_t * item = dynamic_cast (*it);
if ( item )
{
if ( item->hasId() )
selectedItemsList->add( item->id() );
else
- y2error( "Item has no ID: %s", item->label()->value().c_str() );
+ y2error( "Item has no ID: %s", (*it)->label().c_str() );
}
else
y2error( "Wrong item type (not a YCPItem): %s", (*it)->label().c_str() );
@@ -953,6 +970,20 @@
YCPValue
+YCPPropertyHandler::tryGetMultiSelectionBoxSelectedItems( YWidget * widget )
+{
+ return tryGetSelectionWidgetSelectedItems( widget );
+}
+
+
+YCPValue
+YCPPropertyHandler::tryGetTableSelectedItems( YWidget * widget )
+{
+ return tryGetSelectionWidgetSelectedItems( widget );
+}
+
+
+YCPValue
YCPPropertyHandler::tryGetMultiSelectionBoxCurrentItem( YWidget * widget )
{
YMultiSelectionBox * multiSelBox = dynamic_cast (widget);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-ycp-ui-bindings-2.16.47/src/YCPPropertyHandler.h new/yast2-ycp-ui-bindings-2.17.2/src/YCPPropertyHandler.h
--- old/yast2-ycp-ui-bindings-2.16.47/src/YCPPropertyHandler.h 2008-02-11 19:25:50.000000000 +0100
+++ new/yast2-ycp-ui-bindings-2.17.2/src/YCPPropertyHandler.h 2008-07-15 18:10:08.000000000 +0200
@@ -105,6 +105,7 @@
static bool trySetSelectionWidgetItems ( YWidget * widget, const YCPValue & val );
static bool trySetRadioButtonGroupCurrentButton ( YWidget * widget, const YCPValue & val );
static bool trySetMultiSelectionBoxSelectedItems ( YWidget * widget, const YCPValue & val );
+ static bool trySetTableSelectedItems ( YWidget * widget, const YCPValue & val );
static bool trySetMultiSelectionBoxCurrentItem ( YWidget * widget, const YCPValue & val );
static bool trySetMultiProgressMeterValues ( YWidget * widget, const YCPValue & val );
static bool trySetBarGraphValues ( YWidget * widget, const YCPValue & val );
@@ -124,6 +125,7 @@
static YCPValue tryGetComboBoxValue ( YWidget * widget );
static YCPValue tryGetRadioButtonGroupCurrentButton ( YWidget * widget );
static YCPValue tryGetMultiSelectionBoxSelectedItems( YWidget * widget );
+ static YCPValue tryGetTableSelectedItems ( YWidget * widget );
static YCPValue tryGetMultiSelectionBoxCurrentItem ( YWidget * widget );
static YCPValue tryGetTreeOpenItems ( YWidget * widget );
static YCPValue tryGetTreeCurrentBranch ( YWidget * widget );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-ycp-ui-bindings-2.16.47/VERSION new/yast2-ycp-ui-bindings-2.17.2/VERSION
--- old/yast2-ycp-ui-bindings-2.16.47/VERSION 2008-05-16 12:33:48.000000000 +0200
+++ new/yast2-ycp-ui-bindings-2.17.2/VERSION 2008-07-15 17:46:53.000000000 +0200
@@ -1 +1 @@
-2.16.47
+2.17.2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org