From cda8e4d9d6d6296567cc08ee7bc57dc491b98e1b Mon Sep 17 00:00:00 2001 From: Rodney Dawes Date: Wed, 7 Jan 2004 22:46:12 +0000 Subject: Make the ESelectNames object be a HIG-compliant dialog, change "Folder" to 2004-01-07 Rodney Dawes * gui/component/select-names/e-select-names.c: * gui/component/select-names/select-names.glade: Make the ESelectNames object be a HIG-compliant dialog, change "Folder" to be "Address Book", and fix a mnemonic conflict with "Category" and "Cancel" Fixes #50660 svn path=/trunk/; revision=24095 --- .../gui/component/select-names/e-select-names.c | 51 ++- .../gui/component/select-names/select-names.glade | 458 ++++++++++----------- 2 files changed, 239 insertions(+), 270 deletions(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index 3925857447..4717222325 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -473,10 +473,32 @@ e_select_names_init (ESelectNames *e_select_names) ESource *source = NULL; char *uid; + gui = glade_xml_new (EVOLUTION_GLADEDIR "/select-names.glade", NULL, NULL); + widget = glade_xml_get_widget (gui, "select-names-box"); + if (!widget) { + g_object_unref (gui); + return; + } + gtk_widget_ref (widget); + gtk_container_remove (GTK_CONTAINER (widget->parent), widget); + gtk_box_pack_start (GTK_DIALOG (e_select_names)->vbox, widget, TRUE, TRUE, 0); + gtk_widget_unref (widget); + + gtk_dialog_add_buttons (GTK_DIALOG (e_select_names), + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_OK, + NULL); + + gtk_window_set_modal (GTK_WINDOW (e_select_names), TRUE); + gtk_window_set_default_size (GTK_WINDOW (e_select_names), 472, 512); + gtk_window_set_title (GTK_WINDOW (e_select_names), _("Select Contents from Address Book")); + gtk_window_set_resizable (GTK_WINDOW (e_select_names), TRUE); + gtk_dialog_set_has_separator (GTK_DIALOG (e_select_names), FALSE); + gtk_container_set_border_width (GTK_CONTAINER (e_select_names), 4); + /* FIXME What to do on error/NULL ? */ e_select_names->source_list = e_source_list_new_for_gconf_default ("/apps/evolution/addressbook/sources"); - gui = glade_xml_new (EVOLUTION_GLADEDIR "/select-names.glade", NULL, NULL); e_select_names->gui = gui; /* Add the source menu */ @@ -492,32 +514,9 @@ e_select_names_init (ESelectNames *e_select_names) e_select_names->child_count = 0; e_select_names->def = NULL; - widget = glade_xml_get_widget(gui, "table-top"); - if (!widget) { - return; - } - gtk_widget_ref(widget); - gtk_container_remove(GTK_CONTAINER(widget->parent), widget); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(e_select_names)->vbox), widget, TRUE, TRUE, 0); - gtk_widget_unref(widget); - - gtk_dialog_add_buttons (GTK_DIALOG (e_select_names), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, - NULL); - gtk_dialog_set_default_response (GTK_DIALOG (e_select_names), GTK_RESPONSE_OK); - gtk_container_set_border_width (GTK_CONTAINER (e_select_names), 12); - gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (e_select_names)->vbox), 6); - gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (e_select_names)->action_area), 12); - - gtk_window_set_modal (GTK_WINDOW (e_select_names), TRUE); - - gtk_window_set_title(GTK_WINDOW(e_select_names), _("Select Contacts from Addressbook")); - gtk_window_set_resizable(GTK_WINDOW(e_select_names), TRUE); - e_select_names->table = E_TABLE_SCROLLED(glade_xml_get_widget(gui, "table-source")); e_select_names->model = g_object_get_data(G_OBJECT(e_select_names->table), "model"); e_select_names->adapter = g_object_get_data(G_OBJECT(e_select_names->table), "adapter"); @@ -735,8 +734,6 @@ e_select_names_add_section (ESelectNames *e_select_names, child->source = source; g_object_ref(child->source); - e_select_names->child_count++; - alignment = gtk_alignment_new(0, 0, 1, 0); label_text = g_strconcat (child->title, " ->", NULL); @@ -810,6 +807,8 @@ e_select_names_add_section (ESelectNames *e_select_names, g_hash_table_insert(e_select_names->children, g_strdup(id), child); sync_table_and_models (child->source, e_select_names); + + e_select_names->child_count++; } void diff --git a/addressbook/gui/component/select-names/select-names.glade b/addressbook/gui/component/select-names/select-names.glade index bf63b9dfa4..e5add45e06 100644 --- a/addressbook/gui/component/select-names/select-names.glade +++ b/addressbook/gui/component/select-names/select-names.glade @@ -5,16 +5,16 @@ - 12 - Select Names + 3 + Select Contacts from Address Book GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE - False + True 417 332 True False - True + False @@ -33,10 +33,10 @@ True True True - gtk-ok + gtk-cancel True GTK_RELIEF_NORMAL - 0 + -6 @@ -44,10 +44,10 @@ True True - gtk-cancel + gtk-ok True GTK_RELIEF_NORMAL - 0 + -5 @@ -60,51 +60,76 @@ - + + 4 True - 3 - 1 False - 6 - 6 + 6 - + True + <b>Show Contacts</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 - 0 - 1 - 1 - 2 - - + 0 + False + False - + True False - 6 + 12 - + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True 2 2 False 6 - 3 + 12 - + True - Type a name into the entry, or -select one from the list below: - False + Address _Book: + True False - GTK_JUSTIFY_LEFT + GTK_JUSTIFY_CENTER False False 0 @@ -123,140 +148,44 @@ select one from the list below: - + True - 1 - 2 - False - 6 - 6 - - - - True - Selected Contacts: - False - False - GTK_JUSTIFY_CENTER - True - False - 0.5 - 0.5 - 0 - 0 - - - 1 - 2 - 0 - 1 - fill - - - + C_ategory: + True + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 - 1 - 2 + 0 + 1 1 2 + fill + - + True - 7.45058e-09 - 0.5 - 1 - 1 - - - - 3 - True - False - 6 - - - - True - False - 6 - - - - True - True - True - True - 0 - - True - * - False - - - 0 - True - True - - - - - - True - True - Find - True - GTK_RELIEF_NORMAL - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - 0.5 - 0.5 - 1 - 1 - - - - True - e_addressbook_create_ebook_table - 0 - 0 - Sat, 10 Jun 2000 22:02:57 GMT - - - - - 0 - True - True - - - - + e_select_names_create_categories + 0 + 0 + Tue, 19 Feb 2002 23:06:24 GMT - 0 - 1 + 1 + 2 1 2 + expand|shrink|fill + shrink|fill @@ -268,16 +197,14 @@ select one from the list below: - 0 - 1 - 1 - 2 - fill + 0 + False + False - + True False @@ -285,140 +212,183 @@ select one from the list below: GTK_JUSTIFY_LEFT False False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + <b>Contacts</b> + False + True + GTK_JUSTIFY_LEFT + False + False 0 0.5 0 - 3 + 0 - 0 - 1 - 2 - 3 - fill - + 0 + False + False - + True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN + False + 12 - - 6 + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True - 2 - 2 False - 6 - 6 + 6 - + True - _Folder: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 + e_addressbook_create_ebook_table + 0 + 0 + Sat, 10 Jun 2000 22:02:57 GMT - 0 - 1 - 0 - 1 - fill - + 0 + True + True - + True - _Category: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - - - 0 - 1 - 1 - 2 - fill - - - + False + 12 - - - True - 7.45058e-09 - 0.5 - 0 - 1 + + + True + True + True + True + 0 + + True + * + False + + + 0 + True + True + + - + True - e_select_names_create_categories - 0 - 0 - Tue, 19 Feb 2002 23:06:24 GMT + True + _Find + True + GTK_RELIEF_NORMAL + + 0 + False + False + - 1 - 2 - 1 - 2 - fill + 0 + False + False + + 0 + False + False + - + True - Show Contacts - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 + 3 + 2 + False + 18 + 12 - label_item + 0 + True + True - 0 - 1 - 0 - 1 - + 0 + True + True + + + + + + True + + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 3 + + + 0 + False + False + GTK_PACK_END -- cgit v1.2.3