]> git.pld-linux.org Git - packages/dc_gui.git/blame - dc_gui-home_etc.patch
- BR:db3-devel->BR:db-devel, BR:libgnomeui-devel
[packages/dc_gui.git] / dc_gui-home_etc.patch
CommitLineData
07ba5148 1diff -Nur dc_gui2-0.68.orig/src/callbacks.c dc_gui2-0.68.chng/src/callbacks.c
2--- dc_gui2-0.68.orig/src/callbacks.c Sat Jan 4 08:24:38 2003
3+++ dc_gui2-0.68.chng/src/callbacks.c Wed Jan 8 13:54:11 2003
4@@ -560,7 +560,11 @@
fc825d2b 5
07ba5148 6 s=g_string_new(NULL);
7 path=getenv("HOME");
fc825d2b 8- g_string_sprintf(s,"%s/.dctc/recent",(path!=NULL)?path:".");
07ba5148 9+ if (getenv("CONFIG_DIR"))
10+ g_string_sprintf(s, "%s/%s/dctc/recent",
11+ (path!=NULL)?path:".", getenv("CONFIG_DIR"));
fc825d2b 12+ else
07ba5148 13+ g_string_sprintf(s, "%s/.dctc/recent", (path!=NULL)?path:".");
14 unlink(s->str);
15 g_string_free(s,TRUE);
fc825d2b 16 fill_recent_hub_clist();
07ba5148 17diff -Nur dc_gui2-0.68.orig/src/main.c dc_gui2-0.68.chng/src/main.c
18--- dc_gui2-0.68.orig/src/main.c Sat Jan 4 08:25:04 2003
19+++ dc_gui2-0.68.chng/src/main.c Wed Jan 8 13:50:39 2003
20@@ -410,9 +410,14 @@
21 textdomain (GETTEXT_PACKAGE);
fc825d2b 22 #endif
23
07ba5148 24- path=getenv("HOME");
fc825d2b 25- dctc_main_dir=g_string_new(NULL);
26- g_string_sprintf(dctc_main_dir,"%s/.dctc",(path!=NULL)?path:".");
07ba5148 27+ path = getenv("HOME");
28+ dctc_main_dir = g_string_new(NULL);
29+ if (getenv("CONFIG_DIR"))
30+ g_string_sprintf(dctc_main_dir, "%s/%s/dctc",
31+ (path!=NULL)?path:".", getenv("CONFIG_DIR"));
fc825d2b 32+ else
07ba5148 33+ g_string_sprintf(dctc_main_dir, "%s/.dctc", (path!=NULL)?path:".");
34+
fc825d2b 35 if(access(dctc_main_dir->str,R_OK|W_OK|X_OK))
36 {
37 if(errno==ENOENT)
07ba5148 38diff -Nur dc_gui2-0.68.orig/src/recent_hub_clist.c dc_gui2-0.68.chng/src/recent_hub_clist.c
39--- dc_gui2-0.68.orig/src/recent_hub_clist.c Wed Jan 1 15:24:57 2003
40+++ dc_gui2-0.68.chng/src/recent_hub_clist.c Wed Jan 8 13:57:01 2003
41@@ -46,7 +46,11 @@
42
43 s=g_string_new(NULL);
44 path=getenv("HOME");
45- g_string_sprintf(s,"%s/.dctc/recent",(path!=NULL)?path:".");
46+ if(getenv("CONFIG_DIR"))
47+ g_string_sprintf(s, "%s/%s/dctc/recent",
48+ (path!=NULL)?path:".", getenv("CONFIG_DIR"));
49+ else
50+ g_string_sprintf(s, "%s/.dctc/recent",(path!=NULL)?path:".");
51
52 /* we read the file ~/.dctc/recent */
53 f=fopen(s->str,"rb");
This page took 0.08063 seconds and 4 git commands to generate.