Hi,

I am including two patches, one for debian menus and other to remove the clean 
file (not needed now).

kix
-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
>From fa5b8d9020c70a9c8d50bfc3a0c5a71d6138391d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Thu, 1 Mar 2012 00:33:36 +0100
Subject: [PATCH 1/2] debian: Menu moved to /etc/WindowMaker 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 and /etc/GNUstep were moved to /etc/WindowMaker
---
 debian/debianfiles/menu/wmappearance    |    2 +-
 debian/debianfiles/wmaker               |    2 +-
 debian/patches/50_def_config_paths.diff |    2 +-
 debian/patches/51_wmaker_man.diff       |    2 +-
 debian/rules                            |    2 +-
 debian/wmaker-common.dirs               |    2 +-
 debian/wmaker-common.install            |   11 +++++------
 debian/wmaker-common.links              |    2 +-
 debian/wmaker-common.postinst           |    7 ++++++-
 debian/wmaker-common.postrm             |    3 ++-
 debian/wmaker.menu-method               |   10 +++++-----
 11 files changed, 25 insertions(+), 20 deletions(-)

diff --git a/debian/debianfiles/menu/wmappearance b/debian/debianfiles/menu/wmappearance
index 20391b3..f8d79c0 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/WindowMaker"
 userprefix=shell("echo -n /${GNUSTEP_USER_ROOT-GNUstep}") "/Library/WindowMaker"
 treewalk=(M)
 
diff --git a/debian/debianfiles/wmaker b/debian/debianfiles/wmaker
index 8317563..bf5b299 100644
--- a/debian/debianfiles/wmaker
+++ b/debian/debianfiles/wmaker
@@ -5,7 +5,7 @@ set -e
 [ -n "$GNUSTEP_USER_ROOT" ] || export GNUSTEP_USER_ROOT="$HOME/GNUstep"
 gs_base="$GNUSTEP_USER_ROOT"
 gs_defaults="$gs_base/Defaults"
-gs_system_defaults=/etc/GNUstep/Defaults
+gs_system_defaults=/etc/WindowMaker
 wm_base="$gs_base/Library/WindowMaker"
 wm_backgrounds="$wm_base/Backgrounds"
 wm_iconsets="$wm_base/IconSets"
diff --git a/debian/patches/50_def_config_paths.diff b/debian/patches/50_def_config_paths.diff
index 3106719..1d4554c 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/WindowMaker:"PKGDATADIR
  #define DEF_MENU_FILE	 "menu"
 
  /* name of the script to execute at startup */
diff --git a/debian/patches/51_wmaker_man.diff b/debian/patches/51_wmaker_man.diff
index 0e17627..d0963b3 100644
--- a/debian/patches/51_wmaker_man.diff
+++ b/debian/patches/51_wmaker_man.diff
@@ -18,7 +18,7 @@ Last-Update: 2011-08-16
  few options not available using the Attributes Editor.
  .TP
 -.B /usr/share/WindowMaker/Defaults/
-+.B /etc/GNUstep/Defaults/
++.B /etc/WindowMaker/
  All the above-mentioned files are READ from here if not found except
  for WMState, which is COPIED from here. No matter where they are read
  from, if it's necessary to write configuration changes back into this
diff --git a/debian/rules b/debian/rules
index ffb48ec..a57d76d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 # export DH_VERBOSE=1
 
-CFLAGS = -g -Wall -DGLOBAL_DEFAULTS_SUBDIR="\\\"GNUstep/Defaults\\\""
+CFLAGS = -g -Wall
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0
diff --git a/debian/wmaker-common.dirs b/debian/wmaker-common.dirs
index 35d9727..91f23a6 100644
--- a/debian/wmaker-common.dirs
+++ b/debian/wmaker-common.dirs
@@ -1,5 +1,5 @@
 etc/menu-methods
-etc/GNUstep/Defaults
+etc/WindowMaker
 usr/bin
 usr/sbin
 usr/share/doc/wmaker
diff --git a/debian/wmaker-common.install b/debian/wmaker-common.install
index 0e71c16..3c64c94 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
@@ -132,11 +131,11 @@ debian/debianfiles/upgrade-windowmaker-defaults usr/sbin
 debian/debianfiles/Theme/Debian			usr/share/WindowMaker/Themes
 debian/debianfiles/Theme/debian.tiff		usr/share/WindowMaker/Backgrounds
 # Configuration
-etc/WindowMaker/WMGLOBAL			etc/GNUstep/Defaults
-etc/WindowMaker/WMState				etc/GNUstep/Defaults
-debian/debianfiles/conf/WMWindowAttributes	etc/GNUstep/Defaults
-debian/debianfiles/conf/WMRootMenu		etc/GNUstep/Defaults
-debian/debianfiles/conf/WindowMaker		etc/GNUstep/Defaults
+etc/WindowMaker/WMGLOBAL
+etc/WindowMaker/WMState
+debian/debianfiles/conf/WMWindowAttributes	etc/WindowMaker
+debian/debianfiles/conf/WMRootMenu		etc/WindowMaker
+debian/debianfiles/conf/WindowMaker		etc/WindowMaker
 debian/debianfiles/wmaker-common.desktop	usr/share/xsessions
 # Menu
 debian/debianfiles/menu/wmappearance		etc/menu-methods
diff --git a/debian/wmaker-common.links b/debian/wmaker-common.links
index f3f35eb..ca21a67 100644
--- a/debian/wmaker-common.links
+++ b/debian/wmaker-common.links
@@ -1 +1 @@
-etc/GNUstep/Defaults usr/share/WindowMaker/Defaults
+etc/WindowMaker usr/share/WindowMaker/Defaults
diff --git a/debian/wmaker-common.postinst b/debian/wmaker-common.postinst
index 526329a..32a7f2b 100644
--- a/debian/wmaker-common.postinst
+++ b/debian/wmaker-common.postinst
@@ -17,7 +17,12 @@ case "$1" in
     done
 
     if [ -x /usr/bin/update-menus -a -x /usr/bin/install-menu ] ; then
-        update-menus
+# Remove the menu.hook from all the possible paths.
+      rm -f /etc/X11/WindowMaker/menu.hook /etc/WindowMaker/menu.hook
+      rm -f /etc/GNUstep/WindowMaker/menu.hook /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..31ef360 100644
--- a/debian/wmaker-common.postrm
+++ b/debian/wmaker-common.postrm
@@ -14,7 +14,8 @@ 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/WindowMaker/menu.hook
+      rm -f /usr/share/WindowMaker/appearance.menu
     fi
   ;;
   upgrade|abort-install|disappear)
diff --git a/debian/wmaker.menu-method b/debian/wmaker.menu-method
index aa3e55b..532927c 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/WindowMaker"
 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

>From 54254557c42426b05f3e6df40997c6159e5cbdd1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Sat, 3 Mar 2012 18:04:07 +0100
Subject: [PATCH 2/2] debian: clean file removed

The file "clean", which contains "WindowMaker/Defaults/WMRootMenu" can be removed, because this file was included to be cleaned in the commit 01907f998349d8382a25191a7871e7c93af156db
---
 debian/clean |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
 delete mode 100644 debian/clean

diff --git a/debian/clean b/debian/clean
deleted file mode 100644
index 1826b97..0000000
--- a/debian/clean
+++ /dev/null
@@ -1 +0,0 @@
-WindowMaker/Defaults/WMRootMenu
-- 
1.7.9

Reply via email to