You are not logged in.

#26 2015-09-27 13:46:39

tekkkz
Member
Registered: 2015-08-07
Posts: 68

Re: Openbox add Icons to Menu

Traceback (most recent call last):
  File "obiconadder.py", line 72, in <module>
    if getIconTheme() != None : iconDirs.append("/usr/share/icons/" + getIconTheme() + "/48x48")
  File "obiconadder.py", line 49, in getIconTheme
    contents = contents.split("\n")
UnboundLocalError: local variable 'contents' referenced before assignment

Offline

#27 2015-09-27 13:52:09

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: Openbox add Icons to Menu

Whoops. Fixed.

Offline

#28 2015-09-27 13:55:26

tekkkz
Member
Registered: 2015-08-07
Posts: 68

Re: Openbox add Icons to Menu

Nearly perfect!

Last edited by tekkkz (2015-09-27 13:55:53)

Offline

#29 2015-09-27 14:04:27

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: Openbox add Icons to Menu

Any more bugs/issues with it?

Offline

#30 2015-09-27 14:06:48

tekkkz
Member
Registered: 2015-08-07
Posts: 68

Re: Openbox add Icons to Menu

It cant find sth for KCalc cause its something with -calculator for it

Offline

#31 2015-09-27 14:23:01

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: Openbox add Icons to Menu

Hmmm. According to the .desktop file it needs accessories-calculator which for me is available as /usr/share/icons/gnome/48x48/apps/accessories-calculator.png. The .desktop check doesn't look like it should fail - there should be a match between kcalc in your menu file and Exec=kcalc in the .desktop. Perhaps your icon theme doesn't provide that icon.

What I'll do is always add the gnome-icon-theme dir if it exists. That should take care of any missing icons.

Offline

#32 2015-09-27 14:26:42

tekkkz
Member
Registered: 2015-08-07
Posts: 68

Re: Openbox add Icons to Menu

yap tell me when fixed

Offline

#33 2015-09-27 14:38:19

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: Openbox add Icons to Menu

With any luck, I think it should be fixed now.

Edit: I tested it by putting the kcalc .desktop file in my /usr/share/applications and the script successfully picked up the icon for kcalc and added it to the test menu file so I think that's been taken care of.

Anyway, this thread has gotten rather long and cumbersome but the long and the short of it is, if you're looking to add icons to an existing Openbox menu file without throwing away the old contents, you can try my script linked to in post #19. Also see the suggestion in post #14.

Last edited by Chazza (2015-09-27 15:23:26)

Offline

#34 2021-05-30 05:58:56

cowsha
Member
Registered: 2021-05-30
Posts: 1

Re: Openbox add Icons to Menu

you have to install gtk2-perl to obmenu-generator get the icons

Offline

#35 2021-05-30 12:10:00

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Openbox add Icons to Menu

This thread is six years old. Please do not necrobump.

Closing.

Offline

Board footer

Powered by FluxBB