Thumbnailprovider.dll

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Thumbnailprovider.dll

Post by kisolre »

Not sure how this works but can this be extended to show thumbnails for backup versions also? For all "FCStd*" or at least FCStd1 - FCStd9? Maybe show some overlay to distinguish backups?
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Thumbnailprovider.dll

Post by kisolre »

And also for FCBak extension?
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Thumbnailprovider.dll

Post by uwestoehr »

For the records: The process of installing and compiling the DLL on Windows is now described in the Wiki:
Compile_on_Windows#Tumbnail_Provider
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Thumbnailprovider.dll

Post by kisolre »

I think this should be supplied with the windows installation and description how to enable it in a readme, doc, ... It is jusr 160kb /(77kb upx-ed) and would be really nice to have. Maybe just a BAT file and a simple "run as administrator" explanation will do the trick.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Thumbnailprovider.dll

Post by uwestoehr »

kisolre wrote: Sun Mar 29, 2020 10:44 am I think this should be supplied with the windows installation
This is already the case. Since 0.18.4 the FC for Windows installer will automatically install the DLL if FC is installed with admin privileges. See few posts from me here above.
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Thumbnailprovider.dll

Post by kisolre »

Missed that...
Is it hard to implement my previous suggestions? Preview also backup files? Maybe some overlay to indicate that it is a backup file?
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Thumbnailprovider.dll

Post by uwestoehr »

kisolre wrote: Sun Mar 29, 2020 1:26 pm Missed that...
Is it hard to implement my previous suggestions? Preview also backup files? Maybe some overlay to indicate that it is a backup file?
I am not the author of the DLL. You can change the code to work also for FCBak files. As far as I can see, it is just copying and modifying line 110 of Main.cpp:
https://github.com/FreeCAD/FreeCAD/blob ... n.cpp#L110

I can have a closer look later.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Thumbnailprovider.dll

Post by uwestoehr »

uwestoehr wrote: Sun Mar 29, 2020 2:16 pm I can have a closer look later.
It was really that simple: https://github.com/FreeCAD/FreeCAD/pull/3292
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Thumbnailprovider.dll

Post by kisolre »

That is good. But in recent discussion I was reminded that FreeCAD does not open its backup files without firs renaming them to FCStd to avoid inadvertently editing the backup file and thus defeat its purpose. Now if they display proper icons/thumbnails there will be users complaining that they can not directly open them. Could we draw an overlay before passing the image to windows so the user has an indication that this is not a regular FCStd file?
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Thumbnailprovider.dll

Post by uwestoehr »

kisolre wrote: Tue Mar 31, 2020 8:10 am Now if they display proper icons/thumbnails there will be users complaining that they can not directly open them.
I don't understand. The way files are displayed in Windows explorer is in general independent on how they can be opened. What would help an overlay that it is a backup? it will not be more clear that backup files cannot directly be opened.

But why not? Please step in and implement this as you like. But take care of the readability.
Here is how it looks here in Windows Explorer with large symbols:
large size
large size
explorer_8TiNDl7pev.png (10.64 KiB) Viewed 1012 times
and with midsize symbols:
midsize
midsize
explorer_iFgQeJih5P.png (5.43 KiB) Viewed 1012 times
Post Reply