1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-01 19:42:32 +01:00

getstyle: Save theme pack in Themes dir

When invoked as

getstyle -p NewTheme

Instead of saving the theme inside the topdir ~/GNUstep let's save it
insinde their proper directory ~/GNUstep/Library/WindowMaker/Themes.
This commit is contained in:
Carlos R. Mafra
2012-01-15 02:38:57 +00:00
parent 5ef03b2a3a
commit ac8a493ed9

View File

@@ -138,7 +138,7 @@ void print_help(int print_usage, int exitval)
{ {
printf("Usage: %s [-t] [-p] [-h] [-v] [file]\n", __progname); printf("Usage: %s [-t] [-p] [-h] [-v] [file]\n", __progname);
if (print_usage) { if (print_usage) {
puts("Retrieves style/theme configuration and output to FILE or to stdout"); puts("Retrieves style/theme configuration and outputs to ~/GNUstep/Library/WindowMaker/Themes/file.themed/style or to stdout");
puts(""); puts("");
puts(" -h, --help display this help and exit"); puts(" -h, --help display this help and exit");
puts(" -v, --version output version information and exit"); puts(" -v, --version output version information and exit");
@@ -263,12 +263,15 @@ void makeThemePack(WMPropList * style, char *themeName)
if ((t = wusergnusteppath()) == NULL) if ((t = wusergnusteppath()) == NULL)
return; return;
themeNameLen = strlen(t) + 1 /* / */ + strlen(themeName) + 8 /* ".themed/" */ + 1 /* '\0' */; themeNameLen = strlen(t) + strlen(themeName) + 50;
themeDir = wmalloc(themeNameLen); themeDir = wmalloc(themeNameLen);
snprintf(themeDir, themeNameLen, "%s/%s.themed/", t, themeName); snprintf(themeDir, themeNameLen, "%s/Library/WindowMaker/Themes/%s.themed/", t, themeName);
ThemePath = themeDir; ThemePath = themeDir;
if (!wmkdirhier(themeDir))
if (!wmkdirhier(themeDir)) {
wwarning("Could not make theme dir %s\n", themeDir);
return; return;
}
keys = WMGetPLDictionaryKeys(style); keys = WMGetPLDictionaryKeys(style);