diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-03-21 14:16:28 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-03-21 14:16:28 +0000 |
commit | 23bfed5220ef942e8a3103f2fc4eb8bf0e2d0be8 (patch) | |
tree | 40381007970b708860597c03ed2ea30caf2dea68 /Rpmdrake | |
parent | c1a5ebe0ffafd97f4bcce28cb5cff46874ceebad (diff) | |
download | rpmdrake-23bfed5220ef942e8a3103f2fc4eb8bf0e2d0be8.tar rpmdrake-23bfed5220ef942e8a3103f2fc4eb8bf0e2d0be8.tar.gz rpmdrake-23bfed5220ef942e8a3103f2fc4eb8bf0e2d0be8.tar.bz2 rpmdrake-23bfed5220ef942e8a3103f2fc4eb8bf0e2d0be8.tar.xz rpmdrake-23bfed5220ef942e8a3103f2fc4eb8bf0e2d0be8.zip |
(perform_installation) simplify and make sure we restore the main
window sensivity in case of an exception
Diffstat (limited to 'Rpmdrake')
-rwxr-xr-x | Rpmdrake/pkg.pm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 1facc7f6..e5b7d2c7 100755 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -462,6 +462,8 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( my $w = $::main_window; $w->set_sensitive(0); + my $_restore_sensitive = before_leaving { warn" RESTORE\n";$w->set_sensitive(1) }; + my $_flush_guard = Gtk2::GUI_Update_Guard->new; my $group; @@ -513,7 +515,6 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( : $to_install), scroll => 1, yesno => 1) or do { - $w->set_sensitive(1); return 1; }; @@ -733,7 +734,6 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( join("\n\n", @errors, @error_msgs)), if_(@errors + @error_msgs > 1, scroll => 1), ); - $w->set_sensitive(1); return !$something_installed; } @@ -780,7 +780,6 @@ you may now inspect some in order to take actions:"), N("Unrecoverable error: no package found for installation, sorry.")); } - $w->set_sensitive(1); statusbar_msg_remove($statusbar_msg_id); #- XXX maybe remove this return !($something_installed || scalar(@to_remove)); @@ -790,7 +789,6 @@ you may now inspect some in order to take actions:"), N("There was a problem during the installation:\n\n%s", $fatal_msg)); return_with_error: Rpmdrake::gurpm::end(); - $w->set_sensitive(1); return !$something_installed; } |