Hi,

this is the new patch. Paul, can you check it? If is ok for you, Carlos please, 
upload the patch

kix

>From c219cd6ac90619d153a16c7d720dc41c444d380a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Sun, 4 Mar 2012 13:35:06 +0100
Subject: [PATCH] debian: Menu moved to /etc/GNUstep/Defaults and Applications
 moved to root menu

The Application/* items ara moved to the root menu, removing the "Applications" 
submenu.
The files from /etc/X11/WindowMaker moved to /etc/GNUstep/Defaults
---
 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 +++++-----
 6 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/debian/debianfiles/menu/wmappearance 
b/debian/debianfiles/menu/wmappearance
index 20391b3..230a656 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 3106719..230fe03 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 0e71c16..9bc0d24 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 526329a..b39a9f6 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 eadd636..fb13fcd 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 aa3e55b..4c1bd33 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"
-- 
1.7.9

-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
>From c219cd6ac90619d153a16c7d720dc41c444d380a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Sun, 4 Mar 2012 13:35:06 +0100
Subject: [PATCH] debian: Menu moved to /etc/GNUstep/Defaults and Applications
 moved to root menu

The Application/* items ara moved to the root menu, removing the "Applications" submenu.
The files from /etc/X11/WindowMaker moved to /etc/GNUstep/Defaults
---
 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 +++++-----
 6 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/debian/debianfiles/menu/wmappearance b/debian/debianfiles/menu/wmappearance
index 20391b3..230a656 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 3106719..230fe03 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 0e71c16..9bc0d24 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 526329a..b39a9f6 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 eadd636..fb13fcd 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 aa3e55b..4c1bd33 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"
-- 
1.7.9

Reply via email to