Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[user experience] [files panel] [rfe/discussion] make files panel easier to navigate #14

Open
genodeftest opened this issue Dec 12, 2015 · 10 comments

Comments

@genodeftest
Copy link
Member

Currently, the files panel has these elements:

  1. Toolbar, containing these buttons:
    • back
    • forward
    • up
    • reload
    • home
  2. path, by using a GtkComboBox with a GtkEntry inside it.
  3. a search bar
  4. a GtkTreeView

I think in the toolbar we could get rid of the reload button. Instead a GFileMonitor should be used to watch folders for changes.

Path: Why is this using a GtkComboBox when there is no way to bookmark the current directory? How about just using a GtkEntry? Or is there a way to bookmark I don't know about?

Instead I think exaile should have another button for easy access of external mass storage devices. I often have to type in a path manually or have some 5…10 clicks to get to those devices. Bad thing is, this behaviour would be platform-specific:

  • On Windows this button should go to the highest level, displaying all disks C:\, D:\, E:\, …
  • on Linux this depends on which desktop environment (DE) you are running.
    • Gnome (gvfs) will mount removable disks below /run/media/username/. Downside: unmounted disks are not present. Alternatively there is other-locations:///, which currently isn't supported by gvfs but only by nautilus.
    • KDE mounted below /media/ when I checked last
    • I don't know about other DEs.
  • I don't know anything about Mac OS X.

Ideas? Comments?

@virtuald
Copy link
Member

Without looking at the code itself, it appears that the combobox is populated with the root folders that you add to your collection.

I don't mind the idea of a GFileMonitor instead of refresh... though, it seems like this sort of thing might be built into some GTK widget already. I wonder if you could repurpose a FileChooser widget for this purpose, as it already has builtin volumes/shortcuts support.

For linux, you should be able to find the removable devices via dbus/udisks et al... which I think there's a mass storage plugin that sorta handles some of that? But, I've never used it, and I don't think we've ever had a particularly good story about how to access removable devices.

For the others, it's hard to say, but almost certainly would need to be platform specific.

I've actually contemplated removing all device support from Exaile, just because it's incomplete and feels like it has been tacked on. However, the CD stuff uses it, so I haven't bothered yet.

@sjohannes
Copy link
Member

sjohannes commented Dec 12, 2015

I think in the toolbar we could get rid of the reload button. Instead a GFileMonitor should be used to watch folders for changes.

Makes sense, though I don't know how well that works on all platforms and on network GVFS mounts.

Path: Why is this using a GtkComboBox when there is no way to bookmark the current directory? How about just using a GtkEntry? Or is there a way to bookmark I don't know about?

It should list your library locations. Having bookmarks would indeed be useful.

Instead I think exaile should have another button for easy access of external mass storage devices. I often have to type in a path manually or have some 5…10 clicks to get to those devices. Bad thing is, this behaviour would be platform-specific: [...]

GVolumeMonitor kind of does this:

>>> [m.get_name() for m in Gio.VolumeMonitor.get().get_mounts()]
['BD-ROM Drive (F:)', 'Local Disk (D:)', 'Local Disk (C:)']

### In a cmd shell, I create a loopback mount with
###    subst Z: C:\Windows

>>> [m.get_name() for m in Gio.VolumeMonitor.get().get_mounts()]
['Local Disk (Z:)', 'BD-ROM Drive (F:)', 'Local Disk (D:)', 'Local Disk (C:)']

but surprisingly it seems broken in Linux (tested on Arch under VirtualBox):

(Update: Never mind, apparently we just need a mainloop running. Ignore the text below.)

>>> [m.get_name() for m in Gio.VolumeMonitor.get().get_mounts()]
['localhost', '21 GB Volume']

### Looks ok so far. 'localhost' is an sftp mount, '21 GB Volume' is a data partition.
### At this point I manually mount a CD.

>>> [m.get_name() for m in Gio.VolumeMonitor.get().get_mounts()]
['localhost', '21 GB Volume']

### Hm, the CD doesn't show up.
### Then I manually unmount the '21 GB Volume'.

>>> [m.get_name() for m in Gio.VolumeMonitor.get().get_mounts()]
['localhost', '21 GB Volume']

### Also doesn't change.
### Now I restart the Python session.

>>> [m.get_name() for m in Gio.VolumeMonitor.get().get_mounts()]
['localhost', '10_2_RELEASE_AMD64_BO']

@genodeftest
Copy link
Member Author

@sjohannes : I reported that upstream: https://bugzilla.gnome.org/show_bug.cgi?id=759644

A GtkFileChooserWidget would be ideal. Sadly there is no API for manipulating its columns. The default one might be too wide to be displayed in a Panel. Anyway we want it to display either the GtkPlacesSidebar or a GtkTreeView listing files. I'll try to implement this.

EDIT: There are a bunch of signals on e.g. GVolumeMonitor to listen for. That might help.

@Hackswell
Copy link

Also, is it possible to "remember" where in the list you were so when you go up/back a directory, the file list is positioned close to the folder just exited? Currently, it always sets you to the beginning.

sjohannes referenced this issue in exaile/exaile Apr 27, 2016
This is really not the best; we should save the selection instead and also
do it on every back/forward as well (so that new selections will be
retained in the history). It's better than nothing though.

Addresses https://github.com/exaile/exaile/issues/195#issuecomment-214732297
@sjohannes
Copy link
Member

Also, is it possible to "remember" where in the list you were so when you go up/back a directory, the file list is positioned close to the folder just exited? Currently, it always sets you to the beginning.

85dc8d6 implements a basic version of this. It won't work well if the directory has been modified in the meantime (it just saves the row+column number in history).

@Hackswell
Copy link

Thanks, @sjohannes! Just curious... would it be better to save as you enter a directory, or pull the name of the dir you are LEAVING and search for where that is in the updated ".." list? Just two different ways of doing it, I guess.

sjohannes referenced this issue in exaile/exaile Apr 27, 2016
This behaviour is similar to that of Nautilus and Thunar.

Added the behaviour to go_up and go_home as well.

Also, by using the gfile instead of row index, it works correctly if the
directory content is modified.

Ref: https://github.com/exaile/exaile/issues/195#issuecomment-214938229
Idea by @Hackswell on GitHub.
@sjohannes
Copy link
Member

Good point. Nautilus and Thunar seem to work as you described, so I've modified the code to do that.

The previous design was based on Windows Explorer, where each history entry stores its own selection. I think that's actually better than Nautilus's behaviour for a file manager, but in our case not very important.

@Hackswell
Copy link

A most excellent patch, good sir! Arigato!

tfree87 referenced this issue in tfree87/exaile May 2, 2016
This is really not the best; we should save the selection instead and also
do it on every back/forward as well (so that new selections will be
retained in the history). It's better than nothing though.

Addresses https://github.com/exaile/exaile/issues/195#issuecomment-214732297
tfree87 referenced this issue in tfree87/exaile May 2, 2016
This behaviour is similar to that of Nautilus and Thunar.

Added the behaviour to go_up and go_home as well.

Also, by using the gfile instead of row index, it works correctly if the
directory content is modified.

Ref: https://github.com/exaile/exaile/issues/195#issuecomment-214938229
Idea by @Hackswell on GitHub.
tfree87 referenced this issue in tfree87/exaile May 3, 2016
This is really not the best; we should save the selection instead and also
do it on every back/forward as well (so that new selections will be
retained in the history). It's better than nothing though.

Addresses https://github.com/exaile/exaile/issues/195#issuecomment-214732297
tfree87 referenced this issue in tfree87/exaile May 3, 2016
This behaviour is similar to that of Nautilus and Thunar.

Added the behaviour to go_up and go_home as well.

Also, by using the gfile instead of row index, it works correctly if the
directory content is modified.

Ref: https://github.com/exaile/exaile/issues/195#issuecomment-214938229
Idea by @Hackswell on GitHub.
tfree87 referenced this issue in tfree87/exaile May 3, 2016
This is really not the best; we should save the selection instead and also
do it on every back/forward as well (so that new selections will be
retained in the history). It's better than nothing though.

Addresses https://github.com/exaile/exaile/issues/195#issuecomment-214732297
tfree87 referenced this issue in tfree87/exaile May 3, 2016
This behaviour is similar to that of Nautilus and Thunar.

Added the behaviour to go_up and go_home as well.

Also, by using the gfile instead of row index, it works correctly if the
directory content is modified.

Ref: https://github.com/exaile/exaile/issues/195#issuecomment-214938229
Idea by @Hackswell on GitHub.
tfree87 referenced this issue in tfree87/exaile May 5, 2016
This is really not the best; we should save the selection instead and also
do it on every back/forward as well (so that new selections will be
retained in the history). It's better than nothing though.

Addresses https://github.com/exaile/exaile/issues/195#issuecomment-214732297
tfree87 referenced this issue in tfree87/exaile May 5, 2016
This behaviour is similar to that of Nautilus and Thunar.

Added the behaviour to go_up and go_home as well.

Also, by using the gfile instead of row index, it works correctly if the
directory content is modified.

Ref: https://github.com/exaile/exaile/issues/195#issuecomment-214938229
Idea by @Hackswell on GitHub.
tfree87 referenced this issue in tfree87/exaile May 12, 2016
This is really not the best; we should save the selection instead and also
do it on every back/forward as well (so that new selections will be
retained in the history). It's better than nothing though.

Addresses https://github.com/exaile/exaile/issues/195#issuecomment-214732297
tfree87 referenced this issue in tfree87/exaile May 12, 2016
This behaviour is similar to that of Nautilus and Thunar.

Added the behaviour to go_up and go_home as well.

Also, by using the gfile instead of row index, it works correctly if the
directory content is modified.

Ref: https://github.com/exaile/exaile/issues/195#issuecomment-214938229
Idea by @Hackswell on GitHub.
tfree87 referenced this issue in tfree87/exaile May 17, 2016
This is really not the best; we should save the selection instead and also
do it on every back/forward as well (so that new selections will be
retained in the history). It's better than nothing though.

Addresses https://github.com/exaile/exaile/issues/195#issuecomment-214732297
tfree87 referenced this issue in tfree87/exaile May 17, 2016
This behaviour is similar to that of Nautilus and Thunar.

Added the behaviour to go_up and go_home as well.

Also, by using the gfile instead of row index, it works correctly if the
directory content is modified.

Ref: https://github.com/exaile/exaile/issues/195#issuecomment-214938229
Idea by @Hackswell on GitHub.
tfree87 referenced this issue in tfree87/exaile May 20, 2016
This is really not the best; we should save the selection instead and also
do it on every back/forward as well (so that new selections will be
retained in the history). It's better than nothing though.

Addresses https://github.com/exaile/exaile/issues/195#issuecomment-214732297
tfree87 referenced this issue in tfree87/exaile May 20, 2016
This behaviour is similar to that of Nautilus and Thunar.

Added the behaviour to go_up and go_home as well.

Also, by using the gfile instead of row index, it works correctly if the
directory content is modified.

Ref: https://github.com/exaile/exaile/issues/195#issuecomment-214938229
Idea by @Hackswell on GitHub.
tfree87 referenced this issue in tfree87/exaile Jun 2, 2016
This is really not the best; we should save the selection instead and also
do it on every back/forward as well (so that new selections will be
retained in the history). It's better than nothing though.

Addresses https://github.com/exaile/exaile/issues/195#issuecomment-214732297
tfree87 referenced this issue in tfree87/exaile Jun 2, 2016
This behaviour is similar to that of Nautilus and Thunar.

Added the behaviour to go_up and go_home as well.

Also, by using the gfile instead of row index, it works correctly if the
directory content is modified.

Ref: https://github.com/exaile/exaile/issues/195#issuecomment-214938229
Idea by @Hackswell on GitHub.
tfree87 referenced this issue in tfree87/exaile Jun 2, 2016
This is really not the best; we should save the selection instead and also
do it on every back/forward as well (so that new selections will be
retained in the history). It's better than nothing though.

Addresses https://github.com/exaile/exaile/issues/195#issuecomment-214732297
tfree87 referenced this issue in tfree87/exaile Jun 2, 2016
This behaviour is similar to that of Nautilus and Thunar.

Added the behaviour to go_up and go_home as well.

Also, by using the gfile instead of row index, it works correctly if the
directory content is modified.

Ref: https://github.com/exaile/exaile/issues/195#issuecomment-214938229
Idea by @Hackswell on GitHub.
tfree87 referenced this issue in tfree87/exaile Jun 2, 2016
This is really not the best; we should save the selection instead and also
do it on every back/forward as well (so that new selections will be
retained in the history). It's better than nothing though.

Addresses https://github.com/exaile/exaile/issues/195#issuecomment-214732297
tfree87 referenced this issue in tfree87/exaile Jun 2, 2016
This behaviour is similar to that of Nautilus and Thunar.

Added the behaviour to go_up and go_home as well.

Also, by using the gfile instead of row index, it works correctly if the
directory content is modified.

Ref: https://github.com/exaile/exaile/issues/195#issuecomment-214938229
Idea by @Hackswell on GitHub.
@sjohannes
Copy link
Member

To summarize the discussion as I understand it: we've identified three things we can do to improve the Files panel:

  1. Use GFileMonitor to automatically refresh the directory. There are some questions here regarding its reliability and performance, especially on network drives.

  2. Provide a way to quickly browse to mounted filesystems. I have just implemented this in
    728a2ea. It's now in the drop down list, after your library locations.

  3. Preserve selection when going up/back/forward. This was implemented a long time ago.

This bug is a bit busy with discussion regarding points number 2 and 3 (which have been resolved), so I'm going to close it. Feel free to open a new bug for point 1, or if there are further requests.

@genodeftest genodeftest transferred this issue from exaile/exaile Feb 14, 2020
@genodeftest
Copy link
Member Author

Moving to exaile-ideas for point 1.

@genodeftest genodeftest reopened this Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants