mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +01:00
WINGs: Use the constants added in config-paths.h for paths
Replace hard-coded directory names by the constants that have been previously added to the common header.
This commit is contained in:
committed by
Carlos R. Mafra
parent
bd38778bef
commit
8219c36488
@@ -40,7 +40,6 @@ char *WMUserDefaultsDidChangeNotification = "WMUserDefaultsDidChangeNotification
|
||||
|
||||
static void synchronizeUserDefaults(void *foo);
|
||||
|
||||
#define DEFAULTS_DIR "/Defaults"
|
||||
#ifndef HAVE_INOTIFY
|
||||
/* Check defaults database for changes every this many milliseconds */
|
||||
/* XXX: this is shared with src/ stuff, put it in some common header */
|
||||
@@ -49,7 +48,7 @@ static void synchronizeUserDefaults(void *foo);
|
||||
|
||||
const char *wusergnusteppath()
|
||||
{
|
||||
static const char subdir[] = "/GNUstep";
|
||||
static const char subdir[] = "/" GSUSER_SUBDIR;
|
||||
static char *path = NULL;
|
||||
char *gspath;
|
||||
const char *h;
|
||||
@@ -101,12 +100,11 @@ char *wdefaultspathfordomain(const char *domain)
|
||||
size_t slen;
|
||||
|
||||
gspath = wusergnusteppath();
|
||||
slen = strlen(gspath) + strlen(DEFAULTS_DIR) + strlen(domain) + 4;
|
||||
slen = strlen(gspath) + strlen("/" DEFAULTS_SUBDIR "/") + strlen(domain) + 1;
|
||||
path = wmalloc(slen);
|
||||
|
||||
strcpy(path, gspath);
|
||||
strcat(path, DEFAULTS_DIR);
|
||||
strcat(path, "/");
|
||||
strcat(path, "/" DEFAULTS_SUBDIR "/");
|
||||
strcat(path, domain);
|
||||
|
||||
return path;
|
||||
|
||||
Reference in New Issue
Block a user