[yast-commit] r48574 - in /trunk/yast2: VERSION library/packages/src/PackageCallbacks.ycp package/yast2.changes yast2.spec.in
Author: lslezak Date: Fri Jun 27 10:55:10 2008 New Revision: 48574 URL: http://svn.opensuse.org/viewcvs/yast?rev=48574&view=rev Log: - adapted to the new patch messages and patch scripts callbacks (bnc#401220) - 2.17.4 Modified: trunk/yast2/VERSION trunk/yast2/library/packages/src/PackageCallbacks.ycp trunk/yast2/package/yast2.changes trunk/yast2/yast2.spec.in Modified: trunk/yast2/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/VERSION?rev=48574&r1=48573&r2=48574&view=diff ============================================================================== --- trunk/yast2/VERSION (original) +++ trunk/yast2/VERSION Fri Jun 27 10:55:10 2008 @@ -1 +1 @@ -2.17.3 +2.17.4 Modified: trunk/yast2/library/packages/src/PackageCallbacks.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/packages/src/PackageCallbacks.ycp?rev=48574&r1=48573&r2=48574&view=diff ============================================================================== --- trunk/yast2/library/packages/src/PackageCallbacks.ycp (original) +++ trunk/yast2/library/packages/src/PackageCallbacks.ycp Fri Jun 27 10:55:10 2008 @@ -1656,11 +1656,11 @@ return patch_full_name; } - global void ScriptStart(string patch_name, string patch_version, string patch_arch, string script_path, boolean installation) + global void ScriptStart(string patch_name, string patch_version, string patch_arch, string script_path) { string patch_full_name = FormatPatchName(patch_name, patch_version, patch_arch); - y2milestone("ScriptStart callback: patch: %1, script: %2, installation: %3", patch_full_name, script_path, installation); + y2milestone("ScriptStart callback: patch: %1, script: %2", patch_full_name, script_path); if (Mode::commandline()) { @@ -1669,37 +1669,40 @@ else { term progressbox = `VBox( - `HSpacing(40), + `HSpacing(60), // popup heading `Heading(_("Running Script")), - `Left( - `HBox - ( - // label, script name follows - `Left(`Label(`opt(`boldFont), _("Script: "))), - `Left(`Label(script_path)) - ), + `VBox( (patch_full_name != "") ? `HBox ( // label, patch name follows - `Left(`Label(`opt(`boldFont), _("Patch: "))), - `Left(`Label(patch_full_name)) + `Label(`opt(`boldFont), _("Patch: ")), + `Label(patch_full_name), + `HStretch() ) : - `Empty() + `Empty(), + `HBox + ( + // label, script name follows + `Label(`opt(`boldFont), _("Script: ")), + `Label(script_path), + `HStretch() + ) ), // label - `LogView(`id(`log), _("Output of the Script")), - - `PushButton(`id(`abort), Label::AbortButton()) + `LogView(`id(`log), _("Output of the Script"), 10, 0), + `PushButton(`id(`abort), `opt(`default, `key_F9), Label::AbortButton()) ); if (_script_popup) UI::CloseDialog (); UI::OpenDialog(progressbox); + UI::SetFocus(`id(`abort) ); + _script_popup = true; } } @@ -1729,10 +1732,43 @@ return true; } - global void ScriptProblem(string description) + global string ScriptProblem(string description) { y2warning("ScriptProblem: %1", description); - Popup::Error(description); + + symbol ui = Popup::AnyQuestion3("", + description, + Label::RetryButton(), /*yes_button_message*/ + Label::AbortButton(), /* no_button_message*/ + Label::IgnoreButton(), /*retry_button_message*/ + `retry /*symbol focus*/ ); + + y2internal("Problem result: %1", ui); + + // Abort is the default + string ret = "A"; + + if (ui == `retry) + { + // ignore + ret = "I"; + } + else if (ui == `yes) + { + // retry + ret = "R"; + } + else if (ui == `no) + { + // abort + ret = "A"; + } + else + { + y2warning("Unknown result: %1, aborting", ui); + } + + return ret; } global void ScriptFinish() @@ -1745,7 +1781,7 @@ } } - global void Message(string patch_name, string patch_version, string patch_arch, string message) + global boolean Message(string patch_name, string patch_version, string patch_arch, string message) { string patch_full_name = FormatPatchName(patch_name, patch_version, patch_arch); y2milestone("Message (%1): %2", patch_full_name, message); @@ -1756,7 +1792,10 @@ patch_full_name = sformat(_("Patch: %1\n\n"), patch_full_name); } - Popup::LongMessage(patch_full_name + message); + boolean ret = Popup::ContinueCancel(patch_full_name + message); + y2milestone("User input: %1", ret); + + return ret; } global symbol AskAbortRefresh() @@ -2857,6 +2896,8 @@ boolean DummyBooleanInteger(integer param1) {y2debug("Empty generic boolean(integer)->true callback"); return true;} +string DummyStringString(string param1) {y2debug("Empty generic string(string)->\"\" callback"); return "";} + void DummyVoid() {y2debug("Empty generic void() callback");} global void SetDummyProcessCallbacks() @@ -2951,15 +2992,15 @@ Pkg::CallbackProgressReportEnd(DummyVoidInteger); } -void DummyScriptStart(string patch_name, string patch_version, string patch_arch, string script_path, boolean installation) {y2debug("Empty ScriptStart callback");} +void DummyScriptStart(string patch_name, string patch_version, string patch_arch, string script_path) {y2debug("Empty ScriptStart callback");} boolean DummyScriptProgress (boolean ping, string output) {y2debug("Empty ScriptProgress callback, returning true"); return true;} -void DummyMessage(string patch_name, string patch_version, string patch_arch, string message) {y2debug("Empty Message callback");} +boolean DummyMessage(string patch_name, string patch_version, string patch_arch, string message) {y2debug("Empty Message callback"); return true; /* continue */} global void SetDummyScriptCallbacks() { Pkg::CallbackScriptStart(DummyScriptStart); Pkg::CallbackScriptProgress(DummyScriptProgress); - Pkg::CallbackScriptProblem(DummyVoidString); + Pkg::CallbackScriptProblem(DummyStringString); Pkg::CallbackScriptFinish(DummyVoid); Pkg::CallbackMessage(DummyMessage); Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=48574&r1=48573&r2=48574&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Fri Jun 27 10:55:10 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Jun 27 10:53:23 CEST 2008 - lslezak@suse.cz + +- adapted to the new patch messages and patch scripts callbacks + (bnc#401220) +- 2.17.4 + +------------------------------------------------------------------- Thu Jun 19 11:05:22 CEST 2008 - aschnell@suse.de - added Integer::RangeFrom, Integer::IsPowerOfTwo and Integer::Sum Modified: trunk/yast2/yast2.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/yast2.spec.in?rev=48574&r1=48573&r2=48574&view=diff ============================================================================== --- trunk/yast2/yast2.spec.in (original) +++ trunk/yast2/yast2.spec.in Fri Jun 27 10:55:10 2008 @@ -5,7 +5,7 @@ BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-testsuite yast2-perl-bindings # Needed already in build time -BuildRequires: yast2-pkg-bindings >= 2.16.23 +BuildRequires: yast2-pkg-bindings >= 2.17.1 # pre-requires for filling the sysconfig template (sysconfig.yast2) PreReq: %fillup_prereq @@ -15,8 +15,8 @@ # Mod_UI Requires: yast2-ycp-ui-bindings >= 2.16.44 -# changed callback registration -Requires: yast2-pkg-bindings >= 2.16.23 +# changed patch/message callbacks +Requires: yast2-pkg-bindings >= 2.17.1 Requires: yast2_ui yast2_theme # For Cron Agent, Module Requires: perl-Config-Crontab -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn.opensuse.org