Install application icon into hicolor icon theme

Bug #1354889 reported by Satchit Bhogle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qpdfview
Fix Released
Low
Adam Reichold

Bug Description

I'm trying to change my icon theme (to Moka, to be specific), but it requires that all icons be installed to /usr/share/icons. qpdfview's icon is saved to /usr/share/qpdfview. Can that be changed?

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello Satchit,

thanks for bringing this problem to our attention. We currently install exactly one icon, i.e. our application icon which should not be part of any theme, so I do not really understand how its installation path could prevent you from choosing a different icon theme? Can eloborate further on that?

If you always end up with qpdfview's own fallback icons, this rather implies that your icon theme is not detected by Qt as the application-specific and fallback icons are embedded in the application binary and are not installed separately at all. You can find out if that is the case by editing the configuration file "~/.config/qpdfview/qpdfview.conf" and setting the key "iconTheme" in the section "mainWindow" to the name of your icon theme.

Best regards, Adam.

Changed in qpdfview:
status: New → Incomplete
Revision history for this message
Satchit Bhogle (satchitb) wrote :

The creator of the icon pack doesn't accept requests for icons that are not installed to /usr/share/icons. I understood that to mean that the icon pack does not replace icons that are not in /usr/share/icons.

I don't see a key "iconTheme" at all. My output for the config file is this:
[mainWindow]
recentlyUsed=@Invalid()
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\x31\0\0\0\x18\0\0\x5U\0\0\x2\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xfe\xff\xff\xff\xfe\0\0\0\0\x2\0)
state=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x2\0\0\0\0\0\0\0\0\0\0\0\0\xfc\x2\0\0\0\x3\xfb\0\0\0\x16\0o\0u\0t\0l\0i\0n\0\x65\0\x44\0o\0\x63\0k\0\0\0\0\0\xff\xff\xff\xff\0\0\0g\0\xff\xff\xff\xfb\0\0\0\x1c\0p\0r\0o\0p\0\x65\0r\0t\0i\0\x65\0s\0\x44\0o\0\x63\0k\0\0\0\0\0\xff\xff\xff\xff\0\0\0g\0\xff\xff\xff\xfb\0\0\0\x1c\0t\0h\0u\0m\0\x62\0n\0\x61\0i\0l\0s\0\x44\0o\0\x63\0k\0\0\0\0\0\xff\xff\xff\xff\0\0\0g\0\xff\xff\xff\0\0\0\x3\0\0\0\0\0\0\0\0\xfc\x1\0\0\0\x1\xfb\0\0\0\x14\0s\0\x65\0\x61\0r\0\x63\0h\0\x44\0o\0\x63\0k\0\0\0\0\0\xff\xff\xff\xff\0\0\x1\x65\0\xff\xff\xff\0\0\x5%\0\0\x2\xc0\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x3\0\0\0\x16\0\x66\0i\0l\0\x65\0T\0o\0o\0l\0\x42\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x16\0\x65\0\x64\0i\0t\0T\0o\0o\0l\0\x42\0\x61\0r\x1\0\0\0\x9d\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x16\0v\0i\0\x65\0w\0T\0o\0o\0l\0\x42\0\x61\0r\x1\0\0\x1\xe4\xff\xff\xff\xff\0\0\0\0\0\0\0\0)
openPath=/home/XYZ (masked by me)

[documentView]
matchCase=false
continuousMode=true
layoutMode=0
scaleFactor=1
scaleMode=0
rotation=0
invertColors=false
highlightAll=false

Revision history for this message
Adam Reichold (adamreichold) wrote : Re: [Bug 1354889] Re: qpdfview does not install icon to /usr/share/icons

Hello again,

Am 10.08.2014 um 19:53 schrieb Satchit Bhogle:
> The creator of the icon pack doesn't accept requests for icons that are
> not installed to /usr/share/icons. I understood that to mean that the
> icon pack does not replace icons that are not in /usr/share/icons.

Sounds correct, but why should the icon theme replace the qpdfview
application icon? It is specific to the application and does not
represent a generic action or entity that should be themed but is rather
the projects logo.

> I don't see a key "iconTheme" at all. My output for the config file is this:
> [mainWindow]
> recentlyUsed=@Invalid()
> geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\x31\0\0\0\x18\0\0\x5U\0\0\x2\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xfe\xff\xff\xff\xfe\0\0\0\0\x2\0)
> state=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x2\0\0\0\0\0\0\0\0\0\0\0\0\xfc\x2\0\0\0\x3\xfb\0\0\0\x16\0o\0u\0t\0l\0i\0n\0\x65\0\x44\0o\0\x63\0k\0\0\0\0\0\xff\xff\xff\xff\0\0\0g\0\xff\xff\xff\xfb\0\0\0\x1c\0p\0r\0o\0p\0\x65\0r\0t\0i\0\x65\0s\0\x44\0o\0\x63\0k\0\0\0\0\0\xff\xff\xff\xff\0\0\0g\0\xff\xff\xff\xfb\0\0\0\x1c\0t\0h\0u\0m\0\x62\0n\0\x61\0i\0l\0s\0\x44\0o\0\x63\0k\0\0\0\0\0\xff\xff\xff\xff\0\0\0g\0\xff\xff\xff\0\0\0\x3\0\0\0\0\0\0\0\0\xfc\x1\0\0\0\x1\xfb\0\0\0\x14\0s\0\x65\0\x61\0r\0\x63\0h\0\x44\0o\0\x63\0k\0\0\0\0\0\xff\xff\xff\xff\0\0\x1\x65\0\xff\xff\xff\0\0\x5%\0\0\x2\xc0\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x3\0\0\0\x16\0\x66\0i\0l\0\x65\0T\0o\0o\0l\0\x42\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x16\0\x65\0\x64\0i\0t\0T\0o\0o\0l\0\x42\0\x61\0r\x1\0\0\0\x9d\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x16\0v\0i\0\x65\0w\0T\0o\0o\0l\0\x42\0\x61\0r\x1\0\0\x1\xe4\xff\xff\xff\xff\0\0\0\0\0\0\0\0)
> openPath=/home/XYZ (masked by me)
>
> [documentView]
> matchCase=false
> continuousMode=true
> layoutMode=0
> scaleFactor=1
> scaleMode=0
> rotation=0
> invertColors=false
> highlightAll=false
>

Yes, the key is usually not there because we let Qt do the icon theme
detection. But adding it like

[mainWindow]
iconTheme=tango

will override that. (With "tango" of course being just an example.)

Best regards, Adam.

Revision history for this message
Satchit Bhogle (satchitb) wrote : Re: qpdfview does not install icon to /usr/share/icons

Thank you very much for your response. I was only hoping to get an icon that would fit in with the rest of the theme (which also rethemes application icons). I'd like to know if I should add that line at the end of the [mainWindow] section as it stands or to replace the contents of the section with that line.

Thank you again.

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello again,

you can just add the "iconTheme=" line anywhere after "[mainWindow]" and before the next "[]" section header. But this is only necessary if Qt does not pick up your icon theme at all and you always see the same fallback icons within qpdfview.

If you really want to theme the application icon itself, one could of course install it to "/usr/share/icons/hicolor/apps/scalable" but this would add a dependency to the fallback "hicolor" icon theme. Running Ubuntu this probably isn't a dependency at all and your package maintainer (Benjamin Eltzner) could decide to install the icon (and corresponding rasterized versions) to this location instead like it is for example done in the openSUSE packages available at [1].

I'll think about whether I am willing to take the extra dependency upstream, but I sounds reasonable (since it's a rather soft dependency in any case).

Best regards, Adam.

[1] https://build.opensuse.org/package/show/X11:QtDesktop/qpdfview

Changed in qpdfview:
status: Incomplete → Triaged
summary: - qpdfview does not install icon to /usr/share/icons
+ Install application icon into hicolor icon theme
Changed in qpdfview:
importance: Undecided → Low
Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello again,

so we now install our SVG application icon to "/usr/share/icons/hicolor/scalable/apps" by default even if this usually implies a dependency on the freedesktop infrastructure (which is more or less there by default anyway).

I also updated the development versions of the Arch Linux [1] and OpenSUSE [2] packages and requested a rebuild of the Ubuntu development packages [3]. Please test and report your findings. Thanks!

Best regards, Adam.

[1] https://aur.archlinux.org/packages/qpdfview-bzr/

[2] https://build.opensuse.org/package/show/X11:QtDesktop:trunk/qpdfview

[3] https://code.launchpad.net/~adamreichold/+recipe/qpdfview-dailydeb

Changed in qpdfview:
assignee: nobody → Adam Reichold (adamreichold)
milestone: none → 0.4.12
status: Triaged → Fix Committed
Revision history for this message
Satchit Bhogle (satchitb) wrote :

Thank you so much.

Changed in qpdfview:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.