[yast-commit] r43962 - in /trunk/yast2/library: control/src/ProductControl.ycp wizard/src/Wizard.ycp
Author: locilka Date: Mon Jan 28 19:09:16 2008 New Revision: 43962 URL: http://svn.opensuse.org/viewcvs/yast?rev=43962&view=rev Log: - Removing useless Wizard() calls in ProductControl to minimize the Wizard redrawing. (Continuing on that ...) Modified: trunk/yast2/library/control/src/ProductControl.ycp trunk/yast2/library/wizard/src/Wizard.ycp Modified: trunk/yast2/library/control/src/ProductControl.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/control/src/ProductControl.ycp?rev=43962&r1=43961&r2=43962&view=diff ============================================================================== --- trunk/yast2/library/control/src/ProductControl.ycp (original) +++ trunk/yast2/library/control/src/ProductControl.ycp Mon Jan 28 19:09:16 2008 @@ -535,25 +535,30 @@ }); }); - UI::WizardCommand(`SetCurrentStep( first_id ) ); + UI::WizardCommand(`SetCurrentStep( CurrentWizardStep ) ); } - - +/* Forces UpdateWizardSteps to redraw steps even if nothing seem to be changed */ +boolean force_UpdateWizardSteps = false; /** * Update Steps */ global define void UpdateWizardSteps(list<map> stagemode) { + if (force_UpdateWizardSteps == true) { + y2milestone ("UpdateWizardSteps forced"); + force_UpdateWizardSteps = false; + } else if (last_stage_mode == stagemode) { + y2milestone ("No changes in Wizard steps"); + return; + } + last_stage_mode = stagemode; UI::WizardCommand(`DeleteSteps()); + // Also redraws the wizard and sets the current step AddWizardSteps( stagemode ); - // AddWizardSteps sets the current step itself (which also updates the Wizard) - // UI::WizardCommand(`SetCurrentStep( CurrentWizardStep ) ); - // UI::WizardCommand(`UpdateSteps()); - return; } @@ -565,6 +570,7 @@ if ( size( last_stage_mode ) > 0 ) { y2debug( "Retranslating wizard steps" ); + force_UpdateWizardSteps = true; UpdateWizardSteps( last_stage_mode ); } } Modified: trunk/yast2/library/wizard/src/Wizard.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/wizard/src/Wizard.ycp?rev=43962&r1=43961&r2=43962&view=diff ============================================================================== --- trunk/yast2/library/wizard/src/Wizard.ycp (original) +++ trunk/yast2/library/wizard/src/Wizard.ycp Mon Jan 28 19:09:16 2008 @@ -999,10 +999,13 @@ { if ( UI::WizardCommand(`EnableNextButton( false ) ) == false ) { - if ( UI::WidgetExists(`id(`next ) ) ) - UI::ChangeWidget(`id(`next), `Enabled, false ); - else - UI::ChangeWidget(`id(`accept), `Enabled, false ); + if (UI::WidgetExists (`id (`next))) { + UI::ChangeWidget(`id (`next), `Enabled, false); + } else if (UI::WidgetExists (`id (`accept))) { + UI::ChangeWidget(`id (`accept), `Enabled, false); + } else { + y2error (-1, "Neither `next nor `accept widgets exist"); + } } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
locilka@svn.opensuse.org