summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-07 15:54:27 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-07 15:54:27 +0000
commitf6552aae471d51d54b91b302581ab51e36b12d7b (patch)
tree1f984423734c0916f1e6293d81f52b80fffbbb80 /mdkapplet
parent478c51c8ecfb3911879f891c40d7b140862c2808 (diff)
downloadmgaonline-f6552aae471d51d54b91b302581ab51e36b12d7b.tar
mgaonline-f6552aae471d51d54b91b302581ab51e36b12d7b.tar.gz
mgaonline-f6552aae471d51d54b91b302581ab51e36b12d7b.tar.bz2
mgaonline-f6552aae471d51d54b91b302581ab51e36b12d7b.tar.xz
mgaonline-f6552aae471d51d54b91b302581ab51e36b12d7b.zip
(get_banner) extract it out of confirm_upgrade() (will be reused in next commit)
Diffstat (limited to 'mdkapplet')
-rwxr-xr-xmdkapplet14
1 files changed, 9 insertions, 5 deletions
diff --git a/mdkapplet b/mdkapplet
index 9032170b..4cfae24a 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -373,6 +373,14 @@ sub restart_applet() {
exec($0, '--auto-update');
}
+sub get_banner() {
+ Gtk2::Banner->new(
+ (find { -e $_ }
+ qw(/usr/share/mcc/themes/default/rpmdrake-mdk.png /usr/share/icons/large/mdkonline.png)),
+ N("Distribution Upgrade")
+ )
+}
+
sub confirm_upgrade() {
local $mygtk2::left_padding = 0;
my $width = 500;
@@ -380,11 +388,7 @@ sub confirm_upgrade() {
my $warn_me = text2bool($local_config{DO_NOT_ASK_FOR_DISTRO_UPGRADE});
gtkadd($w->{window},
gtknew('VBox', children_tight => [
- Gtk2::Banner->new(
- (find { -e $_ }
- qw(/usr/share/mcc/themes/default/rpmdrake-mdk.png /usr/share/icons/large/mdkonline.png)),
- N("Distribution Upgrade")
- ),
+ get_banner(),
gtknew('Label_Left', text => N("A new stable distribution has been released."),
# workaround infamous 6 years old gnome bug #101968:
width => $width - 50),