From 0f018505a9be193d71a6ff8660d2cb3f48d38b65 Mon Sep 17 00:00:00 2001 From: damien Date: Tue, 6 Mar 2001 03:51:03 +0000 Subject: updated --- clock.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clock.pm b/clock.pm index c1a98041..98b8788a 100755 --- a/clock.pm +++ b/clock.pm @@ -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); } -- cgit v1.2.1