aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2001-01-25 22:48:39 +0800
committerChris Lahey <clahey@src.gnome.org>2001-01-25 22:48:39 +0800
commit9c73622d3869ef66c795f8fa583e726ef8798563 (patch)
treeb3e64bf3a408385876d6bfa4d8f92ea1a2f20e25 /widgets/table/e-table.c
parent735020a97601de2799e6107c45b35047fedb7efa (diff)
downloadgsoc2013-evolution-9c73622d3869ef66c795f8fa583e726ef8798563.tar
gsoc2013-evolution-9c73622d3869ef66c795f8fa583e726ef8798563.tar.gz
gsoc2013-evolution-9c73622d3869ef66c795f8fa583e726ef8798563.tar.bz2
gsoc2013-evolution-9c73622d3869ef66c795f8fa583e726ef8798563.tar.lz
gsoc2013-evolution-9c73622d3869ef66c795f8fa583e726ef8798563.tar.xz
gsoc2013-evolution-9c73622d3869ef66c795f8fa583e726ef8798563.tar.zst
gsoc2013-evolution-9c73622d3869ef66c795f8fa583e726ef8798563.zip
Documented. Added a "cursor_activated" signal. Removed some unused
2001-01-25 Christopher James Lahey <clahey@helixcode.com> * e-table-group-container.c, e-table-group-leaf.c, e-table-group.c, e-table-group.h, e-table-item.c, e-table-item.h: Documented. Added a "cursor_activated" signal. Removed some unused functions (e_table_group_get_count and e_table_group_get_ecol). * e-table-selection-model.c, e-table-selection-model.h: Added a "cursor_activated" signal. Call it when the user changes the selection to match the cursor. * e-table.c, e-table.h: Added a "cursor_activated" signal. Fixed the e_table_compute_location function to take into account the scrolled position. svn path=/trunk/; revision=7808
Diffstat (limited to 'widgets/table/e-table.c')
-rw-r--r--widgets/table/e-table.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index ba9b65a42c..39e388b79f 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -43,6 +43,7 @@ static GtkObjectClass *e_table_parent_class;
enum {
CURSOR_CHANGE,
+ CURSOR_ACTIVATED,
SELECTION_CHANGE,
DOUBLE_CLICK,
RIGHT_CLICK,
@@ -338,6 +339,14 @@ group_cursor_change (ETableGroup *etg, int row, ETable *et)
}
static void
+group_cursor_activated (ETableGroup *etg, int row, ETable *et)
+{
+ gtk_signal_emit (GTK_OBJECT (et),
+ et_signals [CURSOR_ACTIVATED],
+ row);
+}
+
+static void
group_double_click (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et)
{
gtk_signal_emit (GTK_OBJECT (et),
@@ -441,6 +450,8 @@ changed_idle (gpointer data)
NULL);
gtk_signal_connect (GTK_OBJECT (et->group), "cursor_change",
GTK_SIGNAL_FUNC (group_cursor_change), et);
+ gtk_signal_connect (GTK_OBJECT (et->group), "cursor_activated",
+ GTK_SIGNAL_FUNC (group_cursor_activated), et);
gtk_signal_connect (GTK_OBJECT (et->group), "double_click",
GTK_SIGNAL_FUNC (group_double_click), et);
gtk_signal_connect (GTK_OBJECT (et->group), "right_click",
@@ -618,6 +629,8 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h
gtk_signal_connect (GTK_OBJECT (e_table->group), "cursor_change",
GTK_SIGNAL_FUNC(group_cursor_change), e_table);
+ gtk_signal_connect (GTK_OBJECT (e_table->group), "cursor_activated",
+ GTK_SIGNAL_FUNC(group_cursor_activated), e_table);
gtk_signal_connect (GTK_OBJECT (e_table->group), "double_click",
GTK_SIGNAL_FUNC(group_double_click), e_table);
gtk_signal_connect (GTK_OBJECT (e_table->group), "right_click",
@@ -1722,6 +1735,8 @@ e_table_compute_location (ETable *table, GtkWidget *widget,
{
if (!(row || col))
return;
+ x += GTK_LAYOUT(table->table_canvas)->hadjustment->value;
+ y += GTK_LAYOUT(table->table_canvas)->vadjustment->value;
e_table_group_compute_location(table->group, &x, &y, row, col);
}
@@ -2005,6 +2020,7 @@ e_table_class_init (GtkObjectClass *object_class)
object_class->get_arg = et_get_arg;
klass->cursor_change = NULL;
+ klass->cursor_activated = NULL;
klass->selection_change = NULL;
klass->double_click = NULL;
klass->right_click = NULL;
@@ -2029,6 +2045,14 @@ e_table_class_init (GtkObjectClass *object_class)
gtk_marshal_NONE__INT,
GTK_TYPE_NONE, 1, GTK_TYPE_INT);
+ et_signals [CURSOR_ACTIVATED] =
+ gtk_signal_new ("cursor_activated",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (ETableClass, cursor_activated),
+ gtk_marshal_NONE__INT,
+ GTK_TYPE_NONE, 1, GTK_TYPE_INT);
+
et_signals [SELECTION_CHANGE] =
gtk_signal_new ("selection_change",
GTK_RUN_LAST,