summaryrefslogtreecommitdiffstats
path: root/clock.pm
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-04-08 23:29:12 +0000
committerdamien <damien@mandriva.com>2001-04-08 23:29:12 +0000
commit5166be73c82e447955742d88efd7bec038f3cad6 (patch)
tree1f8da9320fb2caba75c3dc4d8af8281474ab645f /clock.pm
parentfde46fee642293c604a284ded76ab27b3183979f (diff)
downloadcontrol-center-5166be73c82e447955742d88efd7bec038f3cad6.tar
control-center-5166be73c82e447955742d88efd7bec038f3cad6.tar.gz
control-center-5166be73c82e447955742d88efd7bec038f3cad6.tar.bz2
control-center-5166be73c82e447955742d88efd7bec038f3cad6.tar.xz
control-center-5166be73c82e447955742d88efd7bec038f3cad6.zip
added timezone
Diffstat (limited to 'clock.pm')
-rwxr-xr-xclock.pm23
1 files changed, 21 insertions, 2 deletions
diff --git a/clock.pm b/clock.pm
index b73ee508..77c623b4 100755
--- a/clock.pm
+++ b/clock.pm
@@ -2,10 +2,17 @@
use POSIX;
use Gtk;
+use lib qw(/usr/lib/libDrakX);
+use interactive;
+use standalone;
+use common qw(:common :file :functional :system);
+use timezone;
+use Data::Dumper;
init Gtk;
#use strict;
$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/;
+my $in = vnew interactive('su');
my $pi=3.1416;
my $pixmap;
my $radius;
@@ -14,7 +21,7 @@ my $dRadians_min;
my $dRadians_sec;
my $Radian;
my $timer;
-my $midx, $midy;
+my ($midx, $midy);
my $first=1;
my $is24;
my $h_old;
@@ -26,11 +33,23 @@ $window->add($vbox);
$window->signal_connect ( delete_event => \&quit_global );
my $hbox = new Gtk::HBox(0,0);
$vbox->pack_start($hbox, 1, 1, 0);
+my $vbox1 = new Gtk::VBox(0,0);
+$hbox->pack_start($vbox1, 1, 1, 0);
my $calendar = new Gtk::Calendar;
-$hbox->pack_start($calendar, 1, 1, 0);
+$vbox1->pack_start($calendar, 1, 1, 0);
$calendar->signal_connect ( $_ => \&cal_changed )
foreach ('month-changed', 'day-selected', 'day-selected-double-click', 'prev-month', 'next-month', 'prev-year', 'next-year');
+my $button_time = new Gtk::Button "Time Zone";
+$vbox1->pack_start($button_time, 0, 1, 10);
+$button_time->signal_connect ( clicked => sub {
+ $in->{timezone}={};
+ add2hash($in->{timezone}, { timezone::read('') });
+ print "###\n" . Data::Dumper->Dump([$in],['$in']) . "\n###\n";
+ $in->{timezone}{timezone} = $in->ask_from_treelist('', _("Which is your timezone?"), '/', [ timezone::getTimeZones('') ], $in->{timezone}{timezone});
+ $in->{timezone}{UTC} = $in->ask_yesorno('', _("Is your hardware clock set to GMT?"), $in->{timezone}{UTC});
+ timezone::write('', $in->{timezone});
+ });
my $vbox2 = new Gtk::VBox(0,0);
$hbox->pack_start($vbox2, 1, 1, 0);
my $drawing_area = new Gtk::DrawingArea;