← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~jjardon/indicator-datetime/fix-833337 into lp:indicator-datetime

 

Javier Jardón has proposed merging lp:~jjardon/indicator-datetime/fix-833337 into lp:indicator-datetime.

Requested reviews:
  Indicator Applet Developers (indicator-applet-developers)
Related bugs:
  Bug #833337 in Indicator Date and Time: "Current timezone duplicates with saved locations"
  https://bugs.launchpad.net/indicator-datetime/+bug/833337

For more details, see:
https://code.launchpad.net/~jjardon/indicator-datetime/fix-833337/+merge/78292
-- 
https://code.launchpad.net/~jjardon/indicator-datetime/fix-833337/+merge/78292
Your team ayatana-commits is subscribed to branch lp:indicator-datetime.
=== modified file 'src/datetime-service.c'
--- src/datetime-service.c	2011-09-29 19:57:50 +0000
+++ src/datetime-service.c	2011-10-05 17:30:47 +0000
@@ -547,6 +547,7 @@
 	}
 
 	gchar ** locations = g_settings_get_strv(conf, SETTINGS_LOCATIONS_S);
+	gchar *current_timezone_name = g_settings_get_string (conf, SETTINGS_TIMEZONE_NAME_S);
 
 	if (locations == NULL) { 
 		g_debug("No locations configured (NULL)");
@@ -581,8 +582,8 @@
 	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 (g_strcmp0 (locations[i], current_timezone_name) != 0 &&
+		    g_strcmp0(locations[1], geo_timezone) != 0) {
 			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);