aboutsummaryrefslogtreecommitdiff
path: root/src/datetime-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-03-29 11:58:28 -0500
committerTed Gould <ted@gould.cx>2011-03-29 11:58:28 -0500
commit5d401d9c978453c29c6d74694fe68e4155534283 (patch)
treea83abdf4b84f9a72af1645ca56cbd40d00414551 /src/datetime-service.c
parent6185b56b563e39d10801e555bf3b51a18f586bdd (diff)
parentb86cc25455f38c4162ecd1fe6add20373c789980 (diff)
downloadayatana-indicator-datetime-5d401d9c978453c29c6d74694fe68e4155534283.tar.gz
ayatana-indicator-datetime-5d401d9c978453c29c6d74694fe68e4155534283.tar.bz2
ayatana-indicator-datetime-5d401d9c978453c29c6d74694fe68e4155534283.zip
Fix crash with GVariantBuilder, unref a timedate and ensure that we always have a separator
Diffstat (limited to 'src/datetime-service.c')
-rw-r--r--src/datetime-service.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 7e01f88..905128b 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -438,11 +438,11 @@ update_timezone_menu_items(gpointer user_data) {
gboolean show = g_settings_get_boolean (conf, SETTINGS_SHOW_LOCATIONS_S);
- if (len > 0) {
- dbusmenu_menuitem_property_set_bool (locations_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
- dbusmenu_menuitem_property_set_bool (current_location, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
- dbusmenu_menuitem_property_set_bool (current_location, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
- } else {
+ dbusmenu_menuitem_property_set_bool (locations_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
+ dbusmenu_menuitem_property_set_bool (current_location, DBUSMENU_MENUITEM_PROP_VISIBLE, show);
+ dbusmenu_menuitem_property_set_bool (current_location, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
+
+ if (len == 0) {
g_debug("No locations configured (Empty List)");
return FALSE;
}