wok rev 11672

pcmanfm: fix detailed list click bug
author Richard Dunbar <mojo@slitaz.org>
date Fri Feb 17 22:58:43 2012 +0000 (2012-02-17)
parents 00f6ddc9b2df
children 8eec3c4a2a20
files pcmanfm/stuff/view.as.detailed.list.click.bug.patch
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/pcmanfm/stuff/view.as.detailed.list.click.bug.patch	Fri Feb 17 22:58:43 2012 +0000
     1.3 @@ -0,0 +1,25 @@
     1.4 +--- src/exo/exo-tree-view.c.ORIG
     1.5 ++++ src/exo/exo-tree-view.c
     1.6 +@@ -364,20 +364,11 @@
     1.7 +       tree_view->priv->button_release_activates = (tree_view->priv->single_click && event->type == GDK_BUTTON_PRESS && event->button == 1
     1.8 +                                                    && (event->state & gtk_accelerator_get_default_mod_mask ()) == 0);
     1.9 +     }
    1.10 +-
    1.11 +-  /* unfortunately GtkTreeView will unselect rows except the clicked one,
    1.12 +-   * which makes dragging from a GtkTreeView problematic. That's why we
    1.13 +-   * remember the selected paths here and restore them later.
    1.14 +-   */
    1.15 ++ 
    1.16 +   if (event->type == GDK_BUTTON_PRESS && (event->state & gtk_accelerator_get_default_mod_mask ()) == 0
    1.17 +       && path != NULL && gtk_tree_selection_path_is_selected (selection, path))
    1.18 +     {
    1.19 +-      /* if no custom select function is set, we simply use exo_noop_false here,
    1.20 +-       * to tell the tree view that it may not alter the selection.
    1.21 +-       */
    1.22 +-      if (G_LIKELY (selection->user_func == NULL))
    1.23 +-        gtk_tree_selection_set_select_function (selection, (GtkTreeSelectionFunc) exo_noop_false, NULL, NULL);
    1.24 +-      else
    1.25 ++
    1.26 +         selected_paths = gtk_tree_selection_get_selected_rows (selection, NULL);
    1.27 +     }
    1.28 +