summaryrefslogtreecommitdiffstats
path: root/clock.pl
diff options
context:
space:
mode:
Diffstat (limited to 'clock.pl')
-rwxr-xr-xclock.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/clock.pl b/clock.pl
index a8540d6b..9cf4721f 100755
--- a/clock.pl
+++ b/clock.pl
@@ -89,7 +89,7 @@ $my_win->{window}->add(gtkpack_(Gtk2::VBox->new(0,0),
gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { ugtk2->exit(0) }),
$button_reset = gtksignal_connect(Gtk2::Button->new(N("Reset")), clicked => sub {
$its_reset = 1;
- $timer = Gtk2->timeout_add(120, \&update_time);
+ $timer = Glib::Timeout->add(120, \&update_time);
Repaint($drawing_area, 1);
$calendar->select_month($old_month, $old_year);
$calendar->select_day($old_day);
@@ -134,7 +134,7 @@ $old_year += 1900;
$calendar->select_month($old_month, $old_year);
$calendar->select_day($old_day);
$button_reset->set_sensitive(0);
-$timer = Gtk2->timeout_add(120, \&update_time);
+$timer = Glib::Timeout->add(120, \&update_time);
$drawing_area->show;
$my_win->main;
@@ -146,7 +146,7 @@ sub update_time() {
};
sub cal_changed() {
- !$its_reset and $timer and Gtk2->timeout_remove($timer);
+ !$its_reset and $timer and Glib::Source->remove($timer);
$button_reset->set_sensitive(1);
}
@@ -161,7 +161,7 @@ sub changed() {
}
sub spinned() {
- Gtk2->timeout_remove($timer);
+ Glib::Source->remove($timer);
$button_reset->set_sensitive(1);
my (undef, undef, undef, @values) = localtime(time());
@@ -174,7 +174,7 @@ sub motion_event {
my ($widget, $event) = @_;
$pressed or return;
if ($first) {
- Gtk2->timeout_remove($timer);
+ Glib::Source->remove($timer);
$Radian = determine_radian($event->x, $event->y);
$button_reset->set_sensitive(1);
}