maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Icon lost (https://talk.maemo.org/showthread.php?t=28021)

svu 2009-04-01 10:15

Icon lost
 
In my desktop (put into /usr/share/applications/hildon) file, I have
Icon=foobar

I have put /usr/share/icons/hicolor/26x26/hildon/foobar.png (26x26) and /usr/share/icons/hicolor/scalable/hildon/foobar.png (64x64) - but in the menu, I still see the default icon :(

It worked when I had single icon in /usr/share/pixmaps (with IconPath in .desktop) - but the icon was low-res. I would like to see a large 64x64 icon...

Anything I am missing?

qwerty12 2009-04-01 10:18

Re: Icon lost
 
Have you done a "gtk-update-icon-cache -f /usr/share/icons/hicolor/"?

svu 2009-04-01 10:29

Re: Icon lost
 
No I have not. Isn't it done automatically by "dpkg -i"?

Anyway, I just did. It seems it helped. Thanks a bunch. Should I put it into postinstall script?

qwerty12 2009-04-01 10:32

Re: Icon lost
 
No, it seems it's a thing that has done by you on Maemo.

But, yes, the postinst script is the best place. I do it like this:

Code:

if [ -r /etc/osso-af-init/af-defines.sh ]; then
  source /etc/osso-af-init/af-defines.sh
fi

if [ -x /usr/bin/dbus-send -a -x /usr/bin/gtk-update-icon-cache ]; then
  dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Updating icon cache" || true
fi

if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -f /usr/share/icons/hicolor || true
fi

(Of course, the first 2 commands are optional; but I like to do it because it lets the user know that it is being updated which can take some time depending on the icons you have.)

svu 2009-04-01 10:41

Re: Icon lost
 
That's cool! Thanks a bunch!

svu 2009-04-01 10:48

Re: Icon lost
 
Why isn't it documented anywhere?

qwerty12 2009-04-01 10:56

Re: Icon lost
 
It's mentioned here (admittedly, not in the same context)

svu 2009-04-01 11:07

Re: Icon lost
 
I guess, it is worth mentioning in the packaging guide, isn't it?

svu 2009-04-01 16:15

Re: Icon lost
 
Another icon-related question.

I am using gtk_window_set_icon (and set_icon_list) in order to set the app window icon. I am passing valid GdkPixbuf(s), tried sizes 26 and 64 - but still I am seeing the default icon in the task list. Any ideas?

qwerty12 2009-04-01 16:34

Re: Icon lost
 
This may be a ruby-maemo specific thing, ukki had the same problem with his ruby knots program on #maemo. (And a solution was not found to my knowledge)

qwerty12 2009-04-03 14:30

Re: Icon lost
 
Quote:

Originally Posted by svu (Post 276506)
Another icon-related question.

I am using gtk_window_set_icon (and set_icon_list) in order to set the app window icon. I am passing valid GdkPixbuf(s), tried sizes 26 and 64 - but still I am seeing the default icon in the task list. Any ideas?

I solved it for ukki's Knots Ruby application: Use xprop to get the WMCLASS of your program and add StartupWMClass=<WMCLASS as given to you by xprop> to your desktop file.

svu 2009-04-03 14:46

Re: Icon lost
 
Thanks a bunch, I'll try.

Actually, I found the way ruby binding deals with the window class and window title - a bit strange. It puts the window class as the first part of the window title (second part is what you give to set_title)


All times are GMT. The time now is 22:03.

vBulletin® Version 3.8.8