1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-06 22:04:12 +01:00

removed some more obsoleted scripts and their manual pages

This commit is contained in:
dan
2004-10-23 00:00:02 +00:00
parent 620a280d64
commit e93e16de06
12 changed files with 7 additions and 325 deletions

View File

@@ -6,10 +6,9 @@ pkgdatadir = $(datadir)/@PACKAGE@
bin_PROGRAMS = wxcopy wxpaste wdwrite wdread getstyle setstyle convertfonts \
seticons geticonset wmsetbg wmsetup wmagnify
bin_SCRIPTS = wmaker.inst wm-oldmenu2new wmchlocale wkdemenu.pl wcopy wpaste
bin_SCRIPTS = wmaker.inst wm-oldmenu2new wkdemenu.pl
EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new directjpeg.c \
wkdemenu.pl wmchlocale.in wcopy wpaste
EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new directjpeg.c wkdemenu.pl
INCLUDES = $(DFLAGS) -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib \
@HEADER_SEARCH_PATH@ \
@@ -58,7 +57,7 @@ wmsetbg_LDADD = \
$(top_builddir)/wrlib/libwraster.la \
@XFTLIBS@ @INTLIBS@ @DLLIBS@
CLEANFILES = wmaker.inst wmchlocale
CLEANFILES = wmaker.inst
wmaker.inst: $(srcdir)/wmaker.inst.in ./Makefile
-rm -f wmaker.inst
@@ -71,9 +70,3 @@ wmaker.inst: $(srcdir)/wmaker.inst.in ./Makefile
chmod 755 wmaker.inst
wmchlocale: $(srcdir)/wmchlocale.in ./Makefile
-rm -f wmchlocale
sed -e "s|#pkgdatadir#|$(pkgdatadir)|" $(srcdir)/wmchlocale.in >wmchlocale
chmod 755 wmchlocale

View File

@@ -27,6 +27,7 @@
#include <stdio.h>
#include <sys/stat.h>
#include <string.h>
#include <locale.h>
#include <WINGs/WUtil.h>
#include "../src/wconfig.h"

View File

@@ -1,148 +0,0 @@
#!/bin/sh
#
# Change locale-dependent settings of WindowMaker.
#
# v0.1 by Jan "judas" Tomka <tomka@oalevice.sk> on Jan 28 2001
#
# v0.2 by Jan "judas" Tomka <tomka@oalevice.sk> on Feb 22 2001
# - removed --nodef option
# - better error recognizing
# - added --test switch like in wsetfont
#
# v0.3 by Jan "judas" Tomka <tomka@oalevice.sk> on May 04 2001
# - bad bugs with --test found and corrected
#
PROGRAM=`basename $0`
VERSION="0.3"
if [ "x$GNUSTEP_USER_ROOT" = "x" ]; then
GSDIR="$HOME/GNUstep"
else
GSDIR="$GNUSTEP_USER_ROOT"
if [ ! -d "GSDIR" ]; then
echo "GNUSTEP_USER_ROOT variable does not contain path to valid directory..." >/dev/stderr
exit 1
fi
fi
GLOBALDIR="#pkgdatadir#"
LOCALDIR="$GSDIR/Library/WindowMaker"
help_msg() {
echo -e "\n"\
"$PROGRAM, v$VERSION by Jan \"judas\" Tomka\n"\
"Syntax:\n"\
" $PROGRAM [--auto] [--test] [<new-locale> | default]\n"\
"\n"\
"<new-locale> locale you want WindowMaker to move to (e.g. ja or default)\n"\
"--auto use current locale\n"\
"--test don't write anything\n"
exit 0
}
if [ $# -eq 0 ]; then
help_msg
fi
for i in $*; do
case $i in
--auto)
auto="YES";;
--test)
test="--test";;
*)
if [ -z "$new_locale" ]; then
new_locale="$i"
else
echo -e "\nUnrecognized command line argument, run without arguments to see help.\n"
exit 1
fi;;
esac
done
if [ "$new_locale" = "default" ]; then
new_locale=""
default="YES"
fi
if [ -n "$auto" ] && [ -z "$new_locale" ]; then
new_locale=$LANG
if [ -z "$new_locale" ]; then
new_locale="${LC_ALL%_*}"
fi
fi
if [ -z "$new_locale" ]; then
if [ -z "$default" ]; then
echo -e "\nNo locale is set, using default...\n" >/dev/stderr
fi
elif ! (locale -a |grep "^$new_locale$" &>/dev/null); then
if [ -z "$auto" ]; then
echo -e "\n"\
"Locale $new_locale is not supported on your system..."\
"\n" >/dev/stderr
else
echo -e "\n"\
"Locale $new_locale currently set is not supported on your system...\n"\
"Check your LANG and LC_ALL variables or install your locale support\n"\
"\n" >/dev/stderr
fi
exit 1
fi
echo -n "Setting Window Maker root menu... "
if [ -z "$new_locale" ] || [ "$new_locale" = "en" ]; then
menu_list="plmenu menu"
args="default"
else
menu_list="plmenu.$new_locale menu.$new_locale plmenu menu"
args="--locale=$new_locale"
fi
echo -n "Setting Window Maker root menu... "
for new_menu in $menu_list; do
for wm_dir in $LOCALDIR $GLOBALDIR; do
if [ -f "$wm_dir/$new_menu" ]; then
if [ -z "$new_locale" ] || ( [ -n "$new_locale" ] && echo "$new_menu" |grep "menu.$new_locale" &>/dev/null ); then
echo "success"
else
echo "fail (copying default)"
fi
new_menu_tmp=$new_menu
# Set new_menu_tmp to first 4 letters of $new_menu.
while [ ${#new_menu_tmp} -gt 4 ]; do
new_menu_tmp=${new_menu_tmp%?}
done
if [ "${new_menu_tmp}" = "menu" ]; then # plain
echo "\"$wm_dir/$new_menu\"" >"$GSDIR/Defaults/WMRootMenu"
else # proplist
cp -f "$wm_dir/$new_menu" "$GSDIR/Defaults/WMRootMenu"
fi
any_found="YES"
break 2
fi
done
done
if [ -z "$any_found" ]; then
echo "fail (no menu found)"
fi
echo -n "Setting Window Maker fonts... "
if [ -z "$new_locale" ] || [ "$new_locale" = "en" ]; then
args="default $nodef"
else
args="--locale=$new_locale $nodef"
fi
if wsetfont "$args" &>/dev/null; then
echo "success"
else
echo -n "fail"
if wsetfont default "$test" &>/dev/null; then
echo " (setting default)"
else
echo " (totally)"
fi
fi