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
|
#define MAX_SHORTCUT_LENGTH 32
|
||||||
|
|
||||||
|
#ifndef GLOBAL_DEFAULTS_SUBDIR
|
||||||
|
#define GLOBAL_DEFAULTS_SUBDIR "WindowMaker"
|
||||||
|
#endif
|
||||||
|
|
||||||
/***** Global *****/
|
/***** Global *****/
|
||||||
|
|
||||||
extern WDDomain *WDWindowMaker;
|
extern WDDomain *WDWindowMaker;
|
||||||
@@ -738,7 +742,7 @@ static WMPropList *readGlobalDomain(char *domainName, Bool requireDictionary)
|
|||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
struct stat stbuf;
|
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) {
|
if (stat(path, &stbuf) >= 0) {
|
||||||
globalDict = WMReadPropListFromFile(path);
|
globalDict = WMReadPropListFromFile(path);
|
||||||
if (globalDict && requireDictionary && !WMIsPLDictionary(globalDict)) {
|
if (globalDict && requireDictionary && !WMIsPLDictionary(globalDict)) {
|
||||||
@@ -833,7 +837,7 @@ void wDefaultsMergeGlobalMenus(WDDomain * menuDomain)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef GLOBAL_PREAMBLE_MENU_FILE
|
#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)) {
|
if (submenu && !WMIsPLArray(submenu)) {
|
||||||
wwarning(_("invalid global menu file %s"), GLOBAL_PREAMBLE_MENU_FILE);
|
wwarning(_("invalid global menu file %s"), GLOBAL_PREAMBLE_MENU_FILE);
|
||||||
@@ -847,7 +851,7 @@ void wDefaultsMergeGlobalMenus(WDDomain * menuDomain)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GLOBAL_EPILOGUE_MENU_FILE
|
#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)) {
|
if (submenu && !WMIsPLArray(submenu)) {
|
||||||
wwarning(_("invalid global menu file %s"), GLOBAL_EPILOGUE_MENU_FILE);
|
wwarning(_("invalid global menu file %s"), GLOBAL_EPILOGUE_MENU_FILE);
|
||||||
@@ -934,7 +938,7 @@ WDDomain *wDefaultsInitDomain(char *domain, Bool requireDictionary)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* global system dictionary */
|
/* 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) {
|
if (stat(path, &stbuf) >= 0) {
|
||||||
shared_dict = WMReadPropListFromFile(path);
|
shared_dict = WMReadPropListFromFile(path);
|
||||||
if (shared_dict) {
|
if (shared_dict) {
|
||||||
|
|||||||
@@ -54,6 +54,10 @@
|
|||||||
|
|
||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
|
|
||||||
|
#ifndef GLOBAL_DEFAULTS_SUBDIR
|
||||||
|
#define GLOBAL_DEFAULTS_SUBDIR "WindowMaker"
|
||||||
|
#endif
|
||||||
|
|
||||||
/****** Global Variables ******/
|
/****** Global Variables ******/
|
||||||
|
|
||||||
/* general info */
|
/* general info */
|
||||||
@@ -610,7 +614,7 @@ static int real_main(int argc, char **argv)
|
|||||||
printf("Window Maker %s\n", VERSION);
|
printf("Window Maker %s\n", VERSION);
|
||||||
exit(0);
|
exit(0);
|
||||||
} else if (strcmp(argv[i], "--global_defaults_path") == 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);
|
exit(0);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
} else if (strcmp(argv[i], "--synchronous") == 0) {
|
} else if (strcmp(argv[i], "--synchronous") == 0) {
|
||||||
|
|||||||
@@ -453,7 +453,7 @@
|
|||||||
|
|
||||||
#define HRESIZE_THRESHOLD 3
|
#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
|
#define MAX_WINDOWLIST_WIDTH 160 /* max width of window title in
|
||||||
* window list */
|
* window list */
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,10 @@
|
|||||||
|
|
||||||
#include "../src/wconfig.h"
|
#include "../src/wconfig.h"
|
||||||
|
|
||||||
|
#ifndef GLOBAL_DEFAULTS_SUBDIR
|
||||||
|
#define GLOBAL_DEFAULTS_SUBDIR "WindowMaker"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* table of style related options */
|
/* table of style related options */
|
||||||
static char *options[] = {
|
static char *options[] = {
|
||||||
"TitleJustify",
|
"TitleJustify",
|
||||||
@@ -133,7 +137,7 @@ char *globalDefaultsPathForDomain(char *domain)
|
|||||||
{
|
{
|
||||||
static char path[1024];
|
static char path[1024];
|
||||||
|
|
||||||
sprintf(path, "%s/WindowMaker/%s", SYSCONFDIR, domain);
|
sprintf(path, "%s/%s/%s", SYSCONFDIR, GLOBAL_DEFAULTS_SUBDIR, domain);
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,10 @@
|
|||||||
|
|
||||||
#include "../src/wconfig.h"
|
#include "../src/wconfig.h"
|
||||||
|
|
||||||
|
#ifndef GLOBAL_DEFAULTS_SUBDIR
|
||||||
|
#define GLOBAL_DEFAULTS_SUBDIR "WindowMaker"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <WINGs/WINGs.h>
|
#include <WINGs/WINGs.h>
|
||||||
#include <wraster.h>
|
#include <wraster.h>
|
||||||
|
|
||||||
@@ -1054,7 +1058,7 @@ char *globalDefaultsPathForDomain(char *domain)
|
|||||||
{
|
{
|
||||||
char path[1024];
|
char path[1024];
|
||||||
|
|
||||||
sprintf(path, "%s/WindowMaker/%s", SYSCONFDIR, domain);
|
sprintf(path, "%s/%s/%s", SYSCONFDIR, GLOBAL_DEFAULTS_SUBDIR, domain);
|
||||||
|
|
||||||
return wstrdup(path);
|
return wstrdup(path);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ install-exec-local:
|
|||||||
@$(mkinstalldirs) $(DESTDIR)$(libdir)/pkgconfig
|
@$(mkinstalldirs) $(DESTDIR)$(libdir)/pkgconfig
|
||||||
@list='wmlib.pc'; for p in $$list; do \
|
@list='wmlib.pc'; for p in $$list; do \
|
||||||
if test -f $$p; then \
|
if test -f $$p; then \
|
||||||
@echo "$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/"; \
|
echo "$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/"; \
|
||||||
@$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/; \
|
$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/; \
|
||||||
else :; fi; \
|
else :; fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user