From 03baf85a6a3d42573bee99adcad5ca919cd63659 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Mon, 7 Aug 2000 20:21:41 +0000 Subject: Fixed the tab order for this dialog. 2000-08-07 Christopher James Lahey * contact-editor/e-contact-editor.c: Fixed the tab order for this dialog. svn path=/trunk/; revision=4581 --- addressbook/ChangeLog | 5 +++ addressbook/contact-editor/e-contact-editor.c | 40 +++++++++++++++++++++++ addressbook/gui/contact-editor/e-contact-editor.c | 40 +++++++++++++++++++++++ 3 files changed, 85 insertions(+) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 891f4cc540..38c9c58b71 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,8 @@ +2000-08-07 Christopher James Lahey + + * contact-editor/e-contact-editor.c: Fixed the tab order for this + dialog. + 2000-08-05 Christopher James Lahey * backend/ebook/e-card-simple.c: Fixed a warning. 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), diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 6793713f65..235c8ea4b1 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/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), -- cgit