aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-09-29 16:46:18 -0500
committerTed Gould <ted@canonical.com>2009-09-29 16:46:18 -0500
commit7acd91df1e487037bbf5533d4086a74219ca204f (patch)
treee60afd91edbd2e8ac0af31717227b5c0aaa9b269
parentcf185b650bc83909d1e93c2c613e9c9982ac8da9 (diff)
downloadayatana-indicator-messages-7acd91df1e487037bbf5533d4086a74219ca204f.tar.gz
ayatana-indicator-messages-7acd91df1e487037bbf5533d4086a74219ca204f.tar.bz2
ayatana-indicator-messages-7acd91df1e487037bbf5533d4086a74219ca204f.zip
Making sure we don't update the text for the time if it's zero.
-rw-r--r--src/im-menu-item.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/im-menu-item.c b/src/im-menu-item.c
index 4357dee..35bb3be 100644
--- a/src/im-menu-item.c
+++ b/src/im-menu-item.c
@@ -187,9 +187,17 @@ update_time (ImMenuItem * self)
{
ImMenuItemPrivate * priv = IM_MENU_ITEM_GET_PRIVATE(self);
+ /* Count has been set, so it takes priority. */
if (priv->count != NULL) {
return;
}
+
+ /* Seconds hasn't been set, so we just want to keep the time
+ area blank. */
+ if (priv->seconds == 0) {
+ dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), INDICATOR_MENUITEM_PROP_RIGHT, "");
+ return;
+ }
gchar * timestring = NULL;