Thumbnailprovider.dll

Having trouble installing or compiling FreeCAD? Get help here.
kisolre
Posts: 2102
Joined: Wed Nov 21, 2018 1:13 pm

Re: Thumbnailprovider.dll

Post by kisolre » Thu Feb 20, 2020 4:28 pm

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
Posts: 2102
Joined: Wed Nov 21, 2018 1:13 pm

Re: Thumbnailprovider.dll

Post by kisolre » Fri Mar 20, 2020 11:39 am

And also for FCBak extension?
User avatar
uwestoehr
Posts: 1425
Joined: Sun Jan 27, 2019 3:21 am

Re: Thumbnailprovider.dll

Post by uwestoehr » Sun Mar 29, 2020 1:09 am

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
Posts: 2102
Joined: Wed Nov 21, 2018 1:13 pm

Re: Thumbnailprovider.dll

Post by kisolre » Sun Mar 29, 2020 10:44 am

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
Posts: 1425
Joined: Sun Jan 27, 2019 3:21 am

Re: Thumbnailprovider.dll

Post by uwestoehr » Sun Mar 29, 2020 12:01 pm

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
Posts: 2102
Joined: Wed Nov 21, 2018 1:13 pm

Re: Thumbnailprovider.dll

Post by kisolre » 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?
User avatar
uwestoehr
Posts: 1425
Joined: Sun Jan 27, 2019 3:21 am

Re: Thumbnailprovider.dll

Post by uwestoehr » Sun Mar 29, 2020 2:16 pm

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
Posts: 1425
Joined: Sun Jan 27, 2019 3:21 am

Re: Thumbnailprovider.dll

Post by uwestoehr » Mon Mar 30, 2020 11:07 pm

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
Posts: 2102
Joined: Wed Nov 21, 2018 1:13 pm

Re: Thumbnailprovider.dll

Post by kisolre » Tue Mar 31, 2020 8:10 am

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
Posts: 1425
Joined: Sun Jan 27, 2019 3:21 am

Re: Thumbnailprovider.dll

Post by uwestoehr » Tue Mar 31, 2020 11:22 am

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:
explorer_8TiNDl7pev.png
large size
explorer_8TiNDl7pev.png (10.64 KiB) Viewed 91 times
and with midsize symbols:
explorer_iFgQeJih5P.png
midsize
explorer_iFgQeJih5P.png (5.43 KiB) Viewed 91 times
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests