#56 File/dir selection by clicking + dragging was removed

closed-fixed
Interface (27)
4
2011-06-14
2011-03-16
No

The old style file and/or directory selection by clicking and then dragging and unselecting by clicking + dragging over the selected items was removed.
This was one of the main reasons why I used to like gentoo. Please bring it back or at least make enabling it an option.

Discussion

  • Emil Brink

    Emil Brink - 2011-03-16
    • labels: --> Interface
    • priority: 5 --> 4
    • assigned_to: nobody --> emilbrink
     
  • Skotlex

    Skotlex - 2011-03-23

    All right, since I really miss this behaviour, I went around to do some research on the topic.

    For those who don't have the background info, the problem is that previously gentoo's dirpanes used CLISTs with the GTK_SELECTION_EXTENDED selection criteria, this is what gave us the smooth "drag to select" behaviour. Both were deprecated with the change to Gtk 2.0.

    Gentoo now uses GtkTreeViews for the panes, and while researching around, I found this:

    http://library.gnome.org/devel/gtk/2.21/GtkTreeView.html#gtk-tree-view-set-rubber-banding

    "Enables or disables rubber banding in tree_view. If the selection mode is GTK_SELECTION_MULTIPLE, rubber banding will allow the user to select multiple rows by dragging the mouse."

    I tried it out, by adding the following line of code to dp_build_list2 (dirpane.c), right after setting the selection method:

    gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(dp->view)), GTK_SELECTION_MULTIPLE);
    gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(dp->view), TRUE);

    The behaviour is... a bit messy. Left click + drag DOES work, but clicking anywhere else will clear the selection before starting a new dragging selection. Ctrl+click will not allow you to add more than one element to the selection, and shift+click has a behaviour I can't even explain.

    I see that GtkTreeSelection allows you to set callback functions to all selecting operations, so it seems possible (at least in theory) to hack some more and improve the rubber-band behaviour to what Gentoo on Gtk1.2 used to do...

     
  • Skotlex

    Skotlex - 2011-04-11

    I'd like to encourage enabling rubber-banding for the next release, as this selection method is one of the most noticeable features of Gentoo as a file manager. Any strange behaviour reported on my last comment is really a Gtk bug (and maybe even fixed on a latter version than the one I use).

    You can usually test how rubber banding works in other applications when using the file-open menu (when it lets you open multiple files at once, it usually has rubber banding active as well).

     
  • Emil Brink

    Emil Brink - 2011-04-12

    I have implemented optional use of the "rubber-banding" selection mode, as outlined by Skotlex below. Thanks for the suggestion. I think it's an improvement, but it does require some re-learning since it's not completely as smooth as the solution pre-GTK+-2.0 versions of gentoo used. I'm not keen on re-implementing that rather hackish solution either, though.

    Marking this as Fixed, but keeping open until after the release containing the change.

     
  • Emil Brink

    Emil Brink - 2011-04-12
    • status: open --> open-fixed
     
  • Emil Brink

    Emil Brink - 2011-06-14

    Closed, this fix is in 0.19.10 which was recently released.

     
  • Emil Brink

    Emil Brink - 2011-06-14
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks