1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-08 23:04:15 +01:00

WPrefs: 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:
Christophe CURIS
2021-08-08 09:36:20 +02:00
committed by Carlos R. Mafra
parent 8219c36488
commit fb2a6d2e61
2 changed files with 18 additions and 11 deletions

View File

@@ -507,7 +507,7 @@ static void createPanel(_Panel * p)
WMSetScrollViewContentView(sview, WMWidgetView(pad)); WMSetScrollViewContentView(sview, WMWidgetView(pad));
data = putNewItem(panel, pad, ExternalInfo, _("Debian Menu")); data = putNewItem(panel, pad, ExternalInfo, _("Debian Menu"));
data->param.pipe.command = "/etc/GNUstep/Defaults/menu.hook"; data->param.pipe.command = "/etc/" GSUSER_SUBDIR "/" DEFAULTS_SUBDIR "/menu.hook";
data = putNewItem(panel, pad, PipeInfo, _("RedHat Menu")); data = putNewItem(panel, pad, PipeInfo, _("RedHat Menu"));
data->param.pipe.command = "wmconfig --output wmaker"; data->param.pipe.command = "wmconfig --output wmaker";
@@ -518,19 +518,25 @@ static void createPanel(_Panel * p)
data = putNewItem(panel, pad, DirectoryInfo, _("Themes")); data = putNewItem(panel, pad, DirectoryInfo, _("Themes"));
data->param.directory.command = "setstyle"; data->param.directory.command = "setstyle";
data->param.directory.directory = data->param.directory.directory =
"/usr/share/WindowMaker/Themes /usr/local/share/WindowMaker/Themes $HOME/GNUstep/Library/WindowMaker/Themes"; "/usr/share/" PACKAGE_TARNAME "/Themes"
" /usr/local/share/" PACKAGE_TARNAME "/Themes"
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Themes";
data->param.directory.stripExt = 1; data->param.directory.stripExt = 1;
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (scale)")); data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (scale)"));
data->param.directory.command = "wmsetbg -u -s"; data->param.directory.command = "wmsetbg -u -s";
data->param.directory.directory = data->param.directory.directory =
"/opt/kde2/share/wallpapers /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds"; "/opt/kde2/share/wallpapers"
" /usr/share/" PACKAGE_TARNAME "/Backgrounds"
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Backgrounds";
data->param.directory.stripExt = 1; data->param.directory.stripExt = 1;
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (tile)")); data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (tile)"));
data->param.directory.command = "wmsetbg -u -t"; data->param.directory.command = "wmsetbg -u -t";
data->param.directory.directory = data->param.directory.directory =
"/opt/kde2/share/wallpapers /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds"; "/opt/kde2/share/wallpapers"
" /usr/share/" PACKAGE_TARNAME "/Backgrounds"
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Backgrounds";
data->param.directory.stripExt = 1; data->param.directory.stripExt = 1;
smenu = putNewSubmenu(pad, _("Assorted XTerms")); smenu = putNewSubmenu(pad, _("Assorted XTerms"));
@@ -619,7 +625,8 @@ static void createPanel(_Panel * p)
WMSetLabelText(label, _("Enter the path for a file containing a menu\n" WMSetLabelText(label, _("Enter the path for a file containing a menu\n"
"or a list of directories with the programs you\n" "or a list of directories with the programs you\n"
"want to have listed in the menu. Ex:\n" "want to have listed in the menu. Ex:\n"
"~/GNUstep/Library/WindowMaker/menu\n" "or\n" "/usr/bin ~/xbin")); "~/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/menu\n"
"or\n" "/usr/bin ~/xbin"));
WMMapSubwidgets(panel->pathF); WMMapSubwidgets(panel->pathF);

View File

@@ -77,11 +77,11 @@ static void showData(_Panel * panel)
if (array) if (array)
wwarning(_("bad value in option IconPath. Using default path list")); wwarning(_("bad value in option IconPath. Using default path list"));
addPathToList(panel->icoL, -1, "~/pixmaps"); addPathToList(panel->icoL, -1, "~/pixmaps");
addPathToList(panel->icoL, -1, "~/GNUstep/Library/Icons"); addPathToList(panel->icoL, -1, "~/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/Icons");
addPathToList(panel->icoL, -1, "/usr/include/X11/pixmaps"); addPathToList(panel->icoL, -1, "/usr/include/X11/pixmaps");
addPathToList(panel->icoL, -1, "/usr/local/share/WindowMaker/Icons"); addPathToList(panel->icoL, -1, "/usr/local/share/" PACKAGE_TARNAME "/Icons");
addPathToList(panel->icoL, -1, "/usr/local/share/WindowMaker/Pixmaps"); addPathToList(panel->icoL, -1, "/usr/local/share/" PACKAGE_TARNAME "/Pixmaps");
addPathToList(panel->icoL, -1, "/usr/share/WindowMaker/Icons"); addPathToList(panel->icoL, -1, "/usr/share/" PACKAGE_TARNAME "/Icons");
} else { } else {
for (i = 0; i < WMGetPropListItemCount(array); i++) { for (i = 0; i < WMGetPropListItemCount(array); i++) {
val = WMGetFromPLArray(array, i); val = WMGetFromPLArray(array, i);
@@ -94,8 +94,8 @@ static void showData(_Panel * panel)
if (array) if (array)
wwarning(_("bad value in option PixmapPath. Using default path list")); wwarning(_("bad value in option PixmapPath. Using default path list"));
addPathToList(panel->pixL, -1, "~/pixmaps"); addPathToList(panel->pixL, -1, "~/pixmaps");
addPathToList(panel->pixL, -1, "~/GNUstep/Library/WindowMaker/Pixmaps"); addPathToList(panel->pixL, -1, "~/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Pixmaps");
addPathToList(panel->pixL, -1, "/usr/local/share/WindowMaker/Pixmaps"); addPathToList(panel->pixL, -1, "/usr/local/share/" PACKAGE_TARNAME "/Pixmaps");
} else { } else {
for (i = 0; i < WMGetPropListItemCount(array); i++) { for (i = 0; i < WMGetPropListItemCount(array); i++) {
val = WMGetFromPLArray(array, i); val = WMGetFromPLArray(array, i);