From 08b237275f2d1a3e01869febcc61c2cc2da22475 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 8 Jan 2004 11:50:30 +0000 Subject: - 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) --- control-center | 9 ++++----- 1 file 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); -- cgit v1.2.1