mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
Add GLOBAL_DEFAULTS_SUBDIR and fix a syntax error in wmlib/Makefile.am
This commit is contained in:
committed by
Carlos R. Mafra
parent
ba027149bd
commit
3f6ae395ce
@@ -69,6 +69,10 @@
|
||||
|
||||
#define MAX_SHORTCUT_LENGTH 32
|
||||
|
||||
#ifndef GLOBAL_DEFAULTS_SUBDIR
|
||||
#define GLOBAL_DEFAULTS_SUBDIR "WindowMaker"
|
||||
#endif
|
||||
|
||||
/***** Global *****/
|
||||
|
||||
extern WDDomain *WDWindowMaker;
|
||||
@@ -738,7 +742,7 @@ static WMPropList *readGlobalDomain(char *domainName, Bool requireDictionary)
|
||||
char path[PATH_MAX];
|
||||
struct stat stbuf;
|
||||
|
||||
snprintf(path, sizeof(path), "%s/WindowMaker/%s", SYSCONFDIR, domainName);
|
||||
snprintf(path, sizeof(path), "%s/%s/%s", SYSCONFDIR, GLOBAL_DEFAULTS_SUBDIR, domainName);
|
||||
if (stat(path, &stbuf) >= 0) {
|
||||
globalDict = WMReadPropListFromFile(path);
|
||||
if (globalDict && requireDictionary && !WMIsPLDictionary(globalDict)) {
|
||||
@@ -833,7 +837,7 @@ void wDefaultsMergeGlobalMenus(WDDomain * menuDomain)
|
||||
return;
|
||||
|
||||
#ifdef GLOBAL_PREAMBLE_MENU_FILE
|
||||
submenu = WMReadPropListFromFile(SYSCONFDIR "/WindowMaker/" GLOBAL_PREAMBLE_MENU_FILE);
|
||||
submenu = WMReadPropListFromFile(SYSCONFDIR "/" GLOBAL_DEFAULTS_SUBDIR "/" GLOBAL_PREAMBLE_MENU_FILE);
|
||||
|
||||
if (submenu && !WMIsPLArray(submenu)) {
|
||||
wwarning(_("invalid global menu file %s"), GLOBAL_PREAMBLE_MENU_FILE);
|
||||
@@ -847,7 +851,7 @@ void wDefaultsMergeGlobalMenus(WDDomain * menuDomain)
|
||||
#endif
|
||||
|
||||
#ifdef GLOBAL_EPILOGUE_MENU_FILE
|
||||
submenu = WMReadPropListFromFile(SYSCONFDIR "/WindowMaker/" GLOBAL_EPILOGUE_MENU_FILE);
|
||||
submenu = WMReadPropListFromFile(SYSCONFDIR "/" GLOBAL_DEFAULTS_SUBDIR "/" GLOBAL_EPILOGUE_MENU_FILE);
|
||||
|
||||
if (submenu && !WMIsPLArray(submenu)) {
|
||||
wwarning(_("invalid global menu file %s"), GLOBAL_EPILOGUE_MENU_FILE);
|
||||
@@ -934,7 +938,7 @@ WDDomain *wDefaultsInitDomain(char *domain, Bool requireDictionary)
|
||||
}
|
||||
|
||||
/* global system dictionary */
|
||||
snprintf(path, sizeof(path), "%s/WindowMaker/%s", SYSCONFDIR, domain);
|
||||
snprintf(path, sizeof(path), "%s/%s/%s", SYSCONFDIR, GLOBAL_DEFAULTS_SUBDIR, domain);
|
||||
if (stat(path, &stbuf) >= 0) {
|
||||
shared_dict = WMReadPropListFromFile(path);
|
||||
if (shared_dict) {
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
|
||||
#include <WINGs/WUtil.h>
|
||||
|
||||
#ifndef GLOBAL_DEFAULTS_SUBDIR
|
||||
#define GLOBAL_DEFAULTS_SUBDIR "WindowMaker"
|
||||
#endif
|
||||
|
||||
/****** Global Variables ******/
|
||||
|
||||
/* general info */
|
||||
@@ -610,7 +614,7 @@ static int real_main(int argc, char **argv)
|
||||
printf("Window Maker %s\n", VERSION);
|
||||
exit(0);
|
||||
} else if (strcmp(argv[i], "--global_defaults_path") == 0) {
|
||||
printf("%s/WindowMaker\n", SYSCONFDIR);
|
||||
printf("%s/%s\n", SYSCONFDIR, GLOBAL_DEFAULTS_SUBDIR);
|
||||
exit(0);
|
||||
#ifdef DEBUG
|
||||
} else if (strcmp(argv[i], "--synchronous") == 0) {
|
||||
|
||||
@@ -453,7 +453,7 @@
|
||||
|
||||
#define HRESIZE_THRESHOLD 3
|
||||
|
||||
#define MAX_WORKSPACENAME_WIDTH 32
|
||||
#define MAX_WORKSPACENAME_WIDTH 64
|
||||
#define MAX_WINDOWLIST_WIDTH 160 /* max width of window title in
|
||||
* window list */
|
||||
|
||||
|
||||
@@ -38,6 +38,10 @@
|
||||
|
||||
#include "../src/wconfig.h"
|
||||
|
||||
#ifndef GLOBAL_DEFAULTS_SUBDIR
|
||||
#define GLOBAL_DEFAULTS_SUBDIR "WindowMaker"
|
||||
#endif
|
||||
|
||||
/* table of style related options */
|
||||
static char *options[] = {
|
||||
"TitleJustify",
|
||||
@@ -133,7 +137,7 @@ char *globalDefaultsPathForDomain(char *domain)
|
||||
{
|
||||
static char path[1024];
|
||||
|
||||
sprintf(path, "%s/WindowMaker/%s", SYSCONFDIR, domain);
|
||||
sprintf(path, "%s/%s/%s", SYSCONFDIR, GLOBAL_DEFAULTS_SUBDIR, domain);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
@@ -53,6 +53,10 @@
|
||||
|
||||
#include "../src/wconfig.h"
|
||||
|
||||
#ifndef GLOBAL_DEFAULTS_SUBDIR
|
||||
#define GLOBAL_DEFAULTS_SUBDIR "WindowMaker"
|
||||
#endif
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
#include <wraster.h>
|
||||
|
||||
@@ -1054,7 +1058,7 @@ char *globalDefaultsPathForDomain(char *domain)
|
||||
{
|
||||
char path[1024];
|
||||
|
||||
sprintf(path, "%s/WindowMaker/%s", SYSCONFDIR, domain);
|
||||
sprintf(path, "%s/%s/%s", SYSCONFDIR, GLOBAL_DEFAULTS_SUBDIR, domain);
|
||||
|
||||
return wstrdup(path);
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ install-exec-local:
|
||||
@$(mkinstalldirs) $(DESTDIR)$(libdir)/pkgconfig
|
||||
@list='wmlib.pc'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
@echo "$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/"; \
|
||||
@$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/; \
|
||||
echo "$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user