diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-06-10 01:22:28 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-06-10 01:22:28 +0000 |
commit | d714c00b8bc20092bc53b616f59178d3933244e3 (patch) | |
tree | b2989f0a431bcd98eccbede731f9aa1e926db1c5 | |
parent | e81239c30bc9d053e42d76caae15aec5055c3df0 (diff) | |
download | rpmdrake-d714c00b8bc20092bc53b616f59178d3933244e3.tar rpmdrake-d714c00b8bc20092bc53b616f59178d3933244e3.tar.gz rpmdrake-d714c00b8bc20092bc53b616f59178d3933244e3.tar.bz2 rpmdrake-d714c00b8bc20092bc53b616f59178d3933244e3.tar.xz rpmdrake-d714c00b8bc20092bc53b616f59178d3933244e3.zip |
Factorize banner code
-rwxr-xr-x | rpmdrake | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -155,6 +155,14 @@ 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})) } @@ -1108,11 +1116,6 @@ Is it ok to continue?", $hpaned->pack2(create_scrolled_window($info), 1, 0); $table->attach($hpaned, 0, 2, 1, 2, ['expand', 'fill'], ['expand', 'fill'], 0, 0); - my %mode2title = ( - remove => N("Software Packages Removal"), - update => N("Software Packages Update"), - install => N("Software Packages Installation"), - ); my $status = Gtk2::Label->new; my $checkbox_show_autoselect; my ($menu, $factory) = create_factory_menu( @@ -1163,7 +1166,7 @@ Is it ok to continue?", gtkpack_( Gtk2::VBox->new(0, 3), 0, $menu, - 0, Gtk2::Banner->new("title-$MODE", $mode2title{$MODE}), + 0, getbanner(), 1, gtkadd( gtkset_shadow_type(gtkset_border_width(Gtk2::Frame->new, 3), 'none'), gtkpack_( |