aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-tree.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-01-11 02:30:23 +0800
committerMilan Crha <mcrha@redhat.com>2012-01-11 02:30:23 +0800
commit73fe6fb330ac9fab009d2bcb5766a2b908a201c7 (patch)
tree4085c894c691cd75b8040e3fffd6eaf5f6752ff0 /widgets/table/e-tree.c
parentfea81db90a01ce184e5955c19d4c340aeb1cbfff (diff)
downloadgsoc2013-evolution-73fe6fb330ac9fab009d2bcb5766a2b908a201c7.tar
gsoc2013-evolution-73fe6fb330ac9fab009d2bcb5766a2b908a201c7.tar.gz
gsoc2013-evolution-73fe6fb330ac9fab009d2bcb5766a2b908a201c7.tar.bz2
gsoc2013-evolution-73fe6fb330ac9fab009d2bcb5766a2b908a201c7.tar.lz
gsoc2013-evolution-73fe6fb330ac9fab009d2bcb5766a2b908a201c7.tar.xz
gsoc2013-evolution-73fe6fb330ac9fab009d2bcb5766a2b908a201c7.tar.zst
gsoc2013-evolution-73fe6fb330ac9fab009d2bcb5766a2b908a201c7.zip
Bug #667398 - Automatic mark-as-seen too aggressive
Diffstat (limited to 'widgets/table/e-tree.c')
-rw-r--r--widgets/table/e-tree.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index e24ce6a6e0..ffcca22457 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -200,6 +200,8 @@ struct _ETreePrivate {
gboolean state_changed;
guint state_change_freeze;
+
+ gboolean is_dragging;
};
static guint et_signals[LAST_SIGNAL] = { 0, };
@@ -638,6 +640,8 @@ e_tree_init (ETree *e_tree)
e_tree->priv->state_changed = FALSE;
e_tree->priv->state_change_freeze = 0;
+
+ e_tree->priv->is_dragging = FALSE;
}
/* Grab_focus handler for the ETree */
@@ -2827,6 +2831,21 @@ e_tree_drag_begin (ETree *tree,
}
/**
+ * e_tree_is_dragging:
+ * @tree: An #ETree widget
+ *
+ * Returns whether is @tree in a drag&drop operation.
+ **/
+gboolean
+e_tree_is_dragging (ETree *tree)
+{
+ g_return_val_if_fail (tree != NULL, FALSE);
+ g_return_val_if_fail (tree->priv != NULL, FALSE);
+
+ return tree->priv->is_dragging;
+}
+
+/**
* e_tree_get_cell_at:
* @tree: An ETree widget
* @x: X coordinate for the pixel
@@ -2928,6 +2947,8 @@ et_drag_begin (GtkWidget *widget,
GdkDragContext *context,
ETree *et)
{
+ et->priv->is_dragging = TRUE;
+
g_signal_emit (et,
et_signals[TREE_DRAG_BEGIN], 0,
et->priv->drag_row,
@@ -2941,6 +2962,8 @@ et_drag_end (GtkWidget *widget,
GdkDragContext *context,
ETree *et)
{
+ et->priv->is_dragging = FALSE;
+
g_signal_emit (et,
et_signals[TREE_DRAG_END], 0,
et->priv->drag_row,