From a3c99bddc891cbd4cae233421920b83acc733186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sat, 3 Mar 2012 18:04:07 +0100 Subject: [PATCH] debian: Small updates in menus etc The file "clean", which contains "WindowMaker/Defaults/WMRootMenu" can be removed, because this file was included to be cleaned in the commit 01907f998349d8382a25191a7871e7c93af156db The Application/* items are moved to the root menu, removing the "Applications" submenu. The files from /etc/X11/WindowMaker moved to /etc/GNUstep/Defaults --- debian/clean | 1 - debian/debianfiles/menu/wmappearance | 2 +- debian/patches/50_def_config_paths.diff | 2 +- debian/wmaker-common.install | 1 - debian/wmaker-common.postinst | 5 +++++ debian/wmaker-common.postrm | 2 +- debian/wmaker.menu-method | 10 +++++----- 7 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 debian/clean diff --git a/debian/clean b/debian/clean deleted file mode 100644 index 1826b978..00000000 --- a/debian/clean +++ /dev/null @@ -1 +0,0 @@ -WindowMaker/Defaults/WMRootMenu diff --git a/debian/debianfiles/menu/wmappearance b/debian/debianfiles/menu/wmappearance index 20391b35..230a6569 100644 --- a/debian/debianfiles/menu/wmappearance +++ b/debian/debianfiles/menu/wmappearance @@ -6,7 +6,7 @@ compat="menu-1" #!include menu.h genmenu="appearance.menu" -rootprefix="/usr/share/WindowMaker" +rootprefix="/etc/GNUstep/Defaults" userprefix=shell("echo -n /${GNUSTEP_USER_ROOT-GNUstep}") "/Library/WindowMaker" treewalk=(M) diff --git a/debian/patches/50_def_config_paths.diff b/debian/patches/50_def_config_paths.diff index 3106719e..230fe03a 100644 --- a/debian/patches/50_def_config_paths.diff +++ b/debian/patches/50_def_config_paths.diff @@ -10,7 +10,7 @@ index c8bb947..cf06113 100644 /* list of paths to look for the config files, searched in order of appearance */ -#define DEF_CONFIG_PATHS "~/GNUstep/Library/WindowMaker:"PKGDATADIR -+#define DEF_CONFIG_PATHS "~/GNUstep/Library/WindowMaker:/etc/X11/WindowMaker:"PKGDATADIR ++#define DEF_CONFIG_PATHS "~/GNUstep/Library/WindowMaker:/etc/GNUstep/Defaults:"PKGDATADIR #define DEF_MENU_FILE "menu" /* name of the script to execute at startup */ diff --git a/debian/wmaker-common.install b/debian/wmaker-common.install index 0e71c163..9bc0d249 100644 --- a/debian/wmaker-common.install +++ b/debian/wmaker-common.install @@ -110,7 +110,6 @@ usr/share/WindowMaker/IconSets/Default.iconset usr/share/WindowMaker/menu.pl usr/share/WindowMaker/menu.el usr/share/WindowMaker/menu.zh_TW -usr/share/WindowMaker/appearance.menu usr/share/WindowMaker/plmenu.zh_CN usr/share/WindowMaker/plmenu.zh_TW usr/share/WindowMaker/menu.gl diff --git a/debian/wmaker-common.postinst b/debian/wmaker-common.postinst index 526329ab..b39a9f64 100644 --- a/debian/wmaker-common.postinst +++ b/debian/wmaker-common.postinst @@ -17,6 +17,11 @@ case "$1" in done if [ -x /usr/bin/update-menus -a -x /usr/bin/install-menu ] ; then +# Remove the menu.hook from all the possible paths. + rm -f /etc/X11/WindowMaker/menu.hook + rm -f /usr/share/WindowMaker/menu.hook +# Remove appearance.menu + rm -f /usr/share/WindowMaker/appearance.menu update-menus fi ;; diff --git a/debian/wmaker-common.postrm b/debian/wmaker-common.postrm index eadd636d..fb13fcd0 100644 --- a/debian/wmaker-common.postrm +++ b/debian/wmaker-common.postrm @@ -14,7 +14,7 @@ case "$1" in purge) if [ -x /usr/bin/update-menus ] ; then update-menus - rm -f /etc/X11/WindowMaker/menu.hook /etc/X11/WindowMaker/plmenu.hook + rm -f /etc/GNUstep/Defaults/menu.hook /etc/GNUstep/Defaults/appearance.menu fi ;; upgrade|abort-install|disappear) diff --git a/debian/wmaker.menu-method b/debian/wmaker.menu-method index aa3e55ba..4c1bd33c 100644 --- a/debian/wmaker.menu-method +++ b/debian/wmaker.menu-method @@ -5,18 +5,18 @@ !include menu.h compat="menu-1"; outputencoding="UTF-8" +outputlanguage="C" genmenu="menu.hook" -rootprefix="/usr/share/WindowMaker" +rootprefix="/etc/GNUstep/Defaults" userprefix=shell("echo -n /${GNUSTEP_USER_ROOT-GNUstep}") "/Library/WindowMaker/" treewalk="(M)" rootsection="/Debian" - function mytitle()=replacewith(title(),"\"","'") function exec($action,$com)= \ - " \"" mytitle() "\" " ifnempty($shortcut, "SHORTCUT " $shortcut " ") $action " " esc($com,"*") "\n" + " \"" translate(,mytitle()) "\" " ifnempty($shortcut, "SHORTCUT " $shortcut " ") $action " " esc($com,"*") "\n" supported x11= exec("SHEXEC",$command) @@ -33,13 +33,13 @@ submenutitle= "" startmenu= "\n" \ ifelse( \ title(), \ - "\"" mytitle() "\" MENU", \ + ifneq(mytitle(), "Applications", "\"" translate(,mytitle()) "\" MENU"), \ "Debian MENU\n\n" \ ) \ "\n" endmenu= ifelse( \ title(), \ - "\"" mytitle() "\" END", \ + ifneq(mytitle(), "Applications", "\"" translate(,mytitle()) "\" END"), \ "\n\nDebian END" \ ) \ "\n"