aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/indicator-menu-item.c25
-rw-r--r--src/indicator-menu-item.h2
2 files changed, 23 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)
{
diff --git a/src/indicator-menu-item.h b/src/indicator-menu-item.h
index a5f3407..e577a7d 100644
--- a/src/indicator-menu-item.h
+++ b/src/indicator-menu-item.h
@@ -48,6 +48,8 @@ IndicatorMenuItem *indicator_menu_item_new (void);
void indicator_menu_item_set_right (IndicatorMenuItem *self, const gchar *text);
void indicator_menu_item_set_label (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);
const gchar * indicator_menu_item_get_icon_name (IndicatorMenuItem *self);
void indicator_menu_item_set_icon (IndicatorMenuItem *self, GdkPixbuf *icon);
GdkPixbuf * indicator_menu_item_get_icon (IndicatorMenuItem *self);