From 8b8ef8b6921a29226562f908dd51d241dccb7d97 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Sun, 15 Jan 2012 00:02:41 +0100 Subject: indicator-menu-item: add get functions for label and right text --- src/indicator-menu-item.c | 16 ++++++++++++++++ src/indicator-menu-item.h | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/indicator-menu-item.c b/src/indicator-menu-item.c index a41177d..a751b4c 100644 --- a/src/indicator-menu-item.c +++ b/src/indicator-menu-item.c @@ -283,6 +283,14 @@ indicator_menu_item_new (void) } +const gchar * +indicator_menu_item_get_label (IndicatorMenuItem *self) +{ + IndicatorMenuItemPrivate *priv = MENU_ITEM_PRIVATE (self); + return gtk_label_get_label (GTK_LABEL (priv->label)); +} + + void indicator_menu_item_set_label (IndicatorMenuItem *self, const gchar *text) @@ -293,6 +301,14 @@ indicator_menu_item_set_label (IndicatorMenuItem *self, } +const gchar * +indicator_menu_item_get_right (IndicatorMenuItem *self) +{ + IndicatorMenuItemPrivate *priv = MENU_ITEM_PRIVATE (self); + return gtk_label_get_label (GTK_LABEL (priv->right_label)); +} + + void indicator_menu_item_set_right (IndicatorMenuItem *self, const gchar *text) diff --git a/src/indicator-menu-item.h b/src/indicator-menu-item.h index e577a7d..fc27b73 100644 --- a/src/indicator-menu-item.h +++ b/src/indicator-menu-item.h @@ -45,8 +45,11 @@ struct _IndicatorMenuItemClass GType indicator_menu_item_get_type (void) G_GNUC_CONST; IndicatorMenuItem *indicator_menu_item_new (void); -void indicator_menu_item_set_right (IndicatorMenuItem *self, const gchar *text); + +const gchar * indicator_menu_item_get_label (IndicatorMenuItem *self); void indicator_menu_item_set_label (IndicatorMenuItem *self, const gchar *text); +const gchar * indicator_menu_item_get_right (IndicatorMenuItem *self); +void indicator_menu_item_set_right (IndicatorMenuItem *self, const gchar *text); gboolean indicator_menu_item_get_right_is_lozenge (IndicatorMenuItem *self); void indicator_menu_item_set_right_is_lozenge (IndicatorMenuItem *self, gboolean is_lozenge); -- cgit v1.2.3