1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

updated get/setstyle for new options

This commit is contained in:
kojima
2000-04-07 23:20:41 +00:00
parent caa86529a9
commit fa9bfc9794
6 changed files with 79 additions and 26 deletions

View File

@@ -11,6 +11,7 @@ Changes since version 0.62.0:
- fixed user-whining-windoze-cycling bug
- added option for f'n windoze cycling..
- added --create-stdcmap and made std colormap creation off by default
- updated get/setstyle to account for new options
Changes since version 0.61.1:
.............................

View File

@@ -15,7 +15,7 @@ AC_INIT(src/WindowMaker.h)
AM_INIT_AUTOMAKE(WindowMaker, 0.62.1)
AM_INIT_AUTOMAKE(WindowMaker, 0.62.2)
AM_PROG_LIBTOOL

View File

@@ -831,12 +831,6 @@ WDefaultEntry optionList[] = {
},
{"ArrowCursor", "(builtin, top_left_arrow)", (void*)WCUR_ARROW,
NULL, getCursor, setCursor
},
{"QuestionCursor", "(builtin, question_arrow)", (void*)WCUR_QUESTION,
NULL, getCursor, setCursor
},
{"TextCursor", "(builtin, xterm)", (void*)WCUR_TEXT,
NULL, getCursor, setCursor
}
#endif
#endif /* DEFINABLE_CURSOR */

View File

@@ -60,7 +60,6 @@ host_triplet = @host@
AS = @AS@
CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
DLLIBS = @DLLIBS@
DLLTOOL = @DLLTOOL@
GFXLIBS = @GFXLIBS@

View File

@@ -2,7 +2,7 @@
*
* WindowMaker window manager
*
* Copyright (c) 1997, 1998 Alfredo K. Kojima
* Copyright (c) 1997~2000 Alfredo K. Kojima
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
*/
#define PROG_VERSION "getstyle (Window Maker) 0.4"
#define PROG_VERSION "getstyle (Window Maker) 0.5"
@@ -71,6 +71,10 @@ static char *options[] = {
"IconTitleColor",
"IconTitleBack",
"MenuStyle",
"WindowTitleExtendSpace",
"MenuTitleExtendSpace",
"MenuTextExtendSpace",
"NormalCursor",
NULL
};
@@ -473,13 +477,16 @@ makeThemePack(proplist_t style, char *themeName)
type = PLGetArrayElement(value, 0);
t = PLGetString(type);
if (t && (strcasecmp(t, "tpixmap")==0
|| strcasecmp(t, "spixmap")==0
|| strcasecmp(t, "cpixmap")==0
|| strcasecmp(t, "mpixmap")==0
|| strcasecmp(t, "tdgradient")==0
|| strcasecmp(t, "tvgradient")==0
|| strcasecmp(t, "thgradient")==0)) {
if (t == NULL)
continue;
if (strcasecmp(t, "tpixmap")==0
|| strcasecmp(t, "spixmap")==0
|| strcasecmp(t, "cpixmap")==0
|| strcasecmp(t, "mpixmap")==0
|| strcasecmp(t, "tdgradient")==0
|| strcasecmp(t, "tvgradient")==0
|| strcasecmp(t, "thgradient")==0) {
proplist_t file;
char *p;
char *newPath;
@@ -497,6 +504,39 @@ makeThemePack(proplist_t style, char *themeName)
} else {
findCopyFile(themeDir, PLGetString(file));
}
} else if (strcasecmp(t, "bitmap")==0) {
proplist_t file;
char *p;
char *newPath;
file = PLGetArrayElement(value, 1);
p = strrchr(PLGetString(file), '/');
if (p) {
copyFile(themeDir, PLGetString(file));
newPath = wstrdup(p+1);
PLRemoveArrayElement(value, 1);
PLInsertArrayElement(value, PLMakeString(newPath), 1);
free(newPath);
} else {
findCopyFile(themeDir, PLGetString(file));
}
file = PLGetArrayElement(value, 2);
p = strrchr(PLGetString(file), '/');
if (p) {
copyFile(themeDir, PLGetString(file));
newPath = wstrdup(p+1);
PLRemoveArrayElement(value, 2);
PLInsertArrayElement(value, PLMakeString(newPath), 2);
free(newPath);
} else {
findCopyFile(themeDir, PLGetString(file));
}
}
}
}

View File

@@ -2,7 +2,7 @@
*
* WindowMaker window manager
*
* Copyright (c) 1997, 1998, 1999 Alfredo K. Kojima
* Copyright (c) 1997~2000 Alfredo K. Kojima
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
*/
#define PROG_VERSION "setstyle (Window Maker) 0.5"
#define PROG_VERSION "setstyle (Window Maker) 0.6"
#include <stdlib.h>
#include <stdio.h>
@@ -104,13 +104,15 @@ hackPathInTexture(proplist_t texture, char *prefix)
/* get texture type */
type = PLGetArrayElement(texture, 0);
t = PLGetString(type);
if (t && (strcasecmp(t, "tpixmap")==0
|| strcasecmp(t, "spixmap")==0
|| strcasecmp(t, "mpixmap")==0
|| strcasecmp(t, "cpixmap")==0
|| strcasecmp(t, "tvgradient")==0
|| strcasecmp(t, "thgradient")==0
|| strcasecmp(t, "tdgradient")==0)) {
if (t == NULL)
return;
if (strcasecmp(t, "tpixmap")==0
|| strcasecmp(t, "spixmap")==0
|| strcasecmp(t, "mpixmap")==0
|| strcasecmp(t, "cpixmap")==0
|| strcasecmp(t, "tvgradient")==0
|| strcasecmp(t, "thgradient")==0
|| strcasecmp(t, "tdgradient")==0) {
proplist_t file;
char buffer[4018];
@@ -120,6 +122,23 @@ hackPathInTexture(proplist_t texture, char *prefix)
/* replace path with full path */
PLRemoveArrayElement(texture, 1);
PLInsertArrayElement(texture, PLMakeString(buffer), 1);
} else if (strcasecmp(t, "bitmap") == 0) {
proplist_t file;
char buffer[4018];
/* get bitmap file path */
file = PLGetArrayElement(texture, 1);
sprintf(buffer, "%s/%s", prefix, PLGetString(file));
/* replace path with full path */
PLRemoveArrayElement(texture, 1);
PLInsertArrayElement(texture, PLMakeString(buffer), 1);
/* get mask file path */
file = PLGetArrayElement(texture, 2);
sprintf(buffer, "%s/%s", prefix, PLGetString(file));
/* replace path with full path */
PLRemoveArrayElement(texture, 2);
PLInsertArrayElement(texture, PLMakeString(buffer), 2);
}
}