mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-09 15:24:12 +01:00
- s/sprintf/snprintf
- updated some po's - fixed crash bug when removing WINDOWS_MENU or WORKSPACE_MENU from rootmenu - some other stuff i forgot
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
echo gathering information for bug tracking...
|
||||
|
||||
uname -a > sysinfo.txt
|
||||
wmaker --version >> sysinfo.txt
|
||||
echo "=============== xdpyinfo ================" >> sysinfo.txt
|
||||
xdpyinfo >> sysinfo.txt
|
||||
echo "=============== env ================" >> sysinfo.txt
|
||||
@@ -25,9 +26,9 @@ cat ../config.cache ../Version >> sysinfo.txt 2> /dev/null
|
||||
cat config.cache Version >> sysinfo.txt 2> /dev/null
|
||||
|
||||
echo "=============== configuration dir ===========" >> sysinfo.txt
|
||||
WDIR=$HOME/gnustep/Library/WindowMaker
|
||||
WDIR=$HOME/GNUstep/Defaults
|
||||
if [ -d $WDIR ]; then
|
||||
for i in preferences menu app_options winitrc shortcuts; do
|
||||
for i in WMGLOBAL WMRootMenu WMState WMWindowAttributes WindowMaker; do
|
||||
if [ -f $WDIR/$i ]; then
|
||||
echo "============== $i ========" >> sysinfo.txt
|
||||
cat $WDIR/$i >> sysinfo.txt
|
||||
@@ -37,6 +38,6 @@ else
|
||||
echo "No config directory found" >> sysinfo.txt
|
||||
fi
|
||||
|
||||
gzip -9 sysinfo.txt
|
||||
bzip2 -9f sysinfo.txt || gzip -9f sysinfo.txt
|
||||
|
||||
echo done.
|
||||
|
||||
@@ -61,7 +61,7 @@ static BufferData *newWindow(int magfactor);
|
||||
int windowCount = 0;
|
||||
|
||||
int rectBufferSize = 32;
|
||||
Display *dpy;
|
||||
Display *dpy, *vdpy;
|
||||
WMScreen *scr;
|
||||
unsigned int black;
|
||||
WMColor *cursorColor1;
|
||||
@@ -212,19 +212,19 @@ updateImage(BufferData *data, int rx, int ry)
|
||||
gw += gx;
|
||||
gx = 0;
|
||||
}
|
||||
if (gx + gw >= WidthOfScreen(DefaultScreenOfDisplay(dpy))) {
|
||||
gw = WidthOfScreen(DefaultScreenOfDisplay(dpy)) - gx;
|
||||
if (gx + gw >= WidthOfScreen(DefaultScreenOfDisplay(vdpy))) {
|
||||
gw = WidthOfScreen(DefaultScreenOfDisplay(vdpy)) - gx;
|
||||
}
|
||||
if (gy < 0) {
|
||||
yoffs = abs(gy);
|
||||
gh += gy;
|
||||
gy = 0;
|
||||
}
|
||||
if (gy + gh >= HeightOfScreen(DefaultScreenOfDisplay(dpy))) {
|
||||
gh = HeightOfScreen(DefaultScreenOfDisplay(dpy)) - gy;
|
||||
if (gy + gh >= HeightOfScreen(DefaultScreenOfDisplay(vdpy))) {
|
||||
gh = HeightOfScreen(DefaultScreenOfDisplay(vdpy)) - gy;
|
||||
}
|
||||
|
||||
image = XGetImage(dpy, DefaultRootWindow(dpy), gx, gy, gw, gh,
|
||||
image = XGetImage(vdpy, DefaultRootWindow(vdpy), gx, gy, gw, gh,
|
||||
AllPlanes, ZPixmap);
|
||||
|
||||
|
||||
@@ -453,6 +453,7 @@ int main(int argc, char **argv)
|
||||
BufferData *data;
|
||||
int i;
|
||||
char *display = "";
|
||||
char *vdisplay = NULL;
|
||||
int magfactor = 2;
|
||||
#if 0
|
||||
WMButton *radio, *tradio;
|
||||
@@ -466,6 +467,11 @@ int main(int argc, char **argv)
|
||||
if (i >= argc)
|
||||
goto help;
|
||||
display = argv[i];
|
||||
} else if (strcmp(argv[i], "-vdisplay")==0) {
|
||||
i++;
|
||||
if (i >= argc)
|
||||
goto help;
|
||||
vdisplay = argv[i];
|
||||
} else if (strcmp(argv[i], "-m")==0) {
|
||||
i++;
|
||||
if (i >= argc)
|
||||
@@ -505,12 +511,22 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
dpy = XOpenDisplay("");
|
||||
dpy = XOpenDisplay(display);
|
||||
if (!dpy) {
|
||||
puts("couldnt open display");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (vdisplay) {
|
||||
vdpy = XOpenDisplay(vdisplay);
|
||||
if (!vdpy) {
|
||||
puts("couldnt open display to be viewed");
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
vdpy = dpy;
|
||||
}
|
||||
|
||||
/* calculate how many rectangles we can send in a trip to the server */
|
||||
rectBufferSize = XMaxRequestSize(dpy) - 128;
|
||||
rectBufferSize /= sizeof(XRectangle);
|
||||
|
||||
@@ -68,6 +68,8 @@ copy() {
|
||||
if [ "$LOCALE" ]; then
|
||||
if [ -f $GLOBALDIR/plmenu.${LOCALE%_*} ]; then
|
||||
source=$GLOBALDIR/plmenu.${LOCALE%_*}
|
||||
elif [ -f $GLOBALDIR/menu.${LOCALE%_*} ]; then
|
||||
source=$GLOBALDIR/menu.${LOCALE%_*}
|
||||
else
|
||||
source=$GLOBALDIR/plmenu
|
||||
fi
|
||||
@@ -266,6 +268,7 @@ test -f ~$GSDIR/Library/WindowMaker/exitscript || \
|
||||
cp $GLOBALDIR/exitscript.sh $GSDIR/Library/WindowMaker/exitscript
|
||||
chmod +rx $GSDIR/Library/WindowMaker/exitscript
|
||||
|
||||
# no need to call wmchlocale --auto, since national menu is already copied
|
||||
wsetfont --auto
|
||||
|
||||
# xx herbert
|
||||
|
||||
@@ -2,12 +2,19 @@
|
||||
#
|
||||
# Change locale-dependent settings of WindowMaker.
|
||||
#
|
||||
# v0.1 by judas@hell <tomka@oalevice.sk> on Jan 28 2001
|
||||
# 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.1"
|
||||
VERSION="0.3"
|
||||
|
||||
if [ "x$GNUSTEP_USER_ROOT" = "x" ]; then
|
||||
GSDIR="$HOME/GNUstep"
|
||||
@@ -23,13 +30,13 @@ LOCALDIR="$GSDIR/Library/WindowMaker"
|
||||
|
||||
help_msg() {
|
||||
echo -e "\n"\
|
||||
"$PROGRAM, v$VERSION by judas@hell\n"\
|
||||
"$PROGRAM, v$VERSION by Jan \"judas\" Tomka\n"\
|
||||
"Syntax:\n"\
|
||||
" $PROGRAM [--auto] [--nodef] [<new-locale> | default]\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"\
|
||||
"--nodef try to change only codings of fonts\n"
|
||||
"--test don't write anything\n"
|
||||
exit 0
|
||||
}
|
||||
|
||||
@@ -41,8 +48,8 @@ for i in $*; do
|
||||
case $i in
|
||||
--auto)
|
||||
auto="YES";;
|
||||
--nodef)
|
||||
nodef="--nodef";;
|
||||
--test)
|
||||
test="--test";;
|
||||
*)
|
||||
if [ -z "$new_locale" ]; then
|
||||
new_locale="$i"
|
||||
@@ -54,6 +61,7 @@ for i in $*; do
|
||||
done
|
||||
if [ "$new_locale" = "default" ]; then
|
||||
new_locale=""
|
||||
default="YES"
|
||||
fi
|
||||
|
||||
if [ -n "$auto" ] && [ -z "$new_locale" ]; then
|
||||
@@ -64,12 +72,20 @@ if [ -n "$auto" ] && [ -z "$new_locale" ]; then
|
||||
fi
|
||||
|
||||
if [ -z "$new_locale" ]; then
|
||||
echo -e "\nNo locale is set, using default...\n" >/dev/stderr
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
@@ -77,13 +93,18 @@ 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 [ -n "$new_locale" ] && echo "$new_menu" |grep "menu.$new_locale" &>/dev/null; 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)"
|
||||
@@ -118,7 +139,7 @@ if wsetfont "$args" &>/dev/null; then
|
||||
echo "success"
|
||||
else
|
||||
echo -n "fail"
|
||||
if wsetfont default &>/dev/null; then
|
||||
if wsetfont default "$test" &>/dev/null; then
|
||||
echo " (setting default)"
|
||||
else
|
||||
echo " (totally)"
|
||||
|
||||
@@ -1423,7 +1423,7 @@ main(int argc, char **argv)
|
||||
render_mode = RDitheredRendering;
|
||||
|
||||
rattr.flags = RC_RenderMode | RC_ColorsPerChannel
|
||||
| RC_StandardColormap;
|
||||
| RC_StandardColormap | RC_DefaultVisual;
|
||||
rattr.render_mode = render_mode;
|
||||
rattr.colors_per_channel = cpc;
|
||||
rattr.standard_colormap_mode = RCreateStdColormap;
|
||||
|
||||
@@ -77,8 +77,8 @@ for i in $*; do
|
||||
"--auto")
|
||||
auto="YES";;
|
||||
*)
|
||||
if echo $i |grep "^--locale=" &>/dev/null; then
|
||||
new_locale=$(echo $i |sed -e "s|--locale=||" -)
|
||||
if echo $i |grep "^--locale=" >/dev/null 2>&1; then
|
||||
new_locale=$(echo $i |sed -e "s|--locale=||")
|
||||
elif [ -z $family ]; then
|
||||
family=$i
|
||||
else
|
||||
@@ -333,6 +333,11 @@ for i in $DomainNames; do
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
tmp1="$j=\"`eval echo '${'$j'}'`\"" # cosmetic length workaround
|
||||
echo '<<<<'
|
||||
if [ ${#tmp1} -lt 80 ]; then
|
||||
tmp1=`echo $tmp1 | sed -e 's/^\(.\{1,76\}\).*/\1/'`
|
||||
fi
|
||||
eval _j="\$$j"
|
||||
echo $j="${_j}"
|
||||
$WDWRITE $i $j \"${_j}\"
|
||||
|
||||
Reference in New Issue
Block a user