Xfce Forum

Sub domains
 

You are not logged in.

#1 2016-02-17 10:19:40

guibog
Member
Registered: 2016-02-17
Posts: 6

Thumbnails in File upload dialog?

Hi,

I searched a lot, and could not find any relevant links. When I'm uploading a file, I get a "File upload" dialog, which I think is provided by Thunar (but not 100% sure).

And sometimes I can see previews of the images I am about to upload, which is very convenient. But it seems weird: some big images have previews, while other much smaller have nothing, and all of them are jpegs. I checked the difference in exif header with exiftool but got nothing interesting. Actually the preview would appear even after I removed the thumbnail in jpeg's header with `jhead -dt file.jpg`. I wonder what I am doing wrong... I have used nautilus a bit before but apart from this issue (and the file sorting), I'm happy with xfce4/thunar.

Thanks in advance

Offline

#2 2016-02-17 10:26:50

guibog
Member
Registered: 2016-02-17
Posts: 6

Re: Thumbnails in File upload dialog?

Hmm, from http://www.dslreports.com/forum/r251550 … er-Firefox it seems that what I see is just the "generic GTK file browser", which has some previews but not always, and I could not understand under which conditions previews are displayed.

Offline

#3 2016-02-17 10:43:21

guibog
Member
Registered: 2016-02-17
Posts: 6

Re: Thumbnails in File upload dialog?

Aya, it seems that a preview_widget is passed by the calling application to GtkFileChooser as shown here https://developer.gnome.org/gtk3/stable … iew-widget

So as I seen this file chooser only from Firefox (my only non terminal app) I guess it is Firefox responsibility to code the preview, am I right?

Offline

#4 2016-02-17 11:10:51

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 9,211

Re: Thumbnails in File upload dialog?

Here is what I see (Firefox 44, Xfce 4.12):

Using a file upload window, Firefox does indeed call the GtkFileChooser. Some of the file previews are missing. I then open Thunar to the same directory and notice the same previews missing, but then tumbler fires up and creates those previews for me. Back in firefox, I leave that directory and return to see the previews.

I don't think that GtkFileChooser is tied into tumbler, the thumbnailing programming. You need to navigate thunar there first to create the previews that GtkFileChooser will then use.

And BTW, welcome to the forums.

Offline

#5 2016-02-19 08:14:04

guibog
Member
Registered: 2016-02-17
Posts: 6

Re: Thumbnails in File upload dialog?

ToZ wrote:

Here is what I see (Firefox 44, Xfce 4.12):

Using a file upload window, Firefox does indeed call the GtkFileChooser. Some of the file previews are missing. I then open Thunar to the same directory and notice the same previews missing, but then tumbler fires up and creates those previews for me. Back in firefox, I leave that directory and return to see the previews.

I don't think that GtkFileChooser is tied into tumbler, the thumbnailing programming. You need to navigate thunar there first to create the previews that GtkFileChooser will then use.

And BTW, welcome to the forums.

Thanks. I do not seem to see the same as you do: if I open a folder with thunar, it may have to generate thumbnails, but will do it for all pics. Then trying to upload a file from this folder using firefox will still be the same (not all files propose previews on right side when selected, and I can't decipher the logic, but it seems it can be related to size as most very small image file have it)

I think we might be talking about two different things here: there is the relatively small (maybe 200x200 or less?) "thumbnail icon" which appears as the icon of a file in thunar, and is generated by tumbler? I added some time ago a plugin to generate these thumbnail icons to video files and it seems to be working.

Then there is the file preview that may appear on the right side of the file chooser, when this file is selected. I am not sure if this is the same thing, I guess a preview could also be generated for pdf or txt files (but I do not have this). These previews are much bigger in size than thumbnail icons, could be over 500x500.

I have Firefox 43.0 and hmm, how to know wich XFCE I have?

Last edited by guibog (2016-02-19 08:14:56)

Offline

#6 2016-02-19 13:58:37

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 9,211

Re: Thumbnails in File upload dialog?

Yes, there are two preview areas (icon thumbnail and preview area). I initially thought they were related, but this appears not to be the case.

The GTK File Chooser dialog can have a preview widget added to it (see: https://developer.gnome.org/gtk3/stable … ooser.html). I guess that Firefox is adding this preview widget. I can also confirm that large image files don't preview there, but this must be a limitation imposed by firefox because I can't find a GTK-based configuration setting for this. Nor can I find anything about it in Firefox documentation.

how to know wich XFCE I have?

xfce4-about -V

Offline

#7 2016-02-19 14:18:55

Jerry3904
Member
Registered: 2013-11-09
Posts: 832

Re: Thumbnails in File upload dialog?

We do not have the package libxfce4ui-utils installed by default, so that command does not work for me on our installation of 4.12. I have been using the desktop one, but I installed the missing package and see now there is a difference:

$ xfdesktop -V
This is xfdesktop version 4.12.2, running on Xfce 4.12.
Built with GTK+ 2.24.25, linked with GTK+ 2.24.25.
Build options:
    Desktop Menu:        enabled
    Desktop Icons:       enabled
    Desktop File Icons:  enabled
-----
$ xfce4-about -V
xfce4-about 4.12.1 (Xfce 4.12)

Copyright (c) 2008-2015
	The Xfce development team. All rights reserved.

Please report bugs to <http://bugzilla.xfce.org/>.
Translators list from 2015-03-15 16:44:46.

The things you learn...


MX-21 (based on Debian Stable) with our flagship Xfce 4.16.
My little collection: Xfce Tidbits

Offline

#8 2016-02-19 14:59:49

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 9,211

Re: Thumbnails in File upload dialog?

Yes. The individual components of Xfce may have different minor versions, but they should all be on the same major release (4.12, 4.10, 4.8, etc). Though, some have totally different versions (e.g. thunar). It is somewhat confusing.

With xfce4-about, I look at the major version in brackets to give me an idea of which major release we are talking about.

Offline

#9 2016-02-22 03:51:54

guibog
Member
Registered: 2016-02-17
Posts: 6

Re: Thumbnails in File upload dialog?

ToZ wrote:

I can also confirm that large image files don't preview there, but this must be a limitation imposed by firefox because I can't find a GTK-based configuration setting for this. Nor can I find anything about it in Firefox documentation.

Yes, the culprit it probably Firefox: I tried with Chrome, and all images have previews in file chooser. I'd rather not switch back to Chrome again, but I guess there's not much XFCE4 can do for me there*. Thanks for the support anyway.

* In fact maybe there is: I'm looking for a way to change the sorting in this file chooser, right now it uses "natural sort order" but I want the normal sort order (for dates like 2016, 20160110, 2017), I searched a bit for some hidden config, to no avail.

Offline

#10 2016-02-22 04:30:36

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 9,211

Re: Thumbnails in File upload dialog?

guibog wrote:

* In fact maybe there is: I'm looking for a way to change the sorting in this file chooser, right now it uses "natural sort order" but I want the normal sort order (for dates like 2016, 20160110, 2017), I searched a bit for some hidden config, to no avail.

I'm not sure if its possible. Since its using the GTK3 file chooser, all the available settings can be found via dconf-editor at org>gtk>settings>file-chooser. It just might be the way that GTK does its sorting.

Offline

#11 2016-05-05 21:51:55

junkyardsparkle
Member
Registered: 2016-05-05
Posts: 2

Re: Thumbnails in File upload dialog?

The Firefox -generated instance of the GTK file chooser will only generate a preview for images with a longest-side dimension of 4096 pixels or less, regardless of file size. Hope that clears up the seemingly erratic behavior a little. smile

Offline

#12 2016-05-06 03:07:09

guibog
Member
Registered: 2016-02-17
Posts: 6

Re: Thumbnails in File upload dialog?

@junkyardsparkle thanks, the answer is late but correct! Is there any way totweak this setting? Many pictures are 4128x3096 by now, which is just a little bit above the limit...

Offline

#13 2016-05-06 03:31:23

junkyardsparkle
Member
Registered: 2016-05-05
Posts: 2

Re: Thumbnails in File upload dialog?

I suspect the limit is hardcoded into GTK or Firefox, I've never found anything related to changing it via configuration (I'm actually a happy fluxbox user who found this thread while doing yet another search on the topic out of frustration). If you manage to discover otherwise (or even specifics about what code to patch) please do add the information here!

Offline

#14 2022-09-21 11:28:01

mhm
Member
Registered: 2022-09-21
Posts: 3

Re: Thumbnails in File upload dialog?

Hello
@guibog could you find a way out?

Offline

#15 2022-09-21 13:08:35

KBar
Moderator
Registered: 2021-11-05
Posts: 612

Re: Thumbnails in File upload dialog?

mhm, this is a 6-year-old topic and both participants haven't been around since then.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

Board footer

Powered by FluxBB