diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-06-10 02:10:53 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-06-10 02:10:53 +0000 |
commit | 4b2b41e354719ebca9295c03b66be393d9c8ba84 (patch) | |
tree | 1bc30e4f8d4375888871a502ae301ac74fe2b8c9 | |
parent | 2ebbfb9d4d04547978de66c7d53e68a6735c0773 (diff) | |
download | rpmdrake-4b2b41e354719ebca9295c03b66be393d9c8ba84.tar rpmdrake-4b2b41e354719ebca9295c03b66be393d9c8ba84.tar.gz rpmdrake-4b2b41e354719ebca9295c03b66be393d9c8ba84.tar.bz2 rpmdrake-4b2b41e354719ebca9295c03b66be393d9c8ba84.tar.xz rpmdrake-4b2b41e354719ebca9295c03b66be393d9c8ba84.zip |
Lazy evaluate getbanner
-rw-r--r-- | rpmdrake.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm index 5177e44c..ecb54014 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -297,6 +297,7 @@ sub fatal_msg { } sub getbanner () { + $::MODE or return undef; Gtk2::Banner->new("title-$::MODE", { remove => N("Software Packages Removal"), update => N("Software Packages Update"), @@ -310,11 +311,12 @@ sub wait_msg { my $mainw = ugtk2->new('Rpmdrake', grab => 1, if_(exists $options{transient}, transient => $options{transient})); $mainw->{real_window}->set_position($options{transient} ? 'center_on_parent' : 'center_always'); my $label = ref($msg) =~ /^Gtk/ ? $msg : Gtk2::WrappedLabel->new($msg); + my $banner = $options{banner} ? getbanner : undef; gtkadd( $mainw->{window}, gtkpack__( gtkset_border_width(Gtk2::VBox->new(0, 5), 6), - if_($options{banner}, getbanner), + if_($banner, $banner), $label, if_(exists $options{widgets}, @{$options{widgets}}), ) |