Mercurial > pidgin
comparison libgaim/plugin.c @ 14725:62366c6a10eb
[gaim-migrate @ 17479]
Make sure plugins are marked not-loadable if their ui-requirement can't be met.
You are going to need to rebuild all the non-core plugins.
The UI specific plugins for Gaim specifies their ui-requirement in the plugin
structure. So it'd make sense to load such plugins only if the ui-requirement
can be met. As it happens, gntgf (a gnt-plugin for gaim-text) can be loaded from
Gaim, which has been reported to have caused Gaim to freeze. gntgf does mark
itself as a gnt-plugin. So I think it should be upto libgaim to make sure
plugins are marked not-loadable if the ui-requirements can not be met.
This commit does exactly that. In doing so, it changes the string plugins
use to specify their ui-requirement (the change is from "gtk" to GAIM_GTK_UI --
which is "gtk-gaim"). So this will require all the non-core plugins to be
rebuilt.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 14 Oct 2006 05:29:11 +0000 |
parents | 60b1bc8dbf37 |
children | f93d632ac8d8 |
comparison
equal
deleted
inserted
replaced
14724:d9bd8925efcc | 14725:62366c6a10eb |
---|---|
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 */ | 21 */ |
22 #include "internal.h" | 22 #include "internal.h" |
23 | 23 |
24 #include "accountopt.h" | 24 #include "accountopt.h" |
25 #include "core.h" | |
25 #include "dbus-maybe.h" | 26 #include "dbus-maybe.h" |
26 #include "debug.h" | 27 #include "debug.h" |
27 #include "notify.h" | 28 #include "notify.h" |
28 #include "prefs.h" | 29 #include "prefs.h" |
29 #include "prpl.h" | 30 #include "prpl.h" |
355 | 356 |
356 if (!gaim_init_plugin(plugin) || plugin->info == NULL) | 357 if (!gaim_init_plugin(plugin) || plugin->info == NULL) |
357 { | 358 { |
358 gaim_plugin_destroy(plugin); | 359 gaim_plugin_destroy(plugin); |
359 return NULL; | 360 return NULL; |
361 } | |
362 else if (plugin->info->ui_requirement && | |
363 strcmp(plugin->info->ui_requirement, gaim_core_get_ui())) | |
364 { | |
365 plugin->error = g_strdup_printf("The UI requirement for this plugin is not met."); | |
366 gaim_debug_error("plugins", "%s is not loadable: The UI requirement is not met.", plugin->path); | |
367 plugin->unloadable = TRUE; | |
368 return plugin; | |
360 } | 369 } |
361 | 370 |
362 /* Really old plugins. */ | 371 /* Really old plugins. */ |
363 if (plugin->info->magic != GAIM_PLUGIN_MAGIC) | 372 if (plugin->info->magic != GAIM_PLUGIN_MAGIC) |
364 { | 373 { |