aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-09-09 13:47:11 -0500
committerTed Gould <ted@canonical.com>2009-09-09 13:47:11 -0500
commit604a104fe13e066890bb00e250ed2bc7614d9454 (patch)
tree6a4bdfadcc2e9a9a83c3879ef0084e058d0ca238
parent5a886cf768167eaef5b3e3c648bb8cddfe2c28d7 (diff)
parentd7a27576d1c853cb828425f26c35f3dfa2931ab0 (diff)
downloadayatana-indicator-messages-604a104fe13e066890bb00e250ed2bc7614d9454.tar.gz
ayatana-indicator-messages-604a104fe13e066890bb00e250ed2bc7614d9454.tar.bz2
ayatana-indicator-messages-604a104fe13e066890bb00e250ed2bc7614d9454.zip
Merging in the time init stuff into this branch so that it gets into this code review.
-rw-r--r--src/im-menu-item.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/im-menu-item.c b/src/im-menu-item.c
index f97436e..c2b3d12 100644
--- a/src/im-menu-item.c
+++ b/src/im-menu-item.c
@@ -125,12 +125,21 @@ im_menu_item_init (ImMenuItem *self)
g_debug("Building new IM Menu Item");
ImMenuItemPrivate * priv = IM_MENU_ITEM_GET_PRIVATE(self);
+ /* Set the variables to NULL, but they should be
+ configured further down the line. */
priv->listener = NULL;
priv->server = NULL;
priv->indicator = NULL;
+ /* A sane default, but look below */
priv->seconds = 0;
+ /* Set the seconds to be the time when the item was
+ created incase we're not given a better time. */
+ GTimeVal current_time;
+ g_get_current_time(&current_time);
+ priv->seconds = current_time.tv_sec;
+
return;
}