Bug 199730 - app-office/gnucash-2.2.1-r1 does not install icon
Bug#: 199730 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: trivial Priority: P2
Resolution: FIXED Assigned To: tove@gentoo.org Reported By: tetromino@gmail.com
Component: Applications
URL: 
Summary: app-office/gnucash-2.2.1-r1 does not install icon
Keywords:  
Status Whiteboard: 
Opened: 2007-11-20 06:45 0000
Description:   Opened: 2007-11-20 06:45 0000
gnucash-2.2.1 (unlike 2.0.x series) does not install a png or svg icon for its
desktop menu entry; gnucash.desktop says Icon=gnucash-icon, but there is no
gnucash-icon.png installed. Instead, gnucash ebuild sticks gnucash-icon.ico in
/usr/share/pixmaps, but that doesn't help since .ico files cannot be read by
current Gnome application menu.

Solution is to add

src_install() {
    gnome2_src_install
    newicon "src/pixmaps/gnucash-icon-48x48.png" "gnucash-icon.png"
}

to the ebuild.

------- Comment #1 From Josh Sled 2007-11-20 16:55:33 0000 -------
It'd be nicer to use the svg version, if possible.

------- Comment #2 From Torsten Veller 2007-11-20 17:57:19 0000 -------
Please help me:

1) Josh, this seems to be an upstream problem. You deliver a .desktop file with
an Icon that doesn't match. Can you fix it?

2) The svg version is this one ->
http://svn.gnucash.org/trac/browser/gnucash/trunk/art/tango/scalable/gnucash.svg
It's not in the tarball but we can fetch it (and mirror it).
Does the svg version work in every desktop environment? As i can only find 2
other .svg files in my /usr/share/pixmaps.

------- Comment #3 From Alexandre Rostovtsev 2007-11-20 22:22:55 0000 -------
Created an attachment (id=136553) [details]
gnucash-2.2.1-icons.patch"

After looking at this a bit more, this is basically a bug in the gnucash build
system. The gnucash program uses gnucash-icon-*x*.png files (which it installs
in /usr/share/gnucash/pixmaps). Mistakenly, it then additionally installs them
into /usr/share/pixmaps, thinking that the menu system will pick them up to
display the desktop icon. However, the menu system expects a file called
"gnucash-icon.png". To use multiple sizes, "gnucash-icon.png" has to be present
in multiple directories under /usr/share/icons.

So the correct solution is to change the makefile to copy the differently-sized
icons under the right name to the right subdirectories of /usr/share/icons.
Patch attached.

------- Comment #4 From Alexandre Rostovtsev 2007-11-20 22:30:13 0000 -------
So with the above patch, you should not install anything into
/usr/share/pixmaps any more (so you ignore my first comment about src_install).
And if you do want to install the svg version, it should go into
/usr/share/icons/hicolor/scalable/apps/gnucash-icon.svg, and then the the
svg-compatible menu systems will pick it up.

------- Comment #5 From Josh Sled 2007-12-16 17:38:37 0000 -------
Upstream: http://bugzilla.gnome.org/show_bug.cgi?id=503889

------- Comment #6 From Torsten Veller 2007-12-18 12:28:18 0000 -------
gnucash-2.2.2 is in the tree with the icons patch. I have also added the svg
icon.

Thanks to
Alex, for reporting and patching, and 
Josh, for filing the upstream bugreport.

------- Comment #7 From Josh Sled 2007-12-18 14:34:05 0000 -------
(In reply to comment #6)
> gnucash-2.2.2 is in the tree with the icons patch. I have also added the svg
> icon.

Oh, wow.  I'd worked up an upstream commit for the icon issue over the weekend,
 but wasn't quite able to get it into 2.2.2 (needs to be tested against Windows
for upstream submission).  I was going to hand it to you here, but you beat me
to the punch! :)  Nice job, and thanks for the bump.