summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcontrol-center28
1 files changed, 15 insertions, 13 deletions
diff --git a/control-center b/control-center
index c52f475d..51a60a56 100755
--- a/control-center
+++ b/control-center
@@ -38,6 +38,15 @@ use my_gtk qw(:helpers :wrappers :various);
use ugtk qw(:helpers :wrappers :various);
use strict;
+#---
+# i18n
+# IMPORTANT: next code is needed to get correct namespace
+# (drakconf instead of libDrakX)
+# (This version is now UTF8 compliant - Sg 2001-08-18)
+#---
+
+push @::textdomains, 'drakconf';
+
# set the locale, needed for proper fontset and charset selection
Gtk->set_locale;
use Config;
@@ -318,12 +327,12 @@ foreach (@tree) {
$darea_left->signal_connect(expose_event => $draw);
$darea_left->signal_connect(realize => sub { $darea_left->window->set_cursor($cursor_hand) });
$darea_left->signal_connect(enter_notify_event => sub {
- return if ($darea_left->{state} != 0);
+ return if $darea_left->{state} != 0;
$darea_left->{state} = 1;
&$draw;
});
$darea_left->signal_connect(leave_notify_event => sub {
- return if ($darea_left->{state} != 1);
+ return if $darea_left->{state} != 1;
$darea_left->{state} = 0;
&$draw;
});
@@ -465,6 +474,7 @@ $summary_darea->signal_connect(expose_event => sub {
my $style = $summary_darea->style->copy();
$style->font(Gtk::Gdk::Font->fontset_load(N("-*-helvetica-medium-r-normal-*-20-*-100-100-p-*-iso8859-1,*-r-*")));
$pix_dbl->draw_string($style->font, $summary_darea->style->black_gc, 80, 115, N("Welcome to the Mandrake Control Center"));
+ local *VERS;
open VERS, "/etc/mandrake-release" or die N("cannot open this file for read: %s", $!);
my ($sysname, $nodename, $release, undef, $machine) = uname();
my $i = 0;
@@ -544,14 +554,6 @@ sub sig_usr2 {
$emb_socket->show;
}
-#---
-# i18n routines
-# IMPORTANT: next two routines have to be redefined here to
-# get correct namespace (drakconf instead of libDrakX)
-# (This version is now UTF8 compliant - Sg 2001-08-18)
-#---
-
-push @::textdomains, 'drakconf';
sub fork_ {
my ($prog, $do_not_kill) = @_;
@@ -561,7 +563,7 @@ sub fork_ {
exec($prog);
}
return if $do_not_kill;
- push @pid_launched, $pid if ($embedded);
+ push @pid_launched, $pid if $embedded;
}
@@ -650,7 +652,7 @@ sub launch_xapp {
sub clean_socket {
$emb_box->hide;
foreach (@pid_launched) {
- kill 'TERM', $_ if (defined $_);
+ kill 'TERM', $_ if defined $_;
}
@pid_launched = ();
$emb_socket and $emb_socket->destroy();
@@ -765,7 +767,7 @@ sub about_mdk_cc {
$translator_name, $translator_email],
);
}
- $clist->set_selectable($_, 0) foreach (0..$i);
+ $clist->set_selectable($_, 0) foreach 0..$i;
$clist->columns_autosize();
$clist->set_column_justification(0, "right");