Instead of using _old_ and hard-coded predefined menus as the
source for the user's WMRootMenu during installation, generate
the menu automatically using wmgenmenu.

Signed-off-by: Carlos R. Mafra <[email protected]>
---
 util/wmaker.inst.in |   26 +++++++-------------------
 1 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/util/wmaker.inst.in b/util/wmaker.inst.in
index 2acbbd6..6257a54 100644
--- a/util/wmaker.inst.in
+++ b/util/wmaker.inst.in
@@ -61,24 +61,6 @@ copy() {
        rm -f "$target"
        if [ "$file" = "WindowMaker" ]; then
                sed -e "s|~/GNUstep|$GSDIR|g" "$source" > "$target"
-       elif [ "$file" = "WMRootMenu" ]; then
-               if [ "$LOCALE" ]; then
-                   if [ -f "$GLOBALDIR/plmenu.$LOCALE" ]; then
-                       source="$GLOBALDIR/plmenu.$LOCALE"
-                   elif [ -f "$GLOBALDIR/plmenu.${LOCALE%.*}" ]; then
-                       source="$GLOBALDIR/plmenu.${LOCALE%.*}"
-                   elif [ -f "$GLOBALDIR/plmenu.${LOCALE%_*}" ]; then
-                       source="$GLOBALDIR/plmenu.${LOCALE%_*}"
-                   elif [ -f "$GLOBALDIR/menu.${LOCALE%_*}" ]; then
-                       source="$GLOBALDIR/menu.${LOCALE%_*}"
-                   else
-                       source="$GLOBALDIR/plmenu"
-                   fi
-               else
-                   source="$GLOBALDIR/plmenu"
-               fi
-               sed -e "s:#wmdatadir#:$GLOBALDIR:g" \
-                       "$source" > "$GSDIR/Defaults/WMRootMenu"
        else
                if test "x$GNUSTEP_USER_ROOT" = "x"; then
                        sed -e "s:#wmdatadir#:$GLOBALDIR:g" \
@@ -91,7 +73,12 @@ copy() {
        fi
 }
 
-
+#
+# Generate WMRootmenu
+#
+GenerateMenu() {
+       wmgenmenu > $GSDIR/Defaults/WMRootMenu
+}
 
 echo "Installing WindowMaker $VERSION for current user..."
 
@@ -160,6 +147,7 @@ for i in $FILES; do
        fi
 done
 
+       GenerateMenu
 
 if [ ! -d "$GSDIR/Library/Icons/" ]; then
       echo "Creating icon library directory $GSDIR/Library/Icons"
-- 
1.7.3.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to