Mailinglist Archive: yast-commit (1339 mails)

< Previous Next >
[yast-commit] r46451 - in /trunk/yast2: library/wizard/src/Wizard.ycp package/yast2.changes
  • From: locilka@xxxxxxxxxxxxxxxx
  • Date: Fri, 11 Apr 2008 16:37:43 -0000
  • Message-id: <20080411163743.408892993B@xxxxxxxxxxxxxxxx>
Author: locilka
Date: Fri Apr 11 18:37:42 2008
New Revision: 46451

URL: http://svn.opensuse.org/viewcvs/yast?rev=46451&view=rev
Log:
- New Wizard::OpenOKDialog() (FATE #120373).


Modified:
trunk/yast2/library/wizard/src/Wizard.ycp
trunk/yast2/package/yast2.changes

Modified: trunk/yast2/library/wizard/src/Wizard.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/wizard/src/Wizard.ycp?rev=46451&r1=46450&r2=46451&view=diff
==============================================================================
--- trunk/yast2/library/wizard/src/Wizard.ycp (original)
+++ trunk/yast2/library/wizard/src/Wizard.ycp Fri Apr 11 18:37:42 2008
@@ -113,6 +113,19 @@
);
}

+ /**
+ * Returns a button box with buttons "Cancel", "OK"
+ * @return a widget tree
+ **/
+ global term CancelOKButtonBox() {
+ return `HBox(
+ `HWeight(1, `Empty() ), // Layout trick to make sure
the center button is centered
+ `HStretch(),
+ `HWeight(1, `PushButton(`id(`cancel ), `opt (`key_F9),
Label::CancelButton() ) ),
+ `HStretch(),
+ `HWeight(1, `PushButton(`id(`ok ), `opt (`key_F10,
`default), Label::OKButton() ) )
+ );
+ }

/**
* Returns a button box with buttons "Abort", "Accept"
@@ -254,6 +267,16 @@
return GenericDialog( CancelAcceptButtonBox() );
}

+ /**
+ * Returns a standard wizard dialog with buttons "Cancel", "OK"
+ *
+ * @stable
+ *
+ * @return term describing the dialog.
+ **/
+ global term OKDialog() {
+ return GenericDialog( CancelOKButtonBox() );
+ }

/**
* Open any wizard dialog.
@@ -311,6 +334,29 @@
}
}

+ /**
+ * Open a dialog with "OK", "Cancel"
+ * and set the keyboard focus to "OK".
+ **/
+ global void OpenOKDialog()
+ {
+ if ( haveFancyUI() )
+ {
+ UI::OpenDialog(`opt(`defaultsize ),
+ `Wizard(`no_back_button, "",
+ `cancel, Label::CancelButton(),
+ `ok, Label::OKButton() ) );
+
+ // Don't let sloppy calls to Wizard::SetContents() disable this
button by accident
+ UI::WizardCommand(`ProtectNextButton( true ) );
+ }
+ else
+ {
+ Wizard::OpenDialog( OKDialog() );
+ UI::SetFocus(`id(`ok) );
+ }
+ }
+

/**
* Open a dialog with "Accept", "Cancel"

Modified: trunk/yast2/package/yast2.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=46451&r1=46450&r2=46451&view=diff
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Fri Apr 11 18:37:42 2008
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Fri Apr 11 18:38:02 CEST 2008 - locilka@xxxxxxx
+
+- New Wizard::OpenOKDialog() (FATE #120373).
+
+-------------------------------------------------------------------
Fri Apr 11 10:50:20 CEST 2008 - mvidner@xxxxxxx

- FileChanges::FileChangedFromPackage: fixed to actually consider the

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages