aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/contact-editor/e-contact-editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/contact-editor/e-contact-editor.c')
-rw-r--r--addressbook/contact-editor/e-contact-editor.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/addressbook/contact-editor/e-contact-editor.c b/addressbook/contact-editor/e-contact-editor.c
index 6793713f65..235c8ea4b1 100644
--- a/addressbook/contact-editor/e-contact-editor.c
+++ b/addressbook/contact-editor/e-contact-editor.c
@@ -901,6 +901,44 @@ app_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
return TRUE;
}
+static GList *
+add_to_tab_order(GList *list, GladeXML *gui, char *name)
+{
+ GtkWidget *widget = glade_xml_get_widget(gui, name);
+ return g_list_prepend(list, widget);
+}
+
+static void
+setup_tab_order(GladeXML *gui)
+{
+ GtkWidget *container;
+ GList *list = NULL;
+
+ container = glade_xml_get_widget(gui, "table-contact-editor-general");
+
+ if (container) {
+ list = add_to_tab_order(list, gui, "entry-fullname");
+ list = add_to_tab_order(list, gui, "entry-jobtitle");
+ list = add_to_tab_order(list, gui, "entry-company");
+ list = add_to_tab_order(list, gui, "combo-file-as");
+ list = add_to_tab_order(list, gui, "entry-phone1");
+ list = add_to_tab_order(list, gui, "entry-phone2");
+ list = add_to_tab_order(list, gui, "entry-phone3");
+ list = add_to_tab_order(list, gui, "entry-phone4");
+ list = g_list_reverse(list);
+ e_container_change_tab_order(GTK_CONTAINER(container), list);
+ g_list_free(list);
+
+ list = NULL;
+ list = add_to_tab_order(list, gui, "entry-email1");
+ list = add_to_tab_order(list, gui, "entry-web");
+ list = add_to_tab_order(list, gui, "text-address");
+ list = add_to_tab_order(list, gui, "button-contacts");
+ list = g_list_reverse(list);
+ e_container_change_tab_order(GTK_CONTAINER(container), list);
+ }
+}
+
static void
e_contact_editor_init (EContactEditor *e_contact_editor)
{
@@ -935,6 +973,8 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
gui = glade_xml_new (EVOLUTION_GLADEDIR "/contact-editor.glade", NULL);
e_contact_editor->gui = gui;
+ setup_tab_order(gui);
+
e_contact_editor->app = glade_xml_get_widget (gui, "contact editor");
e_container_foreach_leaf (GTK_CONTAINER (e_contact_editor->app),