aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary-preferences.c
diff options
context:
space:
mode:
authorAnna Marie Dirks <anna@ximian.com>2001-08-10 06:30:30 +0800
committerAnna Dirks <anna@src.gnome.org>2001-08-10 06:30:30 +0800
commit80f09e4507d10a14a009c882bb0df5ec6e795de7 (patch)
treeb963220dcfa548b127521844ce02e93f62f474c8 /my-evolution/e-summary-preferences.c
parent0c1a805875c0db4f8e031a26334fec567029dcb5 (diff)
downloadgsoc2013-evolution-80f09e4507d10a14a009c882bb0df5ec6e795de7.tar.gz
gsoc2013-evolution-80f09e4507d10a14a009c882bb0df5ec6e795de7.tar.zst
gsoc2013-evolution-80f09e4507d10a14a009c882bb0df5ec6e795de7.zip
added accelerators to all useful widgets in this file such that this
2001-08-09 Anna Marie Dirks <anna@ximian.com> * 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
Diffstat (limited to 'my-evolution/e-summary-preferences.c')
-rw-r--r--my-evolution/e-summary-preferences.c29
1 files changed, 12 insertions, 17 deletions
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);