Mercurial > pidgin.yaz
annotate plugins/autorecon.c @ 10845:3d7311bde284
[gaim-migrate @ 12517]
sf patch #1184976, from Richard Laager
"This contact-izes the View Log in the conversation window
correctly."
Richard, you may want to double-check my changes to the for loop.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 19 Apr 2005 03:52:18 +0000 |
parents | bb6fea81e770 |
children | 77cb56ff14e1 |
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 | |
205 if (accountReconnecting == NULL) | |
206 return; | |
207 | |
10020 | 208 account = gaim_connection_get_account(gc); |
209 | |
210 accountReconnecting = g_slist_remove(accountReconnecting, account); | |
211 } | |
212 | |
213 static void | |
6113 | 214 free_auto_recon(gpointer data) |
215 { | |
216 GaimAutoRecon *info = data; | |
217 | |
218 if (info->timeout != 0) | |
219 g_source_remove(info->timeout); | |
220 | |
221 g_free(info); | |
222 } | |
223 | |
8774 | 224 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
225 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
226 plugin_load(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
227 { |
8774 | 228 |
229 /* this was the suggested way to override a single function of the | |
230 real ui ops. However, there's a mild concern of having more than one | |
231 bit of code making a new ui op call-through copy. If plugins A and B | |
232 both override the ui ops (in that order), B thinks that the | |
233 overridden ui ops A created was the original. If A unloads first, | |
234 and swaps out and frees its overridden version, then B is calling | |
235 through to a free'd ui op. There needs to be a way to "stack up" | |
236 overridden ui ops or something... I have a good idea of how to write | |
237 such a creature if someone wants it done. - siege 2004-04-20 */ | |
238 | |
10748 | 239 /* get old ops, make a copy with a minor change */ |
8774 | 240 old_ops = gaim_connections_get_ui_ops(); |
241 new_ops = (GaimConnectionUiOps *) g_memdup(old_ops, | |
242 sizeof(GaimConnectionUiOps)); | |
10020 | 243 new_ops->connect_progress = connect_progress; |
244 new_ops->connected = connected; | |
245 new_ops->disconnected = disconnected; | |
246 new_ops->notice = notice; | |
8774 | 247 new_ops->report_disconnect = report_disconnect; |
248 gaim_connections_set_ui_ops(new_ops); | |
249 | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
250 hash = g_hash_table_new_full(g_int_hash, g_int_equal, NULL, |
8774 | 251 free_auto_recon); |
10748 | 252 |
10020 | 253 accountReconnecting = NULL; |
3630 | 254 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
255 gaim_signal_connect(gaim_connections_get_handle(), "signed-off", |
8774 | 256 plugin, GAIM_CALLBACK(reconnect), NULL); |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
257 |
10020 | 258 gaim_signal_connect(gaim_connections_get_handle(), "signed-on", |
259 plugin, GAIM_CALLBACK(reconnected), NULL); | |
260 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
261 return TRUE; |
3802 | 262 } |
263 | |
8774 | 264 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
265 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
266 plugin_unload(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
267 { |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
268 g_hash_table_destroy(hash); |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
269 hash = NULL; |
10748 | 270 |
10020 | 271 if (accountReconnecting) { |
272 g_slist_free(accountReconnecting); | |
273 accountReconnecting = NULL; | |
274 } | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
275 |
8774 | 276 gaim_connections_set_ui_ops(old_ops); |
277 g_free(new_ops); | |
278 old_ops = new_ops = NULL; | |
279 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
280 return TRUE; |
3630 | 281 } |
282 | |
8774 | 283 |
10748 | 284 static |
285 GaimPluginPrefFrame *get_plugin_pref_frame(GaimPlugin *plugin) | |
286 { | |
8774 | 287 GaimPluginPrefFrame *frame = gaim_plugin_pref_frame_new(); |
288 GaimPluginPref *pref; | |
289 | |
290 pref = gaim_plugin_pref_new_with_label(_("Error Message Suppression")); | |
9549 | 291 gaim_plugin_pref_frame_add(frame, pref); |
8774 | 292 |
293 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_CONNECTED, | |
294 _("Hide Disconnect Errors")); | |
295 gaim_plugin_pref_frame_add(frame, pref); | |
296 | |
297 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_CONNECTING, | |
298 _("Hide Login Errors")); | |
299 gaim_plugin_pref_frame_add(frame, pref); | |
300 | |
10020 | 301 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_RECONNECTING_DIALOG, |
302 _("Hide Reconnecting Dialog")); | |
303 gaim_plugin_pref_frame_add(frame, pref); | |
304 | |
8774 | 305 return frame; |
306 } | |
307 | |
308 | |
309 static GaimPluginUiInfo pref_info = { | |
310 get_plugin_pref_frame | |
311 }; | |
312 | |
313 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
314 static GaimPluginInfo info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
315 { |
9943 | 316 GAIM_PLUGIN_MAGIC, |
317 GAIM_MAJOR_VERSION, | |
318 GAIM_MINOR_VERSION, | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
319 GAIM_PLUGIN_STANDARD, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
320 NULL, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
321 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
322 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
323 GAIM_PRIORITY_DEFAULT, /**< priority */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
324 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
325 AUTORECON_PLUGIN_ID, /**< id */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
326 N_("Auto-Reconnect"), /**< name */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
327 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
328 /** summary */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
329 N_("When you are kicked offline, this reconnects you."), |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
330 /** description */ |
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 "Eric Warmenhoven <eric@warmenhoven.org>", /**< author */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
333 GAIM_WEBSITE, /**< homepage */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
334 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
335 plugin_load, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
336 plugin_unload, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
337 NULL, /**< destroy */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
338 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
339 NULL, /**< ui_info */ |
8774 | 340 NULL, /**< extra_info */ |
8993 | 341 &pref_info, /**< prefs_info */ |
342 NULL | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
343 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
344 |
8774 | 345 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
346 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
347 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
348 { |
8774 | 349 gaim_prefs_add_none(AUTORECON_OPT); |
350 gaim_prefs_add_bool(OPT_HIDE_CONNECTED, FALSE); | |
351 gaim_prefs_add_bool(OPT_HIDE_CONNECTING, FALSE); | |
10020 | 352 gaim_prefs_add_bool(OPT_HIDE_RECONNECTING_DIALOG, FALSE); |
9971 | 353 gaim_prefs_remove(OPT_RESTORE_STATE); |
3630 | 354 } |
355 | |
6063 | 356 GAIM_INIT_PLUGIN(autorecon, init_plugin, info) |