diff options
author | Rodney Dawes <dobey@ximian.com> | 2004-01-08 06:46:12 +0800 |
---|---|---|
committer | Rodney Dawes <dobey@src.gnome.org> | 2004-01-08 06:46:12 +0800 |
commit | cda8e4d9d6d6296567cc08ee7bc57dc491b98e1b (patch) | |
tree | b9d28e4fea2ca69118811cc1a5edc0291878c5a9 /addressbook/gui | |
parent | fc863cbedf2998f93b1518bac7ce2243a1468372 (diff) | |
download | gsoc2013-evolution-cda8e4d9d6d6296567cc08ee7bc57dc491b98e1b.tar.gz gsoc2013-evolution-cda8e4d9d6d6296567cc08ee7bc57dc491b98e1b.tar.zst gsoc2013-evolution-cda8e4d9d6d6296567cc08ee7bc57dc491b98e1b.zip |
Make the ESelectNames object be a HIG-compliant dialog, change "Folder" to
2004-01-07 Rodney Dawes <dobey@ximian.com>
* 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
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names.c | 51 | ||||
-rw-r--r-- | addressbook/gui/component/select-names/select-names.glade | 458 |
2 files changed, 239 insertions, 270 deletions
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 @@ <requires lib="gnome"/> <widget class="GtkDialog" id="dialog-top"> - <property name="border_width">12</property> - <property name="title" translatable="yes">Select Names</property> + <property name="border_width">3</property> + <property name="title" translatable="yes">Select Contacts from Address Book</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> + <property name="modal">True</property> <property name="default_width">417</property> <property name="default_height">332</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> - <property name="has_separator">True</property> + <property name="has_separator">False</property> <child internal-child="vbox"> <widget class="GtkVBox" id="dialog-vbox1"> @@ -33,10 +33,10 @@ <property name="can_default">True</property> <property name="has_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-ok</property> + <property name="label">gtk-cancel</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">0</property> + <property name="response_id">-6</property> </widget> </child> @@ -44,10 +44,10 @@ <widget class="GtkButton" id="button5"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> + <property name="label">gtk-ok</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">0</property> + <property name="response_id">-5</property> </widget> </child> </widget> @@ -60,51 +60,76 @@ </child> <child> - <widget class="GtkTable" id="table-top"> + <widget class="GtkVBox" id="select-names-box"> + <property name="border_width">4</property> <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">1</property> <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> + <property name="spacing">6</property> <child> - <widget class="GtkHSeparator" id="hseparator1"> + <widget class="GtkLabel" id="label33"> <property name="visible">True</property> + <property name="label" translatable="yes"><b>Show Contacts</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options"></property> - <property name="y_options"></property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkVBox" id="vbox5"> + <widget class="GtkHBox" id="hbox2"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">6</property> + <property name="spacing">12</property> <child> - <widget class="GtkTable" id="table4"> + <widget class="GtkLabel" id="label35"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkTable" id="show_contacts_table"> <property name="visible">True</property> <property name="n_rows">2</property> <property name="n_columns">2</property> <property name="homogeneous">False</property> <property name="row_spacing">6</property> - <property name="column_spacing">3</property> + <property name="column_spacing">12</property> <child> - <widget class="GtkLabel" id="label32"> + <widget class="GtkLabel" id="label30"> <property name="visible">True</property> - <property name="label" translatable="yes">Type a name into the entry, or -select one from the list below:</property> - <property name="use_underline">False</property> + <property name="label" translatable="yes">Address _Book:</property> + <property name="use_underline">True</property> <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="justify">GTK_JUSTIFY_CENTER</property> <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0</property> @@ -123,140 +148,44 @@ select one from the list below:</property> </child> <child> - <widget class="GtkTable" id="table-recipients"> + <widget class="GtkLabel" id="label31"> <property name="visible">True</property> - <property name="n_rows">1</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="GtkLabel" id="label20"> - <property name="visible">True</property> - <property name="label" translatable="yes">Selected Contacts:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> + <property name="label" translatable="yes">C_ategory:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_CENTER</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <property name="left_attach">0</property> + <property name="right_attach">1</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkAlignment" id="alignment4"> + <widget class="Custom" id="custom-categories"> <property name="visible">True</property> - <property name="xalign">7.45058e-09</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - - <child> - <widget class="GtkVBox" id="vbox6"> - <property name="border_width">3</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkHBox" id="hbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkEntry" id="entry-select"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button-find"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Find</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkAlignment" id="alignment3"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - - <child> - <widget class="Custom" id="table-source"> - <property name="visible">True</property> - <property name="creation_function">e_addressbook_create_ebook_table</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Sat, 10 Jun 2000 22:02:57 GMT</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> + <property name="creation_function">e_select_names_create_categories</property> + <property name="int1">0</property> + <property name="int2">0</property> + <property name="last_modification_time">Tue, 19 Feb 2002 23:06:24 GMT</property> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> + <property name="x_options">expand|shrink|fill</property> + <property name="y_options">shrink|fill</property> </packing> </child> </widget> @@ -268,16 +197,14 @@ select one from the list below:</property> </child> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkLabel" id="status-message"> + <widget class="GtkLabel" id="label37"> <property name="visible">True</property> <property name="label" translatable="yes"></property> <property name="use_underline">False</property> @@ -285,140 +212,183 @@ select one from the list below:</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label36"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Contacts</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> <property name="xalign">0</property> <property name="yalign">0.5</property> <property name="xpad">0</property> - <property name="ypad">3</property> + <property name="ypad">0</property> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkFrame" id="frame1"> + <widget class="GtkHBox" id="hbox3"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> + <property name="homogeneous">False</property> + <property name="spacing">12</property> <child> - <widget class="GtkTable" id="show_contacts_table"> - <property name="border_width">6</property> + <widget class="GtkLabel" id="label38"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="vbox8"> <property name="visible">True</property> - <property name="n_rows">2</property> - <property name="n_columns">2</property> <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> + <property name="spacing">6</property> <child> - <widget class="GtkLabel" id="label30"> + <widget class="Custom" id="table-source"> <property name="visible">True</property> - <property name="label" translatable="yes">_Folder:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="creation_function">e_addressbook_create_ebook_table</property> + <property name="int1">0</property> + <property name="int2">0</property> + <property name="last_modification_time">Sat, 10 Jun 2000 22:02:57 GMT</property> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> <child> - <widget class="GtkLabel" id="label31"> + <widget class="GtkHBox" id="hbox1"> <property name="visible">True</property> - <property name="label" translatable="yes">_Category:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> + <property name="homogeneous">False</property> + <property name="spacing">12</property> - <child> - <widget class="GtkAlignment" id="alignment5"> - <property name="visible">True</property> - <property name="xalign">7.45058e-09</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">1</property> + <child> + <widget class="GtkEntry" id="entry-select"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char" translatable="yes">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> <child> - <widget class="Custom" id="custom-categories"> + <widget class="GtkButton" id="button-find"> <property name="visible">True</property> - <property name="creation_function">e_select_names_create_categories</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Tue, 19 Feb 2002 23:06:24 GMT</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Find</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> </child> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options">fill</property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> </child> <child> - <widget class="GtkLabel" id="label1"> + <widget class="GtkTable" id="table-recipients"> <property name="visible">True</property> - <property name="label" translatable="yes">Show Contacts</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="n_rows">3</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">18</property> + <property name="column_spacing">12</property> </widget> <packing> - <property name="type">label_item</property> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="status-message"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">3</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="pack_type">GTK_PACK_END</property> </packing> </child> </widget> |