diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-01-15 00:02:41 +0100 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-01-15 00:02:41 +0100 |
commit | 8b8ef8b6921a29226562f908dd51d241dccb7d97 (patch) | |
tree | 1681f94fefe6965c66f3919eed2690d8c16fca69 | |
parent | 3540dc7d8fd0ef1f6b27c3c39760d0442912c2b1 (diff) | |
download | ayatana-indicator-printers-8b8ef8b6921a29226562f908dd51d241dccb7d97.tar.gz ayatana-indicator-printers-8b8ef8b6921a29226562f908dd51d241dccb7d97.tar.bz2 ayatana-indicator-printers-8b8ef8b6921a29226562f908dd51d241dccb7d97.zip |
indicator-menu-item: add get functions for label and right text
-rw-r--r-- | src/indicator-menu-item.c | 16 | ||||
-rw-r--r-- | src/indicator-menu-item.h | 5 |
2 files changed, 20 insertions, 1 deletions
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); |