From 80f09e4507d10a14a009c882bb0df5ec6e795de7 Mon Sep 17 00:00:00 2001 From: Anna Marie Dirks Date: Thu, 9 Aug 2001 22:30:30 +0000 Subject: added accelerators to all useful widgets in this file such that this 2001-08-09 Anna Marie Dirks * my-evolution.glade : added accelerators to all useful widgets in this file such that this dialog can now be fully navigated from the keyboard. * e-summary-preferences.c : changed the construct_pixmap_button function to take glade xml, an hbox and pixmap, making it possible to use glade to define and change the keyboard accelerators, instead of trying to do this in the c code. svn path=/trunk/; revision=11844 --- my-evolution/ChangeLog | 11 ++ my-evolution/e-summary-preferences.c | 29 +++-- my-evolution/my-evolution.glade | 199 ++++++++++++++++++++++++++++++----- 3 files changed, 193 insertions(+), 46 deletions(-) (limited to 'my-evolution') diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index bdb00558e1..6b627fe456 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,14 @@ +2001-08-09 Anna Marie Dirks + * my-evolution.glade : added accelerators to all useful widgets + in this file such that this dialog can now be fully navigated from + the keyboard. + + * e-summary-preferences.c : changed the construct_pixmap_button + function to take glade xml, an hbox and pixmap, making it possible + to use glade to define and change the keyboard accelerators, instead + of trying to do this in the c code. + + 2001-08-06 Damon Chaplin * e-summary-tasks.c (sort_uids): diff --git a/my-evolution/e-summary-preferences.c b/my-evolution/e-summary-preferences.c index 42d96b4b61..d055de9430 100644 --- a/my-evolution/e-summary-preferences.c +++ b/my-evolution/e-summary-preferences.c @@ -1102,23 +1102,18 @@ calendar_today_toggled_cb (GtkToggleButton *tb, } static void -construct_pixmap_button (GtkButton *button, - const char *text, +construct_pixmap_button (GladeXML *xml, + const char *id, const char *image) { - GtkWidget *label, *box, *pixmap; - - g_return_if_fail (button != NULL); - - box = gtk_hbox_new (FALSE, 0); - label = gtk_label_new (text); - gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); + GtkWidget *box, *pixmap; + box = glade_xml_get_widget (xml, id); + pixmap = gnome_stock_pixmap_widget (NULL, image); gtk_box_pack_start (GTK_BOX (box), pixmap, TRUE, TRUE, 0); - gtk_container_add (GTK_CONTAINER (button), box); - gtk_widget_show_all (box); + gtk_widget_show (pixmap); } static gboolean @@ -1158,14 +1153,14 @@ make_property_dialog (PropertyData *pd) mail->add = glade_xml_get_widget (pd->xml, "button4"); g_return_val_if_fail (mail->add != NULL, FALSE); - construct_pixmap_button (GTK_BUTTON (mail->add), _("Add"), + construct_pixmap_button (pd->xml, "hbox-mailadd", GNOME_STOCK_BUTTON_NEXT); gtk_signal_connect (GTK_OBJECT (mail->add), "clicked", GTK_SIGNAL_FUNC (mail_add_clicked_cb), pd); mail->remove = glade_xml_get_widget (pd->xml, "button5"); g_return_val_if_fail (mail->remove != NULL, FALSE); - construct_pixmap_button (GTK_BUTTON (mail->remove), _("Remove"), + construct_pixmap_button (pd->xml, "hbox-mailremove", GNOME_STOCK_BUTTON_PREV); gtk_signal_connect (GTK_OBJECT (mail->remove), "clicked", GTK_SIGNAL_FUNC (mail_remove_clicked_cb), pd); @@ -1206,7 +1201,7 @@ make_property_dialog (PropertyData *pd) rdf->add = glade_xml_get_widget (pd->xml, "button9"); g_return_val_if_fail (rdf->add != NULL, FALSE); - construct_pixmap_button (GTK_BUTTON (rdf->add), _("Add"), + construct_pixmap_button (pd->xml, "hbox-newsadd", GNOME_STOCK_BUTTON_NEXT); gtk_widget_set_sensitive (rdf->add, FALSE); gtk_signal_connect (GTK_OBJECT (rdf->add), "clicked", @@ -1215,7 +1210,7 @@ make_property_dialog (PropertyData *pd) rdf->remove = glade_xml_get_widget (pd->xml, "button10"); g_return_val_if_fail (rdf->remove != NULL, FALSE); - construct_pixmap_button (GTK_BUTTON (rdf->remove), _("Remove"), + construct_pixmap_button (pd->xml, "hbox-newsremove", GNOME_STOCK_BUTTON_PREV); gtk_widget_set_sensitive (rdf->remove, FALSE); gtk_signal_connect (GTK_OBJECT (rdf->remove), "clicked", @@ -1268,7 +1263,7 @@ make_property_dialog (PropertyData *pd) weather->add = glade_xml_get_widget (pd->xml, "button6"); g_return_val_if_fail (weather->add != NULL, FALSE); - construct_pixmap_button (GTK_BUTTON (weather->add), _("Add"), + construct_pixmap_button (pd->xml, "hbox-weatheradd", GNOME_STOCK_BUTTON_NEXT); gtk_signal_connect (GTK_OBJECT (weather->add), "clicked", GTK_SIGNAL_FUNC (weather_add_clicked_cb), pd); @@ -1276,7 +1271,7 @@ make_property_dialog (PropertyData *pd) weather->remove = glade_xml_get_widget (pd->xml, "button7"); g_return_val_if_fail (weather->remove != NULL, FALSE); - construct_pixmap_button (GTK_BUTTON (weather->remove), _("Remove"), + construct_pixmap_button (pd->xml, "hbox-weatherremove", GNOME_STOCK_BUTTON_PREV); gtk_signal_connect (GTK_OBJECT (weather->remove), "clicked", GTK_SIGNAL_FUNC (weather_remove_clicked_cb), pd); diff --git a/my-evolution/my-evolution.glade b/my-evolution/my-evolution.glade index 90be02ea0f..c9e75c5b7f 100644 --- a/my-evolution/my-evolution.glade +++ b/my-evolution/my-evolution.glade @@ -64,13 +64,14 @@ GtkLabel label9 - + GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 + clist7 0 1 @@ -90,13 +91,14 @@ GtkLabel label10 - + GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 + clist1 2 3 @@ -155,7 +157,27 @@ - Placeholder + GtkHBox + hbox-mailadd + False + 0 + + + GtkLabel + label41 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + True + True + + @@ -172,7 +194,27 @@ - Placeholder + GtkHBox + hbox-mailremove + False + 0 + + + GtkLabel + label42 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + True + True + + @@ -308,7 +350,7 @@ checkbutton1 3 True - + False True @@ -323,7 +365,7 @@ GtkLabel Notebook:tab label5 - + GTK_JUSTIFY_CENTER False 0.5 @@ -356,13 +398,14 @@ GtkLabel label19 - + GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 + clist6 0 1 @@ -382,13 +425,14 @@ GtkLabel label20 - + GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 + clist5 2 3 @@ -447,7 +491,27 @@ - Placeholder + GtkHBox + hbox-newsadd + False + 0 + + + GtkLabel + label43 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + True + True + + @@ -464,7 +528,39 @@ - Placeholder + GtkHBox + hbox9 + False + 0 + + + GtkHBox + hbox-newsremove + False + 0 + + 0 + True + True + + + + GtkLabel + label47 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + True + True + + + @@ -621,13 +717,14 @@ GtkLabel label25 - + GTK_JUSTIFY_LEFT False 0 0.5 0 0 + spinbutton1 0 1 @@ -647,13 +744,14 @@ GtkLabel label29 - + GTK_JUSTIFY_LEFT False 0 0.5 0 0 + spinbutton4 0 1 @@ -738,7 +836,7 @@ GtkButton button11 True - + GTK_RELIEF_NORMAL 3 @@ -763,7 +861,7 @@ GtkLabel Notebook:tab label6 - + GTK_JUSTIFY_CENTER False 0.5 @@ -796,13 +894,14 @@ GtkLabel label14 - + GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 + ctree1 0 1 @@ -822,13 +921,14 @@ GtkLabel label15 - + GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 + clist3 2 3 @@ -887,7 +987,27 @@ - Placeholder + GtkHBox + hbox-weatheradd + False + 0 + + + GtkLabel + label45 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + True + True + + @@ -904,7 +1024,27 @@ - Placeholder + GtkHBox + hbox-weatherremove + False + 0 + + + GtkLabel + label48 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + True + True + + @@ -1087,7 +1227,7 @@ GtkRadioButton radiobutton7 True - + False True units_group @@ -1102,7 +1242,7 @@ GtkRadioButton radiobutton8 True - + False True units_group @@ -1128,13 +1268,14 @@ GtkLabel label38 - + GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 + spinbutton5 0 False @@ -1173,7 +1314,7 @@ GtkLabel Notebook:tab label7 - + GTK_JUSTIFY_CENTER False 0.5 @@ -1228,7 +1369,7 @@ GtkRadioButton radiobutton3 True - + False True days_group @@ -1243,7 +1384,7 @@ GtkRadioButton radiobutton4 True - + False True days_group @@ -1258,7 +1399,7 @@ GtkRadioButton radiobutton5 True - + False True days_group @@ -1273,7 +1414,7 @@ GtkRadioButton radiobutton6 True - + False True days_group @@ -1309,7 +1450,7 @@ GtkRadioButton radiobutton1 True - + False True tasks_group @@ -1324,7 +1465,7 @@ GtkRadioButton radiobutton2 True - + False True tasks_group @@ -1342,7 +1483,7 @@ GtkLabel Notebook:tab label8 - + GTK_JUSTIFY_CENTER False 0.5 -- cgit v1.2.3