elementary / icons

Named, vector icons for elementary OS
https://elementary.io
GNU General Public License v3.0
552 stars 84 forks source link

Please consider adding an icon for .kdbx files #808

Closed 4jNsY6fCVqZv closed 9 months ago

4jNsY6fCVqZv commented 5 years ago

To my understanding and knowledge this is a very common file format for password manager databases. Currently Files only shows a sad and not explaining empty grey-white icon. Do you have any idea how to improve this?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/78074824-please-consider-adding-an-icon-for-kdbx-files?utm_campaign=plugin&utm_content=tracker%2F27377189&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F27377189&utm_medium=issues&utm_source=github).
jeremypw commented 5 years ago

To fix this there needs to be a suitable file in /usr/share/mime/application defining which icon to use for this mime-type. Its not really a Files problem I am afraid (unless you mean that the fallback icon should be improved). I would have thought that an application that uses this file type would insert a suitable file?

jeremypw commented 5 years ago

See "/usr/share/mime/applications/x-dbf.xml" for an example.

4jNsY6fCVqZv commented 5 years ago

I know that's not a Files problem. That's why I created the issue at elementary/icons. I can also create it as an issue at KeePassXC. More sustainable would probably be the solution with a super nice fallback icon in elementary OS itself, right? Otherwise numerous apps would have to change something. How does elementary OS handle all the other mime types?

4jNsY6fCVqZv commented 5 years ago

I would have thought that an application that uses this file type would insert a suitable file?

I'm afraid it doesn't look that way :(

jeremypw commented 5 years ago

@4jNsY6fCVqZv Sorry, for some reason I thought I was on the Files repo :-(.

It seems that KeePass does create the necessary mime file and specifies the icon "application-x-keepassx" and icons of that name are installed in the "hicolor" theme. But Files (nor another file manager) is using it. I've tried running update-mime-database, gtk-update-icon-cache and update-desktop-database to no avail even after loggiing out and in.

I notice another 3rd party program has the same problem - and it used to work with mimetype icons in the hicolor theme.

I tried manually copying the keepass icons into the corresponding elementary theme folders and running gtk-update-icon-cache /usr/share/icons/elementary and then it works OK.

jeremypw commented 5 years ago

I am not an expert on icon themes, but the problem may be that elementary is not falling back to use the hicolor theme any more?

jeremypw commented 5 years ago

Looking at Files code, it seems that the icon is falling back to a generic icon within the elementary theme before looking in the hicolor theme. This sees to be related to the way Gtk.IconTheme.choose_icon_for_scale () works (now). I can push a PR forcing a look for the specified icon in the hicolor theme before falling back.

jeremypw commented 5 years ago

As it turns out this was a Files issue - probably introduced when some C code handling icon lookup and caching was ported to Vala :-(

4jNsY6fCVqZv commented 5 years ago

Thanks for taking the time to test this out! Do you think https://github.com/elementary/icons/issues/809 and https://github.com/elementary/icons/issues/789 could be related to this issue?

jeremypw commented 5 years ago

I think #789 is probably due to the same bug in Files. There is a different PR submitted that fixes it by symlinking to the hicolor icons but that would have to be done for each missing icon. I'll check whether my PR fixes it as well.

4jNsY6fCVqZv commented 5 years ago

Thank you, that would be wonderful, if your PR could fix several problems!

4jNsY6fCVqZv commented 5 years ago

@jeremypw Don't you think https://github.com/elementary/os-patches/issues/63 could be related here?

jeremypw commented 5 years ago

@4jNsY6fCVqZv Maybe but not directly. The icon provided by the app should be good enough.

4jNsY6fCVqZv commented 5 years ago

@jeremypw I wonder whether the OpenConnect VPN client is really a separate app in this case, or just an additional plugin for the network manager? OpenVPN and PPTP are the default options in elementary OS. So these are two independent apps, each with its own icons and dialogs?!

jeremypw commented 5 years ago

That is best discussed on the related issue reports.

danirabbit commented 9 months ago

Gonna close this since it sounds like this was a Files bug