Author: locilka Date: Thu Oct 16 15:16:31 2008 New Revision: 52294 URL: http://svn.opensuse.org/viewcvs/yast?rev=52294&view=rev Log: - Enhancing ProductControl to show internal steps names if debug mode is enabled (needed for WAGON); Modified: trunk/yast2/library/control/src/ProductControl.ycp trunk/yast2/package/yast2.changes Modified: trunk/yast2/library/control/src/ProductControl.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/control/src/ProductControl.ycp?rev=52294&r1=52293&r2=52294&view=diff ============================================================================== --- trunk/yast2/library/control/src/ProductControl.ycp (original) +++ trunk/yast2/library/control/src/ProductControl.ycp Thu Oct 16 15:16:31 2008 @@ -707,6 +707,8 @@ */ global define void AddWizardSteps(list<map> stagemode) { + boolean debug_workflow = ProductFeatures::GetBooleanFeature ("globals", "debug_workflow"); + last_stage_mode = stagemode; // UI::WizardCommand() can safely be called even if the respective UI @@ -747,26 +749,33 @@ // only for debugging y2debug("Adding wizard step: %1", m ); + string heading = ""; + string label = ""; + string id = ""; + // Heading if (haskey (m, "heading") && m["label"]:"" != "") { - UI::WizardCommand (`AddStepHeading ( - haskey (m, "textdomain") - ? dgettext (m["textdomain"]:"", m["label"]:"") - : dgettext (wizard_textdomain, m["label"]:"") - )); + heading = ( + haskey (m, "textdomain") ? + dgettext (m["textdomain"]:"", m["label"]:"") + : + dgettext (wizard_textdomain, m["label"]:"") + ); // Label } else if (m["label"]:"" != "") { - if (first_id=="") - { + if (first_id=="") { first_id = m["id"]:""; } - UI::WizardCommand(`AddStep ( - haskey (m, "textdomain") - ? dgettext (m["textdomain"]:"", m["label"]:"") - : dgettext (wizard_textdomain, m["label"]:""), - m["id"]:"" - )); + + label = ( + haskey (m, "textdomain") ? + dgettext (m["textdomain"]:"", m["label"]:"") + : + dgettext (wizard_textdomain, m["label"]:"") + ); + + id = m["id"]:""; last_label = m["label"]:""; last_domain = m["textdomain"]:""; @@ -775,22 +784,28 @@ if (first_id=="") { first_id = m["id"]:""; } + if (last_label != "") { if (last_domain != "") { - UI::WizardCommand(`AddStep( dgettext( - last_domain, - last_label ), - m["id"]:"" ) - ); + label = dgettext (last_domain, last_label); + id = m["id"]:""; } else { - UI::WizardCommand(`AddStep( dgettext( - wizard_textdomain, - last_label ), - m["id"]:"" ) - ); + label = dgettext (wizard_textdomain, last_label); } + id = m["id"]:""; } } + + if (heading != nil && heading != "") { + UI::WizardCommand (`AddStepHeading (heading)); + } + + if (label != nil && label != "") { + if (debug_workflow == true) { + label = label + sformat (" [%1]", m["name"]:""); + } + UI::WizardCommand (`AddStep (label, id)); + } }); }); Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=52294&r1=52293&r2=52294&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Thu Oct 16 15:16:31 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Oct 16 15:15:02 CEST 2008 - locilka@suse.cz + +- Enhancing ProductControl to show internal steps names if debug + mode is enabled (needed for WAGON); + +------------------------------------------------------------------- Wed Oct 15 14:59:02 CEST 2008 - locilka@suse.cz - Removing SetFocus from Popup::AnyQuestion (bnc #435399). -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org