After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 315207 - gtkfilechooser should offer previews from GNOME
gtkfilechooser should offer previews from GNOME
Status: RESOLVED DUPLICATE of bug 141154
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.19.x
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
: 498073 588697 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-09-04 06:45 UTC by Emmanuel Touzery
Modified: 2012-10-17 20:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
feature in nautilus (32.48 KB, image/png)
2005-09-04 06:46 UTC, Emmanuel Touzery
Details
gtkfilechooser open UI mockup. (134.61 KB, image/png)
2007-01-19 13:16 UTC, Andrew Moon
Details

Description Emmanuel Touzery 2005-09-04 06:45:29 UTC
i was very surprised there's not already a bug for this, maybe i just didn't
find it.
the point is that there's no (inline) preview at all in GtkFileChooser, which
makes it very unpractical to browse directories of pictures. see screenshot
attachment.

in most of the cases, it's possible to work around it, drag&dropping the file in
applications (thus avoiding gtkfilechooser), but for instance when uploading a
file on a website, there is only a "browse" button and you can't drag&drop. then
you must use nautilus, remember the file name, go in file chooser, or maybe
drag&drop from nautilus to the filechooser if it works...
in any case that's not intuitive and not very practical.

of course i realise the problem is that gtk doesn't have access to gnome APIs,
it's just that GtkFileChooser should offer an extension mechanism for such
thumbnails.
Comment 1 Emmanuel Touzery 2005-09-04 06:46:17 UTC
Created attachment 51775 [details]
feature in nautilus
Comment 2 Andrew Moon 2007-01-19 13:16:26 UTC
Created attachment 80692 [details]
gtkfilechooser open UI mockup.

UI mockup. The major difference is the addition of zoom and list/icon view toggle controls in the top right corner.
Comment 3 Andrew Moon 2007-01-19 13:18:41 UTC
I also am having the exact same issues with the gtkfilechooser. Selecting specific images from folders of images is a real pain, with the best approach to copy+paste the address from Nautilus.

I am a bit worried that this bug was reported over a year ago with no response.

I think a good way to do this is to offer both a list and icon mode in gtkfilechooser like it is done in Nautilus.

Which brings up another question, should icon mode be used by default like it is in Nautilus or stick to the list mode?

I've attached a rough UI-mockup that I've created.

Also there is a somewhat lengthy thread discussing the issues (mostly performance related) involved as well as some general complaints on the existing interface on the Ubuntu forums here: http://www.ubuntuforums.org/showthread.php?t=340994

Please excuse the title of the thread, I know you guys work hard and I am very thankful for it, however gtkfileviewer was annoying me quite a lot that day...

Thank you in advance.
Comment 4 Jean-François Fortin Tam 2007-01-20 23:41:54 UTC
Googled my way here; just to cast my vote on this feature here. Not having thumbnails can simply destroy usability for my aunts who seldom grasp the concept of a filename and have short memory. I saw old Windows versions using this, it is kind of humiliating ;)
Comment 5 Bruce Cowan 2007-09-23 00:13:19 UTC
This should be filed under the GtkFileChooser component.
Comment 6 Mart Raudsepp 2007-09-23 02:18:06 UTC
Modifying component to GtkFileChooser :)
Comment 7 Jean-François Fortin Tam 2007-09-23 03:04:10 UTC
Does that mean bug 372344 should not be considered wontfix, but instead a duplicate of this one?
Comment 8 Emmanuel Touzery 2007-09-24 10:29:00 UTC
To answer comment #7; I think not, bug #372344 was about a preview pane appearing on the right of the file list when you select a file. This bug is about thumbnails inside the list of files. see mockups in comment #1 and comment #2.
Comment 9 Jean-François Fortin Tam 2007-09-24 13:15:01 UTC
Indeed it is slightly different, bug 372344 was about the preview "pane" it seems. However, when I thought of an icon view, I got this reply:

quote: "the preferences are for nautilus, and a file selection dialog is not a file manager window. the file chooser does not have an icon view, and will not get
one." (comment 2 of bug 372344)

It just scared me a bit I guess.
Comment 10 Emmanuel Touzery 2007-09-24 13:40:31 UTC
about the icon view, as you can see in the attachment from comment #1 it's possible to have thumbnails without needing an icon view. Nautilus shows thumbnails in the same mode as the file chooser, in list mode.

I don't really understand why the file chooser shouldn't have an icon mode, but certainly there is no reason why it shouldn't have at least thumbnails in the list mode.
Comment 11 Jean-François Fortin Tam 2007-09-24 14:38:58 UTC
Well, thumbnails in list mode are pretty darn small, no? Unless there are zoom +/- buttons that I failed to notice?
Comment 12 Federico Mena Quintero 2007-09-24 16:54:48 UTC
(In reply to comment #10)

> I don't really understand why the file chooser shouldn't have an icon mode

I'll be happy to review a patch for this.

> certainly there is no reason why it shouldn't have at least thumbnails in the
> list mode.

This is easy to do with bad performance; a bit harder to do with good performance.  Grep for gnome_icon_lookup in libgnomeui/file-chooser/gtkfilesystemgnomevfs.c - you'll see that it doesn't use a GnomeThumbnailFactory object.  If you add one, it will get thumbnails in the file list.
Comment 13 Emmanuel Touzery 2007-09-25 06:59:26 UTC
about coding this feature: i thought gtk couldn't use gnome libraries such as GnomeThumbnailFactory(cross-dependency problem)?
i think most people would be satisfied with previews for image types which GtkPixbuf can display, if we give up gnome thumbnailers (too bad for SVG images though).

What is doable here? is there some way we could use the gnome thumbnailers? or we limit ourselves to GtkPixbuf?

About performance.. you probably mean not keeping in memory images which are not displayed anymore, when the user changes the directory or scrolls in the list?
Comment 14 Behdad Esfahbod 2007-09-25 12:27:04 UTC
GdkPixbuf happily renders SVGs if you have librsvg installed.
Comment 15 Federico Mena Quintero 2007-09-25 19:07:21 UTC
(In reply to comment #13)
> about coding this feature: i thought gtk couldn't use gnome libraries such as
> GnomeThumbnailFactory(cross-dependency problem)?
> i think most people would be satisfied with previews for image types which
> GtkPixbuf can display, if we give up gnome thumbnailers (too bad for SVG images
> though).

This would be done in libgnomeui/file-chooser/gtkfilesystemgnomevfs.c, which already links to libgnomeui.  So, using gnome-thumbnail-factory is not a problem.

> About performance.. you probably mean not keeping in memory images which are
> not displayed anymore, when the user changes the directory or scrolls in the
> list?

This is about loading thumbnails only when they get scrolled into the visible area.  GtkTreeView doesn't let you do that easily.
Comment 16 Mathias Hasselmann (IRC: tbf) 2008-01-13 11:03:08 UTC
GLib recently got MD5 support, so thumbnailing could be moved to gtk now.
Comment 17 Emmanuele Bassi (:ebassi) 2008-01-13 19:13:45 UTC
the implementation of the file-to-thumbnail-path-to-pixbuf can be also found in libegg, under the pixbufthumbnail directory (as part of the EggIconChooser widget).
Comment 18 Maciej (Matthew) Piechotka 2008-03-25 09:14:05 UTC
I am not sure if it is not too late but I would prefere a separate pane on the left. Why?
- Because I often have folders with many files [which even in 'list' layout are not in the same 'page'].  The previews in-list would make searching file longer if I know a file [1].
- It would also do not make hard to scroll the list while the thubnails loads.
- Because it is already done in many applications (for example MS Office, GIMP...) and users are familiar with it.

Possibly the best solution [for users - not developers ;)] would be implementing both and offer a configuration of behaviour.

[1] I know I should use git but I name files simpy "yyyymmdd. filename" and if I know the filename part I can find the filename easily but I cannot put it in the path textbox as I don't know the begining of filename.
Comment 19 Murray Cumming 2008-05-03 08:03:03 UTC
Nobody seems to have mentioned (and people don't seem to realize) that previewing is currently something added by the application. That's why you have a preview pane when opening files from the GIMP. Any generic solution would need to play well with that. But if this is just about thumbnail icons, or an icon view, then this bug should be renamed.
Comment 20 Maciej (Matthew) Piechotka 2008-05-03 10:17:18 UTC
(In reply to comment #19)
> Nobody seems to have mentioned (and people don't seem to realize) that
> previewing is currently something added by the application. That's why you have
> a preview pane when opening files from the GIMP. Any generic solution would
> need to play well with that. But if this is just about thumbnail icons, or an
> icon view, then this bug should be renamed.
> 

I've mentioned - and unfortunatly it seems to be more useful for me in this form. Because:
- As icons load it may make scrolling hard
- In folders with many files it is more efficient
- Users are more familiar with this type of preview (;))

May be it should be done by something like:
gtk_file_chooser_set_preview(chooser, TRUE);
or other indication of compatibility of application.

Anyway IMHO the fact that applications are implementing it on their own means that the feature is in fact needed.
Comment 21 Christian Dywan 2008-09-08 13:10:50 UTC
Gtk+ does show previews in the list mode by now.

Either an icon view or a preview still seem like good ideas. I wonder if one of these would be enough, ie. if you have big icons that would make choosing images much more convenient, and you wouldn't need a separate preview anymore.
Comment 22 Jean-François Fortin Tam 2008-09-08 16:39:19 UTC
I am still a proponent of the "large thumbnail"/"icon" view. The 10x10 pixels thumbnails we have in list view are a joke, and the one-at-a-time preview pane on the right is inefficient, too.

Please, rename this bug to reduce confusion?
Comment 23 Pacho Ramos 2008-10-17 18:33:02 UTC
Something like http://bugzilla.gnome.org/attachment.cgi?id=80692&action=view would be really useful when selecting images, for example, when selecting an image to be used as user image from gnome-about-me I have to remember full filename because:
1. If nautilus was not opened in image location I get no preview at all (at least with gtk-2.12.11
2. Even when I get preview in list mode (after browsing with nautilus location dir), it would be easier select the desired image in proposed mode, because with list view, it can be hard find proper image when directory contains a lot of them

Thanks
Comment 24 Christian Dywan 2009-02-06 09:18:10 UTC
*** Bug 498073 has been marked as a duplicate of this bug. ***
Comment 25 Emmanuele Bassi (:ebassi) 2009-07-16 08:02:48 UTC
*** Bug 588697 has been marked as a duplicate of this bug. ***
Comment 26 Benjamín Valero Espinosa 2010-06-07 21:59:08 UTC
This bug seems a duplicate of #141154.
Comment 27 Mohd Ridzuan Bistami 2011-01-12 06:04:54 UTC
Any plan to solve this issue in gtk+3.0?
Comment 28 Jonny Lamb 2012-10-17 00:26:49 UTC
Isn't this a duplicate of bug #141154 now then?
Comment 29 Jean-François Fortin Tam 2012-10-17 15:01:05 UTC
Let's make it so.
- preview panes are the individual applications' responsibility
- thumbnails in listview are completely useless
- we're missing an iconview with thumbnails, which is what bug #141154 is about

*** This bug has been marked as a duplicate of bug 141154 ***
Comment 30 Bastien Nocera 2012-10-17 15:17:13 UTC
(In reply to comment #29)
> Let's make it so.
> - preview panes are the individual applications' responsibility

I think this is exactly the problem that people were complaining about. It shouldn't be.
Comment 31 Jean-François Fortin Tam 2012-10-17 15:53:32 UTC
Having a big thumbnails iconview for images and videos, reusing the fdo thumbnail spec, would solve 90% of the usecases. For more specialized usecases required by individual applications, then they can use the preview pane.

This is how I understand it (the bug report here has many issues mixed up together, making this a bit more confusing, but the jist of the issue is #141154 I think).
Comment 32 Federico Mena Quintero 2012-10-17 20:10:03 UTC
BTW, making the preview pane *not* the application's responsibility, i.e. making it be handled directly by the file chooser, will happen soon.  This will be part of the "content selection" project for Gnome OS.

Thanks to nekohayo for marking this bug as a duplicate.  Bug #141154 has the details on the new bgo141154-filechooser-icon-view branch.