From e314838447e094839517d933136faa16a5744f31 Mon Sep 17 00:00:00 2001 From: kojima Date: Sat, 6 Jan 2001 22:38:07 +0000 Subject: [PATCH] fixed bug in builtin xpm loader fixed crash bug in menu editor --- ChangeLog | 4 ++++ WINGs/Extras/Makefile.am | 3 +++ WINGs/Makefile.am | 3 +++ WPrefs.app/Menu.c | 4 ++-- WPrefs.app/WPrefs.c | 3 +++ configure.in | 2 +- util/wmaker.inst.in | 16 ++++++++++++++++ wrlib/nxpm.c | 38 ++++++++++++++++++++++++++++---------- 8 files changed, 60 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index a4a462ea..5d6c88dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,10 @@ Changes since version 0.63.0: - decreased nice() value in wmsetbg - applied gnome panel not-covering patch from (Bastien Nocera ) - added item copy to WPrefs menu editor +- added locale selection code for menu in wmaker.inst (Eliphas Levy Theodoro ) +- fixed bug in built-in xpm support (Alessandro Strada ) +- removed plugin support +- fixed a crash bug in WPrefs menu editor Changes since version 0.62.1: ............................. diff --git a/WINGs/Extras/Makefile.am b/WINGs/Extras/Makefile.am index ae1cb986..f0cf5d68 100644 --- a/WINGs/Extras/Makefile.am +++ b/WINGs/Extras/Makefile.am @@ -4,6 +4,9 @@ AUTOMAKE_OPTIONS = no-dependencies +# is this a kluge? if so, how should i do it? +includedir = @includedir@/WINGs + include_HEADERS = wtableview.h wtabledelegates.h diff --git a/WINGs/Makefile.am b/WINGs/Makefile.am index 5db3ee6e..3e16dd66 100644 --- a/WINGs/Makefile.am +++ b/WINGs/Makefile.am @@ -8,6 +8,9 @@ SUBDIRS = . Documentation Resources Examples Extras Tests #libWINGs_la_LDFLAGS = -version-info 1:1:0 +# is this a kluge? if so, how should i do it? +includedir = @includedir@/WINGs + include_HEADERS = WINGs.h WUtil.h WINGsP.h bin_SCRIPTS = get-wings-flags get-wutil-flags diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c index 369d1936..bc567f55 100644 --- a/WPrefs.app/Menu.c +++ b/WPrefs.app/Menu.c @@ -1439,7 +1439,7 @@ buildSubmenu(_Panel *panel, proplist_t pl) char *title; proplist_t tp, bp; int i; - + tp = PLGetArrayElement(pl, 0); title = PLGetString(tp); @@ -1455,7 +1455,7 @@ buildSubmenu(_Panel *panel, proplist_t pl) title = PLGetString(tp); - if (PLIsArray(bp)) { /* it's a submenu */ + if (!bp || PLIsArray(bp)) { /* it's a submenu */ WEditMenu *submenu; submenu = buildSubmenu(panel, pi); diff --git a/WPrefs.app/WPrefs.c b/WPrefs.app/WPrefs.c index 32f45cb0..79ed8d30 100644 --- a/WPrefs.app/WPrefs.c +++ b/WPrefs.app/WPrefs.c @@ -410,6 +410,9 @@ savePanelData(Panel *panel) static void changeSection(WMWidget *self, void *data) { + if (WPrefs.currentPanel == data) + return; + if (WPrefs.banner) { WMDestroyWidget(WPrefs.banner); WPrefs.banner = NULL; diff --git a/configure.in b/configure.in index 73747b15..52b02199 100644 --- a/configure.in +++ b/configure.in @@ -886,7 +886,7 @@ cat <get-wraster-flags prefix="$prefix" exec_prefix=\$prefix -WCFLAGS="-I\$prefix/include $inc_search_path" +WCFLAGS="-I\$prefix/include/WINGs $inc_search_path" WLFLAGS="-L\$exec_prefix/lib $lib_search_path" WLIBS="-lwraster $GFXLIBS $XLIBS -lm" diff --git a/util/wmaker.inst.in b/util/wmaker.inst.in index 4fc76252..24e9beaa 100644 --- a/util/wmaker.inst.in +++ b/util/wmaker.inst.in @@ -11,6 +11,12 @@ else fi # /xx herbert + +LOCALE=$LANG +if [ -z "$LOCALE" ]; then + LOCALE=$LC_ALL +fi + # directory where system wide configuration is stored GLOBALDIR="#pkgdatadir#" GLOBALDEFDIR="#sysconfdir#" @@ -56,6 +62,16 @@ 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 + cp $GLOBALDIR/plmenu.${LOCALE%_*} $GSDIR/Defaults/WMRootMenu + else + cp $GLOBALDIR/plmenu $GSDIR/Defaults/WMRootMenu + fi + else + cp $GLOBALDIR/plmenu $GSDIR/Defaults/WMRootMenu + fi else if test "x$GNUSTEP_USER_ROOT" = "x"; then sed -e "s:#wmdatadir#:$GLOBALDIR:g" \ diff --git a/wrlib/nxpm.c b/wrlib/nxpm.c index 560350cd..7af74441 100644 --- a/wrlib/nxpm.c +++ b/wrlib/nxpm.c @@ -176,11 +176,20 @@ RGetImageFromXPMData(RContext *context, char **data) if (k==ccount) k = 0; - *(r++) = color_table[0][k]; - *(g++) = color_table[1][k]; - *(b++) = color_table[2][k]; - if (a) - *(a++) = color_table[3][k]; + *r = color_table[0][k]; + *g = color_table[1][k]; + *b = color_table[2][k]; + if (a) { + *a = color_table[3][k]; + r += 4; + g += 4; + b += 4; + a += 4; + } else { + r += 3; + g += 3; + b += 3; + } } } else { for (j=0; j