diff options
-rw-r--r-- | src/im-menu-item.c | 17 | ||||
-rw-r--r-- | src/im-menu-item.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/im-menu-item.c b/src/im-menu-item.c index fd93cc7..ee91f71 100644 --- a/src/im-menu-item.c +++ b/src/im-menu-item.c @@ -50,6 +50,7 @@ struct _ImMenuItemPrivate glong seconds; gchar * count; gulong indicator_changed; + gboolean attention; guint time_update_min; }; @@ -387,6 +388,7 @@ im_menu_item_new (IndicateListener * listener, IndicateListenerServer * server, priv->indicator = indicator; priv->count = NULL; priv->time_update_min = 0; + priv->attention = FALSE; dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), "type", INDICATOR_MENUITEM_TYPE); @@ -403,9 +405,24 @@ im_menu_item_new (IndicateListener * listener, IndicateListenerServer * server, return self; } +/* Gets the number of seconds for the creator + of this item. */ glong im_menu_item_get_seconds (ImMenuItem * menuitem) { + g_return_val_if_fail(IS_IM_MENU_ITEM(menuitem), 0); + ImMenuItemPrivate * priv = IM_MENU_ITEM_GET_PRIVATE(menuitem); return priv->seconds; } + +/* Gets whether or not this indicator item is + asking for attention or not. */ +gboolean +im_menu_item_get_attention (ImMenuItem * menuitem) +{ + g_return_val_if_fail(IS_IM_MENU_ITEM(menuitem), FALSE); + + ImMenuItemPrivate * priv = IM_MENU_ITEM_GET_PRIVATE(menuitem); + return priv->attention; +} diff --git a/src/im-menu-item.h b/src/im-menu-item.h index 5ae4f82..1ec9bf0 100644 --- a/src/im-menu-item.h +++ b/src/im-menu-item.h @@ -57,6 +57,7 @@ struct _ImMenuItem { GType im_menu_item_get_type (void); ImMenuItem * im_menu_item_new (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator); glong im_menu_item_get_seconds (ImMenuItem * menuitem); +gboolean im_menu_item_get_attention (ImMenuItem * menuitem); G_END_DECLS |