FreeCAD document icon

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FreeCAD document icon

Post by NormandC »

In Ubuntu 11.10 Oneiric, the thumbnail is not shown, neither is the fallback icon. I've checked and freecad-thumbnailer is there in /usr/bin, as is the freecad-doc.png icon in /usr/share/freecad. (and thumbnails are in the fcstd documents, I checked that too)

This may be either GNOME 3.2 or Unity's fault though. For example I've been unable to get back the icons in menus on Ubuntu 11.04, I've not tried in Oneiric but I'm not optimistic. In Natty I've went through gconf-editor, along with dconf-editor which is Unity's thing. It's annoying (to say the least) that these people remove features assuming that we don't need them. :roll:
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: FreeCAD document icon

Post by yorik »

Yes for me too it is still broken, but things are changing a lot in the gnome world, I still didn't have a real look at it yet...
Can you find a trace of freecad-thumbnailer in your gconf?
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FreeCAD document icon

Post by NormandC »

Guess what: I've got FreeCAD icons and thumbnails back in Ubuntu 11.10 Oneiric! :D

But I tried so many things that I have no idea what did it. I don't know on what Debian version you're on Yorik, and what GNOME packages you have. Ubuntu 11.10 is based on the latest GNOME 3.2 and many things have changed. For example, gconf-editor does not work anymore, as configuration has switched from gconf (now deprecated) to GSettings. dconf-editor is a GUI frontend for GSetting, but it implements very few parameters.

Anyway, I was pissed that all my FreeCAD files had a generic text icon file. I installed the assogiate package, which is a File types Editor GUI app. With it I was able to set a default icon to FreeCAD files since there were none set.

Thumbnail management has changed too. When perusing my filesystem, I found that there was now a /usr/share/thumbnailers folder. It contained a few *.thumbnailer files. I copied the one for evince and decided to create one for FreeCAD with the following:

Code: Select all

[Thumbnailer Entry]
TryExec=freecad-thumbnailer
Exec=freecad-thumbnailer -s %s %u %o
MimeType=application/x-extension-fcstd;
At first I named it freecad.thumbnailer. I rebooted, none of my files were showing their thumbnails. I copied it to freecad-thumbnailer.thumbnailer, since freecad-thumbnailer is the name of the script in /usr/bin. Rebooted, no effect. So I gave up.

That was last week. Tonight, I created a new file for the first time in a couple of weeks, and surprise! The thumbnail is there. :)

It looks like that all my existing files (created prior to my current Oneiric installation) don't show thumbnails. The only way I can get one is to open a file and save it again. I wonder if there's a way to "rebuild" the thumbnail cache or something...

I guess next, what I need to do is delete the .thumbnailer files I created to make sure that they're actually doing something.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD document icon

Post by wmayer »

It looks like that all my existing files (created prior to my current Oneiric installation) don't show thumbnails. The only way I can get one is to open a file and save it again. I wonder if there's a way to "rebuild" the thumbnail cache or something...
I don't know if this is still true for Gnome3 but in Gnome2 you have the directory $HOME/.thumbnails with two sub-directories. inside there you have PNG files with a GUID as file name. I think when deleting all the files there you should see the correct thumbnail for exiting fcstd files.

But I wonder if the thumbnail stuff how we do it is Gnome-specific or a standard defined by freedesktop.org. Any KDE (or other DE) user here where the thumbnails of the PPA FreeCAD packages work as is?
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: FreeCAD document icon

Post by yorik »

Didn't work with me... But thunar's thumbnail system is half broken now, they are switching to another system, so I suppose all I can do is wait (or switch for another file manager)
I believe thumbnailer definitions in /usr/share/thumbnailers (or ~/.local/share/thumbnailers) is indeed a freedesktop spec (but written by gnome?? I don't fully understand...) : http://live.gnome.org/ThumbnailerSpec see the "Registering a specialized thumbnailer" section
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: FreeCAD document icon

Post by jmaustpc »

Hi Werner Norm Yorik

KDE 4.7.2 Dolphin Kubuntu 11.04 32bit, shows thumbnails from FreeCAD files perfectly. Oh!! Hell!!! Its not working any more! :shock:

Seriously, I only enabled thumb nails a couple of months ago and it was working well KDE4.7.1, I am sure it was working just a few weeks ago. I am on KDE 4.7.2 now.

I don't know when it stopped working. It was great when looking for a FreeCAD model you could often confirm which model you wanted by the thumb nail picture, it was truly practical and useful.

I had thought about turning it off to keep my file size below 256Kb for posting to the forum, but I realised it made little difference so I turned it back on. When looking for files I had forgotten that I had turned it back on, I mean I was thinking it was still turned off, that's why I didn't notice sooner.

I just tried saving a new project in PPA 4727 and svn 5080 and neither are saving a file with a viewable thumb nail.

I have loaded the fcstd file into Ark (in Gnome probably called Arggggggg!!! :D sorry I couldn't help my self!) and the png file is there.

Jim
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: FreeCAD document icon

Post by jmaustpc »

Ok now I have unzipped the fcstd file with Ark

there is the folder "thumbnail" which when I open has the thumbnail png,
which Dolphin can see
as can Gwenview,

so the picture file of the thumbnail itself in the fcstd file is fine edit - I mean the picture is ok but it still does not show up as a thumb nail in the file browser, when viewing a fcstd file.

Jim

Screen shots of above
screenshot_thumb_nails.jpeg
screenshot_thumb_nails.jpeg (182.53 KiB) Viewed 2195 times
screenshot_thumb_nails3.jpeg
screenshot_thumb_nails3.jpeg (53.83 KiB) Viewed 2195 times
Attachments
screenshot_thumb_nails1.jpeg
screenshot_thumb_nails1.jpeg (82.27 KiB) Viewed 2195 times
Last edited by jmaustpc on Tue Nov 01, 2011 1:22 pm, edited 1 time in total.
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: FreeCAD document icon

Post by yorik »

Hm yes the thumbnail is there inside the file, but the thumbnailer (the program responsible for delivering that thumbnail to the file manager) is not working or (more probably) not correctly registered with the file manager. I cannot find a proper standard definition for that on the web... The gnome page I linked above seems to be the closest thing we have as a "standard"...
pperisin
Posts: 695
Joined: Wed Oct 20, 2010 12:29 pm

Re: FreeCAD document icon

Post by pperisin »

Hi,

I have one question. Whenever I save FCStd file, I also see FCStd1 fle with the same name.
What file is this? Can it be deleted? Can it be deleted automatically on close document or something?

regards
Petar
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: FreeCAD document icon

Post by jmaustpc »

Hi Petar
Its an auto save copy of your model

I believe it works like this, although I have not checked.

If you click the save icon when there is no changes to save, then it creates a backup copy. I believe it will create many copies if you so desire.

So it is a backup from a certain point when you clicked save, useful if FreeCAD keeps crashing or corrupting files, or to use as a crude "un-do" feature mechanism.

Being a backup of your work at a certain time, you can delete if you desire, at the risk of not being able to go back to the old file of course.

Jim
Post Reply