diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-22 14:15:58 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-22 14:15:58 +0000 |
commit | fbd149c8147b5a70a38abbf2f97e47ca92bc9d26 (patch) | |
tree | 9d86c5bf03650189c9fc95d624304e5ee8b92841 /perl-install/standalone/drakclock | |
parent | c71526807728e9198dde7e74eface63d6e903b0f (diff) | |
download | drakx-backup-do-not-use-fbd149c8147b5a70a38abbf2f97e47ca92bc9d26.tar drakx-backup-do-not-use-fbd149c8147b5a70a38abbf2f97e47ca92bc9d26.tar.gz drakx-backup-do-not-use-fbd149c8147b5a70a38abbf2f97e47ca92bc9d26.tar.bz2 drakx-backup-do-not-use-fbd149c8147b5a70a38abbf2f97e47ca92bc9d26.tar.xz drakx-backup-do-not-use-fbd149c8147b5a70a38abbf2f97e47ca92bc9d26.zip |
show timezone in drakclock (Robert Vojta, #9141)
Diffstat (limited to 'perl-install/standalone/drakclock')
-rwxr-xr-x | perl-install/standalone/drakclock | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/perl-install/standalone/drakclock b/perl-install/standalone/drakclock index 607cb52a6..ac982e158 100755 --- a/perl-install/standalone/drakclock +++ b/perl-install/standalone/drakclock @@ -33,18 +33,23 @@ $my_win->{window}->signal_connect(delete_event => sub { ugtk2->exit(0) }); my $calendar = Gtk2::Calendar->new; $calendar->signal_connect($_ => \&cal_changed) foreach 'month-changed', 'day-selected', 'day-selected-double-click', 'prev-month', 'next-month', 'prev-year', 'next-year'; +$in->{timezone} = {}; +add2hash($in->{timezone}, timezone::read()); + +my $label_timezone = Gtk2::Label->new(defined($in->{timezone}{timezone}) ? $in->{timezone}{timezone} : N("not defined")); + my $button_time = Gtk2::Button->new(N("Change Time Zone")); $button_time->signal_connect(clicked => sub { local $::isEmbedded = 0; # to prevent sub window embedding - $in->{timezone} = {}; - add2hash($in->{timezone}, timezone::read()); my $timezone = $in->{timezone}{timezone}; $in->{timezone}{timezone} = $in->ask_from_treelist(N("Timezone - DrakClock"), N("Which is your timezone?"), '/', [ timezone::getTimeZones() ], $timezone); if (defined($in->{timezone}{timezone})) { $in->{timezone}{UTC} = $in->ask_yesorno(N("GMT - DrakClock"), N("Is your hardware clock set to GMT?"), $in->{timezone}{UTC}); timezone::write($in->{timezone}); + $label_timezone->set_text($in->{timezone}{timezone}); } else { $in->{timezone}{timezone} = $timezone; + $label_timezone->set_text($timezone); } }); #my $button_ntp = Gtk2::Button->new(N("Use NTP")); @@ -67,7 +72,10 @@ $my_win->{window}->add(gtkpack_(Gtk2::VBox->new, 1, gtkpack_(Gtk2::HBox->new, 1, gtkpack_(Gtk2::VBox->new, 0, $calendar, - 0, $button_time, + 0, gtkadd(gtkset_shadow_type(Gtk2::Frame->new(N("Timezone")), 'etched_in'), + gtkpack__(Gtk2::VBox->new, + $label_timezone, + $button_time)), 1, gtkadd(gtkset_shadow_type(Gtk2::Frame->new(N("Network Time Protocol")), 'etched_in'), gtkpack_(Gtk2::VBox->new, 0, Gtk2::Label->new(N("Your computer can synchronize its clock\n with a remote time server using NTP")), |