aboutsummaryrefslogtreecommitdiff
path: root/src/ka-plugin-loader.c
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2013-03-31 16:24:35 +0200
committerGuido Günther <agx@sigxcpu.org>2013-03-31 16:24:35 +0200
commit6c66f3c0bfc6c655c53e552ba8ef487700a6e0bc (patch)
treeec0da0d6be6e02f3e237ec35743f213df218f7d2 /src/ka-plugin-loader.c
parentNew upstream version 3.2.1 (diff)
downloadkrb5-auth-dialog-6c66f3c0bfc6c655c53e552ba8ef487700a6e0bc.tar.gz
krb5-auth-dialog-6c66f3c0bfc6c655c53e552ba8ef487700a6e0bc.tar.bz2
krb5-auth-dialog-6c66f3c0bfc6c655c53e552ba8ef487700a6e0bc.zip
New upstream version 3.8.0
Diffstat (limited to 'src/ka-plugin-loader.c')
-rw-r--r--src/ka-plugin-loader.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/ka-plugin-loader.c b/src/ka-plugin-loader.c
index 2321215..e21a863 100644
--- a/src/ka-plugin-loader.c
+++ b/src/ka-plugin-loader.c
@@ -16,12 +16,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <gconf/gconf-client.h>
-
#include "ka-plugin-loader.h"
#include "ka-plugin.h"
+#include "ka-settings.h"
#include "ka-applet-priv.h"
-#include "ka-gconf-tools.h"
#include <gmodule.h>
@@ -98,29 +96,33 @@ load_plugins (KaPluginLoader *self)
{
int i;
KaPluginLoaderPrivate *priv = GET_PRIVATE (self);
- const char *pname;
- GConfClient *gconf;
- GSList *plugins = NULL;
+ GSettings *settings;
+ char **plugins = NULL;
if (!g_module_supported ()) {
g_warning ("GModules are not supported on your platform!");
return;
}
- gconf = ka_applet_get_gconf_client (priv->applet);
+ settings = g_settings_get_child(ka_applet_get_settings (priv->applet),
+ KA_SETTING_CHILD_PLUGINS);
/* For now we only load the plugins on program startup */
- ka_gconf_get_string_list(gconf, KA_GCONF_KEY_PLUGINS_ENABLED, &plugins);
+ plugins = g_settings_get_strv(settings,
+ KA_SETTING_KEY_PLUGINS_ENABLED);
+
if (!plugins) {
g_message ("No plugins to load");
- return ;
+ return;
}
- for (i=0; (pname = g_slist_nth_data (plugins, i)) != NULL; i++) {
+ for (i = 0; plugins[i]; i++) {
char *path;
char *fname;
KaPlugin *plugin;
- fname = g_strdup_printf("libka-plugin-%s.%s", pname, G_MODULE_SUFFIX);
+ fname = g_strdup_printf("libka-plugin-%s.%s",
+ plugins[i],
+ G_MODULE_SUFFIX);
path = g_module_build_path (KA_PLUGINS_DIR, fname);
plugin = load_plugin (path);
@@ -131,7 +133,8 @@ load_plugins (KaPluginLoader *self)
g_free (fname);
g_free (path);
}
- g_slist_free (plugins);
+ g_strfreev (plugins);
+ g_object_unref (settings);
}
bgstack15