aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-10-12 23:30:40 -0500
committerTed Gould <ted@gould.cx>2011-10-12 23:30:40 -0500
commit14bd650eea1a31843b49bac5f12f8798fccfe303 (patch)
tree134689b68475fee2d12a8c4ef200549cec50ee70
parent010d4d2c8e013a7bcd804cf696377dab774a82da (diff)
downloadayatana-indicator-datetime-14bd650eea1a31843b49bac5f12f8798fccfe303.tar.gz
ayatana-indicator-datetime-14bd650eea1a31843b49bac5f12f8798fccfe303.tar.bz2
ayatana-indicator-datetime-14bd650eea1a31843b49bac5f12f8798fccfe303.zip
Check to see if we're in the same timezone as default
-rw-r--r--src/datetime-service.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 25572ee..ed8c8e3 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -581,8 +581,8 @@ update_timezone_menu_items(gpointer user_data) {
offset = dbusmenu_menuitem_get_position (current_location, root)+1;
for (i = 0; i < len; i++) {
// Iterate over configured places and add any which aren't already listed
- if (g_strcmp0(locations[i], current_timezone) != 0 &&
- g_strcmp0(locations[i], geo_timezone) != 0) {
+ if ((current_timezone == NULL || !g_str_has_prefix(locations[i], current_timezone)) &&
+ (geo_timezone == NULL || !g_str_has_prefix(locations[i], geo_timezone))) {
g_debug("Adding timezone in update_timezones %s", locations[i]);
item = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set (item, DBUSMENU_MENUITEM_PROP_TYPE, TIMEZONE_MENUITEM_TYPE);