Mercurial > pidgin
annotate plugins/autorecon.c @ 11692:969fb599cc1b
[gaim-migrate @ 13978]
go away
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 18 Oct 2005 02:54:26 +0000 |
parents | a32bf50ee5d1 |
children |
rev | line source |
---|---|
11633 | 1 /* |
2 * TODO: Are we getting rid of this, now that this functionality | |
3 * is in the core? Can we get rid of those preferences? I | |
4 * think we should be ok with always attempting to reconnect | |
5 * and never showing disconnected/reconnected messages. | |
6 * --KingAnt | |
7 * | |
8 * If we keep this file, we need to add the GPL header here. | |
9 */ | |
10 | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5607
diff
changeset
|
11 #include "internal.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5607
diff
changeset
|
12 |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5607
diff
changeset
|
13 #include "connection.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5607
diff
changeset
|
14 #include "debug.h" |
8774 | 15 #include "pluginpref.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5607
diff
changeset
|
16 #include "prpl.h" |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
17 #include "signals.h" |
9943 | 18 #include "version.h" |
4202
59751fe608c5
[gaim-migrate @ 4438]
Christian Hammond <chipx86@chipx86.com>
parents:
4113
diff
changeset
|
19 |
8774 | 20 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
21 #define AUTORECON_PLUGIN_ID "core-autorecon" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
22 |
2216
66783ad29e55
[gaim-migrate @ 2226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1818
diff
changeset
|
23 #define INITIAL 8000 |
4590 | 24 #define MAXTIME 2048000 |
2216
66783ad29e55
[gaim-migrate @ 2226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1818
diff
changeset
|
25 |
6113 | 26 typedef struct { |
27 int delay; | |
28 guint timeout; | |
29 } GaimAutoRecon; | |
2216
66783ad29e55
[gaim-migrate @ 2226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1818
diff
changeset
|
30 |
6113 | 31 static GHashTable *hash = NULL; |
8774 | 32 |
10020 | 33 static GSList *accountReconnecting = NULL; |
34 | |
8774 | 35 #define AUTORECON_OPT "/plugins/core/autorecon" |
10020 | 36 #define OPT_HIDE_CONNECTED AUTORECON_OPT "/hide_connected_error" |
37 #define OPT_HIDE_CONNECTING AUTORECON_OPT "/hide_connecting_error" | |
38 #define OPT_RESTORE_STATE AUTORECON_OPT "/restore_state" | |
39 #define OPT_HIDE_RECONNECTING_DIALOG AUTORECON_OPT "/hide_reconnecting_dialog" | |
8774 | 40 |
41 /* storage of original (old_ops) and modified (new_ops) ui ops to allow us to | |
42 intercept calls to report_disconnect */ | |
43 static GaimConnectionUiOps *old_ops = NULL; | |
44 static GaimConnectionUiOps *new_ops = NULL; | |
45 | |
10748 | 46 static void |
47 connect_progress(GaimConnection *gc, const char *text, | |
48 size_t step, size_t step_count) | |
49 { | |
50 if (old_ops == NULL || old_ops->connect_progress == NULL) { | |
10020 | 51 /* there's nothing to call through to, so don't bother |
52 checking prefs */ | |
53 return; | |
10748 | 54 } else if (gaim_prefs_get_bool(OPT_HIDE_RECONNECTING_DIALOG) && accountReconnecting && |
10020 | 55 g_slist_find(accountReconnecting, gc->account)) { |
56 /* this is a reconnecting, and we're hiding those */ | |
57 gaim_debug(GAIM_DEBUG_INFO, "autorecon", | |
58 "hide connecting dialog while reconnecting\n"); | |
59 return; | |
60 } | |
10748 | 61 |
10020 | 62 old_ops->connect_progress(gc, text, step, step_count); |
63 } | |
64 | |
10748 | 65 static void |
66 connected(GaimConnection *gc) | |
67 { | |
68 if (old_ops == NULL || old_ops->connected == NULL) { | |
10020 | 69 /* there's nothing to call through to, so don't bother |
70 checking prefs */ | |
71 return; | |
10748 | 72 } else if (gaim_prefs_get_bool(OPT_HIDE_RECONNECTING_DIALOG) && accountReconnecting && |
10020 | 73 g_slist_find(accountReconnecting, gc->account)) { |
74 /* this is a reconnecting, and we're hiding those */ | |
75 gaim_debug(GAIM_DEBUG_INFO, "autorecon", | |
76 "hide connecting dialog while reconnecting\n"); | |
77 return; | |
78 } | |
10748 | 79 |
10020 | 80 old_ops->connected(gc); |
81 } | |
82 | |
10748 | 83 static void |
84 disconnected(GaimConnection *gc) | |
85 { | |
86 if (old_ops == NULL || old_ops->disconnected == NULL) { | |
10020 | 87 /* there's nothing to call through to, so don't bother |
88 checking prefs */ | |
89 return; | |
10748 | 90 } else if (gaim_prefs_get_bool(OPT_HIDE_RECONNECTING_DIALOG) && accountReconnecting && |
10020 | 91 g_slist_find(accountReconnecting, gc->account)) { |
92 /* this is a reconnecting, and we're hiding those */ | |
93 gaim_debug(GAIM_DEBUG_INFO, "autorecon", | |
94 "hide connecting dialog while reconnecting\n"); | |
95 return; | |
96 } | |
10748 | 97 |
10020 | 98 old_ops->disconnected(gc); |
99 } | |
100 | |
10748 | 101 static void |
102 notice(GaimConnection *gc, const char *text) | |
103 { | |
104 if (old_ops == NULL || old_ops->notice == NULL) { | |
10020 | 105 /* there's nothing to call through to, so don't bother |
106 checking prefs */ | |
107 return; | |
10748 | 108 } else if (gaim_prefs_get_bool(OPT_HIDE_RECONNECTING_DIALOG) && accountReconnecting && |
10020 | 109 g_slist_find(accountReconnecting, gc->account)) { |
110 /* this is a reconnecting, and we're hiding those */ | |
111 gaim_debug(GAIM_DEBUG_INFO, "autorecon", | |
112 "hide connecting dialog while reconnecting\n"); | |
113 } | |
10748 | 114 |
10020 | 115 old_ops->notice(gc, text); |
116 } | |
8774 | 117 |
10748 | 118 static void |
119 report_disconnect(GaimConnection *gc, const char *text) | |
120 { | |
121 if (old_ops == NULL || old_ops->report_disconnect == NULL) { | |
8774 | 122 /* there's nothing to call through to, so don't bother |
123 checking prefs */ | |
124 return; | |
125 | |
10748 | 126 } else if (gc->state == GAIM_CONNECTED |
8774 | 127 && gaim_prefs_get_bool(OPT_HIDE_CONNECTED)) { |
128 /* this is a connected error, and we're hiding those */ | |
129 gaim_debug(GAIM_DEBUG_INFO, "autorecon", | |
10345 | 130 "hid disconnect error message (%s)\n", text); |
8774 | 131 return; |
132 | |
10748 | 133 } else if (gc->state == GAIM_CONNECTING |
8774 | 134 && gaim_prefs_get_bool(OPT_HIDE_CONNECTING)) { |
135 /* this is a connecting error, and we're hiding those */ | |
136 gaim_debug(GAIM_DEBUG_INFO, "autorecon", | |
10345 | 137 "hid error message while connecting (%s)\n", text); |
8774 | 138 return; |
139 } | |
140 | |
141 /* if we haven't returned by now, then let's pass to the real | |
142 function */ | |
143 old_ops->report_disconnect(gc, text); | |
144 } | |
145 | |
146 | |
10748 | 147 static gboolean |
148 do_signon(gpointer data) | |
149 { | |
5587
1c55b1540e18
[gaim-migrate @ 5991]
Christian Hammond <chipx86@chipx86.com>
parents:
5227
diff
changeset
|
150 GaimAccount *account = data; |
6113 | 151 GaimAutoRecon *info; |
152 | |
5227
6d1707dc8c3d
[gaim-migrate @ 5597]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
153 gaim_debug(GAIM_DEBUG_INFO, "autorecon", "do_signon called\n"); |
6113 | 154 g_return_val_if_fail(account != NULL, FALSE); |
155 info = g_hash_table_lookup(hash, account); | |
4494
b5a50a6a13b0
[gaim-migrate @ 4769]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
4491
diff
changeset
|
156 |
5607 | 157 if (g_list_index(gaim_accounts_get_all(), account) < 0) |
1817
b367beee6448
[gaim-migrate @ 1827]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1404
diff
changeset
|
158 return FALSE; |
6113 | 159 |
10748 | 160 if (info) |
7372 | 161 info->timeout = 0; |
162 | |
5587
1c55b1540e18
[gaim-migrate @ 5991]
Christian Hammond <chipx86@chipx86.com>
parents:
5227
diff
changeset
|
163 gaim_debug(GAIM_DEBUG_INFO, "autorecon", "calling gaim_account_connect\n"); |
10738 | 164 gaim_account_connect(account); |
5587
1c55b1540e18
[gaim-migrate @ 5991]
Christian Hammond <chipx86@chipx86.com>
parents:
5227
diff
changeset
|
165 gaim_debug(GAIM_DEBUG_INFO, "autorecon", "done calling gaim_account_connect\n"); |
6113 | 166 |
1817
b367beee6448
[gaim-migrate @ 1827]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1404
diff
changeset
|
167 return FALSE; |
1378
aedeb1218a0a
[gaim-migrate @ 1388]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1165
diff
changeset
|
168 } |
aedeb1218a0a
[gaim-migrate @ 1388]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1165
diff
changeset
|
169 |
8774 | 170 |
10748 | 171 static void |
172 reconnect(GaimConnection *gc, void *m) | |
173 { | |
6113 | 174 GaimAccount *account; |
175 GaimAutoRecon *info; | |
10020 | 176 GSList* listAccount; |
6113 | 177 |
178 g_return_if_fail(gc != NULL); | |
179 account = gaim_connection_get_account(gc); | |
180 info = g_hash_table_lookup(hash, account); | |
10020 | 181 if (accountReconnecting) |
182 listAccount = g_slist_find(accountReconnecting, account); | |
183 else | |
184 listAccount = NULL; | |
6113 | 185 |
2216
66783ad29e55
[gaim-migrate @ 2226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1818
diff
changeset
|
186 if (!gc->wants_to_die) { |
6113 | 187 if (info == NULL) { |
188 info = g_new0(GaimAutoRecon, 1); | |
189 g_hash_table_insert(hash, account, info); | |
190 info->delay = INITIAL; | |
8249 | 191 } else { |
6113 | 192 info->delay = MIN(2 * info->delay, MAXTIME); |
8250 | 193 if (info->timeout != 0) |
194 g_source_remove(info->timeout); | |
8249 | 195 } |
6113 | 196 info->timeout = g_timeout_add(info->delay, do_signon, account); |
10748 | 197 |
10020 | 198 if (!listAccount) |
199 accountReconnecting = g_slist_prepend(accountReconnecting, account); | |
6113 | 200 } else if (info != NULL) { |
201 g_hash_table_remove(hash, account); | |
10748 | 202 |
10020 | 203 if (listAccount) |
204 accountReconnecting = g_slist_delete_link(accountReconnecting, listAccount); | |
2216
66783ad29e55
[gaim-migrate @ 2226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1818
diff
changeset
|
205 } |
9546 | 206 } |
8774 | 207 |
6113 | 208 static void |
10748 | 209 reconnected(GaimConnection *gc, void *m) |
210 { | |
10020 | 211 GaimAccount *account; |
212 | |
10574 | 213 g_return_if_fail(gc != NULL); |
214 | |
10942 | 215 account = gaim_connection_get_account(gc); |
216 | |
217 g_hash_table_remove(hash, account); | |
218 | |
10574 | 219 if (accountReconnecting == NULL) |
220 return; | |
221 | |
10020 | 222 accountReconnecting = g_slist_remove(accountReconnecting, account); |
223 } | |
224 | |
225 static void | |
6113 | 226 free_auto_recon(gpointer data) |
227 { | |
228 GaimAutoRecon *info = data; | |
229 | |
230 if (info->timeout != 0) | |
231 g_source_remove(info->timeout); | |
232 | |
233 g_free(info); | |
234 } | |
235 | |
8774 | 236 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
237 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
238 plugin_load(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
239 { |
8774 | 240 /* this was the suggested way to override a single function of the |
241 real ui ops. However, there's a mild concern of having more than one | |
242 bit of code making a new ui op call-through copy. If plugins A and B | |
243 both override the ui ops (in that order), B thinks that the | |
244 overridden ui ops A created was the original. If A unloads first, | |
245 and swaps out and frees its overridden version, then B is calling | |
246 through to a free'd ui op. There needs to be a way to "stack up" | |
247 overridden ui ops or something... I have a good idea of how to write | |
248 such a creature if someone wants it done. - siege 2004-04-20 */ | |
249 | |
10748 | 250 /* get old ops, make a copy with a minor change */ |
8774 | 251 old_ops = gaim_connections_get_ui_ops(); |
252 new_ops = (GaimConnectionUiOps *) g_memdup(old_ops, | |
253 sizeof(GaimConnectionUiOps)); | |
10020 | 254 new_ops->connect_progress = connect_progress; |
255 new_ops->connected = connected; | |
256 new_ops->disconnected = disconnected; | |
257 new_ops->notice = notice; | |
8774 | 258 new_ops->report_disconnect = report_disconnect; |
259 gaim_connections_set_ui_ops(new_ops); | |
260 | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
261 hash = g_hash_table_new_full(g_int_hash, g_int_equal, NULL, |
8774 | 262 free_auto_recon); |
10748 | 263 |
10020 | 264 accountReconnecting = NULL; |
3630 | 265 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
266 gaim_signal_connect(gaim_connections_get_handle(), "signed-off", |
8774 | 267 plugin, GAIM_CALLBACK(reconnect), NULL); |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
268 |
10020 | 269 gaim_signal_connect(gaim_connections_get_handle(), "signed-on", |
270 plugin, GAIM_CALLBACK(reconnected), NULL); | |
271 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
272 return TRUE; |
3802 | 273 } |
274 | |
8774 | 275 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
276 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
277 plugin_unload(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
278 { |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
279 g_hash_table_destroy(hash); |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
280 hash = NULL; |
10748 | 281 |
10020 | 282 if (accountReconnecting) { |
283 g_slist_free(accountReconnecting); | |
284 accountReconnecting = NULL; | |
285 } | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
286 |
8774 | 287 gaim_connections_set_ui_ops(old_ops); |
288 g_free(new_ops); | |
289 old_ops = new_ops = NULL; | |
290 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
291 return TRUE; |
3630 | 292 } |
293 | |
8774 | 294 |
10748 | 295 static |
296 GaimPluginPrefFrame *get_plugin_pref_frame(GaimPlugin *plugin) | |
297 { | |
8774 | 298 GaimPluginPrefFrame *frame = gaim_plugin_pref_frame_new(); |
299 GaimPluginPref *pref; | |
300 | |
301 pref = gaim_plugin_pref_new_with_label(_("Error Message Suppression")); | |
9549 | 302 gaim_plugin_pref_frame_add(frame, pref); |
8774 | 303 |
304 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_CONNECTED, | |
305 _("Hide Disconnect Errors")); | |
306 gaim_plugin_pref_frame_add(frame, pref); | |
307 | |
308 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_CONNECTING, | |
309 _("Hide Login Errors")); | |
310 gaim_plugin_pref_frame_add(frame, pref); | |
311 | |
10020 | 312 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_RECONNECTING_DIALOG, |
313 _("Hide Reconnecting Dialog")); | |
314 gaim_plugin_pref_frame_add(frame, pref); | |
315 | |
8774 | 316 return frame; |
317 } | |
318 | |
319 | |
320 static GaimPluginUiInfo pref_info = { | |
321 get_plugin_pref_frame | |
322 }; | |
323 | |
324 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
325 static GaimPluginInfo info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
326 { |
9943 | 327 GAIM_PLUGIN_MAGIC, |
328 GAIM_MAJOR_VERSION, | |
329 GAIM_MINOR_VERSION, | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
330 GAIM_PLUGIN_STANDARD, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
331 NULL, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
332 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
333 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
334 GAIM_PRIORITY_DEFAULT, /**< priority */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
335 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
336 AUTORECON_PLUGIN_ID, /**< id */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
337 N_("Auto-Reconnect"), /**< name */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
338 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
339 /** summary */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
340 N_("When you are kicked offline, this reconnects you."), |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
341 /** description */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
342 N_("When you are kicked offline, this reconnects you."), |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
343 "Eric Warmenhoven <eric@warmenhoven.org>", /**< author */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
344 GAIM_WEBSITE, /**< homepage */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
345 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
346 plugin_load, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
347 plugin_unload, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
348 NULL, /**< destroy */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
349 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
350 NULL, /**< ui_info */ |
8774 | 351 NULL, /**< extra_info */ |
8993 | 352 &pref_info, /**< prefs_info */ |
353 NULL | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
354 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
355 |
8774 | 356 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
357 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
358 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
359 { |
8774 | 360 gaim_prefs_add_none(AUTORECON_OPT); |
361 gaim_prefs_add_bool(OPT_HIDE_CONNECTED, FALSE); | |
362 gaim_prefs_add_bool(OPT_HIDE_CONNECTING, FALSE); | |
10020 | 363 gaim_prefs_add_bool(OPT_HIDE_RECONNECTING_DIALOG, FALSE); |
9971 | 364 gaim_prefs_remove(OPT_RESTORE_STATE); |
3630 | 365 } |
366 | |
6063 | 367 GAIM_INIT_PLUGIN(autorecon, init_plugin, info) |