diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-11-03 01:28:16 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-11-03 01:28:16 +0800 |
commit | 89beb886b9c5e242e7a426e51d2d9d4810a79cd4 (patch) | |
tree | 97cc07255dfe64f3e96f715ec91b356d5e331518 /widgets/table/e-table.c | |
parent | e72460cd5b8e5b6522e4f9702e351c034715c31c (diff) | |
download | gsoc2013-evolution-89beb886b9c5e242e7a426e51d2d9d4810a79cd4.tar.gz gsoc2013-evolution-89beb886b9c5e242e7a426e51d2d9d4810a79cd4.tar.zst gsoc2013-evolution-89beb886b9c5e242e7a426e51d2d9d4810a79cd4.zip |
Updated these unused glade files to better match the versions in the code.
2000-11-02 Christopher James Lahey <clahey@helixcode.com>
* e-table-config.glade, e-table-config.glade.h: Updated these
unused glade files to better match the versions in the code.
* e-table.c, e-table.h: Added e_table_selected_count and
"selection_change" signal.
* e-tree-model.c: Fixed an out of order
svn path=/trunk/; revision=6354
Diffstat (limited to 'widgets/table/e-table.c')
-rw-r--r-- | widgets/table/e-table.c | 60 |
1 files changed, 44 insertions, 16 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 88e305b88d..6da35fea39 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -41,6 +41,7 @@ static GtkObjectClass *e_table_parent_class; enum { CURSOR_CHANGE, + SELECTION_CHANGE, DOUBLE_CLICK, RIGHT_CLICK, CLICK, @@ -837,6 +838,12 @@ void e_table_save_state (ETable *e_table gtk_object_sink(GTK_OBJECT(state)); } +static void +et_selection_model_selection_change (ETableGroup *etg, ETable *et) +{ + gtk_signal_emit (GTK_OBJECT (et), + et_signals [SELECTION_CHANGE]); +} static ETable * et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete, @@ -880,6 +887,9 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete, "sorter", e_table->sorter, NULL); + gtk_signal_connect(GTK_OBJECT(e_table->selection), "selection_changed", + GTK_SIGNAL_FUNC(et_selection_model_selection_change), e_table); + if (!specification->no_headers) { e_table_setup_header (e_table); } @@ -1204,6 +1214,15 @@ e_table_selected_row_foreach (ETable *e_table, closure); } +gint +e_table_selected_count (ETable *e_table) +{ + g_return_val_if_fail(e_table != NULL, -1); + g_return_val_if_fail(E_IS_TABLE(e_table), -1); + + return e_table_selection_model_selected_count(e_table->selection); +} + void e_table_select_all (ETable *table) { @@ -1887,25 +1906,26 @@ e_table_class_init (GtkObjectClass *object_class) e_table_parent_class = gtk_type_class (PARENT_TYPE); - object_class->destroy = et_destroy; - object_class->set_arg = et_set_arg; - object_class->get_arg = et_get_arg; + object_class->destroy = et_destroy; + object_class->set_arg = et_set_arg; + object_class->get_arg = et_get_arg; - klass->cursor_change = NULL; - klass->double_click = NULL; - klass->right_click = NULL; - klass->click = NULL; - klass->key_press = NULL; + klass->cursor_change = NULL; + klass->selection_change = NULL; + klass->double_click = NULL; + klass->right_click = NULL; + klass->click = NULL; + klass->key_press = NULL; - klass->table_drag_begin = NULL; - klass->table_drag_end = NULL; - klass->table_drag_data_get = NULL; - klass->table_drag_data_delete = NULL; + klass->table_drag_begin = NULL; + klass->table_drag_end = NULL; + klass->table_drag_data_get = NULL; + klass->table_drag_data_delete = NULL; - klass->table_drag_leave = NULL; - klass->table_drag_motion = NULL; - klass->table_drag_drop = NULL; - klass->table_drag_data_received = NULL; + klass->table_drag_leave = NULL; + klass->table_drag_motion = NULL; + klass->table_drag_drop = NULL; + klass->table_drag_data_received = NULL; et_signals [CURSOR_CHANGE] = gtk_signal_new ("cursor_change", @@ -1915,6 +1935,14 @@ e_table_class_init (GtkObjectClass *object_class) gtk_marshal_NONE__INT, GTK_TYPE_NONE, 1, GTK_TYPE_INT); + et_signals [SELECTION_CHANGE] = + gtk_signal_new ("selection_change", + GTK_RUN_LAST, + object_class->type, + GTK_SIGNAL_OFFSET (ETableClass, selection_change), + gtk_marshal_NONE__NONE, + GTK_TYPE_NONE, 0); + et_signals [DOUBLE_CLICK] = gtk_signal_new ("double_click", GTK_RUN_LAST, |