summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2008-02-13 04:40:15 +0000
committerWilliam Jon McCann <mccann@src.gnome.org>2008-02-13 04:40:15 +0000
commit75ba3554b2f4d1ffa3fef2efaffca58af0ebf704 (patch)
treebcef0819138a4b0b4a54f1c5beacb225e5d2ffb9
parentee81768ec0adce3a982cc9ad1047b6b644ee3284 (diff)
downloadgdm-75ba3554b2f4d1ffa3fef2efaffca58af0ebf704.tar.gz
Make service name a property.
2008-02-12 William Jon McCann <jmccann@redhat.com> * daemon/gdm-session-direct.c: (_gdm_session_direct_set_service_name), (gdm_session_direct_set_property), (gdm_session_direct_get_property), (gdm_session_direct_class_init): Make service name a property. svn path=/trunk/; revision=5751
-rw-r--r--ChangeLog8
-rw-r--r--daemon/gdm-session-direct.c24
2 files changed, 31 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f7710a8c..cd07446f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-02-12 William Jon McCann <jmccann@redhat.com>
+
+ * daemon/gdm-session-direct.c:
+ (_gdm_session_direct_set_service_name),
+ (gdm_session_direct_set_property),
+ (gdm_session_direct_get_property), (gdm_session_direct_class_init):
+ Make service name a property.
+
2008-02-12 William Jon McCann <mccann@jhu.edu>
* gui/user-switch-applet/GNOME_GdmUserSwitchApplet.server.in.in:
diff --git a/daemon/gdm-session-direct.c b/daemon/gdm-session-direct.c
index 144d44dc..46277f67 100644
--- a/daemon/gdm-session-direct.c
+++ b/daemon/gdm-session-direct.c
@@ -43,7 +43,7 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
#include <glib-object.h>
-#define DBUS_API_SUBJECT_TO_CHANGE
+
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
@@ -92,6 +92,7 @@ struct _GdmSessionDirectPrivate
enum {
PROP_0,
+ PROP_SERVICE_NAME,
PROP_DISPLAY_NAME,
PROP_DISPLAY_HOSTNAME,
PROP_DISPLAY_IS_LOCAL,
@@ -1867,6 +1868,14 @@ gdm_session_direct_select_language (GdmSession *session,
impl->priv->selected_language = g_strdup (text);
}
+static void
+_gdm_session_direct_set_service_name (GdmSessionDirect *session,
+ const char *name)
+{
+ g_free (session->priv->service_name);
+ session->priv->service_name = g_strdup (name);
+}
+
/* At some point we may want to read these right from
* the slave but for now I don't want the dependency */
static void
@@ -1928,6 +1937,9 @@ gdm_session_direct_set_property (GObject *object,
self = GDM_SESSION_DIRECT (object);
switch (prop_id) {
+ case PROP_SERVICE_NAME:
+ _gdm_session_direct_set_service_name (self, g_value_get_string (value));
+ break;
case PROP_DISPLAY_NAME:
_gdm_session_direct_set_display_name (self, g_value_get_string (value));
break;
@@ -1963,6 +1975,9 @@ gdm_session_direct_get_property (GObject *object,
self = GDM_SESSION_DIRECT (object);
switch (prop_id) {
+ case PROP_SERVICE_NAME:
+ g_value_set_string (value, self->priv->service_name);
+ break;
case PROP_DISPLAY_NAME:
g_value_set_string (value, self->priv->display_name);
break;
@@ -2080,6 +2095,13 @@ gdm_session_direct_class_init (GdmSessionDirectClass *session_class)
g_type_class_add_private (session_class, sizeof (GdmSessionDirectPrivate));
g_object_class_install_property (object_class,
+ PROP_SERVICE_NAME,
+ g_param_spec_string ("service-name",
+ "service name",
+ "service name",
+ "gdm",
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ g_object_class_install_property (object_class,
PROP_DISPLAY_NAME,
g_param_spec_string ("display-name",
"display name",