aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-12 14:37:58 -0600
committerTed Gould <ted@gould.cx>2010-03-12 14:37:58 -0600
commite504d1d019cf0af9b210d8150a5822f5e4878f4f (patch)
tree2892d149906a758644846efbff0c0a51a4e9512a
parent0d2c0778772b92815dd1a773f6a5e10ed3c80869 (diff)
downloadayatana-indicator-session-e504d1d019cf0af9b210d8150a5822f5e4878f4f.tar.gz
ayatana-indicator-session-e504d1d019cf0af9b210d8150a5822f5e4878f4f.tar.bz2
ayatana-indicator-session-e504d1d019cf0af9b210d8150a5822f5e4878f4f.zip
Creating our little dbus-object.
-rw-r--r--src/session-dbus.c6
-rw-r--r--src/session-dbus.h1
-rw-r--r--src/session-service.c4
3 files changed, 11 insertions, 0 deletions
diff --git a/src/session-dbus.c b/src/session-dbus.c
index fd506ad..60002d0 100644
--- a/src/session-dbus.c
+++ b/src/session-dbus.c
@@ -97,6 +97,12 @@ _session_dbus_server_get_icon (SessionDbus * service, gchar ** icon, GError ** e
return TRUE;
}
+SessionDbus *
+session_dbus_new (void)
+{
+ return SESSION_DBUS(g_object_new(SESSION_DBUS_TYPE, NULL));
+}
+
void
session_dbus_set_name (SessionDbus * session, const gchar * name)
{
diff --git a/src/session-dbus.h b/src/session-dbus.h
index 67c151c..2169b49 100644
--- a/src/session-dbus.h
+++ b/src/session-dbus.h
@@ -26,6 +26,7 @@ struct _SessionDbus {
};
GType session_dbus_get_type (void);
+SessionDbus * session_dbus_new (void);
void session_dbus_set_name (SessionDbus * session, const gchar * name);
G_END_DECLS
diff --git a/src/session-service.c b/src/session-service.c
index febf007..693c73a 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -43,6 +43,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "gconf-helper.h"
+#include "session-dbus.h"
#include "users-service-dbus.h"
#include "lock-helper.h"
@@ -65,6 +66,7 @@ struct _ActivateData
static DBusGConnection *system_bus = NULL;
static DBusGProxy *gdm_proxy = NULL;
static UsersServiceDbus *dbus_interface = NULL;
+static SessionDbus *session_dbus = NULL;
static DbusmenuMenuitem *lock_menuitem = NULL;
static DbusmenuMenuitem *switch_menuitem = NULL;
@@ -691,6 +693,8 @@ main (int argc, char ** argv)
DbusmenuServer * server = dbusmenu_server_new(INDICATOR_SESSION_DBUS_OBJECT);
dbusmenu_server_set_root(server, root_menuitem);
+ session_dbus = session_dbus_new();
+
mainloop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(mainloop);