Browse Source

Rename menu creation functions

Remove the menu suffix from menu creation functions.
pull/8/head
George Vlahavas 9 years ago
parent
commit
56225bcbaa
  1. 22
      src/xdgmenumaker

22
src/xdgmenumaker

@ -176,18 +176,18 @@ def main(argv):
usage() usage()
sys.exit('ERROR: You must specify the output format with -f') sys.exit('ERROR: You must specify the output format with -f')
elif desktop == "blackbox": elif desktop == "blackbox":
blackboxmenu() blackbox()
elif desktop == "fluxbox": elif desktop == "fluxbox":
fluxboxmenu() fluxbox()
elif desktop == "windowmaker": elif desktop == "windowmaker":
seticon = False seticon = False
windowmakermenu() windowmaker()
elif desktop == "icewm": elif desktop == "icewm":
icewmmenu() icewm()
elif desktop == "pekwm": elif desktop == "pekwm":
pekwmmenu() pekwmmenu()
elif desktop == "jwm": elif desktop == "jwm":
jwmmenu() jwm()
elif desktop == "compizboxmenu": elif desktop == "compizboxmenu":
compizboxmenu() compizboxmenu()
else: else:
@ -409,14 +409,14 @@ def category_icon(category):
icon = None icon = None
return icon return icon
def blackboxmenu(): def blackbox():
# Blackbox menus are the same as Fluxbox menus. They just don't support # Blackbox menus are the same as Fluxbox menus. They just don't support
# icons. # icons.
global seticon global seticon
seticon = False seticon = False
fluxboxmenu() fluxbox()
def fluxboxmenu(): def fluxbox():
if submenu: if submenu:
spacing = ' ' spacing = ' '
if seticon: if seticon:
@ -460,7 +460,7 @@ def fluxboxmenu():
print('[end] # (' + applications + ')') print('[end] # (' + applications + ')')
def windowmakermenu(): def windowmaker():
print('"' + applications + '" MENU') print('"' + applications + '" MENU')
for menu_category in menu(): for menu_category in menu():
category = menu_category.category category = menu_category.category
@ -473,7 +473,7 @@ def windowmakermenu():
print('"' + applications + '" END') print('"' + applications + '" END')
def icewmmenu(): def icewm():
if submenu: if submenu:
spacing = ' ' spacing = ' '
if seticon: if seticon:
@ -560,7 +560,7 @@ def pekwmmenu():
print("}") print("}")
def jwmmenu(): def jwm():
print('<?xml version="1.0"?>') print('<?xml version="1.0"?>')
print('<JWM>') print('<JWM>')
if submenu: if submenu:

Loading…
Cancel
Save