aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-table-model.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-05-08 04:49:02 +0800
committerChris Lahey <clahey@src.gnome.org>2000-05-08 04:49:02 +0800
commit56f9196ac4e30fd0f5e0bd79bab0dcfc9856c8ff (patch)
tree1b90f791be6fcb52dc21e44c44b45099317df91d /widgets/e-table/e-table-model.c
parent271cb81264219225420332375135c74857e035e7 (diff)
downloadgsoc2013-evolution-56f9196ac4e30fd0f5e0bd79bab0dcfc9856c8ff.tar.gz
gsoc2013-evolution-56f9196ac4e30fd0f5e0bd79bab0dcfc9856c8ff.tar.zst
gsoc2013-evolution-56f9196ac4e30fd0f5e0bd79bab0dcfc9856c8ff.zip
Handle row_inserted and row_deleted signals properly.
2000-05-07 Christopher James Lahey <clahey@helixcode.com> * e-table-item.c, e-table-item.h, e-table.c, e-table.h: Handle row_inserted and row_deleted signals properly. * e-table-model.c, e-table-model.h: Created the row_inserted and row_deleted signals. * e-table-sorted-variable.c, e-table-subset-variable.c: Emit the row_inserted and row_deleted signals as appropriate. svn path=/trunk/; revision=2879
Diffstat (limited to 'widgets/e-table/e-table-model.c')
-rw-r--r--widgets/e-table/e-table-model.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/widgets/e-table/e-table-model.c b/widgets/e-table/e-table-model.c
index d75554f2d0..3ea01c05e1 100644
--- a/widgets/e-table/e-table-model.c
+++ b/widgets/e-table/e-table-model.c
@@ -22,6 +22,8 @@ enum {
MODEL_CHANGED,
MODEL_ROW_CHANGED,
MODEL_CELL_CHANGED,
+ MODEL_ROW_INSERTED,
+ MODEL_ROW_DELETED,
ROW_SELECTION,
LAST_SIGNAL
};
@@ -143,6 +145,22 @@ e_table_model_class_init (GtkObjectClass *object_class)
gtk_marshal_NONE__INT_INT,
GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
+ e_table_model_signals [MODEL_ROW_INSERTED] =
+ gtk_signal_new ("model_row_inserted",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (ETableModelClass, model_row_inserted),
+ gtk_marshal_NONE__INT,
+ GTK_TYPE_NONE, 1, GTK_TYPE_INT);
+
+ e_table_model_signals [MODEL_ROW_DELETED] =
+ gtk_signal_new ("model_row_deleted",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (ETableModelClass, model_row_deleted),
+ gtk_marshal_NONE__INT,
+ GTK_TYPE_NONE, 1, GTK_TYPE_INT);
+
gtk_object_class_add_signals (object_class, e_table_model_signals, LAST_SIGNAL);
}
@@ -203,6 +221,26 @@ e_table_model_cell_changed (ETableModel *e_table_model, int col, int row)
}
void
+e_table_model_row_inserted (ETableModel *e_table_model, int row)
+{
+ g_return_if_fail (e_table_model != NULL);
+ g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
+
+ gtk_signal_emit (GTK_OBJECT (e_table_model),
+ e_table_model_signals [MODEL_ROW_INSERTED], row);
+}
+
+void
+e_table_model_row_deleted (ETableModel *e_table_model, int row)
+{
+ g_return_if_fail (e_table_model != NULL);
+ g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
+
+ gtk_signal_emit (GTK_OBJECT (e_table_model),
+ e_table_model_signals [MODEL_ROW_DELETED], row);
+}
+
+void
e_table_model_freeze (ETableModel *e_table_model)
{
g_return_if_fail (e_table_model != NULL);