From d7a27576d1c853cb828425f26c35f3dfa2931ab0 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 9 Sep 2009 10:03:33 -0500 Subject: Setting the default seconds to be the current time. --- src/im-menu-item.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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(¤t_time); + priv->seconds = current_time.tv_sec; + return; } -- cgit v1.2.3