]> git.0d.be Git - empathy.git/commitdiff
Setting reorderable on the contact list view to get row previews as drag icons
authorShaun McCance <Shaun McCance>
Fri, 18 Sep 2009 19:11:44 +0000 (14:11 -0500)
committerShaun McCance <shaunm@gnome.org>
Tue, 24 Nov 2009 20:50:28 +0000 (14:50 -0600)
This is a hack.  There's a comment explaining the hack.  Read it.

libempathy-gtk/empathy-contact-list-view.c

index 78e1f90206e6b407c3377294b562fbe05a7e3cd6..eb18acf0b9904712538a9d4d6eb5d07962946a9a 100644 (file)
@@ -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);