diff options
-rwxr-xr-x | clock.pl | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -141,16 +141,16 @@ $my_win->main; ugtk2->exit(0); -sub update_time { +sub update_time() { Repaint($drawing_area, 1); }; -sub cal_changed { +sub cal_changed() { !$its_reset and $timer and Gtk2->timeout_remove($timer); $button_reset->set_sensitive(1); } -sub changed { +sub changed() { my $val = $adj_h->get_value; my $limit = ($is24 ? 18 : 6); if (($limit > $val && $h_old > $limit && $h_old < ($is24 ? 24 : 12)) || @@ -160,7 +160,7 @@ sub changed { $h_old = $val; } -sub spinned { +sub spinned() { Gtk2->timeout_remove($timer); $button_reset->set_sensitive(1); @@ -206,7 +206,7 @@ sub expose_event { 0; } -sub rad_to_time { +sub rad_to_time() { $adj_h->set_value(POSIX::floor($dRadians_hour * 6 / $PI) + ($is24 ? 12 : 0)); $adj_m->set_value(POSIX::floor($dRadians_min*30/$PI)); $adj_s->set_value(POSIX::floor($dRadians_sec*30/$PI)); @@ -223,8 +223,8 @@ sub time_to_rad { } sub Repaint { - my ($drawing_area, $update_time) = @_; - time_to_rad(localtime(time())) if $update_time; + my ($drawing_area, $o_update_time) = @_; + time_to_rad(localtime(time())) if $o_update_time; my ($width, $height) = ($drawing_area->allocation->width, $drawing_area->allocation->height); my $dRadians_hour_real = $dRadians_hour + $dRadians_min / 12; my $dRadians_min_real = POSIX::floor($dRadians_min / $PI * 30) * $PI / 30; |