aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-07-02 12:46:57 +0000
committerThierry Vignaud <tv@mandriva.org>2008-07-02 12:46:57 +0000
commitbae8d4e75bcf20d519c6962968a0bb56408e7773 (patch)
tree14326b8ecafdf7283654c830a12233c621337802
parentfc2124e224c18b8846b7c11c6878a2335a39c6dc (diff)
downloadrpmdrake-bae8d4e75bcf20d519c6962968a0bb56408e7773.tar
rpmdrake-bae8d4e75bcf20d519c6962968a0bb56408e7773.tar.gz
rpmdrake-bae8d4e75bcf20d519c6962968a0bb56408e7773.tar.bz2
rpmdrake-bae8d4e75bcf20d519c6962968a0bb56408e7773.tar.xz
rpmdrake-bae8d4e75bcf20d519c6962968a0bb56408e7773.zip
(main_quit) factorize GUI exiting in it (needed for next commits)
-rwxr-xr-xrpmdrake8
1 files changed, 6 insertions, 2 deletions
diff --git a/rpmdrake b/rpmdrake
index 71d228e4..7870c595 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -207,6 +207,10 @@ sub do_search($$$$$$$) {
$tree_selection->signal_emit('changed');
}
+sub quit() {
+ Gtk2->main_quit
+}
+
sub run_treeview_dialog {
my ($callback_action) = @_;
@@ -534,7 +538,7 @@ sub run_treeview_dialog {
$tree_selection->signal_emit('changed');
}, undef, '<Item>' ],
[ N("/_File") . N("/Reload the _packages list"), undef, $reload_db_and_clear_all, undef, '<Item>' ],
- [ N("/_File") . N("/_Quit"), N("<control>Q"), sub { Gtk2->main_quit }, undef, '<Item>', ],
+ [ N("/_File") . N("/_Quit"), N("<control>Q"), \&quit, undef, '<Item>', ],
#[ N("/_View"), undef, undef, undef, '<Branch>' ],
if_(!$>,
[ N("/_Options"), undef, undef, undef, '<Branch>' ],
@@ -649,7 +653,7 @@ sub run_treeview_dialog {
),
0, gtksignal_connect(
Gtk2::Button->new(but_(N("Quit"))),
- clicked => sub { Gtk2->main_quit },
+ clicked => \&quit,
),
),
),