[gdm/wip/xserver-in-session: 5/12] xdmcp-chooser-display: drop hostname-selected signal
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/wip/xserver-in-session: 5/12] xdmcp-chooser-display: drop hostname-selected signal
- Date: Thu, 22 Jan 2015 14:38:49 +0000 (UTC)
commit 947f04426424217a06c55112c3a1c7f1d2c3fae1
Author: Ray Strode <rstrode redhat com>
Date: Mon Jan 19 09:21:16 2015 -0500
xdmcp-chooser-display: drop hostname-selected signal
It's just a thin wrapper around a slave signal, so it's pointless.
This commit drops the signal and changes the listener to just listen
to the slave directly.
daemon/gdm-xdmcp-chooser-display.c | 25 -------------------------
daemon/gdm-xdmcp-chooser-display.h | 3 ---
daemon/gdm-xdmcp-display-factory.c | 11 +++++++----
3 files changed, 7 insertions(+), 32 deletions(-)
---
diff --git a/daemon/gdm-xdmcp-chooser-display.c b/daemon/gdm-xdmcp-chooser-display.c
index 371c2b0..3821371 100644
--- a/daemon/gdm-xdmcp-chooser-display.c
+++ b/daemon/gdm-xdmcp-chooser-display.c
@@ -43,7 +43,6 @@
#include "gdm-address.h"
enum {
- HOSTNAME_SELECTED,
LAST_SIGNAL
};
@@ -56,33 +55,12 @@ static gboolean gdm_xdmcp_chooser_display_prepare (GdmDisplay *display);
G_DEFINE_TYPE (GdmXdmcpChooserDisplay, gdm_xdmcp_chooser_display, GDM_TYPE_XDMCP_DISPLAY)
static void
-on_hostname_selected (GdmXdmcpChooserSlave *slave,
- const char *hostname,
- GdmXdmcpChooserDisplay *display)
-{
- g_debug ("GdmXdmcpChooserDisplay: hostname selected: %s", hostname);
- g_signal_emit (display, signals [HOSTNAME_SELECTED], 0, hostname);
-}
-
-static void
gdm_xdmcp_chooser_display_class_init (GdmXdmcpChooserDisplayClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdmDisplayClass *display_class = GDM_DISPLAY_CLASS (klass);
display_class->prepare = gdm_xdmcp_chooser_display_prepare;
-
- signals [HOSTNAME_SELECTED] =
- g_signal_new ("hostname-selected",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GdmXdmcpChooserDisplayClass, hostname_selected),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__STRING,
- G_TYPE_NONE,
- 1,
- G_TYPE_STRING);
}
static void
@@ -100,9 +78,6 @@ gdm_xdmcp_chooser_display_prepare (GdmDisplay *display)
slave = GDM_XDMCP_CHOOSER_SLAVE (gdm_display_get_slave (display));
- g_signal_connect (slave, "hostname-selected",
- G_CALLBACK (on_hostname_selected), display);
-
return TRUE;
}
diff --git a/daemon/gdm-xdmcp-chooser-display.h b/daemon/gdm-xdmcp-chooser-display.h
index 7890afa..6f3008b 100644
--- a/daemon/gdm-xdmcp-chooser-display.h
+++ b/daemon/gdm-xdmcp-chooser-display.h
@@ -48,9 +48,6 @@ typedef struct
typedef struct
{
GdmXdmcpDisplayClass parent_class;
-
- void (* hostname_selected) (GdmXdmcpChooserDisplay *display,
- const char *hostname);
} GdmXdmcpChooserDisplayClass;
GType gdm_xdmcp_chooser_display_get_type (void);
diff --git a/daemon/gdm-xdmcp-display-factory.c b/daemon/gdm-xdmcp-display-factory.c
index 7fb26d6..cff5ceb 100644
--- a/daemon/gdm-xdmcp-display-factory.c
+++ b/daemon/gdm-xdmcp-display-factory.c
@@ -1988,9 +1988,9 @@ gdm_xdmcp_send_decline (GdmXdmcpDisplayFactory *factory,
}
static void
-on_hostname_selected (GdmXdmcpChooserDisplay *display,
+on_hostname_selected (GdmSlave *slave,
const char *hostname,
- GdmXdmcpDisplayFactory *factory)
+ GdmXdmcpChooserDisplay *display)
{
struct addrinfo hints;
struct addrinfo *ai_list;
@@ -2007,7 +2007,7 @@ on_hostname_selected (GdmXdmcpChooserDisplay *display,
g_assert (address != NULL);
- ic = indirect_client_lookup (factory, address);
+ ic = indirect_client_lookup (xdmcp_display_factory_object, address);
if (ic->chosen_address != NULL) {
gdm_address_free (ic->chosen_address);
@@ -2086,6 +2086,7 @@ gdm_xdmcp_display_create (GdmXdmcpDisplayFactory *factory,
{
GdmDisplay *display;
GdmDisplayStore *store;
+ GdmSlave *slave;
gboolean use_chooser;
g_debug ("GdmXdmcpDisplayFactory: Creating xdmcp display for %s:%d",
@@ -2109,7 +2110,6 @@ gdm_xdmcp_display_create (GdmXdmcpDisplayFactory *factory,
displaynum,
address,
get_next_session_serial (factory));
- g_signal_connect (display, "hostname-selected", G_CALLBACK (on_hostname_selected), factory);
} else {
display = gdm_xdmcp_greeter_display_new (hostname,
displaynum,
@@ -2133,6 +2133,9 @@ gdm_xdmcp_display_create (GdmXdmcpDisplayFactory *factory,
G_CALLBACK (on_display_status_changed),
factory);
+ slave = gdm_display_get_slave (display);
+ g_signal_connect (slave, "hostname-selected", G_CALLBACK (on_hostname_selected), display);
+
store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory));
gdm_display_store_add (store, display);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]