Mercurial > pidgin.yaz
comparison pidgin/plugins/gtkbuddynote.c @ 18626:f05360b5470d
Fix core plugin dependency registering for gtkbuddynote to happen in plugin_init() so that it can work correctly. Add an additional sanity check in the core plugin unloading so that messed up dependency registrations don't cause crashes in the future. Thanks to deryni for helping figure this out.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 24 Jul 2007 03:52:21 +0000 |
parents | a2c488006756 |
children | 44b4e8bd759b |
comparison
equal
deleted
inserted
replaced
18625:672dd03f538a | 18626:f05360b5470d |
---|---|
105 if (buddynote != NULL) { | 105 if (buddynote != NULL) { |
106 PurplePluginInfo *bninfo = buddynote->info; | 106 PurplePluginInfo *bninfo = buddynote->info; |
107 | 107 |
108 bninfo->flags = PURPLE_PLUGIN_FLAG_INVISIBLE; | 108 bninfo->flags = PURPLE_PLUGIN_FLAG_INVISIBLE; |
109 | 109 |
110 info.dependencies = g_list_append(info.dependencies, | |
111 "core-plugin_pack-buddynote"); | |
112 | 110 |
113 /* If non-gtk buddy note plugin is loaded, but we are not, then load | 111 /* If non-gtk buddy note plugin is loaded, but we are not, then load |
114 * ourselves, otherwise people upgrading from pre-gtkbuddynote days | 112 * ourselves, otherwise people upgrading from pre-gtkbuddynote days |
115 * will not have 'Buddy Notes' showing as loaded in the plugins list. | 113 * will not have 'Buddy Notes' showing as loaded in the plugins list. |
116 * We also trigger a save on the list of plugins because it's not been | 114 * We also trigger a save on the list of plugins because it's not been |
132 init_plugin(PurplePlugin *plugin) | 130 init_plugin(PurplePlugin *plugin) |
133 { | 131 { |
134 /* Use g_idle_add so that the rest of the plugins can get loaded | 132 /* Use g_idle_add so that the rest of the plugins can get loaded |
135 * before we do our check. */ | 133 * before we do our check. */ |
136 g_idle_add(check_for_buddynote, plugin); | 134 g_idle_add(check_for_buddynote, plugin); |
135 | |
136 info.dependencies = g_list_append(info.dependencies, | |
137 "core-plugin_pack-buddynote"); | |
137 } | 138 } |
138 | 139 |
139 PURPLE_INIT_PLUGIN(gtkbuddynote, init_plugin, info) | 140 PURPLE_INIT_PLUGIN(gtkbuddynote, init_plugin, info) |