From tgoettlicher@svn.opensuse.org Wed Nov 25 16:39:19 2009 From: tgoettlicher@svn.opensuse.org To: yast-commit@lists.opensuse.org Subject: [yast-commit] r59763 - in /branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings: ./ examples/ package/ src/ Date: Wed, 25 Nov 2009 16:39:28 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4535664429373565403==" --===============4535664429373565403== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: tgoettlicher Date: Wed Nov 25 17:39:28 2009 New Revision: 59763 URL: http://svn.opensuse.org/viewcvs/yast?rev=3D59763&view=3Drev Log: updated to latest version Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/MAINTAINER branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/VERSION branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/Events.ycp branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/IconButton1.ycp branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/RichText3.ycp branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/Tree-icons.ycp branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/Tree1.ycp branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/package/yast2-ycp-ui-bin= dings.changes branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCPDialogParser.cc branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCPDialogParser.h branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCPTreeItemParser.cc branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCP_UI.cc branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCP_UI.h branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YUINamespace.cc branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YUINamespace.h branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YWidgetOpt.h branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/yast2-ycp-ui-bindings.sp= ec.in Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/MAINTAINER URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc= p-ui-bindings/MAINTAINER?rev=3D59763&r1=3D59762&r2=3D59763&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/MAINTAINER (original) +++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/MAINTAINER Wed Nov 25 17= :39:28 2009 @@ -1 +1 @@ -Stefan Hundhammer +Thomas Goettlicher Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc= p-ui-bindings/VERSION?rev=3D59763&r1=3D59762&r2=3D59763&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/VERSION (original) +++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/VERSION Wed Nov 25 17:39= :28 2009 @@ -1 +1 @@ -2.17.11 +2.18.5 Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/Events.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc= p-ui-bindings/examples/Events.ycp?rev=3D59763&r1=3D59762&r2=3D59763&view=3Ddi= ff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/Events.ycp (ori= ginal) +++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/Events.ycp Wed = Nov 25 17:39:28 2009 @@ -42,7 +42,7 @@ "chef de cuisine Giuseppe.

= "; =20 =20 - term delivery =3D `Tree(`id(`delivery_service ), `opt(`notify), "&Delive= ry Service", + term delivery =3D `Tree(`id(`delivery_service ), `opt(`notify, `notifyCo= ntextMenu), "&Delivery Service", [ `item(`id(`europe), "Europe", true, [ @@ -81,7 +81,7 @@ ] ); =20 - term pizza =3D `SelectionBox(`id(`pizza), `opt(`notify,`immediate), "Pi= &zza", + term pizza =3D `SelectionBox(`id(`pizza), `opt(`notify,`immediate, `not= ifyContextMenu), "Pi&zza", [ `item(`id(`napoli ), "Napoli" ), `item(`id(`funghi ), "Funghi" ), @@ -92,7 +92,7 @@ ] ); =20 - term toppings =3D `MultiSelectionBox(`id(`toppings), `opt(`notify), "To&= ppings", + term toppings =3D `MultiSelectionBox(`id(`toppings), `opt(`notify, `noti= fyContextMenu), "To&ppings", [ `item( `id(`cheese ), "Cheese" , true ), `item( `id(`tomatoes ), "Tomatoes" , true ), @@ -103,7 +103,7 @@ ] ); =20 - term drink =3D `Table(`id(`drink), `opt(`notify, `immediate, `multiSele= ction), `header( "Drink", "Contents" ), + term drink =3D `Table(`id(`drink), `opt(`notify, `immediate, `multiSele= ction, `notifyContextMenu), `header( "Drink", "Contents" ), [ `item(`id(`coke), "Coca Cola", "Caffeine" ), `item(`id(`sprite), "Sprite", "" ), Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/IconButto= n1.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc= p-ui-bindings/examples/IconButton1.ycp?rev=3D59763&r1=3D59762&r2=3D59763&view= =3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/IconButton1.ycp= (original) +++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/IconButton1.ycp= Wed Nov 25 17:39:28 2009 @@ -1,12 +1,30 @@ +// PushButton with icons (relative path) { - // Build a dialog with one icon button. - // Wait until that button is clicked, - // then close the dialog and terminate. + UI::OpenDialog ( + `VBox ( + `Heading( "YaST2 Mini Control Center" ), + `IconButton (`id ("keyboard "), "yast-keyboard.png", "Keyboard"), + `IconButton (`id ("mouse" ), "yast-mouse.png", "Mouse"), + `IconButton (`id ("timezone" ), "yast-timezone.png", "Time zone"), + `IconButton (`id ("lan" ), "yast-lan.png", "Network"), + `IconButton (`id ("sw_single"), "yast-software.png", "Software") + ) + ); =20 - UI::OpenDialog( - `IconButton( "icons/22x22/apps/yast-users.png", "&OK" ) - ); + any ret =3D nil; =20 - UI::UserInput(); - UI::CloseDialog(); + do + { + ret =3D UI::UserInput(); + + if (ret !=3D `cancel) + { + UI::OpenDialog (`Label ("Running " + (string) ret + "...")); + sleep (4000); + UI::CloseDialog(); + } + + } while ( ret !=3D `cancel); + + UI::CloseDialog(); } Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/RichText3= .ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc= p-ui-bindings/examples/RichText3.ycp?rev=3D59763&r1=3D59762&r2=3D59763&view= =3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/RichText3.ycp (= original) +++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/RichText3.ycp W= ed Nov 25 17:39:28 2009 @@ -3,13 +3,16 @@ UI::OpenDialog( `opt(`defaultsize), `VBox( `RichText( "

RichText example

" - + "

This is a RichText widget. The ncurses UI wraps lines auto= matically - Qt breaks lines and uses a vertical scroll bar.

" + + "

This is a RichText widget. Lines are wrapped automatically= , this is a very very very very long long long long long long line .

" + "

It's very much like HTML, but not quite as powerful.

" + "

Text in pre tags preserves newlines and spaces.

" + "
"
+                 + "\n"
 				 + "     host     ip adress       host     ip adress\n"
-				 + "     sturm    10.10.0.159     sturm    10.10.0.159\n"
-				 + "Lines are not wrapped; in text mode HTML tags are not removed=
 if the pre tag is used.\n"
+				 + "     sturm    10.10.0.159     sturm    10.10.0.159\n\n"
+				 + "Lines are not wrapped; in text mode HTML tags are not removed=
 if the pre tag is used, "
+                 + "but entities like product: &product; are filtered and sh=
own correctly.\n"
+                 + "\n"
 				 + "
" + "

After /pre the text is HTML text like before.=

" + "

Much much more text .............. continous" @@ -17,9 +20,9 @@ + " much much more text .................

" + "

" + "

another    pre      t	t	
" - + "and much more text hopefully now displayed correctly" + + "and much more text after pre is closed, now HTML text " + "

" - + "
"
+                 + "
"
 				 + "     host     ip adress       host     ip adress\n"
 				 + "     sturm    10.10.0.159     sturm    10.10.0.159\n"
 				 + "Lines are not wrapped; in text mode HTML tags are not removed=
 if the pre tag is used.\n"

Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/Tree-icon=
s.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc=
p-ui-bindings/examples/Tree-icons.ycp?rev=3D59763&r1=3D59762&r2=3D59763&view=
=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/Tree-icons.ycp =
(original)
+++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/Tree-icons.ycp =
Wed Nov 25 17:39:28 2009
@@ -6,7 +6,7 @@
                      `Tree(`id(`mod),
 			   "Modules",
 			   [
-			    `item(`id( "country" ), `icon( "yast-yast-language.png" ), "Localizat=
ion", true,
+			    `item(`id( "country" ), `icon( "yast-language.png" ), "Localization",=
 true,
 				  [
 				   `item(`id( "keyboard"   ), `icon( "yast-keyboard.png"   ), "Keyboard"=
   ),
 				   `item(`id( "timezone"   ), `icon( "yast-timezone.png"   ), "Time zone=
"  )

Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/Tree1.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc=
p-ui-bindings/examples/Tree1.ycp?rev=3D59763&r1=3D59762&r2=3D59763&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/Tree1.ycp (orig=
inal)
+++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/examples/Tree1.ycp Wed N=
ov 25 17:39:28 2009
@@ -2,54 +2,55 @@
 {
     UI::OpenDialog(
 	       `VBox(
-		     `Tree(`id(`dest_dir),
-				   "Select destination directory:",
-				   [
-				    `item(`id(`root), "/" , true,
-					  [
-					   `item(`id(`etc), "etc",
-						 [
-						  `item("opt"),
-						  `item("SuSEconfig"),
-						  `item("X11")
-						 ]
-						 ),
-					   `item("usr", false,=20
-						 [
-						  "bin",
-						  "lib",
-						  `item("share",
-						       [
-							"man",
-							"info",
-							"emacs"
-							]
-						       ),
-						  `item(`id(`usr_local),"local"),
-						  `item("X11R6",
-							[
-							 "bin",
-							 "lib",
-							 "share",
-							 "man",
-							 "etc"
-							 ]
-							)
-						  ]
-						 ),
-					   `item(`id(`opt), "opt", true,
-						 [
-						  "kde",
-						  "netscape",
-						  "Office51"
-						  ]
-						 ),
-					   `item("home"),
-					   "work",
-					   `item(`id(`other), "")
-					   ]
-					  )
-				   ] ),
+		     `MinSize( 30, 10,
+			       `Tree(`id(`dest_dir),
+				     "Select destination directory:",
+				     [
+				      `item(`id(`root), "/" , false,
+					    [
+					     `item(`id(`etc), "etc",
+						   [
+						    `item("opt"),
+						    `item("SuSEconfig"),
+						    `item("X11")
+						    ]
+						   ),
+					     `item("usr", false,=20
+						   [
+						    "bin",
+						    "lib",
+						    `item("share",
+							  [
+							   "man",
+							   "info",
+							   "emacs"
+							   ]
+							  ),
+						    `item(`id(`usr_local),"local"),
+						    `item("X11R6",
+							  [
+							   "bin",
+							   "lib",
+							   "share",
+							   "man",
+							   "etc"
+							   ]
+							  )
+						    ]
+						   ),
+					     `item(`id(`opt), "opt", false,
+						   [
+						    "kde",
+						    "netscape",
+						    "Office51"
+						    ]
+						   ),
+					     `item("home", false),
+					     `item(`id(`other), "")
+					     ]
+					    )
+				      ] )
+			       ),
 		     `HBox(
 			   `PushButton(`id(`sel_opt),		`opt(`hstretch), "/&opt" ),
 			   `PushButton(`id(`sel_usr),		`opt(`hstretch), "/&usr" ),

Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/package/yast2-ycp-=
ui-bindings.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc=
p-ui-bindings/package/yast2-ycp-ui-bindings.changes?rev=3D59763&r1=3D59762&r2=
=3D59763&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/package/yast2-ycp-ui-bin=
dings.changes (original)
+++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/package/yast2-ycp-ui-bin=
dings.changes Wed Nov 25 17:39:28 2009
@@ -1,4 +1,29 @@
 -------------------------------------------------------------------
+Wed Mar 11 16:08:18 CET 2009 - kmachalkova(a)suse.cz
+
+- Do not abort in DumpWidgetTree function if there is no dialog=20
+  on the stack (log warning instead)
+- V 2.18.5 =20
+
+-------------------------------------------------------------------
+Fri Mar  6 10:32:32 CET 2009 - tgoettlicher(a)suse.de
+
+- Added context menus
+- V 2.18.4
+
+-------------------------------------------------------------------
+Mon Feb  9 11:52:05 CET 2009 - sh(a)suse.de
+
+- Require latest libyui in spec file (API change)
+- V 2.18.3=20
+
+-------------------------------------------------------------------
+Wed Jan 14 16:25:57 CET 2009 - aschnell(a)suse.de
+
+- added graph widget
+- V 2.18.2
+
+-------------------------------------------------------------------
 Wed Oct 15 15:12:38 CEST 2008 - sh(a)suse.de
=20
 - Added `opt(`confirmUnsupported) for PackageSelector widget

Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCPDialogParse=
r.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc=
p-ui-bindings/src/YCPDialogParser.cc?rev=3D59763&r1=3D59762&r2=3D59763&view=
=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCPDialogParser.cc (=
original)
+++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCPDialogParser.cc W=
ed Nov 25 17:39:28 2009
@@ -89,6 +89,7 @@
 #include "YTree.h"
 #include "YWizard.h"
 #include "YTimezoneSelector.h"
+#include "YGraph.h"
 #include "YBusyIndicator.h"
=20
 using std::string;
@@ -143,6 +144,11 @@
      *				( if `opt( `notify ) is set for that SelectionBox ).
      *				Only widgets with this option set are affected.
      *
+     * @option	notifyContextMenu Make this widget to send an event when the =
context menu is requested
+     *				e.g. when the user clicks right mouse button
+     *				( if `opt( `notifyContextMenu ) is set for that SelectionBox ).
+     *				Only widgets with this option set are affected.
+     *
      * @option	disabled	Set this widget insensitive, i.e. disable any user i=
nteraction.
      *				The widget will show this state by being greyed out
      *				(depending on the specific UI).
@@ -190,6 +196,7 @@
 	{
 	    string sym =3D rawopt->value(o)->asSymbol()->symbol();
 	    if	    ( sym =3D=3D YUIOpt_notify	) opt.notifyMode.setValue( true );
+	    else if ( sym =3D=3D YUIOpt_notifyContextMenu) opt.notifyContextMenu.se=
tValue( true );
 	    else if ( sym =3D=3D YUIOpt_disabled	) opt.isDisabled.setValue( true );
 	    else if ( sym =3D=3D YUIOpt_hstretch	) opt.isHStretchable.setValue( tru=
e );
 	    else if ( sym =3D=3D YUIOpt_vstretch	) opt.isVStretchable.setValue( tru=
e );
@@ -312,6 +319,7 @@
     else if ( s =3D=3D YUISpecialWidget_TimeField		)	w =3D parseTimeField		(=
 p, opt, term, ol, n );
     else if ( s =3D=3D YUISpecialWidget_Wizard		)	w =3D parseWizard			( p, o=
pt, term, ol, n );
     else if ( s =3D=3D YUISpecialWidget_TimezoneSelector	)	w =3D parseTimezo=
neSelector	( p, opt, term, ol, n );
+    else if ( s =3D=3D YUISpecialWidget_Graph		)	w =3D parseGraph			( p, opt=
, term, ol, n );
     else
     {
 	YUI_THROW( YUIException( string( "Unknown widget type " ) + s.c_str() ) );
@@ -343,6 +351,7 @@
=20
 	if ( opt.isDisabled.value() 	)	w->setDisabled();
 	if ( opt.notifyMode.value() 	)	w->setNotify( true );
+	if ( opt.notifyContextMenu.value())	w->setNotifyContextMenu( true );
 	if ( opt.keyEvents.value()	)	w->setSendKeyEvents( true );
 	if ( opt.autoShortcut.value()	)	w->setAutoShortcut( true );
 	if ( opt.isHStretchable.value()	)	w->setStretchable( YD_HORIZ, true );
@@ -1419,7 +1428,7 @@
 	    if	    ( sym =3D=3D YUIOpt_default    	)	isDefaultButton =3D true;
 	    else if ( sym =3D=3D YUIOpt_okButton	)	role =3D YOKButton;
 	    else if ( sym =3D=3D YUIOpt_cancelButton)	role =3D YCancelButton;
-	    else if ( sym =3D=3D YUIOpt_cancelButton)	role =3D YApplyButton;
+	    else if ( sym =3D=3D YUIOpt_applyButton)	role =3D YApplyButton;
 	    else if ( sym =3D=3D YUIOpt_helpButton 	)	role =3D YHelpButton;
 	    else if ( sym =3D=3D YUIOpt_customButton)	opt.customButton.setValue( tr=
ue );
 	    else logUnknownOption( term, optList->value(o) );
@@ -3451,7 +3460,6 @@
 YCPDialogParser::parseTimezoneSelector( YWidget * parent, YWidgetOpt & opt,
                                         const YCPTerm & term, const YCPList =
& optList, int argnr )
 {
-
     if ( term->size() - argnr !=3D 2
 	 || !term->value(argnr)->isString()
          || !term->value(argnr+1)->isMap() )
@@ -3472,6 +3480,43 @@
     return selector;
 }
=20
+
+/**
+ * @widgets	Graph
+ * @short	graph
+ * @class	YGraph
+ *
+ * @usage	if ( HasSpecialWidget( `Graph ) {...
+ * 		    `Graph( "graph.dot", "dot" )
+ *
+ * @description
+ * An graph
+ *
+ * @note This is a "special" widget, i.e. not all UIs necessarily support it=
.  Check
+ * for availability with HasSpecialWidget(`Graph) before using it.
+ **/
+YWidget *
+YCPDialogParser::parseGraph( YWidget * parent, YWidgetOpt & opt,
+			     const YCPTerm & term, const YCPList & optList, int argnr )
+{
+    if ( term->size() - argnr !=3D 2
+	 || !term->value(argnr)->isString()
+	 || !term->value(argnr+1)->isString() )
+    {
+	THROW_BAD_ARGS( term );
+    }
+
+    rejectAllOptions( term, optList );
+
+    string filename =3D term->value( argnr )->asString()->value();
+    string layoutAlgorithm =3D term->value( argnr+1 )->asString()->value();
+
+    YGraph * graph =3D YUI::optionalWidgetFactory()->createGraph( parent, fi=
lename, layoutAlgorithm );
+
+    return graph;
+}
+
+
 /**
  * @widget	BusyIndicator
  * @short	Graphical busy indicator

Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCPDialogParse=
r.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc=
p-ui-bindings/src/YCPDialogParser.h?rev=3D59763&r1=3D59762&r2=3D59763&view=3D=
diff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCPDialogParser.h (o=
riginal)
+++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCPDialogParser.h We=
d Nov 25 17:39:28 2009
@@ -272,6 +272,9 @@
     static YWidget * parseTimezoneSelector ( YWidget *parent, YWidgetOpt & o=
pt, const YCPTerm & term,
 					     const YCPList & optList, int argnr );
=20
+    static YWidget * parseGraph ( YWidget *parent, YWidgetOpt & opt, const Y=
CPTerm & term,
+				  const YCPList & optList, int argnr );
+
     static YWidget * parseBusyIndicator( YWidget *parent, YWidgetOpt & opt,
 				       const YCPTerm & term, const YCPList & optList, int argnr );
     /**

Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCPTreeItemPar=
ser.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc=
p-ui-bindings/src/YCPTreeItemParser.cc?rev=3D59763&r1=3D59762&r2=3D59763&view=
=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCPTreeItemParser.cc=
 (original)
+++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCPTreeItemParser.cc=
 Wed Nov 25 17:39:28 2009
@@ -85,7 +85,7 @@
 	item =3D new YCPTreeItem( parent,
 			        label,		// The real label
 				label,		// Use the label as ID, too
-				false );	// Not initially selected
+				false );	// Not initially open
     }
     else				// `item(...)
     {

Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCP_UI.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc=
p-ui-bindings/src/YCP_UI.cc?rev=3D59763&r1=3D59762&r2=3D59763&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCP_UI.cc (original)
+++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCP_UI.cc Wed Nov 25=
 17:39:28 2009
@@ -43,6 +43,7 @@
 #include "YCPItemParser.h"
 #include "YCPMacroPlayer.h"
 #include "YCPMacroRecorder.h"
+#include "YCPMenuItemParser.h"
 #include "YCPPropertyHandler.h"
 #include "YCPValueWidgetID.h"
 #include "YCPWizardCommandParser.h"
@@ -99,6 +100,8 @@
     else if ( symbol =3D=3D YUISpecialWidget_Date			)	hasWidget =3D fact->ha=
sDateField();
     else if ( symbol =3D=3D YUISpecialWidget_Time			)	hasWidget =3D fact->ha=
sTimeField();
     else if ( symbol =3D=3D YUISpecialWidget_TimezoneSelector	)	hasWidget =
=3D fact->hasTimezoneSelector();
+    else if ( symbol =3D=3D YUISpecialWidget_Graph			)	hasWidget =3D fact->h=
asGraph();
+    else if ( symbol =3D=3D YUISpecialWidget_ContextMenu		)	hasWidget =3D fa=
ct->hasContextMenu();
     else
     {
 	yuiError() << "HasSpecialWidget(): Unknown special widget: " << symbol << e=
ndl;
@@ -542,6 +545,7 @@
 		    else if ( optList->value(o)->asSymbol()->symbol() =3D=3D YUIOpt_warnco=
lor )	colorMode  =3D YDialogWarnColor;
 		    else if ( optList->value(o)->asSymbol()->symbol() =3D=3D YUIOpt_decora=
ted ) 	{} // obsolete
 		    else if ( optList->value(o)->asSymbol()->symbol() =3D=3D YUIOpt_center=
ed  )	{} // obsolete
+
 		    else
 			yuiWarning() << "Unknown option " << opts->value(o) << " for OpenDialog" =
<< endl;
 		}
@@ -1059,7 +1063,15 @@
=20
 void YCP_UI::DumpWidgetTree()
 {
-    YDialog::currentDialog()->dumpDialogWidgetTree();
+    // Do not abort() the whole thing just because some sloppy
+    // YCP client does not know how to close dialogs (#483942)
+    // After all, this is a debugging function
+    YDialog *currentDialog =3D YDialog::currentDialog(false);
+
+    if (currentDialog)=20
+        currentDialog->dumpDialogWidgetTree();
+    else
+	yuiWarning() << "No dialog exists :( Nothing to dump." << endl;
 }
=20
 /**
@@ -1584,5 +1596,35 @@
=20
=20
=20
+/**
+* @description
+* Opens a context menu when the users right clickes a widget=20
+*=20
+*=20
+* Example: OpenContextMenu( `menu(
+* [ `item(`id(`folder), "&Entry1"  ),
+* `menu( "&Submenu1",
+* [ `item(`id(`text),
+* "&Entry2" ),
+* `item(`id(`image),
+* "&Entry3"     ) ]) ]  )); 
+*
+* @param itemList list of menu items
+* @return bool  Returns true when the context menu was shown, on error=20
+                (e.g. not supported by ui) false is returned.
+               =20
+*/
+YCPBoolean YCP_UI::OpenContextMenu ( const YCPTerm & term )
+{
+    YCPList itemList =3D term->value(0)->asList();
+=20
+    if ( YUI::app()->openContextMenu( YCPMenuItemParser::parseMenuItemList( =
itemList ) ) )
+	return YCPBoolean( true );
+    else
+	return YCPBoolean( false );
+}
+=20
+
+
=20
 // EOF

Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCP_UI.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc=
p-ui-bindings/src/YCP_UI.h?rev=3D59763&r1=3D59762&r2=3D59763&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCP_UI.h (original)
+++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YCP_UI.h Wed Nov 25 =
17:39:28 2009
@@ -56,6 +56,7 @@
     static YCPValue 	HasSpecialWidget		( const YCPSymbol & widget );
     static void 	MakeScreenShot			( const YCPString & filename );
     static void 	NormalCursor			();
+    static YCPBoolean 	OpenContextMenu			( const YCPTerm & term );
     static YCPBoolean 	OpenDialog			( const YCPTerm & opts, const YCPTerm & =
dialogTerm );
     static void 	PlayMacro			( const YCPString & filename );
     static void 	PostponeShortcutCheck		();

Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YUINamespace.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc=
p-ui-bindings/src/YUINamespace.cc?rev=3D59763&r1=3D59762&r2=3D59763&view=3Ddi=
ff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YUINamespace.cc (ori=
ginal)
+++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YUINamespace.cc Wed =
Nov 25 17:39:28 2009
@@ -215,6 +215,16 @@
 	return YCPVoid();
 }
=20
+YCPBoolean
+YUINamespace::OpenContextMenu( const YCPTerm & term )
+{
+    if ( YUIComponent::ui() )
+	return YCP_UI::OpenContextMenu( term );
+    else
+	return YCPBoolean( false );
+}
+
+
=20
 YCPValue
 YUINamespace::ChangeWidget( const YCPTerm & widget_id, const YCPSymbol & pro=
perty, const YCPValue & new_value )

Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YUINamespace.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc=
p-ui-bindings/src/YUINamespace.h?rev=3D59763&r1=3D59762&r2=3D59763&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YUINamespace.h (orig=
inal)
+++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YUINamespace.h Wed N=
ov 25 17:39:28 2009
@@ -300,6 +300,9 @@
     /* TYPEINFO: boolean () */
     YCPBoolean TextMode();
=20
+    /* TYPEINFO: boolean (term) */=09
+    YCPBoolean OpenContextMenu( const YCPTerm & term );
+
=20
    =20
     YCPValue

Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YWidgetOpt.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc=
p-ui-bindings/src/YWidgetOpt.h?rev=3D59763&r1=3D59762&r2=3D59763&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YWidgetOpt.h (origin=
al)
+++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/src/YWidgetOpt.h Wed Nov=
 25 17:39:28 2009
@@ -120,6 +120,7 @@
=20
     YBoolOpt isDisabled;
     YBoolOpt notifyMode;
+    YBoolOpt notifyContextMenu;
     YBoolOpt isHStretchable;
     YBoolOpt isVStretchable;
     YBoolOpt autoShortcut;

Modified: branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/yast2-ycp-ui-bindi=
ngs.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yc=
p-ui-bindings/yast2-ycp-ui-bindings.spec.in?rev=3D59763&r1=3D59762&r2=3D59763=
&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/yast2-ycp-ui-bindings.sp=
ec.in (original)
+++ branches/SuSE-Code-11-SP1-Branch/ycp-ui-bindings/yast2-ycp-ui-bindings.sp=
ec.in Wed Nov 25 17:39:28 2009
@@ -2,6 +2,8 @@
=20
=20
 @HEADER@
+Group:	System/YaST
+License: GPL v2 or later
=20
=20
 BuildRequires:	gcc-c++
@@ -19,21 +21,23 @@
 # libycp includes crypto built-ins
 BuildRequires:  libxcrypt-devel
=20
-Requires:	yast2-libyui	   >=3D 2.17.14
-BuildRequires:	yast2-libyui-devel >=3D 2.17.14
+Requires:	yast2-libyui	   >=3D 2.18.7
+BuildRequires:	yast2-libyui-devel >=3D 2.18.7
=20
 # libyui ImplPtr
 BuildRequires:	boost-devel
=20
=20
-Summary:	-
+Summary:	YaST2 - YCP Bindings for the YaST2 User Interface Engine
 Provides:	@plugindir@/libpy2UI.so.2.0.0
=20
 %description
--
+This package makes the generic YaST2 user interface engine available
+for YCP applications (YCP is the scripting language in which most YaST2
+modules are written).
=20
 @HEADER-DEVEL@
-Summary:	-
+Summary:	YaST2 - YCP Bindings for the YaST2 User Interface Engine
=20
 Requires:	glibc-devel
 Requires:	libstdc++-devel
@@ -44,8 +48,9 @@
 Requires:	yast2-devtools
=20
 %description devel
--
-
+This is the development package that makes the generic YaST2 user
+interface engine available for YCP applications (YCP is the scripting
+language in which most YaST2 modules are written).
=20
 @PREP@
=20

--=20
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org

--===============4535664429373565403==--