summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcontrol-center52
1 files changed, 16 insertions, 36 deletions
diff --git a/control-center b/control-center
index b286b5ba..b35c26b1 100755
--- a/control-center
+++ b/control-center
@@ -290,9 +290,7 @@ my ($menu, $factory) = create_factory_menu($window_global,
}
},
{ path => join('', @{$options{embedded_mode}}), type => '<ToggleItem>',
- callback => sub {
- $embedded = $embedded_check_box->active;
- }
+ callback => sub { $embedded = $embedded_check_box->active }
},
if_($::isWiz,
{ path => join('', @{$options{wiz_expert}}), type => '<ToggleItem>',
@@ -362,7 +360,7 @@ gtkadd($window_global,
)
),
1, my $notebook_global = gtkset_name(Gtk2::Notebook->new, 'mcc'),
- 0, gtkadd(gtkset_shadow_type(gtkset_size_request(gtkset_border_width($exp_frame = Gtk2::Frame->new(N("Logs")), 5), 0, 120), 'etched_out')),
+ 0, gtkadd(gtkset_shadow_type(gtkset_size_request(gtkset_border_width($exp_frame = Gtk2::Frame->new(N("Logs")), 5), 0, 120), 'etched_in')),
0, gtksignal_connect(gtkset_size_request(Gtk2::DrawingArea->new(), -1, 1),
realize => sub { set_back_pixbuf($_[0], gtkcreate_pixbuf('mcc-right-bottom')) }),
@@ -554,8 +552,6 @@ foreach (@tree) {
# my $vscrollbar = new Gtk2::VScrollbar(Gtk2::Adjustment->new);
$notebook_global->append_page(my $w_ret = create_scrolled_window($tbl, undef, 'none'));
-# $notebook_global->append_page(create_scrolled_window($tbl));
-# $notebook_global->append_page($tbl);
# $w_ret->vscrollbar->set_size_request(19, undef);
}
@@ -642,7 +638,9 @@ sub update_exp {
return if $still_in_splash_screen || $pending_app;
if ($show_logs) {
$exp_frame->show_all;
- } elsif ($exp_frame) { $exp_frame->hide }
+ } else {
+ $exp_frame->hide;
+ }
}
@@ -658,7 +656,6 @@ sub sig_child {
return unless $left_locked;
kill('USR1', $$);
splash_warning(N("This program has exited abnormally"));
-# Gtk2->main
}
# got when child properly exited
@@ -675,7 +672,7 @@ sub sig_usr1 {
sub sig_usr2 {
$left_locked = 0;
$emb_wait->hide;
- $emb_socket->show;
+ $emb_socket->show if $emb_socket;
}
@@ -744,7 +741,7 @@ sub compute_exec_string {
# (re)start logdrake if needed
if ($show_logs && $freeze_log) { #FIXME && !$exp_socket
my $exp_socket;
- gtkadd($exp_frame, gtkset_name($exp_socket = Gtk2::Socket->new), 'mcc');
+ gtkadd($exp_frame, $exp_socket = Gtk2::Socket->new);
$exp_socket->realize;
my $exec_log = "logdrake --explain=$log_exp --embedded " . $exp_socket->window->XWINDOW . " " . $$;
$freeze_log = 0;
@@ -765,23 +762,27 @@ sub launch_xapp {
return $1;
}
+sub kill_them_all {
+ map { if__($_, kill 'TERM', $_) } @_;
+}
+
sub kill_children {
- map { if__($_, kill 'TERM', $_) } @pid_launched;
+ kill_them_all(@pid_launched);
@pid_launched = ();
}
sub kill_logdrake {
- map { if__($_, kill 'TERM', $_) } @pid_exp;
+ kill_them_all(@pid_exp);
}
sub quit_global {
&kill_children();
&kill_logdrake();
setVarsInSh($conffile, {
- EMBEDDED => bool2text($embedded),
- LOGS => bool2text($show_logs),
+ EMBEDDED => bool2text($embedded),
+ LOGS => bool2text($show_logs),
EXPERT_WIZARD => bool2text($expert_wizard),
- THEME => $theme,
+ THEME => $theme,
});
gtkset_mousecursor_normal();
Gtk2->exit(0);
@@ -888,27 +889,6 @@ sub about_mdk_cc {
$window_about->show_all;
}
-sub connect_to_site {
- my ($link, $help)=@_;
- my $browser = $ENV{BROWSER};
- my $initial_user = $ENV{INITIAL_USER};
-
- unless ($browser) {
- splash_warning(" " . N("Warning: No browser specified") . " ");
- return;
- }
-
- if ($help) {
- fork_("$browser $link &");
- } else {
- if ($initial_user && $initial_user ne "root") {
- fork_("su -m -l $initial_user -c \"$browser $link &\"");
- } else {
- splash_warning(" ".N("Security Warning: I'm not allowed to connect to the internet as root user")." ");
- }
- }
-}
-
#-------------------------------------------------------------
# mcc specific graphic functions: