summaryrefslogtreecommitdiff
path: root/applets/clock/clock.c
diff options
context:
space:
mode:
authormuesli4 <[email protected]>2013-04-10 15:49:44 +0200
committermuesli4 <[email protected]>2013-04-10 15:49:44 +0200
commit9201a7cebc456d2e3ce98bd478f75d0c2b223d70 (patch)
tree53a6d40d40e594e71ecc861c705f48cbe53fbc49 /applets/clock/clock.c
parentec3bedb24f64944c0874dec793ba1ea9cb1b777b (diff)
parentf4a927c268231fdd6b5a333d0c547b46a11af858 (diff)
downloadmate-panel-9201a7cebc456d2e3ce98bd478f75d0c2b223d70.tar.bz2
mate-panel-9201a7cebc456d2e3ce98bd478f75d0c2b223d70.tar.xz
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'applets/clock/clock.c')
-rw-r--r--applets/clock/clock.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 44b844e8..bcbf847d 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -2264,6 +2264,17 @@ static void
setup_gsettings (ClockData *cd)
{
cd->settings = mate_panel_applet_settings_new (MATE_PANEL_APPLET (cd->applet), CLOCK_SCHEMA);
+
+ /* hack to allow users to set custom format in dconf-editor */
+ gint format;
+ gchar *custom_format;
+ format = g_settings_get_enum (cd->settings, KEY_FORMAT);
+ custom_format = g_settings_get_string (cd->settings, KEY_CUSTOM_FORMAT);
+ g_settings_set_enum (cd->settings, KEY_FORMAT, format);
+ g_settings_set_string (cd->settings, KEY_CUSTOM_FORMAT, custom_format);
+ if (custom_format != NULL)
+ g_free (custom_format);
+
g_signal_connect (cd->settings, "changed::" KEY_FORMAT, G_CALLBACK (format_changed), cd);
g_signal_connect (cd->settings, "changed::" KEY_SHOW_SECONDS, G_CALLBACK (show_seconds_changed), cd);
g_signal_connect (cd->settings, "changed::" KEY_SHOW_DATE, G_CALLBACK (show_date_changed), cd);