epiphany missing thumbnail preview panel

Bug #1635777 reported by quequotion
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Epiphany
Fix Released
Wishlist
quequotion

Bug Description

epiphany's filechooser does not have a thumbnail preview panel.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Use of a "proper" previewer (like gnome-sushi) was discontinued in Files as it was considered that in most cases opening with the actual app was almost as fast. Also in the case of images and videos at least the thumbnail can identify them.

The Pantheon File Chooser uses the Gnome FileChooser Widgets (apart from the pathbar) and it appears that these no longer show a "proper" previewer by default?

This bug is related: #1459499

It should be possible to add a thumbnail panel though

Changed in pantheon-files:
status: New → Confirmed
importance: Undecided → Wishlist
summary: - pantheon-filechooser-module missing preview panel
+ pantheon-filechooser-module missing thumbnail preview panel
Revision history for this message
quequotion (quequotion) wrote : Re: pantheon-filechooser-module missing thumbnail preview panel

This "previewarea" comes straight from Valadoc*. It only seems to work with JPEGs under a certain size and probably isn't all that sane.

pantheon-filechooser-module's Behavior from one application to another seems to be very idiomatic. For example, firefox would sometimes show a preview and now shows two previews in its "Save" dialog, but only one in its "Open" dialog (if it doesn't crash). On the other hand, Epiphany almost never displayed thumbnails, but does with this patch in it's "Open" dialog--unfortunately epiphany is still using the native gtk module for its "Save" dialog.

Looks like this:
https://s13.postimg.org/ukrxos0dz/previewarea.png

*Direct links to pages on Valadoc don't work. Navigate to gtk+3.0 -> FileChooserDialog.

Revision history for this message
quequotion (quequotion) wrote :

Here's what the dialogs look like normally. Epiphany does not show previews in its "Open" dialog, (which uses pantheon-filechooser-module) and uses the gtk filechooser for "Save" (which has a functional preview window). Firefox is working as expected for the time being, showing previews in both "Open" and "Save" dialogs and using pantheon-filechooser-module for both (only "Save" shown in screenshot).

https://s21.postimg.org/qz8wgqmyv/unpatched.png

Revision history for this message
quequotion (quequotion) wrote :

Seems like the GNOME devs have in mind that each individual application should supply its own preview widget:

https://developer.gnome.org/gtk3/stable/GtkFileChooser.html#gtk-file-chooser-set-preview-widget

If this is really the case, I can imagine two ways to work around this in pantheon-filechooser-module; both involve implementing a preview panel in pantheon-filechooser-module using the same thumbnailing services used by pantheon-files/marlin/nautilus/etc.

A. Ignore application-supplied widgets. Remove application-supplied widgets and use available thumbnailing services.
Advantages (not to be considered comprehensive):
-use the same thumbnail cache as pantheon-files (potentially loading previews faster, etc)
-thumbnail multiple filetypes regardless of application (it's faster to see if it's the right or wrong kind of file than to wonder if the preview isn't working and then check the filename or look it up in pantheon-files to make sure--particulary with programs that handle multiple files and files that don't use a .xyz filename)
Disadvantages (also not to be considered comprehensive):
-maybe some applications would supply preview widgets for filetypes that do not have thumbnailing services available? (just a theory, don't know of any such case; not sure if this is what is meant by "application-supplied" widget)
-not every filetype has a thumbnailng service availabe (considering there are an infinite variety of filetypes, eventually users will be confronted with a broken or missing preview)

B. Use preview application-supplied widgets when available or thumbnailing services when not. Check if an application supplies its own preview widget and use it if it does, but use thumbnailing services if it does not.
Advantages (also not to be considered comprehensive):
-applications supplying preview widgets might be able to preview files relative to themselves at the least.
-if that is the case, coverage of more filetypes than there are currently thumbnailing services available for.
Disadvantages (also not to be considered comprehensive):
-inconsistent behavior--some applications might preview only their own files while some applications would preview whatever files have available thumbnailing services (again, leaving users wondering if thumbnailing is working properly or not)

Revision history for this message
Zisu Andrei (matzipan) wrote :

Jeremy, I believe the discussion to remove previews was regarding the "preview" tab in the "Properties" window of a file.

Regarding whether it's option A or B from quequotion's previous message, what was it before the regression?

Revision history for this message
Zisu Andrei (matzipan) wrote :

Ignore the last paragraph in my last comment. I'd say option B sounds good. But I am not sure what the implementation requires.

Revision history for this message
quequotion (quequotion) wrote :

Take a look at how firefox does it, in lines 72~140 of:
https://hg.mozilla.org/mozilla-central/file/tip/widget/gtk/nsFilePicker.cpp

Looks like they do create their own widget, checking filetypes and even formatting the preview panel. They do not provide their own thumbnailing service, but use gdk_pixbuf_new_from_file_at_size() to generate thumbnails. Also, pantheon-filechooser-module could probably check if applications are setting gtk_file_chooser_set_preview_widget_active() to know if an application-supplied widget intends to provide previews.

I tried to look up the possibilities and limitations of gdk_pixbuf, but developer.gnome.org seems to be broken. Google cached version: http://goo.gl/fRFLZq

Revision history for this message
quequotion (quequotion) wrote :

epiphany also implements its own preview widget*, in lines 132~157 of:
https://git.gnome.org/browse/epiphany/tree/lib/widgets/ephy-file-chooser.c?h=gnome-3-22

Lines 196 and 197 then disable the preview widget and possibly re-enable it?

I don't understand how that is supposed to work, and it makes me think I have to open a separate bug about ephiphany in particular not being able to open preview panels in patheon-filechooser-module (does it even work with the gtk-filechooser?). Still no idea how it uses two different filechooser modules for "open" and "save".

for epiphany 3.18, this code is in lib/
https://git.gnome.org/browse/epiphany/tree/lib/ephy-file-chooser.c?h=gnome-3-18

Revision history for this message
quequotion (quequotion) wrote :

GNOME wants individual applications to specify the parameters of their filechooser dialogs; so this is really a bug in epiphany.

I've reported the issue upstream and I'm working on a patch; but so far I've only been able to get previews in the "Save..." dialog. Not sure why this solution doesn't work for "Open...":

https://gitlab.gnome.org/GNOME/epiphany/uploads/43395c714d2648ac750e89f998e04329/add-preview-widget.patch

Launchpad does not yet recognize gnome's gitlab issue tracker:

https://gitlab.gnome.org/GNOME/epiphany/issues/552

affects: pantheon-files → epiphany
Changed in epiphany:
status: Confirmed → New
quequotion (quequotion)
summary: - pantheon-filechooser-module missing thumbnail preview panel
+ epiphany missing thumbnail preview panel
description: updated
Revision history for this message
quequotion (quequotion) wrote :
Changed in epiphany:
assignee: nobody → quequotion (quequotion)
assignee: quequotion (quequotion) → nobody
status: New → Fix Released
assignee: nobody → quequotion (quequotion)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.