comparison libpurple/plugins/autoaccept.c @ 31528:40e5d8c3acca

Migrate the pref the previous commit dropped. Refs #11459.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Thu, 30 Dec 2010 00:58:17 +0000
parents 5f4329c3eafe
children dd2f19faee14
comparison
equal deleted inserted replaced
31527:5f4329c3eafe 31528:40e5d8c3acca
46 #define PREF_STRANGER PREF_PREFIX "/stranger" 46 #define PREF_STRANGER PREF_PREFIX "/stranger"
47 #define PREF_NOTIFY PREF_PREFIX "/notify" 47 #define PREF_NOTIFY PREF_PREFIX "/notify"
48 #define PREF_NEWDIR PREF_PREFIX "/newdir" 48 #define PREF_NEWDIR PREF_PREFIX "/newdir"
49 #define PREF_ESCAPE PREF_PREFIX "/escape" 49 #define PREF_ESCAPE PREF_PREFIX "/escape"
50 50
51 #define PREF_STRANGER_OLD PREF_PREFIX "/reject_stranger"
52
51 typedef enum 53 typedef enum
52 { 54 {
53 FT_ASK, 55 FT_ASK,
54 FT_ACCEPT, 56 FT_ACCEPT,
55 FT_REJECT 57 FT_REJECT
226 } 228 }
227 229
228 static gboolean 230 static gboolean
229 plugin_load(PurplePlugin *plugin) 231 plugin_load(PurplePlugin *plugin)
230 { 232 {
233 /* migrate the old pref (we should only care if the plugin is actually *used*) */
234 if(purple_prefs_get_bool(PREF_STRANGER_OLD)) {
235 purple_prefs_set_int(PREF_STRANGER, FT_REJECT);
236 purple_prefs_remove(PREF_STRANGER_OLD);
237 }
238
231 purple_signal_connect(purple_xfers_get_handle(), "file-recv-request", plugin, 239 purple_signal_connect(purple_xfers_get_handle(), "file-recv-request", plugin,
232 PURPLE_CALLBACK(file_recv_request_cb), plugin); 240 PURPLE_CALLBACK(file_recv_request_cb), plugin);
233 purple_signal_connect(purple_blist_get_handle(), "blist-node-extended-menu", plugin, 241 purple_signal_connect(purple_blist_get_handle(), "blist-node-extended-menu", plugin,
234 PURPLE_CALLBACK(context_menu), plugin); 242 PURPLE_CALLBACK(context_menu), plugin);
235 return TRUE; 243 return TRUE;