maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Menu icon for script (https://talk.maemo.org/showthread.php?t=75344)

mcow 2011-07-30 18:12

Menu icon for script
 
I created a python script to run on my N800. I made a .desktop file for it, and that's installed; there's an icon for my script in the desired folder of the menu, and it works.

I initially specified no icon, and so it's showing the default. I've create a PNG, stored it in the same folder as the script, and updated the .desktop accordingly:
Code:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=NormalizeM3Us
Exec=python /home/user/python/NormalizeM3Us.py
Icon=/home/user/python/bandaid.png

But even after rebooting, I'm not seeing my icon.

Maemo docs for the Icon field state:
Quote:

If the name is an absolute path, the given file will be used.
I've triple-checked that the path is right, and loaded the PNG into the Images program so I know the image is OK. Can anyone tell me what's wrong here?

Alfred 2011-07-30 18:35

Re: Menu icon for script
 
I've got kinda similar problem with my "G+ Macuco icon" in maemo5. The icon shows on the desktop, but not in the menu.

Shoudn't it be
Icon="/home/user/python/bandaid.png" ?

mcow 2011-07-30 19:03

Re: Menu icon for script
 
I don't see quotes used in any of the examples, and I'd really be surprised if they were required, or even allowed.

Addison 2011-07-30 20:31

Re: Menu icon for script
 
I guess the easiest solution would be to change an app that you already have and point it towards your new script and icon.

If you never use the Help or Rhapsody or Skype app, yeah, just hack one of those desktop files instead.

This also updates the icons without a need of a full reboot.


root
gtk-update-icon-cache -f /usr/share/icons/hicolor


What does your script do by the way?

mcow 2011-07-30 23:00

Re: Menu icon for script
 
Good suggestion. I looked at the other .desktop files and saw that many of them have this line:
Code:

X-Icon-path=/usr/share/pixmaps/
I looked in that dir and noticed canola.png, and when I looked back at canola.desktop, it didn't have the X-Icon-path, but it did have
Code:

Icon=canola
So I just copied my PNG into /usr/share/pixmaps, changed the Icon line to just the filename, and voilą: it works.

All the script does is convert M3Us encoded in UTF-8+BOM to just plain UTF-8, which is the maemo standard I guess. At any rate, Canola can't read M3Us with a BOM, and MediaMonkey can't write 'em without.

auouymous 2011-07-30 23:39

Re: Menu icon for script
 
/usr/share/icons/hicolor/40x40/hildon/

then run the gtk cache command and only list the icon filename in desktop file, not whole path


All times are GMT. The time now is 11:35.

vBulletin® Version 3.8.8