/soc/2013/ankitkv/gobjectification: 380500e9aff2: Fixed the type...

Ankit Vani a at nevitus.org
Mon Aug 5 17:42:39 EDT 2013


Changeset: 380500e9aff26397b95a6393103fb00d0dab4ecb
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-08-06 03:11 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/380500e9aff2

Description:

Fixed the type of pref used to store loaded plugins, and added some debug messages

diffstat:

 libpurple/plugins.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (45 lines):

diff --git a/libpurple/plugins.c b/libpurple/plugins.c
--- a/libpurple/plugins.c
+++ b/libpurple/plugins.c
@@ -85,8 +85,12 @@ purple_plugin_load(PurplePlugin *plugin)
 		return FALSE;
 	}
 
-	if (!purple_plugin_is_loadable(plugin))
+	if (!purple_plugin_is_loadable(plugin)) {
+		purple_debug_error("plugins", "Failed to load plugin %s: %s",
+				purple_plugin_get_filename(plugin),
+				purple_plugin_get_error(plugin));
 		return FALSE;
+	}
 
 	if (!gplugin_plugin_manager_load_plugin(plugin, &error)) {
 		purple_debug_error("plugins", "Failed to load plugin %s: %s",
@@ -97,6 +101,9 @@ purple_plugin_load(PurplePlugin *plugin)
 
 	loaded_plugins = g_list_append(loaded_plugins, plugin);
 
+	purple_debug_info("plugins", "Loaded plugin %s\n",
+			purple_plugin_get_filename(plugin));
+
 	purple_signal_emit(purple_plugins_get_handle(), "plugin-load", plugin);
 
 	return TRUE;
@@ -788,7 +795,7 @@ purple_plugins_save_loaded(const char *k
 			files = g_list_append(files, (gchar *)purple_plugin_get_filename(plugin));
 	}
 
-	purple_prefs_set_string_list(key, files);
+	purple_prefs_set_path_list(key, files);
 	g_list_free(files);
 #endif
 }
@@ -801,7 +808,7 @@ purple_plugins_load_saved(const char *ke
 
 	g_return_if_fail(key != NULL && *key != '\0');
 
-	files = purple_prefs_get_string_list(key);
+	files = purple_prefs_get_path_list(key);
 
 	for (l = files; l; l = l->next)
 	{



More information about the Commits mailing list