Updating branch refs/heads/master to bcf12e226f93dec8018c0ad6337e149850ee1133 (commit) from 554ce74adbe4b4562ca0fc422175fac7f09b0d29 (commit)
commit bcf12e226f93dec8018c0ad6337e149850ee1133 Author: Sean Davis <smd.seanda...@gmail.com> Date: Sun Nov 10 15:55:12 2013 -0500 Fix 2-way syncing with parole-conf src/parole-conf.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/src/parole-conf.c b/src/parole-conf.c index f5e8683..fe2ee55 100644 --- a/src/parole-conf.c +++ b/src/parole-conf.c @@ -242,6 +242,68 @@ static void parole_conf_get_property (GObject *object, } } +gchar *parole_conf_map_xfconf_property_name (const gchar *prop_name) +{ + gchar *value = NULL; + if (g_strcmp0(prop_name, "/audio/visualization-enabled") == 0) + value = g_strdup("vis-enabled"); + if (g_strcmp0(prop_name, "/audio/visualization-name") == 0) + value = g_strdup("vis-name"); + if (g_strcmp0(prop_name, "/audio/volume") == 0) + value = g_strdup("volume"); + if (g_strcmp0(prop_name, "/folders/last-used-media") == 0) + value = g_strdup("media-chooser-folder"); + if (g_strcmp0(prop_name, "/parole/multimedia-keys") == 0) + value = g_strdup("multimedia-keys"); + if (g_strcmp0(prop_name, "/parole/plugins") == 0) + value = g_strdup("plugins"); + if (g_strcmp0(prop_name, "scan-recursive") == 0) + value = g_strdup("/parole/scan-recursive"); + if (g_strcmp0(prop_name, "/playlist/remember-playlist") == 0) + value = g_strdup("remember-playlist"); + if (g_strcmp0(prop_name, "/playlist/remove-duplicates") == 0) + value = g_strdup("remove-duplicated"); + if (g_strcmp0(prop_name, "/playlist/repeat") == 0) + value = g_strdup("repeat"); + if (g_strcmp0(prop_name, "/playlist/replace-playlist") == 0) + value = g_strdup("replace-playlist"); + if (g_strcmp0(prop_name, "/playlist/show-playlist") == 0) + value = g_strdup("showhide-playlist"); + if (g_strcmp0(prop_name, "/playlist/shuffle") == 0) + value = g_strdup("shuffle"); + if (g_strcmp0(prop_name, "/playlist/play-opened-files") == 0) + value = g_strdup("play-opened-files"); + if (g_strcmp0(prop_name, "/subtitles/enabled") == 0) + value = g_strdup("enable-subtitle"); + if (g_strcmp0(prop_name, "/subtitles/encoding") == 0) + value = g_strdup("subtitle-encoding"); + if (g_strcmp0(prop_name, "/subtitles/font") == 0) + value = g_strdup("subtitle-font"); + if (g_strcmp0(prop_name, "/video/aspect-ratio") == 0) + value = g_strdup("aspect-ratio"); + if (g_strcmp0(prop_name, "/video/brightness") == 0) + value = g_strdup("brightness"); + if (g_strcmp0(prop_name, "/video/contrast") == 0) + value = g_strdup("contrast"); + if (g_strcmp0(prop_name, "/video/disable-screensaver") == 0) + value = g_strdup("reset-saver"); + if (g_strcmp0(prop_name, "/video/enable-xv") == 0) + value = g_strdup("enable-xv"); + if (g_strcmp0(prop_name, "/video/hue") == 0) + value = g_strdup("hue"); + if (g_strcmp0(prop_name, "/video/saturation") == 0) + value = g_strdup("saturation"); + if (g_strcmp0(prop_name, "/window/height") == 0) + value = g_strdup("window-height"); + if (g_strcmp0(prop_name, "/window/minimized") == 0) + value = g_strdup("minimized"); + if (g_strcmp0(prop_name, "/window/maximized") == 0) + value = g_strdup("window-maximized"); + if (g_strcmp0(prop_name, "/window/width") == 0) + value = g_strdup("window-width"); + return value; +} + /** * parole_conf_prop_changed: * @channel : the #XfconfChannel where settings are stored. @@ -259,7 +321,7 @@ static void parole_conf_prop_changed (XfconfChannel *channel, GParamSpec *pspec; /* check if the property exists and emit change */ - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (conf), prop_name + 1); + pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (conf), parole_conf_map_xfconf_property_name(prop_name)); if (G_LIKELY (pspec != NULL)) g_object_notify_by_pspec (G_OBJECT (conf), pspec); } _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits