aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-09-17 10:22:25 -0500
committerTed Gould <ted@gould.cx>2014-09-17 10:22:25 -0500
commitb3f2f2c8c75f853fe16f6d677daae66d7e931e98 (patch)
tree0d3ea2b790c96c6b3c5a68479218040f87da2cec /src
parent36ab9b369b8e4e2ea80c597a854db907367e5a39 (diff)
downloadayatana-indicator-messages-b3f2f2c8c75f853fe16f6d677daae66d7e931e98.tar.gz
ayatana-indicator-messages-b3f2f2c8c75f853fe16f6d677daae66d7e931e98.tar.bz2
ayatana-indicator-messages-b3f2f2c8c75f853fe16f6d677daae66d7e931e98.zip
Setup a basic greeter property
Diffstat (limited to 'src')
-rw-r--r--src/im-menu.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/im-menu.c b/src/im-menu.c
index 55d4685..a56dacb 100644
--- a/src/im-menu.c
+++ b/src/im-menu.c
@@ -24,6 +24,7 @@ struct _ImMenuPrivate
GMenu *toplevel_menu;
GMenu *menu;
ImApplicationList *applist;
+ gboolean on_greeter;
};
G_DEFINE_TYPE_WITH_PRIVATE (ImMenu, im_menu, G_TYPE_OBJECT)
@@ -32,6 +33,7 @@ enum
{
PROP_0,
PROP_APPLICATION_LIST,
+ PROP_ON_GREETER,
NUM_PROPERTIES
};
@@ -60,6 +62,9 @@ im_menu_get_property (GObject *object,
case PROP_APPLICATION_LIST:
g_value_set_object (value, priv->applist);
break;
+ case PROP_ON_GREETER:
+ g_value_set_boolean (value, priv->on_greeter);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -79,6 +84,9 @@ im_menu_set_property (GObject *object,
case PROP_APPLICATION_LIST: /* construct only */
priv->applist = g_value_dup_object (value);
break;
+ case PROP_ON_GREETER:
+ priv->on_greeter = g_value_get_boolean (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -100,6 +108,12 @@ im_menu_class_init (ImMenuClass *class)
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property (object_class, PROP_ON_GREETER,
+ g_param_spec_boolean ("on-greeter", "", "",
+ FALSE,
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
}
static void
@@ -110,6 +124,7 @@ im_menu_init (ImMenu *menu)
priv->toplevel_menu = g_menu_new ();
priv->menu = g_menu_new ();
+ priv->on_greeter = FALSE;
root = g_menu_item_new (NULL, "indicator.messages");
g_menu_item_set_attribute (root, "x-canonical-type", "s", "com.canonical.indicator.root");