FACORAT Fabrice <[EMAIL PROTECTED]> writes:

> timedrake/clock.pl : not using stock icons ( Accept/Cancel )

use stock icons and std layout:
Index: clock.pl
===================================================================
RCS file: /cooker/soft/control-center/clock.pl,v
retrieving revision 1.23
diff -u -p -r1.23 clock.pl
--- clock.pl	16 Jul 2003 10:55:14 -0000	1.23
+++ clock.pl	16 Jul 2003 12:26:01 -0000
@@ -75,7 +75,17 @@ $my_win->{window}->add(gtkpack_(Gtk2::VB
                                                         ),
                                             ),
                                 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::VB
                                                                            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;
-                                          })
                                           )
                                 )
                        );

Reply via email to