diff options
author | damien <damien@mandriva.com> | 2001-03-06 03:51:03 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2001-03-06 03:51:03 +0000 |
commit | 0f018505a9be193d71a6ff8660d2cb3f48d38b65 (patch) | |
tree | 86c1c1ff68ec57c9ce93021c338cb5c7af8293ef /clock.pm | |
parent | 24dcbf3b167a74d5f76feac3d8aba47aef635916 (diff) | |
download | control-center-0f018505a9be193d71a6ff8660d2cb3f48d38b65.tar control-center-0f018505a9be193d71a6ff8660d2cb3f48d38b65.tar.gz control-center-0f018505a9be193d71a6ff8660d2cb3f48d38b65.tar.bz2 control-center-0f018505a9be193d71a6ff8660d2cb3f48d38b65.tar.xz control-center-0f018505a9be193d71a6ff8660d2cb3f48d38b65.zip |
updated
Diffstat (limited to 'clock.pm')
-rwxr-xr-x | clock.pm | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -20,6 +20,7 @@ my $first=1; my $is24; my $h_old; my ($old_year, $old_month, $old_day); +my $its_reset=0; my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel; my $vbox = new Gtk::VBox(0,0); $window->add($vbox); @@ -104,11 +105,13 @@ $button_cancel->signal_connect ( clicked => sub { }); $bbox->add($button_cancel ); $button_reset->signal_connect ( clicked => sub { + $its_reset=1; $timer=Gtk->timeout_add(120, sub { time_to_rad(localtime(time)); Repaint($drawing_area) }); time_to_rad(localtime(time)); Repaint($drawing_area); $calendar->select_month($old_month, $old_year); $calendar->select_day($old_day); $button_reset->set_sensitive(0); + $its_reset=0; }); $bbox->add($button_reset); @@ -127,7 +130,7 @@ $timer=Gtk->timeout_add(120, sub { time_to_rad(localtime(time)); Repaint($drawin Gtk->main; sub cal_changed { - $timer and Gtk->timeout_remove($timer); + !$its_reset and $timer and Gtk->timeout_remove($timer); $button_reset->set_sensitive(1); } |