1 diff -Nur gg-0.2.2.1.orig/src/callbacks.c gg-0.2.2.1/src/callbacks.c
2 --- gg-0.2.2.1.orig/src/callbacks.c Wed May 1 10:07:08 2002
3 +++ gg-0.2.2.1/src/callbacks.c Wed May 29 13:43:33 2002
8 - g_strdup_printf("%s/.gg/history/%d", getenv("HOME"),
9 + g_strdup_printf("%s/history/%d", config.homedir,
11 fp = fopen(path, "r");
13 diff -Nur gg-0.2.2.1.orig/src/gg-types.h gg-0.2.2.1/src/gg-types.h
14 --- gg-0.2.2.1.orig/src/gg-types.h Mon Apr 22 11:59:01 2002
15 +++ gg-0.2.2.1/src/gg-types.h Wed May 29 13:34:54 2002
17 guint save_config_on_exit;
18 guint save_contacts_on_exit;
24 diff -Nur gg-0.2.2.1.orig/src/gg.c gg-0.2.2.1/src/gg.c
25 --- gg-0.2.2.1.orig/src/gg.c Fri Apr 19 16:04:50 2002
26 +++ gg-0.2.2.1/src/gg.c Wed May 29 13:43:09 2002
28 gchar *path, *timestamp, *lognick;
31 - path = g_strdup_printf("%s/.gg/history", getenv("HOME"));
32 + path = g_strdup_printf("%s/history", config.homedir);
37 - g_strdup_printf("%s/.gg/history/%d", getenv("HOME"), sess_uin);
38 + g_strdup_printf("%s/history/%d", config.homedir, sess_uin);
39 fp = fopen(path, "a");
42 diff -Nur gg-0.2.2.1.orig/src/main.c gg-0.2.2.1/src/main.c
43 --- gg-0.2.2.1.orig/src/main.c Mon Apr 22 11:59:01 2002
44 +++ gg-0.2.2.1/src/main.c Wed May 29 13:39:50 2002
49 - path = g_strconcat(g_get_home_dir(), "/.gg/userlist", NULL);
50 + path = g_strconcat(config.homedir, "/userlist", NULL);
52 fp = fopen(path, "w");
56 gtk_clist_clear(GTK_CLIST(lista));
58 - path = g_strconcat(getenv("HOME"), "/.gg/userlist", NULL);
59 + path = g_strconcat(config.homedir, "/userlist", NULL);
61 fp = fopen(path, "r");
64 config.save_contacts_on_exit = 1;
65 config.server = g_strdup(GG_DEFAULT_HOST);
67 - path = g_strconcat(getenv("HOME"), "/.gg/config", NULL);
68 + path = g_strconcat(config.homedir, "/config", NULL);
73 config.width=window->allocation.width;
74 config.height=window->allocation.height;
76 - path = g_strconcat(getenv("HOME"), "/.gg/config", NULL);
77 + path = g_strconcat(config.homedir, "/config", NULL);
79 fp = fopen(path, "w");
83 gchar applet_name[] = "gg";
87 - path = g_strconcat(getenv("HOME"), "/.gg", NULL);
90 + config.homedir = NULL;
91 + if (getenv("CONFIG_DIR"))
92 + config.homedir = g_strconcat(getenv("HOME"),"/",
93 + getenv("CONFIG_DIR"), "/gg", NULL);
95 + config.homedir = g_strconcat(getenv("HOME"), "/.gg", NULL);
97 + mkdir(config.homedir, 0700);
101 g_set_print_handler((GPrintFunc) my_g_print);
106 + g_free(config.homedir);