diff options
author | Ted Gould <ted@gould.cx> | 2011-03-29 11:58:28 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-03-29 11:58:28 -0500 |
commit | 5d401d9c978453c29c6d74694fe68e4155534283 (patch) | |
tree | a83abdf4b84f9a72af1645ca56cbd40d00414551 /src/datetime-service.c | |
parent | 6185b56b563e39d10801e555bf3b51a18f586bdd (diff) | |
parent | b86cc25455f38c4162ecd1fe6add20373c789980 (diff) | |
download | ayatana-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.c | 10 |
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; } |