aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/select-names/e-select-names.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-07-09 09:24:53 +0800
committerChris Lahey <clahey@src.gnome.org>2000-07-09 09:24:53 +0800
commita451a634c20ffb820fd07700b9bb88fbd29df2b9 (patch)
treeeaaa372f989cdb74eb7685b3f80cb10d08c88ae0 /addressbook/gui/component/select-names/e-select-names.c
parent1150b8d1b3f6691ea50eeb768216838311f7b7c6 (diff)
downloadgsoc2013-evolution-a451a634c20ffb820fd07700b9bb88fbd29df2b9.tar
gsoc2013-evolution-a451a634c20ffb820fd07700b9bb88fbd29df2b9.tar.gz
gsoc2013-evolution-a451a634c20ffb820fd07700b9bb88fbd29df2b9.tar.bz2
gsoc2013-evolution-a451a634c20ffb820fd07700b9bb88fbd29df2b9.tar.lz
gsoc2013-evolution-a451a634c20ffb820fd07700b9bb88fbd29df2b9.tar.xz
gsoc2013-evolution-a451a634c20ffb820fd07700b9bb88fbd29df2b9.tar.zst
gsoc2013-evolution-a451a634c20ffb820fd07700b9bb88fbd29df2b9.zip
Include e-select-names-factory.h.
2000-07-08 Christopher James Lahey <clahey@helixcode.com> * gui/component/addressbook-factory.c: Include e-select-names-factory.h. * gui/component/select-names/e-select-names-model.c: Handle a NULL iterator properly in the replace function. * gui/component/select-names/e-select-names-table-model.c: Fill in info properly in the value_at function. * gui/component/select-names/e-select-names-text-model.c: Don't strlen a NULL text object. * gui/component/select-names/e-select-names.c: Close if the person hits ok or cancel (doesn't yet actually undo changes if Cancel is hit.) Handle removing addresses when they're double clicked on. * gui/component/select-names/select-names.glade, gui/component/select-names/select-names.glade.h: Hid some unused fields and changed the text at the top of the dialog. svn path=/trunk/; revision=3989
Diffstat (limited to 'addressbook/gui/component/select-names/e-select-names.c')
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c
index a588b10770..555f195514 100644
--- a/addressbook/gui/component/select-names/e-select-names.c
+++ b/addressbook/gui/component/select-names/e-select-names.c
@@ -169,6 +169,17 @@ 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;
+ }
+}
+
+static void
e_select_names_init (ESelectNames *e_select_names)
{
GladeXML *gui;
@@ -194,6 +205,9 @@ 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");
@@ -292,6 +306,17 @@ button_clicked(GtkWidget *button, ESelectNamesChild *child)
}
}
+static void
+remove_address(ETable *table, int row, ESelectNamesChild *child)
+{
+ EIterator *iterator = e_list_get_iterator(e_select_names_model_get_data(child->source));
+ e_iterator_reset(iterator);
+ for (; row > 0; row--) {
+ e_iterator_next(iterator);
+ }
+ e_select_names_model_remove_item(child->source, iterator);
+}
+
void
e_select_names_add_section(ESelectNames *e_select_names, char *name, char *id, ESelectNamesModel *source)
{
@@ -340,6 +365,9 @@ e_select_names_add_section(ESelectNames *e_select_names, char *name, char *id, E
g_str_compare, TRUE), 0);
etable = e_table_new (header, model, SPEC2);
+ gtk_signal_connect(GTK_OBJECT(etable), "double_click",
+ GTK_SIGNAL_FUNC(remove_address), child);
+
gtk_object_set(GTK_OBJECT(etable),
"cursor_mode", E_TABLE_CURSOR_LINE,
NULL);