Bugzilla – Attachment 186906 Details for
Bug 346129
Too many wizard steps visible for some languages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
Test case
Wizard3-es.ycp (text/plain), 4.06 KB, created by
Stefan Hundhammer
on 2007-12-11 15:15:48 UTC
(
hide
)
Description:
Test case
Filename:
MIME Type:
Creator:
Stefan Hundhammer
Created:
2007-12-11 15:15:48 UTC
Size:
4.06 KB
patch
obsolete
>// Advanced example of using the Wizard widget. >// >// Note: YCP applications are discouraged from using the Wizard widget directly. >// Use the Wizard module instead. > >{ > > list<map> base_installation_steps = > [ > $[ "id": "language", "label": "Language" ], > $[ "id": "proposal", "label": "Installation Settings" ], > $[ "id": "do_resize", "label": "Perform Installation" ], > $[ "id": "prepdisk", "label": "Perform Installation" ], > $[ "id": "kickoff", "label": "Perform Installation" ], > $[ "id": "rpmcopy", "label": "Perform Installation" ], > $[ "id": "finish", "label": "Perform Installation" ] > ]; > > list<map> config_steps = > [ > $[ "id": "continue_2" , "label": "Contraseña de root" ], > $[ "id": "continue_3" , "label": "Verifiación de Instalación" ], > $[ "id": "continue_4" , "label": "Verifiación de Instalación" ], > $[ "id": "continue_5" , "label": "Verifiación de Instalación" ], > $[ "id": "continue_6" , "label": "Nombre de host" ], > $[ "id": "continue_7" , "label": "Red" ], > $[ "id": "continue_8" , "label": "Red" ], > $[ "id": "continue_9" , "label": "Red" ], > $[ "id": "continue_10", "label": "Registración" ], > $[ "id": "continue_11", "label": "Registración" ], > $[ "id": "continue_12", "label": "Actualización en lÃnea" ], > $[ "id": "continue_13", "label": "Actualización en lÃnea" ], > $[ "id": "continue_14", "label": "Actualización en lÃnea" ], > $[ "id": "continue_15", "label": "Actualización en lÃnea" ], > $[ "id": "continue_16", "label": "Usuarios" ], > $[ "id": "continue_17", "label": "Usuarios" ], > $[ "id": "continue_18", "label": "Usuarios" ], > $[ "id": "continue_19", "label": "Notas de la versión" ], > $[ "id": "continue_20", "label": "Configuración del hardware" ], > $[ "id": "continue_21", "label": "Configuración del hardware" ], > $[ "id": "continue_22", "label": "Configuración del hardware" ] > ]; > > list<map> steps = flatten( [ base_installation_steps, config_steps ] ); > > > define void show_step( integer no ) > ``{ > string current_id = lookup( steps[ no ]:nil, "id", ""); > > UI::ReplaceWidget(`id(`contents), > `VBox( > `Heading( "Current workflow step:" ), > `VSpacing(0.5), > `Label( current_id ) > ) ); > > UI::WizardCommand(`SetCurrentStep( current_id ) ); > }; > > 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/SuSELinux/icons/22x22/apps/user_add.png" ) ); > UI::WizardCommand(`SetDialogHeading( "Welcome to the YaST2 installation" ) ); > UI::WizardCommand(`SetHelpText( help_text ) ); > UI::WizardCommand(`ShowReleaseNotesButton( "&Release Notes", "release_notes" ) ); > > UI::WizardCommand(`AddStepHeading( "Base Installation" ) ); > > foreach ( map step, base_installation_steps, ``{ > UI::WizardCommand(`AddStep( step["label"]:"", step["id"]:"" ) ); > }); > > > UI::WizardCommand(`AddStepHeading( "Configuration" ) ); > > foreach ( map step, config_steps, ``{ > UI::WizardCommand(`AddStep( step["label"]:"", step["id"]:"" ) ); > }); > > > integer current_step = 0; > show_step( 0 ); > > while( true ) > { > symbol button = (symbol) UI::UserInput(); > > if ( button == `abort || button == `cancel ) > break; > > if ( button == `next || button == `back ) > { > if ( button == `next && current_step+1 < size( steps ) ) > { > current_step = current_step+1; > > if ( current_step > 2 ) > UI::WizardCommand(`HideReleaseNotesButton() ); > } > > if ( button == `back && current_step > 0 ) > current_step = current_step-1; > > show_step( current_step ); > } > } > > UI::CloseDialog(); > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 346129
:
185959
|
185961
|
186867
| 186906 |
186907
|
186918