Mercurial > pidgin.yaz
annotate plugins/autorecon.c @ 11159:bd8ac1d4b2f2
[gaim-migrate @ 13246]
Get rid of a bunch of gcc4 compile warnings in oscar.
Here's what I'm doing:
-For random bits of binary data, use guchar *
-For textual data (not necessarily utf8), use gchar *
This seems to be what glib and gtk do
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 26 Jul 2005 04:34:37 +0000 |
parents | 50224ac8184d |
children | bb0d7b719af2 |
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 { |
11033
50224ac8184d
[gaim-migrate @ 12919]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10942
diff
changeset
|
230 gaim_debug_register_category("autorecon"); |
8774 | 231 |
232 /* this was the suggested way to override a single function of the | |
233 real ui ops. However, there's a mild concern of having more than one | |
234 bit of code making a new ui op call-through copy. If plugins A and B | |
235 both override the ui ops (in that order), B thinks that the | |
236 overridden ui ops A created was the original. If A unloads first, | |
237 and swaps out and frees its overridden version, then B is calling | |
238 through to a free'd ui op. There needs to be a way to "stack up" | |
239 overridden ui ops or something... I have a good idea of how to write | |
240 such a creature if someone wants it done. - siege 2004-04-20 */ | |
241 | |
10748 | 242 /* get old ops, make a copy with a minor change */ |
8774 | 243 old_ops = gaim_connections_get_ui_ops(); |
244 new_ops = (GaimConnectionUiOps *) g_memdup(old_ops, | |
245 sizeof(GaimConnectionUiOps)); | |
10020 | 246 new_ops->connect_progress = connect_progress; |
247 new_ops->connected = connected; | |
248 new_ops->disconnected = disconnected; | |
249 new_ops->notice = notice; | |
8774 | 250 new_ops->report_disconnect = report_disconnect; |
251 gaim_connections_set_ui_ops(new_ops); | |
252 | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
253 hash = g_hash_table_new_full(g_int_hash, g_int_equal, NULL, |
8774 | 254 free_auto_recon); |
10748 | 255 |
10020 | 256 accountReconnecting = NULL; |
3630 | 257 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
258 gaim_signal_connect(gaim_connections_get_handle(), "signed-off", |
8774 | 259 plugin, GAIM_CALLBACK(reconnect), NULL); |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
260 |
10020 | 261 gaim_signal_connect(gaim_connections_get_handle(), "signed-on", |
262 plugin, GAIM_CALLBACK(reconnected), NULL); | |
263 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
264 return TRUE; |
3802 | 265 } |
266 | |
8774 | 267 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
268 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
269 plugin_unload(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
270 { |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
271 g_hash_table_destroy(hash); |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
272 hash = NULL; |
10748 | 273 |
10020 | 274 if (accountReconnecting) { |
275 g_slist_free(accountReconnecting); | |
276 accountReconnecting = NULL; | |
277 } | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
278 |
8774 | 279 gaim_connections_set_ui_ops(old_ops); |
280 g_free(new_ops); | |
281 old_ops = new_ops = NULL; | |
282 | |
11033
50224ac8184d
[gaim-migrate @ 12919]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10942
diff
changeset
|
283 gaim_debug_unregister_category("autorecon"); |
50224ac8184d
[gaim-migrate @ 12919]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10942
diff
changeset
|
284 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
285 return TRUE; |
3630 | 286 } |
287 | |
8774 | 288 |
10748 | 289 static |
290 GaimPluginPrefFrame *get_plugin_pref_frame(GaimPlugin *plugin) | |
291 { | |
8774 | 292 GaimPluginPrefFrame *frame = gaim_plugin_pref_frame_new(); |
293 GaimPluginPref *pref; | |
294 | |
295 pref = gaim_plugin_pref_new_with_label(_("Error Message Suppression")); | |
9549 | 296 gaim_plugin_pref_frame_add(frame, pref); |
8774 | 297 |
298 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_CONNECTED, | |
299 _("Hide Disconnect Errors")); | |
300 gaim_plugin_pref_frame_add(frame, pref); | |
301 | |
302 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_CONNECTING, | |
303 _("Hide Login Errors")); | |
304 gaim_plugin_pref_frame_add(frame, pref); | |
305 | |
10020 | 306 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_RECONNECTING_DIALOG, |
307 _("Hide Reconnecting Dialog")); | |
308 gaim_plugin_pref_frame_add(frame, pref); | |
309 | |
8774 | 310 return frame; |
311 } | |
312 | |
313 | |
314 static GaimPluginUiInfo pref_info = { | |
315 get_plugin_pref_frame | |
316 }; | |
317 | |
318 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
319 static GaimPluginInfo info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
320 { |
9943 | 321 GAIM_PLUGIN_MAGIC, |
322 GAIM_MAJOR_VERSION, | |
323 GAIM_MINOR_VERSION, | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
324 GAIM_PLUGIN_STANDARD, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
325 NULL, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
326 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
327 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
328 GAIM_PRIORITY_DEFAULT, /**< priority */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
329 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
330 AUTORECON_PLUGIN_ID, /**< id */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
331 N_("Auto-Reconnect"), /**< name */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
332 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
333 /** summary */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
334 N_("When you are kicked offline, this reconnects you."), |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
335 /** description */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
336 N_("When you are kicked offline, this reconnects you."), |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
337 "Eric Warmenhoven <eric@warmenhoven.org>", /**< author */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
338 GAIM_WEBSITE, /**< homepage */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
339 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
340 plugin_load, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
341 plugin_unload, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
342 NULL, /**< destroy */ |
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 NULL, /**< ui_info */ |
8774 | 345 NULL, /**< extra_info */ |
8993 | 346 &pref_info, /**< prefs_info */ |
347 NULL | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
348 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
349 |
8774 | 350 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
351 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
352 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
353 { |
8774 | 354 gaim_prefs_add_none(AUTORECON_OPT); |
355 gaim_prefs_add_bool(OPT_HIDE_CONNECTED, FALSE); | |
356 gaim_prefs_add_bool(OPT_HIDE_CONNECTING, FALSE); | |
10020 | 357 gaim_prefs_add_bool(OPT_HIDE_RECONNECTING_DIALOG, FALSE); |
9971 | 358 gaim_prefs_remove(OPT_RESTORE_STATE); |
3630 | 359 } |
360 | |
6063 | 361 GAIM_INIT_PLUGIN(autorecon, init_plugin, info) |