1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
$NetBSD: patch-ac,v 1.2 2002/12/25 13:18:25 jmmv Exp $
--- settings.cpp.orig Sat Apr 6 13:07:24 2002
+++ settings.cpp
@@ -1040,13 +1040,11 @@ void SettingsDialog::read_config(bool se
if (!get_rcfile_path(search_localfile)) {
string message;
if (search_localfile) {
- message = "Can't find or open file /etc/" RC_FILE ",\n"
- "/usr/local/etc/" RC_FILE " or ";
+ message = "Can't find or open file " RCDIR "/" RC_FILE " or ";
message += prog_config.homedir + "/." RC_FILE "\n";
}
else {
- message = "Can't find or open file /etc/" RC_FILE "\n"
- "or /usr/local/etc/" RC_FILE;
+ message = "Can't find or open file " RCDIR "/" RC_FILE;
message += prog_config.homedir + "/." RC_FILE "\n";
}
write_error(message.c_str());
@@ -1172,8 +1170,7 @@ void SettingsDialog::read_config(bool se
}
void SettingsDialog::get_reset_settings_prompt(void) {
- PromptDialog* dialog_p = new PromptDialog("Enter settings from /etc/efax-gtkrc or\n"
- "/usr/local/etc/efax-gtkrc?",
+ PromptDialog* dialog_p = new PromptDialog("Enter settings from " RCDIR "/efax-gtkrc?",
"Reset settings", standard_size, *this);
if (!dialog_p) {
cerr << "Memory allocation error in SettingsDialog::get_reset_settings_prompt()" << endl;
@@ -1248,17 +1245,11 @@ bool SettingsDialog::get_rcfile_path(boo
if (!found_rcfile) {
- rcfile = "/usr/local/etc/";
+ rcfile = RCDIR "/";
rcfile += RC_FILE;
if (!access(rcfile.c_str(), F_OK)) found_rcfile = true;
}
- if (!found_rcfile) {
-
- rcfile = "/etc/";
- rcfile += RC_FILE;
- if (!access(rcfile.c_str(), F_OK)) found_rcfile = true;
- }
if (!found_rcfile) rcfile = "";
return found_rcfile;
}
|