Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > e93d97066c34d609dd379e62cbd280e2 > files > 3

exo-0.3.106-2mdv2010.1.src.rpm

From cd80ae7747aa87ab6d72f08386b0fd4bea7f05b3 Mon Sep 17 00:00:00 2001
From: Nick Schermer <nick@xfce.org>
Date: Tue, 11 May 2010 18:57:11 +0000
Subject: Make the treeview work again with gtk 2.20 (bug #6230).

---
diff --git a/exo/exo-tree-view.c b/exo/exo-tree-view.c
index f7baa56..159f5b1 100644
--- a/exo/exo-tree-view.c
+++ b/exo/exo-tree-view.c
@@ -365,14 +365,7 @@ exo_tree_view_button_press_event (GtkWidget      *widget,
       && path != NULL && gtk_tree_selection_path_is_selected (selection, path))
     {
       /* check if we have to restore paths */
-      if (G_LIKELY (selection->user_func == (GtkTreeSelectionFunc) exo_noop_false))
-        {
-          /* just reset the select function (previously set to exo_noop_false),
-           * there's no clean way to do this, so what the heck.
-           */
-          selection->user_func = NULL;
-        }
-      else
+      if (G_LIKELY (selection->user_func != (GtkTreeSelectionFunc) exo_noop_false))
         {
           /* select all previously selected paths */
           for (lp = selected_paths; lp != NULL; lp = lp->next)
@@ -380,6 +373,15 @@ exo_tree_view_button_press_event (GtkWidget      *widget,
         }
     }
 
+  /* see bug http://bugzilla.xfce.org/show_bug.cgi?id=6230 for more information */
+  if (G_LIKELY (selection->user_func == (GtkTreeSelectionFunc) exo_noop_false))
+    {
+      /* just reset the select function (previously set to exo_noop_false),
+       * there's no clean way to do this, so what the heck.
+       */
+      selection->user_func = NULL;
+    }
+
   /* release the path (if any) */
   if (G_LIKELY (path != NULL))
     gtk_tree_path_free (path);
--
cgit v0.8.2.1