summaryrefslogtreecommitdiff
path: root/daemon/gdm-launch-environment.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2017-03-31 15:01:06 -0400
committerRay Strode <rstrode@redhat.com>2017-03-31 17:21:58 -0400
commit4bf8912516661f7f03c0906ff484c95df240e911 (patch)
treec4d84d5233988743e0d3049322fd375fd22b7a2b /daemon/gdm-launch-environment.c
parent09bf96930a16d0efff5cc6301e828f7d17b28530 (diff)
downloadgdm-4bf8912516661f7f03c0906ff484c95df240e911.tar.gz
launch-environment: implement hostname-selected signal
We're connecting to a signal that isn't implemented. This commit adds the implementation. A slightly better fix might be to cut out some of the layers, of middle men passing around hostname-selected, but for now this is fine. https://bugzilla.gnome.org/show_bug.cgi?id=780787
Diffstat (limited to 'daemon/gdm-launch-environment.c')
-rw-r--r--daemon/gdm-launch-environment.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
index 4372ac29..a7ae6728 100644
--- a/daemon/gdm-launch-environment.c
+++ b/daemon/gdm-launch-environment.c
@@ -103,6 +103,7 @@ enum {
STOPPED,
EXITED,
DIED,
+ HOSTNAME_SELECTED,
LAST_SIGNAL
};
@@ -264,6 +265,15 @@ on_session_died (GdmSession *session,
}
static void
+on_hostname_selected (GdmSession *session,
+ const char *hostname,
+ GdmLaunchEnvironment *launch_environment)
+{
+ g_debug ("GdmSession: hostname selected: %s", hostname);
+ g_signal_emit (launch_environment, signals [HOSTNAME_SELECTED], 0, hostname);
+}
+
+static void
on_conversation_started (GdmSession *session,
const char *service_name,
GdmLaunchEnvironment *launch_environment)
@@ -409,6 +419,11 @@ gdm_launch_environment_start (GdmLaunchEnvironment *launch_environment)
G_CALLBACK (on_session_died),
launch_environment,
0);
+ g_signal_connect_object (launch_environment->priv->session,
+ "hostname-selected",
+ G_CALLBACK (on_hostname_selected),
+ launch_environment,
+ 0);
gdm_session_start_conversation (launch_environment->priv->session, "gdm-launch-environment");
gdm_session_select_program (launch_environment->priv->session, launch_environment->priv->command);
@@ -807,6 +822,18 @@ gdm_launch_environment_class_init (GdmLaunchEnvironmentClass *klass)
G_TYPE_NONE,
1,
G_TYPE_INT);
+
+ signals [HOSTNAME_SELECTED] =
+ g_signal_new ("hostname-selected",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GdmLaunchEnvironmentClass, hostname_selected),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_STRING);
}
static void