diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-02-25 13:15:44 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-02-25 13:15:44 +0000 |
commit | 52795345e61d97abbcc211fec5d2fc4802e13cfc (patch) | |
tree | 457ec6dfee2e21a249a9206c3095e4bd9019d867 | |
parent | 255d721e6a6764f48ed8af553c37a2582031e0f1 (diff) | |
download | control-center-52795345e61d97abbcc211fec5d2fc4802e13cfc.tar control-center-52795345e61d97abbcc211fec5d2fc4802e13cfc.tar.gz control-center-52795345e61d97abbcc211fec5d2fc4802e13cfc.tar.bz2 control-center-52795345e61d97abbcc211fec5d2fc4802e13cfc.tar.xz control-center-52795345e61d97abbcc211fec5d2fc4802e13cfc.zip |
- do not pass extra argument after --embedded
- make wait area be mcc theme aware
- fix display cleaning when embedded process crash
-rwxr-xr-x | control-center | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/control-center b/control-center index 586a48c2..8d7f2db4 100755 --- a/control-center +++ b/control-center @@ -342,23 +342,29 @@ gtkadd($window_global, 1, gtkpack_(Gtk2::VBox->new(0, 0), 0, gtksignal_connect(gtkset_size_request(Gtk2::DrawingArea->new(), -1, 1), realize => sub { set_back_pixbuf($_[0], gtkcreate_pixbuf('mcc-right-bottom')) }), - 1, gtkpack_(my $emb_box = Gtk2::VBox->new(0, 0), - 1, my $emb_wait = gtkpack_(Gtk2::VBox->new(0, 0), - 1, Gtk2::HBox->new(0, 0), - 0, gtkpack_(Gtk2::HBox->new(0, 0), - 1, Gtk2::VBox->new(0, 0), - 0, gtkadd(gtkset_shadow_type(Gtk2::Frame->new, 'etched_out'), - my $run_darea = gtkset_size_request(Gtk2::DrawingArea->new, 128, 128) - ), - 1, Gtk2::VBox->new(0, 0), - ), - 0, Gtk2::Label->new(N("Please wait...")), - 1, Gtk2::HBox->new(0, 0), - 0, gtkadd(gtkset_layout(gtkset_border_width(Gtk2::HButtonBox->new, 10), 'end'), - gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { Gtk2->timeout_remove($timeout) if $timeout; &child_just_exited() }), - ) - ) - ), + 1, gtkset_name( + gtkadd(my $emb_frame = Gtk2::EventBox->new, + gtkadd(gtkset_border_width(Gtk2::Frame->new, 5), + gtkpack_(my $emb_box = Gtk2::VBox->new(0, 0), + 1, gtkpack_(my $emb_wait = Gtk2::VBox->new(0, 0), + 1, Gtk2::HBox->new(0, 0), + 0, gtkpack_(Gtk2::HBox->new(0, 0), + 1, Gtk2::VBox->new(0, 0), + 0, gtkadd(gtkset_shadow_type(Gtk2::Frame->new, 'etched_out'), + my $run_darea = gtkset_size_request(Gtk2::DrawingArea->new, 128, 128) + ), + 1, Gtk2::VBox->new(0, 0), + ), + 0, Gtk2::Label->new(N("Please wait...")), + 1, Gtk2::HBox->new(0, 0), + 0, gtkadd(gtkset_layout(gtkset_border_width(Gtk2::HButtonBox->new, 10), 'end'), + gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { Gtk2->timeout_remove($timeout) if $timeout; &child_just_exited() }), + ), + ), + ), + ), + ), + 'mcc'), 1, my $notebook_global = gtkset_name(Gtk2::Notebook->new, 'mcc'), 0, gtkset_name(my $w_exp = create_scrolled_window(gtkset_shadow_type(gtkset_size_request(gtkset_border_width($exp_frame = Gtk2::Frame->new(N("Logs")), 5), -1, 120), 'etched_in'), undef, 'none'), 'mcc'), 0, gtksignal_connect(gtkset_size_request(Gtk2::DrawingArea->new(), -1, 1), @@ -564,7 +570,7 @@ foreach (@tree) { $notebook_global->set_size_request(-1, $index * 60); -$emb_box->set_size_request(-1, $index * 50); +$emb_frame->set_size_request(-1, $index * 50); foreach ([ $show_log_check_box, $show_logs ], [ $embedded_check_box, $embedded ], if_($::isWiz, [ $expert_wizard_check_box, $expert_wizard ])) { my ($widget, $value) = @$_; @@ -600,7 +606,7 @@ $notebook_global->signal_connect(switch_page => sub { $window_global->show_all; $exp_frame->hide; -$emb_box->hide; +$emb_frame->hide; $SIG{USR1} = 'IGNORE'; $SIG{USR2} = 'IGNORE'; #sub { print "GOT DUMMY USR2\n" }; @@ -629,7 +635,7 @@ sub child_just_exited { } sub hide_socket_and_clean { - $emb_box->hide; + $emb_frame->hide; $pending_app = 0; update_exp(); } @@ -643,7 +649,7 @@ sub clean_socket { sub create_hidden_socket_if_needed { hide_socket_and_clean(); # clean_socket(); unless ($emb_socket) { - gtkpack($emb_box, gtksignal_connect($emb_socket = Gtk2::Socket->new, 'plug-removed' => \&child_just_exited)) unless $socket; + gtkpack($emb_box, gtksignal_connect($emb_socket = Gtk2::Socket->new, 'plug-removed' => \&child_just_exited)); # emitted when embedded apps begin to draw $emb_socket->signal_connect('plug-added' => sub { $left_locked = 0; @@ -677,7 +683,7 @@ sub sig_child { my $kid; do { $kid = waitpid(-1, POSIX::WNOHANG) } until $kid > 0; return unless $left_locked; - kill('USR1', $$); + child_just_exited splash_warning(N("This program has exited abnormally")); } @@ -710,11 +716,11 @@ sub compute_exec_string { if ($embedded && $gtkplug != -1) { # globally embedded and not "explicitely not embedded" $notebook_global->hide; create_hidden_socket_if_needed(); - $emb_box->show; + $emb_frame->show; $emb_socket->realize; $pending_app = 1; if ($gtkplug > 0) { - $exec .= " --embedded " . $emb_socket->window->XWINDOW . " " . $$; + $exec .= " --embedded " . $emb_socket->window->XWINDOW; $emb_wait->show; $run_pixbuf->unref if $run_pixbuf; $run_pixbuf = gtkcreate_pixbuf($icon . "_128"); @@ -751,7 +757,7 @@ sub compute_exec_string { my $exp_socket; gtkshow(gtkadd($exp_frame, $exp_socket = Gtk2::Socket->new)); $w_exp->show; - my $exec_log = "logdrake --explain=$log_exp --embedded " . $exp_socket->window->XWINDOW . " " . $$; + my $exec_log = "logdrake --explain=$log_exp --embedded " . $exp_socket->window->XWINDOW; $freeze_log = 0; fork_($exec_log, \@pid_exp); } |