[empathy] Only enable row reordering in EmpathyIndividualView if dragging is enabled



commit f84b2a0c688bf42002ddb93ca941af166c846687
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Thu Aug 5 17:14:06 2010 +0100

    Only enable row reordering in EmpathyIndividualView if dragging is enabled

 libempathy-gtk/empathy-individual-view.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 716886d..4e6db6c 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)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]