aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table-model.c
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnu.org>1999-11-25 16:02:13 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-11-25 16:02:13 +0800
commit385ccbd512c4c43305dee900f86d0f51f94b1200 (patch)
tree81920b9b2281f21a55ccd417895d0bd3a271cff7 /widgets/e-table-model.c
parent858500c40a2bf4485e75e1a056d0310b92625929 (diff)
downloadgsoc2013-evolution-385ccbd512c4c43305dee900f86d0f51f94b1200.tar
gsoc2013-evolution-385ccbd512c4c43305dee900f86d0f51f94b1200.tar.gz
gsoc2013-evolution-385ccbd512c4c43305dee900f86d0f51f94b1200.tar.bz2
gsoc2013-evolution-385ccbd512c4c43305dee900f86d0f51f94b1200.tar.lz
gsoc2013-evolution-385ccbd512c4c43305dee900f86d0f51f94b1200.tar.xz
gsoc2013-evolution-385ccbd512c4c43305dee900f86d0f51f94b1200.tar.zst
gsoc2013-evolution-385ccbd512c4c43305dee900f86d0f51f94b1200.zip
Realize cells.
1999-11-25 Miguel de Icaza <miguel@gnu.org> * e-table-header-item.c (ethi_realize): Realize cells. * e-table-item.c (eti_header_dim_changed): redraw before and after. * e-table-header-item.c (ethi_event): Add continuous resizing. 1999-11-24 Miguel de Icaza <miguel@gnu.org> * e-table-subset.h, e-table-subset.c: New files, used to implement subset tables. * e-table-sorted.h, e-table-sorted.c: Now they derive from e-table-subset. * e-cell.c, e-cell.h: realize method now return per view instance data. svn path=/trunk/; revision=1434
Diffstat (limited to 'widgets/e-table-model.c')
-rw-r--r--widgets/e-table-model.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/widgets/e-table-model.c b/widgets/e-table-model.c
index de7bc67c51..1176b33ec7 100644
--- a/widgets/e-table-model.c
+++ b/widgets/e-table-model.c
@@ -16,6 +16,7 @@ static GtkObjectClass *e_table_model_parent_class;
enum {
MODEL_CHANGED,
+ ROW_SELECTION,
LAST_SIGNAL
};
@@ -88,6 +89,14 @@ e_table_model_class_init (GtkObjectClass *object_class)
GTK_SIGNAL_OFFSET (ETableModelClass, model_changed),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
+
+ etm_signals [ROW_SELECTION] =
+ gtk_signal_new ("row_selection",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (ETableModelClass, row_selection),
+ gtk_marshal_NONE__INT_INT,
+ GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
gtk_object_class_add_signals (object_class, etm_signals, LAST_SIGNAL);
}
@@ -158,3 +167,29 @@ e_table_model_max_col_width (ETableModel *etm, int col)
return max;
}
#endif
+
+void
+e_table_model_select_row (ETableModel *etm, int row)
+{
+ gtk_signal_emit (GTK_OBJECT (etm), etm_signals [ROW_SELECTION], row, 1);
+ etm->row_selected = row;
+}
+
+void
+e_table_model_unselect_row (ETableModel *etm, int row)
+{
+ if (etm->row_selected != -1){
+ gtk_signal_emit (
+ GTK_OBJECT (etm), etm_signals [ROW_SELECTION],
+ etm->row_selected, 0);
+ }
+
+ etm->row_selected = -1;
+}
+
+gint
+e_table_model_get_selected_row (ETableModel *etm)
+{
+ return etm->row_selected;
+}
+