1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 12:00:31 +01:00

WMaker: Use wdefaultspathfordomain() to get path for Defaults directory

Instead of constructing path to user's defaults directory with hard-coded
names, just query wdefaultspathfordomain with a blank domain: this returns
the equivalent of "~/GNUstep/Defaults/", yet avoiding problems related to
duplicating strings.
This commit is contained in:
John D Pell
2021-08-08 09:36:11 +02:00
committed by Carlos R. Mafra
parent bfab769065
commit 735651df55
2 changed files with 1 additions and 2 deletions

View File

@@ -488,7 +488,7 @@ static void inotifyWatchConfig(void)
" Changes to the defaults database will require" " Changes to the defaults database will require"
" a restart to take effect. Check your kernel!")); " a restart to take effect. Check your kernel!"));
} else { } else {
watchPath = wstrconcat(wusergnusteppath(), "/Defaults"); watchPath = wdefaultspathfordomain("");
/* Add the watch; really we are only looking for modify events /* Add the watch; really we are only looking for modify events
* but we might want more in the future so check all events for now. * but we might want more in the future so check all events for now.
* The individual events are checked for in event.c. * The individual events are checked for in event.c.

View File

@@ -122,7 +122,6 @@
/* name of the script to execute at startup */ /* name of the script to execute at startup */
#define DEF_INIT_SCRIPT "autostart" #define DEF_INIT_SCRIPT "autostart"
#define DEF_EXIT_SCRIPT "exitscript" #define DEF_EXIT_SCRIPT "exitscript"
#define DEFAULTS_DIR "Defaults"
#ifdef USE_TIFF #ifdef USE_TIFF
#define DEF_BUTTON_IMAGES PKGDATADIR"/buttons.tiff" #define DEF_BUTTON_IMAGES PKGDATADIR"/buttons.tiff"