summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-01-08 11:50:30 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-01-08 11:50:30 +0000
commit08b237275f2d1a3e01869febcc61c2cc2da22475 (patch)
treee699ae5c999bbbd6a3c064b99b9caf3c2c7a9bd9
parent244278dcb9dfb5f5fb140a93c6abc68c5d458b95 (diff)
downloadcontrol-center-08b237275f2d1a3e01869febcc61c2cc2da22475.tar
control-center-08b237275f2d1a3e01869febcc61c2cc2da22475.tar.gz
control-center-08b237275f2d1a3e01869febcc61c2cc2da22475.tar.bz2
control-center-08b237275f2d1a3e01869febcc61c2cc2da22475.tar.xz
control-center-08b237275f2d1a3e01869febcc61c2cc2da22475.zip
- save one /sbin/hostname fork/exec cost by using uname syscall
- give more control on title translators (blindly concatenating translated strings with non localized ones is always bad)
-rwxr-xr-xcontrol-center9
1 files changed, 4 insertions, 5 deletions
diff --git a/control-center b/control-center
index 790a7d44..f00b9237 100755
--- a/control-center
+++ b/control-center
@@ -536,7 +536,10 @@ gtkadd($window_global,
$window_global->signal_connect(delete_event => \&quit_global);
-$window_global->set_title(N("Mandrake Control Center %s", $version) . " [" . chomp_(`hostname`) . "]");
+
+use POSIX qw(:sys_utsname_h :math_h :sys_wait_h :unistd_h);
+my (undef, $nodename) = POSIX::uname();
+$window_global->set_title(N("Mandrake Control Center %s [on %s]", $version, $nodename));
$window_global->set_position('center');
foreach my $notebook ($notebook_global, $banner_notebook) {
@@ -560,10 +563,6 @@ add2notebook($notebook_global, "", create_scrolled_window(gtkset_size_request(my
),
);
-use POSIX qw(:sys_utsname_h :math_h :sys_wait_h :unistd_h);
-
-my (undef, $nodename, $release, undef, $machine) = POSIX::uname();
-
my ($hand_cursor, $normal_cursor, $wait_cursor) = map { Gtk2::Gdk::Cursor->new($_) } qw(hand2 left-ptr watch);