ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #04015
[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/79332
I already see that you merged a fix for this, but Its not complete, for example:
If the user sets Manchester as his current location, the stored timezone will be 'Europe/London Manchester',
So If He add London in the preferred timezones list, It will not appear in the indicator-datetime menu, as all the cities with 'Europe/London' as a Timezone will not be displayed.
Here a possible fix
--
https://code.launchpad.net/~jjardon/indicator-datetime/fix-833337/+merge/79332
Your team ayatana-commits is subscribed to branch lp:indicator-datetime.
=== modified file 'src/datetime-service.c'
--- src/datetime-service.c 2011-10-13 04:30:40 +0000
+++ src/datetime-service.c 2011-10-13 19:45:28 +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,7 +582,7 @@
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 ((current_timezone == NULL || !g_str_has_prefix(locations[i], current_timezone)) &&
+ if (g_strcmp0 (locations[i], current_timezone_name) != 0 &&
(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();
Follow ups