summaryrefslogtreecommitdiffstats
path: root/menus_launcher.pl
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-11-14 14:30:42 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-11-14 14:30:42 +0000
commit5d007314c18cbff6bc060ac2480afceb20e351c4 (patch)
treeba4c00cdcda1e4610c3a278a729b1979b34eac9d /menus_launcher.pl
parenta91fbcd6d8fc1c77fda2a73e4bdfb7662be51ea3 (diff)
downloadcontrol-center-5d007314c18cbff6bc060ac2480afceb20e351c4.tar
control-center-5d007314c18cbff6bc060ac2480afceb20e351c4.tar.gz
control-center-5d007314c18cbff6bc060ac2480afceb20e351c4.tar.bz2
control-center-5d007314c18cbff6bc060ac2480afceb20e351c4.tar.xz
control-center-5d007314c18cbff6bc060ac2480afceb20e351c4.zip
- don't use POSIX when uneeded
- use my_gtk to exit and transparently manage embedding - no need to run twice the main gtk loop
Diffstat (limited to 'menus_launcher.pl')
-rwxr-xr-xmenus_launcher.pl9
1 files changed, 4 insertions, 5 deletions
diff --git a/menus_launcher.pl b/menus_launcher.pl
index 011e1dc6..ce94c41f 100755
--- a/menus_launcher.pl
+++ b/menus_launcher.pl
@@ -2,8 +2,8 @@
use strict;
use lib qw(/usr/lib/libDrakX);
-use POSIX;
use ugtk;
+use my_gtk;
use common;
use interactive;
use standalone;
@@ -23,7 +23,7 @@ my $bindir = "/usr/bin/";
my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel;
$window->signal_connect (delete_event => sub {
ugtk::gtkset_mousecursor_normal();
- Gtk->exit(0);
+ my_gtk->exit(0);
} );
my $vbox = new Gtk::VBox(0,0);
$window->set_title(N("Menu Configuration Center"));
@@ -63,12 +63,11 @@ my $bbox = new Gtk::HButtonBox;
$vbox->pack_start($bbox,0,0,5);
$bbox->set_layout(-end);
my $button_ok = new Gtk::Button N("Done");
-$button_ok->signal_connect (clicked => sub { $::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0) });
+$button_ok->signal_connect (clicked => sub { my_gtk->exit(0) });
$button_ok->can_default(1);
$bbox->add($button_ok);
$window->show_all;
-Gtk->main_iteration while Gtk->events_pending;
-$::isEmbedded and kill 'USR2', $::CCPID;
Gtk->main;
+my_gtk->exit(0);