diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-02-24 07:36:00 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-02-24 07:36:00 +0000 |
commit | 04a32a7f6b48a977c768d62a1c28f00958e0c9df (patch) | |
tree | 05ea561bbfdbb2819f457e37b6f8d197540e3bf1 | |
parent | e58ebc9dfceda9a7ceaab42e1aacb85724e65f96 (diff) | |
download | drakx-04a32a7f6b48a977c768d62a1c28f00958e0c9df.tar drakx-04a32a7f6b48a977c768d62a1c28f00958e0c9df.tar.gz drakx-04a32a7f6b48a977c768d62a1c28f00958e0c9df.tar.bz2 drakx-04a32a7f6b48a977c768d62a1c28f00958e0c9df.tar.xz drakx-04a32a7f6b48a977c768d62a1c28f00958e0c9df.zip |
- clean up embedding; since socket get automatically destroyed on child exit
and since they emit plug-removed at that moment, it's just cleaner to
centralize/consolidate the child exit in mcc
this of course, need a newer up-to-date mcc
what's more, it allows to remove the somewhat mythical
"$::isEmbedded and kill 'USR1', $::CCPID;"
- drakautoinst, drakxservices, keyboardrake: fix fscking embedding managment
-rw-r--r-- | perl-install/bootlook.pm | 10 | ||||
-rw-r--r-- | perl-install/diskdrake/hd_gtk.pm | 4 | ||||
-rw-r--r-- | perl-install/drakxtools.spec | 7 | ||||
-rw-r--r-- | perl-install/my_gtk.pm | 1 | ||||
-rwxr-xr-x | perl-install/standalone/XFdrake | 5 | ||||
-rwxr-xr-x | perl-install/standalone/drakTermServ | 1 | ||||
-rwxr-xr-x | perl-install/standalone/drakautoinst | 3 | ||||
-rwxr-xr-x | perl-install/standalone/drakboot | 4 | ||||
-rwxr-xr-x | perl-install/standalone/drakfont | 1 | ||||
-rwxr-xr-x | perl-install/standalone/drakxservices | 4 | ||||
-rwxr-xr-x | perl-install/standalone/keyboarddrake | 6 | ||||
-rw-r--r-- | perl-install/ugtk2.pm | 1 |
12 files changed, 15 insertions, 32 deletions
diff --git a/perl-install/bootlook.pm b/perl-install/bootlook.pm index 2736befa0..c525673f5 100644 --- a/perl-install/bootlook.pm +++ b/perl-install/bootlook.pm @@ -45,7 +45,7 @@ my $inmain = 0; my $lilogrub = chomp_(`detectloader -q`); my $window = $::isEmbedded ? new Gtk2::Plug($::XID) : new Gtk2::Window("toplevel"); -$window->signal_connect(delete_event => sub { $::isEmbedded ? kill('USR1', $::CCPID) : Gtk2->exit(0) }); +$window->signal_connect(delete_event => sub { utk2->exit(0) }); $window->set_title(N("Boot Style Configuration")); $window->set_border_width(2); #$window->realize; @@ -64,7 +64,7 @@ $window->set_border_width(2); # the menus are not shown # but they provides shiny shortcut like C-q my @menu_items = ({ path => N("/_File"), type => '<Branch>' }, - { path => N("/File/_Quit"), accelerator => N("<control>Q"), callback => sub { $::isEmbedded ? kill('USR1', $::CCPID) : Gtk2->exit(0) } }, + { path => N("/File/_Quit"), accelerator => N("<control>Q"), callback => sub { ugtk2->exit(0) } }, ); my $menubar = create_factory_menu($window, @menu_items); ######### menus end @@ -139,7 +139,7 @@ my $keep_logo = 1; $logo_thm->set_active(1); $logo_thm->signal_connect(clicked => sub { invbool(\$keep_logo) }); $B_create->signal_connect(clicked => sub { - $::isEmbedded ? (kill('USR1', $::CCPID) and system('/usr/sbin/draksplash ')) : system('/usr/sbin/draksplash '); + system('/usr/sbin/draksplash '); }); #- ******** action to take on changing combos values @@ -326,8 +326,8 @@ Click on Configure to launch the setup wizard.", $lilogrub), ) ), gtkadd(gtkset_layout(new Gtk2::HButtonBox, 'end'), - gtksignal_connect(new Gtk2::Button(N("OK")), clicked => sub { Xconfig::various::runlevel($x_mode ? 5 : 3); updateAutologin(); updateAurora(); $::isEmbedded ? kill('USR1',$::CCPID) : Gtk2->exit(0) }), - gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub { $::isEmbedded ? kill('USR1', $::CCPID) : Gtk2->exit(0) }) + gtksignal_connect(new Gtk2::Button(N("OK")), clicked => sub { Xconfig::various::runlevel($x_mode ? 5 : 3); updateAutologin(); updateAurora(); ugtk2->exit(0) }), + gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub { ugtk2->exit(0) }) ) ) ); diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index 321682581..cce017e50 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -124,9 +124,7 @@ sub try_ { $current_entry = '' if !diskdrake::interactive::is_part_existing($current_entry, $all_hds); $update_all->(); - if ($v && member($name, 'Done', 'Wizard')) { - $::isEmbedded ? kill('USR1', $::CCPID) : Gtk2->main_quit; - } + Gtk2->main_quit if $v && member($name, 'Done', 'Wizard'); } ################################################################################ diff --git a/perl-install/drakxtools.spec b/perl-install/drakxtools.spec index 7312ada19..a3a152a69 100644 --- a/perl-install/drakxtools.spec +++ b/perl-install/drakxtools.spec @@ -1,7 +1,7 @@ Summary: The drakxtools (XFdrake, diskdrake, keyboarddrake, mousedrake...) Name: drakxtools Version: 9.1 -Release: 4mdk +Release: 5mdk Url: http://www.mandrakelinux.com/en/drakx.php3 Source0: %name-%version.tar.bz2 License: GPL @@ -9,7 +9,7 @@ Group: System/Configuration/Other # Temporary requires for tools that still use gtk+1 (mainly drakfloppy and net_monitor) Requires: perl-GTK >= 0.6123, perl-GTK-GdkImlib, perl-GTK-GdkPixbuf Requires: %{name}-newt = %version-%release, perl-GTK2 >= 0.0.cvs.2003.01.27.1-2mdk, XFree86-100dpi-fonts, XFree86-75dpi-fonts, /usr/X11R6/bin/xtest, font-tools, usermode >= 1.44-4mdk, perl-MDK-Common >= 1.0.4-14mdk -Conflicts: drakconf < 9.1-0.4mdk +Conflicts: drakconf < 9.1-3mdk BuildRequires: gettext, libgtk+-x11-2.0-devel, ldetect-devel >= 0.4.8, ncurses-devel, newt-devel, perl-devel, libext2fs-devel, perl-MDK-Common-devel BuildRoot: %_tmppath/%name-buildroot Provides: draksec @@ -291,6 +291,9 @@ file /etc/sysconfig/harddrake2/previous_hw | fgrep -q perl && %_datadir/harddrak %config(noreplace) %_sysconfdir/logrotate.d/drakxtools-http %changelog +* Mon Feb 24 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 9.1-5mdk +- clean up exit of tools when embedded in the mcc + * Fri Feb 21 2003 Damien Chaumette <dchaumette@mandrakesoft.com> 9.1-4mdk - drakconnect fixes diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index f7d7600b0..50fbcc630 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -138,7 +138,6 @@ sub flush { gtkflush() } sub exit { gtkset_mousecursor_normal(); #- for restoring a normal in any case flush(); - $::isEmbedded and kill 'USR1', $::CCPID; c::_exit($_[1]) #- workaround } diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake index 44f0e28d2..b8a905b75 100755 --- a/perl-install/standalone/XFdrake +++ b/perl-install/standalone/XFdrake @@ -59,10 +59,7 @@ begin: }; $rc && $rc eq 'config_changed' and ask_for_X_restart($in); - $in->exit(0) if !$::isEmbedded; - - kill 'USR1', $::CCPID; - goto begin; + $in->exit(0); } sub check_XFree { diff --git a/perl-install/standalone/drakTermServ b/perl-install/standalone/drakTermServ index f39c2c3b9..fb98bf47a 100755 --- a/perl-install/standalone/drakTermServ +++ b/perl-install/standalone/drakTermServ @@ -304,7 +304,6 @@ sub interactive_mode { }), gtksignal_connect(new Gtk2::Button(N("Close")), clicked => sub { write_conf_file(); - $::isEmbedded and kill 'USR1', $::CCPID; Gtk2->main_quit(); }), ), diff --git a/perl-install/standalone/drakautoinst b/perl-install/standalone/drakautoinst index fe670be62..540a2fb82 100755 --- a/perl-install/standalone/drakautoinst +++ b/perl-install/standalone/drakautoinst @@ -241,8 +241,7 @@ quit_global($in, 0); sub quit_global { my ($in, $exitcode) = @_; - $::isEmbedded ? kill 'USR1', $::CCPID : $in->exit($exitcode); - goto begin; + $in->exit($exitcode); } diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot index 5abdff7f3..0e0765b9b 100755 --- a/perl-install/standalone/drakboot +++ b/perl-install/standalone/drakboot @@ -23,9 +23,7 @@ if ($in->isa('interactive::gtk')) { lilo_choice(); } -!$::isEmbedded and $in->exit(0); -kill('USR1', $::CCPID); -goto ask; +$in->exit(0); sub lilo_choice { my $bootloader = bootloader::read(); diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont index 4200b0b7b..faf4b4bdb 100755 --- a/perl-install/standalone/drakfont +++ b/perl-install/standalone/drakfont @@ -600,7 +600,6 @@ sub interactive_mode { gtksignal_connect(new Gtk2::Button(N("About")), clicked => sub { help() }), gtksignal_connect(new Gtk2::Button(N("Close")), clicked => sub { - $::isEmbedded and kill 'USR1', $::CCPID; Gtk2->main_quit(); }), ), diff --git a/perl-install/standalone/drakxservices b/perl-install/standalone/drakxservices index 348331fe4..bb6dea16d 100755 --- a/perl-install/standalone/drakxservices +++ b/perl-install/standalone/drakxservices @@ -14,6 +14,4 @@ my $in = 'interactive'->vnew('su', 'services'); begin: my $l = services::ask($in); services::doit($in, $l) if $l; -!$::isEmbedded and $in->exit(0); -kill 'USR1', $::CCPID; -goto begin; +$in->exit(0); diff --git a/perl-install/standalone/keyboarddrake b/perl-install/standalone/keyboarddrake index 004689b3f..081ddc5b2 100755 --- a/perl-install/standalone/keyboarddrake +++ b/perl-install/standalone/keyboarddrake @@ -49,10 +49,4 @@ keyboard::write($keyboard); system('/etc/init.d/keytable', 'restart'); end: -if ($::isEmbedded) { - kill('USR1', $::CCPID); - $keyboard = ''; - goto begin; -} else { $in->exit(0) if $in; -} diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 651ffea10..accdccdae 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -873,7 +873,6 @@ sub flush { gtkflush() } sub exit { gtkset_mousecursor_normal(); #- for restoring a normal in any case flush(); - $::isEmbedded and kill 'USR1', $::CCPID; c::_exit($_[1]) #- workaround } |