aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-07-11 12:15:08 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-08-06 20:06:46 +0200
commit884aa7f2eb944ed70c3aa33b41631aa7138f854d (patch)
treea53063cda0453d2682256fda86e575372fb49b41
parent9be646f274c431f55cf89cc9109a1c9a9c931537 (diff)
plugin-manager: simplify by iterating the list ourselves
-rw-r--r--src/mm-plugin-manager.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mm-plugin-manager.c b/src/mm-plugin-manager.c
index 8eca73c7..1d034a9c 100644
--- a/src/mm-plugin-manager.c
+++ b/src/mm-plugin-manager.c
@@ -549,12 +549,6 @@ out:
return plugin;
}
-static void
-found_plugin (MMPlugin *plugin)
-{
- mm_info ("Loaded plugin '%s'", mm_plugin_get_name (plugin));
-}
-
static gboolean
load_plugins (MMPluginManager *self,
GError **error)
@@ -563,6 +557,7 @@ load_plugins (MMPluginManager *self,
const gchar *fname;
MMPlugin *generic_plugin = NULL;
gchar *plugindir_display = NULL;
+ GList *l;
if (!g_module_supported ()) {
g_set_error (error,
@@ -628,7 +623,8 @@ load_plugins (MMPluginManager *self,
/* Now report about all the found plugins, in the same order they will be
* used while checking support */
- g_list_foreach (self->priv->plugins, (GFunc)found_plugin, NULL);
+ for (l = self->priv->plugins; l; l = g_list_next (l))
+ mm_info ("Loaded plugin '%s'", mm_plugin_get_name (MM_PLUGIN (l->data)));
mm_info ("Successfully loaded %u plugins",
g_list_length (self->priv->plugins));