Mercurial > pidgin.yaz
comparison src/session.c @ 8596:56360561af5e
[gaim-migrate @ 9347]
" This patch creates a new command line argument ('-c' or
'--config') that allows the location of tha gaim prefs
files to be located somewhere other than in ~/.gaim
The patch also removes the -f argument as it is no
longer relevant since .gaimrc is all but gone.
The one "weirdness" is that for the session managment
support, the --config argument will allways appear to
be specified and will contain either the custom value
(if specified) or the canonical version of ~/.gaim (if
no custom -c is specified). If this should be done
differently, let me know." --Daniel Atallah
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Tue, 06 Apr 2004 14:29:51 +0000 |
parents | 084ed9f7ac19 |
children | cfb11d9a46fd |
comparison
equal
deleted
inserted
replaced
8595:1d5e31e518fc | 8596:56360561af5e |
---|---|
23 #include "internal.h" | 23 #include "internal.h" |
24 | 24 |
25 #include "core.h" | 25 #include "core.h" |
26 #include "debug.h" | 26 #include "debug.h" |
27 #include "eventloop.h" | 27 #include "eventloop.h" |
28 | |
29 extern char *opt_rcfile_arg; | |
30 | 28 |
31 #ifdef USE_SM | 29 #ifdef USE_SM |
32 | 30 |
33 #include <X11/ICE/ICElib.h> | 31 #include <X11/ICE/ICElib.h> |
34 #include <X11/SM/SMlib.h> | 32 #include <X11/SM/SMlib.h> |
143 gint i = 2; | 141 gint i = 2; |
144 gint j = 0; | 142 gint j = 0; |
145 gchar **ret; | 143 gchar **ret; |
146 | 144 |
147 if (client_id) i += 2; | 145 if (client_id) i += 2; |
148 if (opt_rcfile_arg) i += 2; | 146 i += 2; /* we will specify gaim's user dir */ |
149 | 147 |
150 ret = g_new(gchar *, i); | 148 ret = g_new(gchar *, i); |
151 ret[j++] = g_strdup(myself); | 149 ret[j++] = g_strdup(myself); |
152 | 150 |
153 if (client_id) { | 151 if (client_id) { |
154 ret[j++] = g_strdup("--session"); | 152 ret[j++] = g_strdup("--session"); |
155 ret[j++] = g_strdup(client_id); | 153 ret[j++] = g_strdup(client_id); |
156 } | 154 } |
157 | 155 |
158 if (opt_rcfile_arg) { | 156 ret[j++] = g_strdup("--config"); |
159 ret[j++] = g_strdup("--file"); | 157 ret[j++] = g_strdup(gaim_user_dir()); |
160 ret[j++] = g_strdup(opt_rcfile_arg); | |
161 } | |
162 | 158 |
163 ret[j++] = NULL; | 159 ret[j++] = NULL; |
164 | 160 |
165 return ret; | 161 return ret; |
166 } | 162 } |