aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-10-30 17:28:26 -0700
committerCharles Kerr <charles.kerr@canonical.com>2013-10-30 17:28:26 -0700
commit28d4e4fb2ae57856acc306ae056090546cc49afb (patch)
tree30c4373f34d9f4ce0111e776431a6656825bf206 /src
parentbbc781d9e2afe500d9a5d09335f0954f25269be6 (diff)
downloadayatana-indicator-datetime-28d4e4fb2ae57856acc306ae056090546cc49afb.tar.gz
ayatana-indicator-datetime-28d4e4fb2ae57856acc306ae056090546cc49afb.tar.bz2
ayatana-indicator-datetime-28d4e4fb2ae57856acc306ae056090546cc49afb.zip
don't generate g_critical() messages in the log when the timezone object is clearing its value.
Diffstat (limited to 'src')
-rw-r--r--src/timezone.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/timezone.c b/src/timezone.c
index ca207f2..4f8addc 100644
--- a/src/timezone.c
+++ b/src/timezone.c
@@ -124,8 +124,11 @@ indicator_datetime_timezone_set_timezone (IndicatorDatetimeTimezone * self,
if (g_strcmp0 (p->timezone->str, timezone))
{
- g_string_assign (p->timezone, timezone);
- g_debug ("%s new timezone set: '%s'", G_STRLOC, timezone);
+ if (timezone != NULL)
+ g_string_assign (p->timezone, timezone);
+ else
+ g_string_set_size (p->timezone, 0);
+ g_debug ("%s new timezone set: '%s'", G_STRLOC, p->timezone->str);
g_object_notify_by_pspec (G_OBJECT(self), properties[PROP_TIMEZONE]);
}
}