maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Running program icon does not show up (https://talk.maemo.org/showthread.php?t=17544)

fms 2008-03-05 07:53

Running program icon does not show up
 
I am having some problems getting icons to show up when running a program. I have packaged and installed 3 different icons (26x26, 40x40, and 64x64) and I am running the gtk-update-icon-cache in the postinst script. Here is what I get:

* The little icon in Application Manager does show up.
* The large icon in the start menu does show up.
* The small icon in the running-programs list at the left does not show up. I am getting the default icon instead.
* The larger icon in the window list (the one that appears when you click in the bottom-left corner of the screen) does not show up. I am getting the default icon instead.

What am I doing wrong? Am I missing something?

yerga 2008-03-05 08:37

Re: Running program icon does not show up
 
You need to define it in the .desktop file with:
Icon=my_icon_40x40

or similar.

fms 2008-03-05 14:37

Re: Running program icon does not show up
 
Quote:

Originally Posted by yerga (Post 151105)
You need to define it in the .desktop file with:
Icon=my_icon_40x40
or similar.

It is already done but does not appear to work.

hns 2008-03-05 14:57

Re: Running program icon does not show up
 
I had this problem when the executable listed in the desktop file was just a script that set an environment variable and then started the actual application (a python script). I think the task bar looks at the command line associated with a window to find the proper icon, and if it differs the default icon is used.

My solution was to have the python app itself check for the environment variable, and set it and restart itself if necessary (using os.environ and os.exec())

yerga 2008-03-05 15:43

Re: Running program icon does not show up
 
This could not be necessary, but try adding to the desktop file:
X-Icon-path=/usr/share/icons
X-Window-Icon=my_icon

I always add two icons to:
/usr/share/icons/hicolor/26x26/hildon/
/usr/share/icons/hicolor/scalable/hildon/

Scalable is the largest icon 64x64.
Scalable icon is shown in the large menu and the window list, and 26x26 is shown in the running apps list.

And I run this in the postinst script: gtk-update-icon-cache -f /usr/share/icons/hicolor

fms 2008-03-05 21:15

Re: Running program icon does not show up
 
Quote:

Originally Posted by hns (Post 151175)
I had this problem when the executable listed in the desktop file was just a script that set an environment variable and then started the actual application (a python script). I think the task bar looks at the command line associated with a window to find the proper icon, and if it differs the default icon is used.

Yes, I had this one as well once, but resolved it (with a different application) in the same way. The weird part is, my current (problematic) application appears to have exactly the same setup as the "good" one.

yabbas 2008-03-06 03:01

Re: Running program icon does not show up
 
If you find out how...I'd like to know :)

vabgeo 2008-03-06 03:41

Re: Running program icon does not show up
 
You can take a look at the package I have created. It works correctly in N800 OS2008.

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=pyAxelWii
Exec=/usr/bin/pyaxelwii
Icon=pyaxelwii
X-Icon-path=/usr/share/icons
X-Window-Icon=pyaxelwii
X-Window-Icon-Dimmed=pyaxelwii
X-Osso-Type=application/x-executable

You can browse the files in the '/usr/share' folder of SVN through the link below
https://garage.maemo.org/plugins/scm...root=pyaxelwii

hope this helps.

fms 2008-03-06 06:02

Re: Running program icon does not show up
 
Quote:

Originally Posted by vabgeo (Post 151466)
You can take a look at the package I have created. It works correctly in N800 OS2008.

Mine exactly the same except it is missing X-Icon-path. Going to try with X-Icon-path today.

anidel 2008-04-08 17:15

Re: Running program icon does not show up
 
Take a look at this:

http://thpinfo.com/2008/02/maemo-icon-sizes.html

I did put my Xournal icon in hicolor/scalable/apps and it works.
Xournal has the correctly sized icon at first installation (in the menu list).

I still can't make it how the correct icon in the taskbar on the side


All times are GMT. The time now is 14:13.

vBulletin® Version 3.8.8