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