diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-07-09 18:42:20 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-07-09 18:42:20 +0800 |
commit | abd6ce3b53f239441f5a655a362d057e16622b62 (patch) | |
tree | 5ba8625433f5ad981de03e71e8e1c8668423de3f /addressbook/gui/component/select-names/e-select-names.c | |
parent | 4bd225790a301c68d7a5df24617f071881d705b9 (diff) | |
download | gsoc2013-evolution-abd6ce3b53f239441f5a655a362d057e16622b62.tar.gz gsoc2013-evolution-abd6ce3b53f239441f5a655a362d057e16622b62.tar.zst gsoc2013-evolution-abd6ce3b53f239441f5a655a362d057e16622b62.zip |
Removed unused do_nothing_cb function.
2000-07-09 Christopher James Lahey <clahey@helixcode.com>
* gui/component/addressbook.c: Removed unused do_nothing_cb
function.
* gui/component/select-names/e-select-names-manager.c,
gui/component/select-names/e-select-names-manager.h: Made the OK
and Cancel buttons in the ESelectNames dialog we create work
properly.
* gui/component/select-names/e-select-names-model.c,
gui/component/select-names/e-select-names-model.h: Added
e_select_names_model_duplicate.
* gui/component/select-names/e-select-names-text-model.c: Made the
text be set correctly if there's already data in the source when
the text model is created.
* gui/component/select-names/e-select-names.c,
gui/component/select-names/e-select-names.h: Removed handling of
the buttons (the user of this dialog will have to handle them.)
Added e_select_names_get_source. Fixed some typos.
svn path=/trunk/; revision=4007
Diffstat (limited to 'addressbook/gui/component/select-names/e-select-names.c')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index 172f3e0d83..90b64b1183 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -169,18 +169,6 @@ set_current_selection(ETable *table, int row, ESelectNames *names) } static void -e_select_names_clicked(ESelectNames *dialog, gint button, ESelectNames *data) -{ - switch(button) { - case 0: - break; - case 1: - break; - } - gnome_dialog_close(GNOME_DIALOG(dialog)); -} - -static void e_select_names_init (ESelectNames *e_select_names) { GladeXML *gui; @@ -206,9 +194,6 @@ e_select_names_init (ESelectNames *e_select_names) GNOME_STOCK_BUTTON_CANCEL, NULL); - gtk_signal_connect(GTK_OBJECT(e_select_names), "clicked", - GTK_SIGNAL_FUNC(e_select_names_clicked), e_select_names); - e_select_names->table = E_TABLE(glade_xml_get_widget(gui, "table-source")); e_select_names->model = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "model"); @@ -341,11 +326,12 @@ e_select_names_add_section(ESelectNames *e_select_names, char *name, char *id, E child = g_new(ESelectNamesChild, 1); child->names = e_select_names; + child->title = g_strdup(_(name)); e_select_names->child_count++; alignment = gtk_alignment_new(0, 0, 1, 0); - label = g_strdup_printf("%s ->", _(name)); + label = g_strdup_printf("%s ->", child->title); button = gtk_button_new_with_label(label); g_free(label); gtk_container_add(GTK_CONTAINER(alignment), button); @@ -386,6 +372,8 @@ e_select_names_add_section(ESelectNames *e_select_names, char *name, char *id, E e_select_names->child_count + 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); + + g_hash_table_insert(e_select_names->children, g_strdup(id), child); } static void * @@ -422,3 +410,16 @@ e_select_names_get_section(ESelectNames *e_select_names, char *id) } return list; } + +ESelectNamesModel * +e_select_names_get_source(ESelectNames *e_select_names, + char *id) +{ + ESelectNamesChild *child = g_hash_table_lookup(e_select_names->children, id); + if (child) { + if (child->source) + gtk_object_ref(GTK_OBJECT(child->source)); + return child->source; + } else + return NULL; +} |