aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-16 21:56:38 -0500
committerTed Gould <ted@gould.cx>2010-03-16 21:56:38 -0500
commit7e38445544d5d0b000336d99b3f91462e63523f5 (patch)
tree3485c5d67f0d374baa720fd1b2237dee1170ddec /src
parent8dddf3fd91765a2811732e1c5dc4a533e55bc5cb (diff)
downloadayatana-indicator-session-7e38445544d5d0b000336d99b3f91462e63523f5.tar.gz
ayatana-indicator-session-7e38445544d5d0b000336d99b3f91462e63523f5.tar.bz2
ayatana-indicator-session-7e38445544d5d0b000336d99b3f91462e63523f5.zip
Adding a guest_item for the guest menu item and a function to set it.
Diffstat (limited to 'src')
-rw-r--r--src/users-service-dbus.c12
-rw-r--r--src/users-service-dbus.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c
index f3952ed..c8974b9 100644
--- a/src/users-service-dbus.c
+++ b/src/users-service-dbus.c
@@ -88,6 +88,8 @@ struct _UsersServiceDbusPrivate
GHashTable *exclusions;
GHashTable *sessions;
+
+ DbusmenuMenuitem * guest_item;
};
#define USERS_SERVICE_DBUS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), USERS_SERVICE_DBUS_TYPE, UsersServiceDbusPrivate))
@@ -157,6 +159,7 @@ users_service_dbus_init (UsersServiceDbus *self)
priv->users = NULL;
priv->count = 0;
+ priv->guest_item = NULL;
/* Get the system bus */
priv->system_bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
@@ -1069,3 +1072,12 @@ users_service_dbus_can_activate_session (UsersServiceDbus *self)
return can_activate;
}
+
+/* Sets the menu item that represents the guest account */
+void
+users_service_dbus_set_guest_item (UsersServiceDbus * self, DbusmenuMenuitem * mi)
+{
+ UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
+ priv->guest_item = mi;
+ return;
+}
diff --git a/src/users-service-dbus.h b/src/users-service-dbus.h
index 15dd71b..4798d64 100644
--- a/src/users-service-dbus.h
+++ b/src/users-service-dbus.h
@@ -85,6 +85,8 @@ gboolean users_service_dbus_can_activate_session (UsersServiceDbus *self);
gboolean users_service_dbus_activate_user_session (UsersServiceDbus *self,
UserData *user);
gboolean users_service_dbus_activate_guest_session (UsersServiceDbus *self);
+void users_service_dbus_set_guest_item (UsersServiceDbus * self,
+ DbusmenuMenuitem * mi);
G_END_DECLS