aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-01-07 19:39:01 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-01-07 19:39:01 +0000
commit37aa2caa350ee8577be82f79a416ab38b5ea89ae (patch)
treea9f3d4f93934e906d3d8cd3a454f978fd00e4690
parente307874629b8c95a02583c8f858c20efa8758441 (diff)
downloadrpmdrake-37aa2caa350ee8577be82f79a416ab38b5ea89ae.tar
rpmdrake-37aa2caa350ee8577be82f79a416ab38b5ea89ae.tar.gz
rpmdrake-37aa2caa350ee8577be82f79a416ab38b5ea89ae.tar.bz2
rpmdrake-37aa2caa350ee8577be82f79a416ab38b5ea89ae.tar.xz
rpmdrake-37aa2caa350ee8577be82f79a416ab38b5ea89ae.zip
make wait messages transient for the main window as well
-rwxr-xr-xrpmdrake15
-rw-r--r--rpmdrake.pm5
2 files changed, 11 insertions, 9 deletions
diff --git a/rpmdrake b/rpmdrake
index 1b4f47a5..77e8e6f6 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -50,7 +50,9 @@ $0 =~ m|/MandrakeUpdate$| and $MODE = 'update';
$::isStandalone = 1;
my $w;
-sub interactive_msg_ { interactive_msg(@_, if_(exists $w->{rwindow}, transient => $w->{rwindow})) };
+sub interactive_msg_ { interactive_msg (@_, if_(exists $w->{rwindow}, transient => $w->{rwindow})) };
+sub interactive_list_ { interactive_list(@_, if_(exists $w->{rwindow}, transient => $w->{rwindow})) };
+sub wait_msg_ { wait_msg (@_, if_(exists $w->{rwindow}, transient => $w->{rwindow})) };
sub ctreefy { $_[0] =~ s,/,|,g; $_[0] }
@@ -254,8 +256,8 @@ sub run_treeview_dialog {
}
}
my $callback = sub { interactive_msg_(N("More information on package..."), $options->{get_info}->($_[0]), scroll => 1) };
- $choices->[interactive_list(N("Please choose"), N("One of the following packages is needed:"),
- [ map { my_fullname($_) } @$choices ], $callback, transient => $w->{rwindow})];
+ $choices->[interactive_list_(N("Please choose"), N("One of the following packages is needed:"),
+ [ map { my_fullname($_) } @$choices ], $callback)];
};
my $choices_auto;
my $callback_choices_auto = sub {
@@ -280,7 +282,7 @@ sub run_treeview_dialog {
build_tree => sub {
my ($add_node, $flat, $mode) = @_;
my @elems;
- my $wait = wait_msg(N("Please wait, listing packages..."));
+ my $wait = wait_msg_(N("Please wait, listing packages..."));
$disable_treeselect_callback = 1;
if ($mode eq 'mandrake_choices') {
foreach my $pkg (keys %$pkgs) {
@@ -805,8 +807,7 @@ Do you want to try another mirror?", $r), yesno => 1) and goto mu_retry_another_
$section eq 'description' and $cur->{description} .= $_;
}
}
-
- my $wait = wait_msg(N("Please wait, finding available packages..."));
+ my $wait = wait_msg_(N("Please wait, finding available packages..."));
my $urpm = new urpm;
my %installable_pkgs;
@@ -984,7 +985,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
sub get_installed_pkgs {
use URPM;
- my $wait = wait_msg(N("Please wait, reading packages database..."));
+ my $wait = wait_msg_(N("Please wait, reading packages database..."));
my @base = qw(basesystem);
my (%base, %basepackages);
my $db = db;
diff --git a/rpmdrake.pm b/rpmdrake.pm
index 0e9f734b..1ea91543 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -118,8 +118,9 @@ sub fatal_msg {
}
sub wait_msg {
- my $mainw = ugtk2->new('rpmdrake', grab => 1);
- my $label = Gtk2::Label->new($_[0]);
+ my ($msg, %options) = @_;
+ my $mainw = ugtk2->new('rpmdrake', grab => 1, if_(exists $options{transient}, transient => $options{transient}));
+ my $label = Gtk2::Label->new($msg);
gtkadd($mainw->{window}, gtkpack(gtkadd(create_vbox(), $label)));
$label->signal_connect(expose_event => sub { $mainw->{displayed} = 1 });
$mainw->sync until $mainw->{displayed};