[yast-commit] r43830 - in /trunk/packager: VERSION package/yast2-packager.changes src/clients/sw_single.ycp src/modules/PackageCallbacks.ycp yast2-packager.spec.in
![](https://seccdn.libravatar.org/avatar/c3c40c0a8c67869856fd7e06cbcb4099.jpg?s=120&d=mm&r=g)
Author: lslezak Date: Tue Jan 22 15:31:01 2008 New Revision: 43830 URL: http://svn.opensuse.org/viewcvs/yast?rev=43830&view=rev Log: - callbacks - do not open a new progress window if there is a progress already running (the progress will be nested in such case) (#352007) - sw_single - use Progress:: to display the total progress at start, reinitialize the target only if it is necessary - 2.16.16 Modified: trunk/packager/VERSION trunk/packager/package/yast2-packager.changes trunk/packager/src/clients/sw_single.ycp trunk/packager/src/modules/PackageCallbacks.ycp trunk/packager/yast2-packager.spec.in Modified: trunk/packager/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/VERSION?rev=43830&r1=43829&r2=43830&view=diff ============================================================================== --- trunk/packager/VERSION (original) +++ trunk/packager/VERSION Tue Jan 22 15:31:01 2008 @@ -1 +1 @@ -2.16.15 +2.16.16 Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=43830&r1=43829&r2=43830&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Tue Jan 22 15:31:01 2008 @@ -1,4 +1,14 @@ ------------------------------------------------------------------- +Tue Jan 22 14:56:19 CET 2008 - lslezak@suse.cz + +- callbacks - do not open a new progress window if there is + a progress already running (the progress will be nested in such + case) (#352007) +- sw_single - use Progress:: to display the total progress at + start, reinitialize the target only if it is necessary +- 2.16.16 + +------------------------------------------------------------------- Thu Jan 17 13:43:42 CET 2008 - lslezak@suse.cz - use a `BusyIndicator widget instead of the animated icon Modified: trunk/packager/src/clients/sw_single.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/sw_single.ycp?rev=43830&r1=43829&r2=43830&view=diff ============================================================================== --- trunk/packager/src/clients/sw_single.ycp (original) +++ trunk/packager/src/clients/sw_single.ycp Tue Jan 22 15:31:01 2008 @@ -32,13 +32,28 @@ import "FileUtils"; import "PackagesUI"; import "CommandLine"; + import "Progress"; symbol StartSWSingle() { Wizard::CreateDialog(); Wizard::SetDesktopIcon("sw_single"); - Wizard::SetContents(_("Initializing..."), `Empty (), "", false, true); + + // a stage in the progress dialog + list<string> stages = [_("Initialize the Target System"), _("Load the Configured Repositories")]; + + // an extra step is needed in dir inst mode + if (Installation::destdir != "/") + { + y2internal("Extra step is needed"); + // %1 is path to the target system (e.g. /tmp/dirinstall + sformat(_("Reset the target system to %1"), Installation::destdir); + } + + // a stage in the progress dialog + Progress::New(_("Starting the Package Manager"), "", 2, stages, [], ""); + Progress::NextStage(); import "Packages"; @@ -113,7 +128,7 @@ define symbol CheckWhichPackages (list<string> arg_list) { - PackageSystem::EnsureTargetInit(); + PackageSystem::EnsureTargetInit(); y2milestone ("CheckWhichPackages (%1)", arg_list); // if sw_single is called with a list of packages or a package name @@ -184,6 +199,8 @@ // start package manager const boolean enabled_only = true; + + Progress::NextStage(); boolean mgr_ok = Pkg::SourceStartManager(enabled_only); if (!mgr_ok) { @@ -196,7 +213,14 @@ Only installed packages are displayed.")); } - Pkg::TargetInit (Installation::destdir, false); + // reset the target if needed (e.g. dirinstall mode) + // EnsureTargetInit() uses "/" as root + if (Installation::destdir != "/") + { + y2milestone("Setting a new target: %1", Installation::destdir); + Progress::NextStage(); + Pkg::TargetInit (Installation::destdir, false); + } return `found_descr; @@ -300,6 +324,8 @@ // check the arguments and try the mount/search for local description symbol result = CheckWhichPackages (arg_list); + Progress::Finish(); + Pkg::SetTextLocale (UI::GetLanguage (true)); y2milestone ("SW_SINGLE: result CheckWhichPackages %1", result); Modified: trunk/packager/src/modules/PackageCallbacks.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/modules/PackageCallbacks.ycp?rev=43830&r1=43829&r2=43830&view=diff ============================================================================== --- trunk/packager/src/modules/PackageCallbacks.ycp (original) +++ trunk/packager/src/modules/PackageCallbacks.ycp Tue Jan 22 15:31:01 2008 @@ -87,7 +87,7 @@ boolean FullScreen() { - boolean ret = UI::WidgetExists(`subprogress_replace_point); + boolean ret = UI::WidgetExists(`progress_replace_point); y2debug("Running in fullscreen mode: %1", ret); return ret; } @@ -2240,6 +2240,8 @@ integer last_stage = 0; +integer close_wizard = 0; + /** * Hanler for ProcessStart callback - handle start of a package manager process * @param task Decription of the task @@ -2250,16 +2252,21 @@ { y2milestone("Process: Start: task: %1, stages: %2, help: %3", task, stages, help); - if (Progress::status()) - { - Wizard::CreateDialog(); - Wizard::SetDesktopIcon("sw_single"); - - // set 100% as max value - Progress::New(task, "", 100, stages, [], help); - Progress::Title(task); - last_stage = 0; - } + if (Progress::status()) + { + if (!Progress::IsRunning()) + { + Wizard::CreateDialog(); + Wizard::SetDesktopIcon("sw_single"); + + close_wizard = close_wizard + 1; + } + + // set 100% as max value + Progress::New(task, "", 100, stages, [], help); + Progress::Title(task); + last_stage = 0; + } } /** @@ -2295,7 +2302,12 @@ // set 100% Progress::Finish(); - Wizard::CloseDialog(); + if (close_wizard == 1) + { + Wizard::CloseDialog(); + } + + close_wizard = close_wizard - 1; } // EOF Modified: trunk/packager/yast2-packager.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/yast2-packager.spec.in?rev=43830&r1=43829&r2=43830&view=diff ============================================================================== --- trunk/packager/yast2-packager.spec.in (original) +++ trunk/packager/yast2-packager.spec.in Tue Jan 22 15:31:01 2008 @@ -19,8 +19,8 @@ # New functions: GPG key management Requires: yast2-pkg-bindings >= 2.16.10 -# Progress::Subprogress*() -Requires: yast2 >= 2.16.17 +# recursive Progress::New() +Requires: yast2 >= 2.16.22 # unzipping license file Requires: unzip -- 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