diff options
Diffstat (limited to 'src/indicator-menu-item.c')
-rw-r--r-- | src/indicator-menu-item.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/indicator-menu-item.c b/src/indicator-menu-item.c index afdf980..a41177d 100644 --- a/src/indicator-menu-item.c +++ b/src/indicator-menu-item.c @@ -139,8 +139,6 @@ indicator_menu_item_set_property (GObject *object, const GValue *value, GParamSpec *pspec) { - IndicatorMenuItemPrivate *priv = MENU_ITEM_PRIVATE (object); - switch (property_id) { case PROP_ICON: @@ -164,8 +162,8 @@ indicator_menu_item_set_property (GObject *object, break; case PROP_RIGHT_IS_LOZENGE: - priv->right_is_lozenge = g_value_get_boolean (value); - gtk_widget_queue_draw (priv->right_label); + indicator_menu_item_set_right_is_lozenge (INDICATOR_MENU_ITEM (object), + g_value_get_boolean (value)); break; @@ -305,6 +303,25 @@ indicator_menu_item_set_right (IndicatorMenuItem *self, } +gboolean +indicator_menu_item_get_right_is_lozenge (IndicatorMenuItem *self) +{ + IndicatorMenuItemPrivate *priv = MENU_ITEM_PRIVATE (self); + return priv->right_is_lozenge; +} + + +void +indicator_menu_item_set_right_is_lozenge (IndicatorMenuItem *self, + gboolean is_lozenge) +{ + IndicatorMenuItemPrivate *priv = MENU_ITEM_PRIVATE (self); + priv->right_is_lozenge = is_lozenge; + gtk_widget_queue_draw (priv->right_label); + g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_RIGHT_IS_LOZENGE]); +} + + GdkPixbuf * indicator_menu_item_get_icon (IndicatorMenuItem *self) { |