aboutsummaryrefslogtreecommitdiffstats
path: root/rpmdrake.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-13 05:32:13 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-13 05:32:13 +0000
commit2120972471cfc09fb0ab1786283b471bb00ba2b4 (patch)
treec9e4a4bf12d5d51a42142ffae9eea4b5bed887c5 /rpmdrake.pm
parent4b2b41e354719ebca9295c03b66be393d9c8ba84 (diff)
downloadrpmdrake-2120972471cfc09fb0ab1786283b471bb00ba2b4.tar
rpmdrake-2120972471cfc09fb0ab1786283b471bb00ba2b4.tar.gz
rpmdrake-2120972471cfc09fb0ab1786283b471bb00ba2b4.tar.bz2
rpmdrake-2120972471cfc09fb0ab1786283b471bb00ba2b4.tar.xz
rpmdrake-2120972471cfc09fb0ab1786283b471bb00ba2b4.zip
Restore banners at startup of MandrivaUpdate
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r--rpmdrake.pm21
1 files changed, 12 insertions, 9 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm
index ecb54014..240e041b 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -180,15 +180,26 @@ sub writeconf {
output $configfile, map { "$_ " . join(' ', @${$config{$_}{var}}) . "\n" } keys %config;
}
+sub getbanner () {
+ $::MODE or return undef;
+ Gtk2::Banner->new("title-$::MODE", {
+ remove => N("Software Packages Removal"),
+ update => N("Software Packages Update"),
+ install => N("Software Packages Installation"),
+ }->{$::MODE});
+}
+
sub interactive_msg {
my ($title, $contents, %options) = @_;
my $d = ugtk2->new($title, grab => 1, if_(exists $options{transient}, transient => $options{transient}));
$d->{rwindow}->set_position($options{transient} ? 'center_on_parent' : 'center_always');
$contents = formatAlaTeX($contents) unless $options{scroll}; #- because we'll use a WrappedLabel
+ my $banner = $options{banner} ? getbanner : undef;
gtkadd(
$d->{window},
gtkpack_(
Gtk2::VBox->new(0, 5),
+ if_($banner, 0, $banner),
1,
(
$options{scroll} ? gtkadd(
@@ -296,15 +307,6 @@ sub fatal_msg {
myexit -1;
}
-sub getbanner () {
- $::MODE or return undef;
- Gtk2::Banner->new("title-$::MODE", {
- remove => N("Software Packages Removal"),
- update => N("Software Packages Update"),
- install => N("Software Packages Installation"),
- }->{$::MODE});
-}
-
sub wait_msg {
my ($msg, %options) = @_;
gtkflush();
@@ -633,6 +635,7 @@ sub update_sources {
my $w; my $label; $w = wait_msg(
$label = Gtk2::Label->new(N("Please wait, updating media...")),
no_wait_cursor => 1,
+ banner => $options{banner},
widgets => [
(my $pb = gtkset_size_request(Gtk2::ProgressBar->new, 300, -1)),
gtkpack(