/soc/2013/ankitkv/gobjectification: e74da88fd308: Refactored nul...
Ankit Vani
a at nevitus.org
Mon Jul 29 18:36:40 EDT 2013
Changeset: e74da88fd3083d415c025279407e695170b3d1dd
Author: Ankit Vani <a at nevitus.org>
Date: 2013-07-30 04:06 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/e74da88fd308
Description:
Refactored nullclient to use the initial GObject plugin API
diffstat:
libpurple/example/nullclient.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (41 lines):
diff --git a/libpurple/example/nullclient.c b/libpurple/example/nullclient.c
--- a/libpurple/example/nullclient.c
+++ b/libpurple/example/nullclient.c
@@ -198,11 +198,6 @@ init_libpurple(void)
* copy this verbatim. */
purple_eventloop_set_ui_ops(&glib_eventloops);
- /* Set path to search for plugins. The core (libpurple) takes care of loading the
- * core-plugins, which includes the protocol-plugins. So it is not essential to add
- * any path here, but it might be desired, especially for ui-specific plugins. */
- purple_plugins_add_search_path(CUSTOM_PLUGIN_PATH);
-
/* Now that all the essential stuff has been set, let's try to init the core. It's
* necessary to provide a non-NULL name for the current ui to the core. This name
* is used by stuff that depends on this ui, for example the ui-specific plugins. */
@@ -214,6 +209,12 @@ init_libpurple(void)
abort();
}
+ /* Set path to search for plugins. The core (libpurple) takes care of loading the
+ * core-plugins, which includes the protocol-plugins. So it is not essential to add
+ * any path here, but it might be desired, especially for ui-specific plugins. */
+ gplugin_plugin_manager_append_path(CUSTOM_PLUGIN_PATH);
+ gplugin_plugin_manager_refresh();
+
/* Load the preferences. */
purple_prefs_load();
@@ -263,10 +264,9 @@ int main(int argc, char *argv[])
printf("libpurple initialized.\n");
- iter = purple_plugins_get_protocols();
+ iter = purple_protocols_get_all();
for (i = 0; iter; iter = iter->next) {
- PurplePlugin *plugin = iter->data;
- PurplePluginInfo *info = plugin->info;
+ PurplePluginProtocolInfo *info = iter->data;
if (info && info->name) {
printf("\t%d: %s\n", i++, info->name);
names = g_list_append(names, (gpointer)info->id);
More information about the Commits
mailing list