aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-table.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-07-27 09:36:20 +0800
committerChris Lahey <clahey@src.gnome.org>2000-07-27 09:36:20 +0800
commit5e3f91d87bde1ca8484b4a35fc3cdc2f1ede8a85 (patch)
treea4e8f215cad48648f602435e6d7c75226c0b9bc2 /widgets/e-table/e-table.c
parentd1cc23165dd9f8d853b6384f038e97afcc51e22c (diff)
downloadgsoc2013-evolution-5e3f91d87bde1ca8484b4a35fc3cdc2f1ede8a85.tar
gsoc2013-evolution-5e3f91d87bde1ca8484b4a35fc3cdc2f1ede8a85.tar.gz
gsoc2013-evolution-5e3f91d87bde1ca8484b4a35fc3cdc2f1ede8a85.tar.bz2
gsoc2013-evolution-5e3f91d87bde1ca8484b4a35fc3cdc2f1ede8a85.tar.lz
gsoc2013-evolution-5e3f91d87bde1ca8484b4a35fc3cdc2f1ede8a85.tar.xz
gsoc2013-evolution-5e3f91d87bde1ca8484b4a35fc3cdc2f1ede8a85.tar.zst
gsoc2013-evolution-5e3f91d87bde1ca8484b4a35fc3cdc2f1ede8a85.zip
Fixed a reference.
2000-07-26 Christopher James Lahey <clahey@helixcode.com> * e-table-click-to-add.c: Fixed a reference. * e-table-selection-model.c, e-table-selection-model.h: Added a clear function. * e-table.c, e-table.h: Made going from click to add to the main table and back work better. svn path=/trunk/; revision=4373
Diffstat (limited to 'widgets/e-table/e-table.c')
-rw-r--r--widgets/e-table/e-table.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/widgets/e-table/e-table.c b/widgets/e-table/e-table.c
index ae258a5c44..8099d3de0d 100644
--- a/widgets/e-table/e-table.c
+++ b/widgets/e-table/e-table.c
@@ -184,6 +184,7 @@ e_table_init (GtkObject *object)
e_table->drop_col = -1;
e_table->selection = e_table_selection_model_new();
+ e_table->cursor_loc = E_TABLE_CURSOR_LOC_NONE;
}
static void
@@ -271,8 +272,21 @@ table_canvas_reflow (GnomeCanvas *canvas, ETable *e_table)
}
static void
+click_to_add_cursor_change (ETableClickToAdd *etcta, int row, int col, ETable *et)
+{
+ if (et->cursor_loc == E_TABLE_CURSOR_LOC_TABLE) {
+ e_table_selection_model_clear(et->selection);
+ }
+ et->cursor_loc = E_TABLE_CURSOR_LOC_ETCTA;
+}
+
+static void
group_cursor_change (ETableGroup *etg, int row, ETable *et)
{
+ if (et->cursor_loc == E_TABLE_CURSOR_LOC_ETCTA && et->click_to_add) {
+ e_table_click_to_add_commit(E_TABLE_CLICK_TO_ADD(et->click_to_add));
+ }
+ et->cursor_loc = E_TABLE_CURSOR_LOC_TABLE;
gtk_signal_emit (GTK_OBJECT (et),
et_signals [CURSOR_CHANGE],
row);
@@ -441,6 +455,8 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h
NULL);
e_canvas_vbox_add_item(E_CANVAS_VBOX(e_table->canvas_vbox), e_table->click_to_add);
+ gtk_signal_connect(GTK_OBJECT (e_table->click_to_add), "cursor_change",
+ GTK_SIGNAL_FUNC(click_to_add_cursor_change), e_table);
}
e_table->group = e_table_group_new (