Component to preview files in a directory

Ask about the individual Gambas components here.
01McAc
Posts: 75
Joined: Sunday 24th January 2021 8:25pm

Re: Component to preview files in a directory

Post by 01McAc »

Same thing here. On Fedora Rawhide it's the raw-thumbnailer:

Code: Select all

[Thumbnailer Entry]
TryExec=/usr/bin/raw-thumbnailer
Exec=/usr/bin/raw-thumbnailer -s %s %u %o
MimeType=image/x-adobe-dng;image/x-canon-cr2;image/x-canon-crw;image/x-nikon-nef;image/x-olympus-orf;image/x-pentax-pef;image/x-sony-arw;image/x-epson-erf;image/x-minolta-mrw;
raw.thumbnailer (END)
BruceSteers wrote: Friday 2nd April 2021 11:22am So what we need now is for some cleaver guy to modify the FileView class to get it to work with gnome-raw-thumbnailer
Beyond my skills, I am very sorry. Any volunteers :?:
User avatar
BruceSteers
Posts: 1523
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Component to preview files in a directory

Post by BruceSteers »

01McAc wrote: Friday 2nd April 2021 6:04pm Same thing here. On Fedora Rawhide it's the raw-thumbnailer:

Code: Select all

[Thumbnailer Entry]
TryExec=/usr/bin/raw-thumbnailer
Exec=/usr/bin/raw-thumbnailer -s %s %u %o
MimeType=image/x-adobe-dng;image/x-canon-cr2;image/x-canon-crw;image/x-nikon-nef;image/x-olympus-orf;image/x-pentax-pef;image/x-sony-arw;image/x-epson-erf;image/x-minolta-mrw;
raw.thumbnailer (END)
BruceSteers wrote: Friday 2nd April 2021 11:22am So what we need now is for some cleaver guy to modify the FileView class to get it to work with gnome-raw-thumbnailer
Beyond my skills, I am very sorry. Any volunteers :?:

Haha i didn't write that..

why do i get the feeling if we were all sat in a room you'd all be looking at me right now ;) :lol: :roll:

I highly doubt it is beyond anyone's skills here you just need to know where to add it.
I haven't really been following what's been going on here as it was a bit beyond me wich is why mostly all i have been able to advise is about how qt is not doing image processing itself.

Looks like FileView.class is in gb.form
https://gitlab.com/gambas/gambas/-/blob ... View.class
and the preview magic happens in CTaskPreview.class
https://gitlab.com/gambas/gambas/-/blob ... view.class

I would suggest pointing this thread to the gambas M/L so Benoit can see it , he would know much better how to implement it if you guys explain what you have discovered about how the other apps are doing things.
i could almost guarantee that my code would need re-writing for him lol.

Or if Benoit will not add it you could probably copy the 2 above mentioned files into your app and rename them (and change CTaskPreview references to match new name) and add it yourself.

I could help anyone if having problems but am doing other things at present to take this on.
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1523
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Component to preview files in a directory

Post by BruceSteers »

BruceSteers wrote: Friday 2nd April 2021 9:26pm
Or if Benoit will not add it you could probably copy the 2 above mentioned files into your app and rename them (and change CTaskPreview references to match new name) and add it yourself.

I could help anyone if having problems but am doing other things at present to take this on.
I had a quick look and have this starter for you...

It's a test app i have just imported FileView.class and CTaskPreview.class into and called them MyFileView.class and MyTaskPreview.class

I had to pull a couple of other functions in from gb.form and the DirCache.class that i renamed to MyDirCache.Class

then changed any references and made a working app with it's own internal (customisable) fileview class.

I have not added any of your previewing stuff to it just made a base that you folks may find useful and be able to adapt to suit your own needs..
I also didn't add any location controls it just opens in Home/Pictures/


A raw previewer seems specific.
I don't have one unless i install one, thus for this reason i am not sure Benoit will want to add it. (I could well be wrong)
my thumbnailer list is as follows on Mint20

Code: Select all

$ ls /usr/share/thumbnailers/
ffmpegthumbnailer.thumbnailer       librsvg.thumbnailer           xplayer.thumbnailer
gdk-pixbuf-thumbnailer.thumbnailer  mate-font-viewer.thumbnailer  xreader.thumbnailer
So might be better to make your own version
Hope this helps...
If at first you don't succeed , try doing something differently.
BruceS
Post Reply