]>
Commit | Line | Data |
---|---|---|
0224bc0f | 1 | diff -Nru icewm-1.2.14pre1.orig/src/genpref.cc icewm-1.2.14pre1/src/genpref.cc |
2 | --- icewm-1.2.14pre1.orig/src/genpref.cc 2003-11-01 11:43:13.000000000 +0100 | |
3 | +++ icewm-1.2.14pre1/src/genpref.cc 2003-11-09 10:11:04.000000000 +0100 | |
4 | @@ -60,6 +60,9 @@ | |
5 | int main() { | |
6 | #ifndef NO_CONFIGURE | |
7 | printf("# preferences(%s) - generated by genpref\n\n", VERSION); | |
8 | + if (getenv("HOME_ETC") != NULL) | |
9 | + printf("# This file should be copied to /etc/icewm/ or $HOME_ETC/.icewm/ directory\n"); | |
10 | + else | |
11 | printf("# This file should be copied to /etc/icewm/ or $HOME/.icewm/ directory\n"); | |
12 | printf("# NOTE: All settings are commented out by default, be sure to\n" | |
13 | "# uncomment them if you change them!\n\n"); | |
14 | diff -Nru icewm-1.2.14pre1.orig/src/icesound.cc icewm-1.2.14pre1/src/icesound.cc | |
15 | --- icewm-1.2.14pre1.orig/src/icesound.cc 2003-11-01 11:43:13.000000000 +0100 | |
16 | +++ icewm-1.2.14pre1/src/icesound.cc 2003-11-09 10:13:06.000000000 +0100 | |
17 | @@ -159,7 +159,7 @@ | |
3866fed2 | 18 | char * YAudioInterface::findSample(char const * basefname) { |
0224bc0f | 19 | static char const * paths[] = { |
3866fed2 | 20 | IceSound::samples, |
21 | - strJoin(getenv("HOME"), "/.icewm/sounds/", NULL), | |
22 | + strJoin(getenv("HOME_ETC") != NULL ? getenv("HOME_ETC") : getenv("HOME"), "/.icewm/sounds/", NULL), | |
23 | strJoin(CFGDIR, "/sounds/", NULL), | |
24 | strJoin(LIBDIR, "/sounds/", NULL) | |
0224bc0f | 25 | }; |
26 | diff -Nru icewm-1.2.14pre1.orig/src/themes.cc icewm-1.2.14pre1/src/themes.cc | |
27 | --- icewm-1.2.14pre1.orig/src/themes.cc 2003-11-01 11:43:13.000000000 +0100 | |
28 | +++ icewm-1.2.14pre1/src/themes.cc 2003-11-09 10:15:47.000000000 +0100 | |
29 | @@ -25,11 +25,12 @@ | |
30 | extern char *configArg; | |
31 | ||
32 | void setDefaultTheme(const char *theme) { | |
33 | - const char *confDir = strJoin(getenv("HOME"), "/.icewm", NULL); | |
34 | + const char *h = getenv("HOME_ETC"); | |
35 | + const char *confDir = strJoin(h != NULL ? h : getenv("HOME"), "/.icewm", NULL); | |
36 | mkdir(confDir, 0777); | |
37 | delete[] confDir; | |
38 | - const char *themeConfNew = strJoin(getenv("HOME"), "/.icewm/theme.new.tmp", NULL); | |
39 | - const char *themeConf = strJoin(getenv("HOME"), "/.icewm/theme", NULL); | |
40 | + const char *themeConfNew = strJoin(h != NULL ? h : getenv("HOME"), "/.icewm/theme.new.tmp", NULL); | |
41 | + const char *themeConf = strJoin(h != NULL ? h : getenv("HOME"), "/.icewm/theme", NULL); | |
42 | int fd = open(themeConfNew, O_RDWR | O_TEXT | O_CREAT | O_TRUNC | O_EXCL, 0666); | |
43 | #warning "do proper escaping" | |
44 | const char *buf = strJoin("Theme=\"", theme, "\"\n", NULL); | |
45 | diff -Nru icewm-1.2.14pre1.orig/src/yapp.cc icewm-1.2.14pre1/src/yapp.cc | |
46 | --- icewm-1.2.14pre1.orig/src/yapp.cc 2003-11-01 11:43:13.000000000 +0100 | |
47 | +++ icewm-1.2.14pre1/src/yapp.cc 2003-11-09 10:18:51.000000000 +0100 | |
3866fed2 | 48 | @@ -44,7 +44,8 @@ |
49 | const char *env = getenv("ICEWM_PRIVCFG"); | |
0224bc0f | 50 | |
3866fed2 | 51 | if (NULL == env) { |
52 | - env = getenv("HOME"); | |
53 | + env = getenv("HOME_ETC"); | |
0224bc0f | 54 | + if (env == NULL) env = getenv("HOME"); |
3866fed2 | 55 | strcpy(cfgdir, env ? env : ""); |
56 | strcat(cfgdir, "/.icewm"); | |
57 | } else { |