Author: locilka Date: Wed Mar 5 15:41:16 2008 New Revision: 45216 URL: http://svn.opensuse.org/viewcvs/yast?rev=45216&view=rev Log: - Do not try to change the Wizard widget if no such widget exists (ncurses) reuse the Back button instead (bnc #367213). - 2.16.31 Modified: trunk/yast2/VERSION trunk/yast2/library/wizard/src/Wizard.ycp trunk/yast2/package/yast2.changes Modified: trunk/yast2/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/VERSION?rev=45216&r1=45215&r2=45216&view=diff ============================================================================== --- trunk/yast2/VERSION (original) +++ trunk/yast2/VERSION Wed Mar 5 15:41:16 2008 @@ -1 +1 @@ -2.16.30 +2.16.31 Modified: trunk/yast2/library/wizard/src/Wizard.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/wizard/src/Wizard.ycp?rev=45216&r1=45215&r2=45216&view=diff ============================================================================== --- trunk/yast2/library/wizard/src/Wizard.ycp (original) +++ trunk/yast2/library/wizard/src/Wizard.ycp Wed Mar 5 15:41:16 2008 @@ -1078,12 +1078,31 @@ } /** + * Returns whether the `Wizard widget is available. + * + * @see bnc #367213. + * @return boolean available + */ + boolean HasWidgetWizard () { + if (! UI::HasSpecialWidget(`Wizard)) { + y2milestone ("no Wizard available"); + return false; + } + + return true; + } + + /** * Show a "Release Notes" button with the specified label and ID if there is a "steps" panel **/ global void ShowReleaseNotesButton( string label, string id ) { - if ( UI::WizardCommand(`ShowReleaseNotesButton( label, id ) ) == false ) - { + // has wizard? continue + // otherwise reuse the back button + // show-releasenotes-button failed? continue + // reuse the back button + if ((HasWidgetWizard() == false) || (UI::WizardCommand (`ShowReleaseNotesButton (label, id)) == false)) { + // Reuse Back button if (UI::WidgetExists (`id (`back_rep))) { UI::ReplaceWidget (`id (`back_rep), `PushButton (`id (id), label)); } else { @@ -1098,9 +1117,14 @@ **/ global void HideReleaseNotesButton() { - if ( UI::WizardCommand(`HideReleaseNotesButton() ) == false ) - { - UI::ReplaceWidget (`id (`back_rep), `Empty ()); + // has wizard? continue + // otherwise reuse the back button + // hide-releasenotes-button failed? continue + // reuse the back button + if ((HasWidgetWizard() == false) || (UI::WizardCommand (`HideReleaseNotesButton()) == false)) { + if (UI::WidgetExists (`id (`back_rep))) { + UI::ReplaceWidget (`id (`back_rep), `Empty ()); + } } } Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=45216&r1=45215&r2=45216&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Wed Mar 5 15:41:16 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Mar 5 15:37:35 CET 2008 - locilka@suse.cz + +- Do not try to change the Wizard widget if no such widget exists + (ncurses) reuse the Back button instead (bnc #367213). +- 2.16.31 + +------------------------------------------------------------------- Tue Mar 4 13:53:43 CET 2008 - locilka@suse.cz - Replacing obsolete ag_background with new ag_process in Service -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org