diff options
author | Stefano Karapetsas <[email protected]> | 2012-11-24 18:21:18 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-11-24 18:21:18 +0100 |
commit | e41ba47bb489bb79ff8a3251fd896900bb3e42c3 (patch) | |
tree | aa950c57bfc68aa1e3f2d49099c61d567ce09669 /mateweather/main.c | |
parent | 75d606567d8e4923e83a58ec8fce410bee89d473 (diff) | |
download | mate-applets-e41ba47bb489bb79ff8a3251fd896900bb3e42c3.tar.bz2 mate-applets-e41ba47bb489bb79ff8a3251fd896900bb3e42c3.tar.xz |
mateweather: migrate to gsettings
Diffstat (limited to 'mateweather/main.c')
-rw-r--r-- | mateweather/main.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/mateweather/main.c b/mateweather/main.c index 2b83440e..de8d8436 100644 --- a/mateweather/main.c +++ b/mateweather/main.c @@ -13,11 +13,12 @@ #include <glib.h> #include <config.h> #include <gtk/gtk.h> +#include <gio/gio.h> #include <mate-panel-applet.h> +#include <mate-panel-applet-gsettings.h> #define MATEWEATHER_I_KNOW_THIS_IS_UNSTABLE -#include <libmateweather/mateweather-mateconf.h> #include <libmateweather/mateweather-prefs.h> #include "mateweather.h" @@ -30,21 +31,15 @@ static gboolean mateweather_applet_new(MatePanelApplet* applet, const gchar* iid { MateWeatherApplet* gw_applet; - char* prefs_key = mate_panel_applet_get_preferences_key(applet); - - mate_panel_applet_add_preferences(applet, "/schemas/apps/mateweather/prefs", NULL); - gw_applet = g_new0(MateWeatherApplet, 1); gw_applet->applet = applet; gw_applet->mateweather_info = NULL; - gw_applet->mateconf = mateweather_mateconf_new(prefs_key); - - g_free(prefs_key); + gw_applet->settings = mate_panel_applet_settings_new (applet, "org.mate.weather"); mateweather_applet_create(gw_applet); - mateweather_prefs_load(&gw_applet->mateweather_pref, gw_applet->mateconf); + mateweather_prefs_load(&gw_applet->mateweather_pref, gw_applet->settings); mateweather_update(gw_applet); |