aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-group.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-08-25 00:33:30 +0800
committerChris Lahey <clahey@src.gnome.org>2001-08-25 00:33:30 +0800
commitf7120120cdd3c8bdfdc201a2bbcff847fa198d0b (patch)
treece4b10fd342f9cb159b248f8acb0af59f13f5d1d /widgets/table/e-table-group.c
parent6c727437ab876b07d1095cc1ac45ad1d0e706c16 (diff)
downloadgsoc2013-evolution-f7120120cdd3c8bdfdc201a2bbcff847fa198d0b.tar.gz
gsoc2013-evolution-f7120120cdd3c8bdfdc201a2bbcff847fa198d0b.tar.zst
gsoc2013-evolution-f7120120cdd3c8bdfdc201a2bbcff847fa198d0b.zip
Added start_drag signals.
2001-08-24 Christopher James Lahey <clahey@ximian.com> * e-table-group-container.c, e-table-group-leaf.c, e-table-group-leaf.h, e-table-group.c, e-table-group.h: Added start_drag signals. * e-table-item.c, e-table-item.h (eti_event): Send the start_drag signal. Fixes Ximian bug #807. * e-table.c, e-table.h, e-tree.c, e-tree.h: Added start_drag signal. Made default handler start drag & drop if we're set to automatically handle dnd. Ripped out the code to handle watching events for dnd since start_drag does this now. svn path=/trunk/; revision=12437
Diffstat (limited to 'widgets/table/e-table-group.c')
-rw-r--r--widgets/table/e-table-group.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index c31be579d4..d9174452be 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -31,6 +31,7 @@ enum {
RIGHT_CLICK,
CLICK,
KEY_PRESS,
+ START_DRAG,
LAST_SIGNAL
};
@@ -525,6 +526,30 @@ e_table_group_key_press (ETableGroup *e_table_group, gint row, gint col, GdkEven
}
/**
+ * e_table_group_start_drag
+ * @eti: %ETableGroup to emit the signal on
+ * @row: The cursor row (model row)
+ * @col: The cursor col (model col)
+ * @event: The event that caused this signal
+ *
+ * This routine emits the "start_drag" signal.
+ */
+gint
+e_table_group_start_drag (ETableGroup *e_table_group, gint row, gint col, GdkEvent *event)
+{
+ gint return_val = 0;
+
+ g_return_val_if_fail (e_table_group != NULL, 0);
+ g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), 0);
+
+ gtk_signal_emit (GTK_OBJECT (e_table_group),
+ etg_signals [START_DRAG],
+ row, col, event, &return_val);
+
+ return return_val;
+}
+
+/**
* e_table_group_get_header
* @eti: %ETableGroup to check
*
@@ -586,6 +611,7 @@ etg_class_init (GtkObjectClass *object_class)
klass->right_click = NULL;
klass->click = NULL;
klass->key_press = NULL;
+ klass->start_drag = NULL;
klass->add = NULL;
klass->add_array = NULL;
@@ -650,6 +676,14 @@ etg_class_init (GtkObjectClass *object_class)
e_marshal_INT__INT_INT_POINTER,
GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT);
+ etg_signals [START_DRAG] =
+ gtk_signal_new ("start_drag",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (ETableGroupClass, start_drag),
+ e_marshal_INT__INT_INT_POINTER,
+ GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT);
+
gtk_object_class_add_signals (object_class, etg_signals, LAST_SIGNAL);
}