aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-06 00:14:06 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-12 00:28:46 +0800
commitf84b2a0c688bf42002ddb93ca941af166c846687 (patch)
tree0ddb7ef37cb024b4e389d1258eb141f807711ee1 /libempathy-gtk
parentc10575354749cf6e26a2826a214a31eac4815196 (diff)
downloadgsoc2013-empathy-f84b2a0c688bf42002ddb93ca941af166c846687.tar
gsoc2013-empathy-f84b2a0c688bf42002ddb93ca941af166c846687.tar.gz
gsoc2013-empathy-f84b2a0c688bf42002ddb93ca941af166c846687.tar.bz2
gsoc2013-empathy-f84b2a0c688bf42002ddb93ca941af166c846687.tar.lz
gsoc2013-empathy-f84b2a0c688bf42002ddb93ca941af166c846687.tar.xz
gsoc2013-empathy-f84b2a0c688bf42002ddb93ca941af166c846687.tar.zst
gsoc2013-empathy-f84b2a0c688bf42002ddb93ca941af166c846687.zip
Only enable row reordering in EmpathyIndividualView if dragging is enabled
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-individual-view.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 716886dbc..4e6db6c6d 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -1559,14 +1559,8 @@ individual_view_constructed (GObject *object)
G_CALLBACK (individual_view_store_row_deleted_cb), view, 0);
/* Setup view */
- /* Setting reorderable is a hack that gets us row previews as drag icons
- for free. We override all the drag handlers. It's tricky to get the
- position of the drag icon right in drag_begin. GtkTreeView has special
- voodoo for it, so we let it do the voodoo that he do.
- */
g_object_set (view,
"headers-visible", FALSE,
- "reorderable", TRUE,
"show-expanders", FALSE,
NULL);
@@ -1680,6 +1674,15 @@ individual_view_set_view_features (EmpathyIndividualView *view,
priv->view_features = features;
+ /* Setting reorderable is a hack that gets us row previews as drag icons
+ for free. We override all the drag handlers. It's tricky to get the
+ position of the drag icon right in drag_begin. GtkTreeView has special
+ voodoo for it, so we let it do the voodoo that he do (but only if dragging
+ is enabled).
+ */
+ gtk_tree_view_set_reorderable (GTK_TREE_VIEW (view),
+ (features & EMPATHY_INDIVIDUAL_VIEW_FEATURE_CONTACT_DRAG));
+
/* Update DnD source/dest */
if (features & EMPATHY_INDIVIDUAL_VIEW_FEATURE_CONTACT_DRAG)
{