diff options
Diffstat (limited to 'clock.pl')
-rwxr-xr-x | clock.pl | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -75,7 +75,17 @@ $my_win->{window}->add(gtkpack_(Gtk2::VBox->new(0,0), ), ), 0, gtkadd(gtkset_layout(Gtk2::HButtonBox->new, 'end'), - gtksignal_connect(Gtk2::Button->new(N("OK")), + gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub { ugtk2->exit(0) }), + $button_reset = gtksignal_connect(Gtk2::Button->new_from_stock('gtk-revert-to-saved'), clicked => sub { + $its_reset = 1; + $timer = Glib::Timeout->add(120, \&update_time); + Repaint($drawing_area, 1); + $calendar->select_month($old_month, $old_year); + $calendar->select_day($old_day); + $button_reset->set_sensitive(0); + $its_reset = 0; + }), + gtksignal_connect(Gtk2::Button->new_from_stock('gtk-ok'), clicked => sub { my ($year, $month, $day) = $calendar->get_date; $month++; @@ -86,16 +96,6 @@ $my_win->{window}->add(gtkpack_(Gtk2::VBox->new(0,0), system("dcop kicker Panel restart") if $ENV{DESKTOP} eq 'kde'; ugtk2->exit(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 = Glib::Timeout->add(120, \&update_time); - Repaint($drawing_area, 1); - $calendar->select_month($old_month, $old_year); - $calendar->select_day($old_day); - $button_reset->set_sensitive(0); - $its_reset = 0; - }) ) ) ); |