[empathy: 8/17] Setting reorderable on the contact list view to get row previews as drag icons



commit 85e7ae3c96ccc9734f5f09371cd44817ff751ce6
Author: Shaun McCance <Shaun McCance>
Date:   Fri Sep 18 14:11:44 2009 -0500

    Setting reorderable on the contact list view to get row previews as drag icons
    
    This is a hack.  There's a comment explaining the hack.  Read it.

 libempathy-gtk/empathy-contact-list-view.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index 78e1f90..eb18acf 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -1080,9 +1080,14 @@ contact_list_view_setup (EmpathyContactListView *view)
 				 GTK_TREE_MODEL (priv->store));
 
 	/* 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", FALSE,
+		      "reorderable", TRUE,
 		      "show-expanders", FALSE,
 		      NULL);
 



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