aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-10 01:48:29 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-10 01:48:29 +0000
commit2ebbfb9d4d04547978de66c7d53e68a6735c0773 (patch)
treef5c9de4d46deb5f46df80955671263ade9443dff
parentd714c00b8bc20092bc53b616f59178d3933244e3 (diff)
downloadrpmdrake-2ebbfb9d4d04547978de66c7d53e68a6735c0773.tar
rpmdrake-2ebbfb9d4d04547978de66c7d53e68a6735c0773.tar.gz
rpmdrake-2ebbfb9d4d04547978de66c7d53e68a6735c0773.tar.bz2
rpmdrake-2ebbfb9d4d04547978de66c7d53e68a6735c0773.tar.xz
rpmdrake-2ebbfb9d4d04547978de66c7d53e68a6735c0773.zip
Don't hide banner in mcc when lauching rpmdrake
-rwxr-xr-xrpmdrake15
-rw-r--r--rpmdrake.pm10
2 files changed, 14 insertions, 11 deletions
diff --git a/rpmdrake b/rpmdrake
index b19c2097..4c2ed8c7 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -155,17 +155,10 @@ package main;
my $w;
my $changelog_first;
-sub getbanner {
- Gtk2::Banner->new("title-$MODE", {
- remove => N("Software Packages Removal"),
- update => N("Software Packages Update"),
- install => N("Software Packages Installation"),
- }->{$MODE}),
-}
-
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 wait_msg_with_banner { push @_, banner => 1 if $::isEmbedded; &wait_msg_ }
$> and (interactive_msg_(N("Running in user mode"),
N("You are launching this program as a normal user.
@@ -1166,7 +1159,7 @@ Is it ok to continue?",
gtkpack_(
Gtk2::VBox->new(0, 3),
0, $menu,
- 0, getbanner(),
+ 0, getbanner,
1, gtkadd(
gtkset_shadow_type(gtkset_border_width(Gtk2::Frame->new, 3), 'none'),
gtkpack_(
@@ -1297,7 +1290,7 @@ Then, restart %s.", $rpmdrake::myname_update)), myexit(-1);
$section =~ /^(pre|description)\z/ and $cur->{$1} .= $_;
}
}
- my $wait = wait_msg_(N("Please wait, finding available packages..."));
+ my $wait = wait_msg_with_banner(N("Please wait, finding available packages..."));
my $urpm = urpm->new;
$urpm->{state} = {};
my %installable_pkgs;
@@ -1693,7 +1686,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_with_banner(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 42cc6796..5177e44c 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -59,6 +59,7 @@ our @EXPORT = qw(
interactive_packtable
interactive_list
fatal_msg
+ getbanner
wait_msg
remove_wait_msg
but
@@ -295,6 +296,14 @@ sub fatal_msg {
myexit -1;
}
+sub getbanner () {
+ 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();
@@ -305,6 +314,7 @@ sub wait_msg {
$mainw->{window},
gtkpack__(
gtkset_border_width(Gtk2::VBox->new(0, 5), 6),
+ if_($options{banner}, getbanner),
$label,
if_(exists $options{widgets}, @{$options{widgets}}),
)