Mailinglist Archive: yast-commit (723 mails)

< Previous Next >
[yast-commit] r47422 - /trunk/gtk/tests/Wizard.ycp
  • From: michael_meeks@xxxxxxxxxxxxxxxx
  • Date: Fri, 09 May 2008 16:10:41 -0000
  • Message-id: <20080509161041.4B6692DEB4@xxxxxxxxxxxxxxxx>
Author: michael_meeks
Date: Fri May 9 18:10:40 2008
New Revision: 47422

URL: http://svn.opensuse.org/viewcvs/yast?rev=47422&view=rev
Log:
shrink down to just a dialog ...

Modified:
trunk/gtk/tests/Wizard.ycp

Modified: trunk/gtk/tests/Wizard.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/tests/Wizard.ycp?rev=47422&r1=47421&r2=47422&view=diff
==============================================================================
--- trunk/gtk/tests/Wizard.ycp (original)
+++ trunk/gtk/tests/Wizard.ycp Fri May 9 18:10:40 2008
@@ -1,68 +1,15 @@
-// Example of using the Wizard widget.
-//
-// Note: YCP applications are discouraged from using the Wizard widget
directly.
-// Use the Wizard module instead.
-
+// Problematic sizing example...
{
- 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( "Welcome to the YaST2 installation" )
);
- UI::WizardCommand(`SetHelpText( help_text ) );
-
- UI::WizardCommand(`AddStepHeading( "Base Installation" ) );
- UI::WizardCommand(`AddStep( "Language", "lang"
) );
- UI::WizardCommand(`AddStep( "Installation Settings", "proposal"
) );
- UI::WizardCommand(`AddStep( "Perform Installation", "doit"
) );
-
- UI::WizardCommand(`AddStepHeading( "Configuration" ) );
- UI::WizardCommand(`AddStep( "Root Password", "root_pw"
) );
- UI::WizardCommand(`AddStep( "Network", "net"
) );
- UI::WizardCommand(`AddStep( "Online Update", "you"
) );
- UI::WizardCommand(`AddStep( "Users", "auth"
) );
- UI::WizardCommand(`AddStep( "Clean Up", "suse_config"
) );
- UI::WizardCommand(`AddStep( "Release Notes", "rel_notes"
) );
- UI::WizardCommand(`AddStep( "Device Configuration",
"hw_proposal" ) );
- UI::WizardCommand(`UpdateSteps() );
-
- if ( false )
- {
- UI::WizardCommand(`SetAbortButtonLabel( "&Cancel" ) );
- UI::WizardCommand(`SetBackButtonLabel( "" ) );
- UI::WizardCommand(`SetNextButtonLabel( "&Accept" ) );
- }
-
- UI::WizardCommand(`SetCurrentStep( "net" ) );
-
term contents = `VBox (
`MinSize (
- 80, 20, // tweak me ! :-)
+ 80, 23, // tweak me ! :-)
`ReplacePoint (`id (`base_license_rp), `Empty())
- ),
+ ),
`PushButton (`id (`show_fulscreen_license), "&Show License...")
);
-
- {
- UI::ReplaceWidget(`id(`contents), contents );
- UI::WaitForEvent();
- }
+
+ UI::OpenDialog(`opt(`defaultsize ), contents);
+ UI::WaitForEvent();

UI::CloseDialog();


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

< Previous Next >
This Thread
  • No further messages