summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog33
-rw-r--r--daemon/gdm-factory-slave.c19
-rw-r--r--daemon/gdm-greeter-server.c38
-rw-r--r--daemon/gdm-greeter-server.h31
-rw-r--r--daemon/gdm-product-slave.c31
-rw-r--r--daemon/gdm-session-relay.c13
-rw-r--r--daemon/gdm-session-relay.h5
-rw-r--r--daemon/gdm-simple-slave.c26
-rw-r--r--gui/simple-greeter/gdm-greeter-client.c29
-rw-r--r--gui/simple-greeter/gdm-greeter-client.h49
-rw-r--r--gui/simple-greeter/gdm-greeter-login-window.c24
-rw-r--r--gui/simple-greeter/gdm-greeter-login-window.h29
-rw-r--r--gui/simple-greeter/gdm-greeter-session.c17
-rw-r--r--gui/simple-greeter/gdm-user-chooser-widget.c11
-rw-r--r--gui/simple-greeter/gdm-user-chooser-widget.h3
15 files changed, 276 insertions, 82 deletions
diff --git a/ChangeLog b/ChangeLog
index 63927178..a1943794 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,38 @@
2007-10-27 William Jon McCann <mccann@jhu.edu>
+ * daemon/gdm-factory-slave.c: (on_greeter_begin_verification),
+ (on_greeter_begin_verification_for_user), (run_greeter):
+ * daemon/gdm-greeter-server.c: (handle_begin_verification),
+ (handle_begin_verification_for_user),
+ (greeter_handle_child_message), (do_introspect),
+ (gdm_greeter_server_class_init):
+ * daemon/gdm-greeter-server.h:
+ * daemon/gdm-product-slave.c: (on_relay_begin_verification),
+ (on_relay_begin_verification_for_user), (connect_to_session_relay):
+ * daemon/gdm-session-relay.c:
+ (gdm_session_relay_begin_verification),
+ (gdm_session_relay_begin_verification_for_user):
+ * daemon/gdm-session-relay.h:
+ * daemon/gdm-simple-slave.c: (on_greeter_begin_verification),
+ (on_greeter_begin_verification_for_user), (run_greeter):
+ * gui/simple-greeter/gdm-greeter-client.c:
+ (gdm_greeter_client_call_begin_verification),
+ (gdm_greeter_client_call_begin_verification_for_user):
+ * gui/simple-greeter/gdm-greeter-client.h:
+ * gui/simple-greeter/gdm-greeter-login-window.c: (on_user_chosen),
+ (gdm_greeter_login_window_class_init):
+ * gui/simple-greeter/gdm-greeter-login-window.h:
+ * gui/simple-greeter/gdm-greeter-session.c:
+ (on_begin_verification), (on_begin_verification_for_user),
+ (toggle_login_window):
+ * gui/simple-greeter/gdm-user-chooser-widget.c: (populate_model),
+ (user_visible_cb):
+ * gui/simple-greeter/gdm-user-chooser-widget.h:
+ Add a begin-verification-for-user. Make clicking other
+ start begin-verification to bring up a username prompt.
+
+2007-10-27 William Jon McCann <mccann@jhu.edu>
+
* gui/simple-greeter/gdm-user-chooser-widget.c: (activate_name),
(gdm_user_chooser_widget_dispose), (populate_model),
(gdm_user_chooser_widget_init), (gdm_user_chooser_widget_finalize):
diff --git a/daemon/gdm-factory-slave.c b/daemon/gdm-factory-slave.c
index fb26010b..13ff1b36 100644
--- a/daemon/gdm-factory-slave.c
+++ b/daemon/gdm-factory-slave.c
@@ -518,13 +518,22 @@ on_session_relay_session_started (GdmSessionRelay *relay,
static void
on_greeter_begin_verification (GdmGreeterServer *greeter_server,
- const char *username,
GdmFactorySlave *slave)
{
g_debug ("begin verification");
- gdm_session_relay_begin_verification (slave->priv->session_relay,
- username);
+ gdm_session_relay_begin_verification (slave->priv->session_relay);
+}
+
+static void
+on_greeter_begin_verification_for_user (GdmGreeterServer *greeter_server,
+ const char *username,
+ GdmFactorySlave *slave)
+{
+ g_debug ("begin verification for user");
+
+ gdm_session_relay_begin_verification_for_user (slave->priv->session_relay,
+ username);
}
static void
@@ -636,6 +645,10 @@ run_greeter (GdmFactorySlave *slave)
G_CALLBACK (on_greeter_begin_verification),
slave);
g_signal_connect (slave->priv->greeter_server,
+ "begin-verification-for-user",
+ G_CALLBACK (on_greeter_begin_verification_for_user),
+ slave);
+ g_signal_connect (slave->priv->greeter_server,
"query-answer",
G_CALLBACK (on_greeter_answer),
slave);
diff --git a/daemon/gdm-greeter-server.c b/daemon/gdm-greeter-server.c
index fc856433..76eb2d4c 100644
--- a/daemon/gdm-greeter-server.c
+++ b/daemon/gdm-greeter-server.c
@@ -73,6 +73,7 @@ enum {
enum {
BEGIN_VERIFICATION,
+ BEGIN_VERIFICATION_FOR_USER,
QUERY_ANSWER,
SESSION_SELECTED,
HOSTNAME_SELECTED,
@@ -241,6 +242,25 @@ handle_begin_verification (GdmGreeterServer *greeter_server,
DBusMessage *message)
{
DBusMessage *reply;
+
+ g_debug ("BeginVerification");
+
+ reply = dbus_message_new_method_return (message);
+ dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
+
+ g_signal_emit (greeter_server, signals [BEGIN_VERIFICATION], 0);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+}
+
+
+static DBusHandlerResult
+handle_begin_verification_for_user (GdmGreeterServer *greeter_server,
+ DBusConnection *connection,
+ DBusMessage *message)
+{
+ DBusMessage *reply;
DBusError error;
const char *text;
@@ -251,13 +271,13 @@ handle_begin_verification (GdmGreeterServer *greeter_server,
g_warning ("ERROR: %s", error.message);
}
- g_debug ("BeginVerification for %s", text);
+ g_debug ("BeginVerificationForUser for '%s'", text);
reply = dbus_message_new_method_return (message);
dbus_connection_send (connection, reply, NULL);
dbus_message_unref (reply);
- g_signal_emit (greeter_server, signals [BEGIN_VERIFICATION], 0, text);
+ g_signal_emit (greeter_server, signals [BEGIN_VERIFICATION_FOR_USER], 0, text);
return DBUS_HANDLER_RESULT_HANDLED;
}
@@ -455,6 +475,8 @@ greeter_handle_child_message (DBusConnection *connection,
if (dbus_message_is_method_call (message, GDM_GREETER_SERVER_DBUS_INTERFACE, "BeginVerification")) {
return handle_begin_verification (greeter_server, connection, message);
+ } else if (dbus_message_is_method_call (message, GDM_GREETER_SERVER_DBUS_INTERFACE, "BeginVerificationForUser")) {
+ return handle_begin_verification_for_user (greeter_server, connection, message);
} else if (dbus_message_is_method_call (message, GDM_GREETER_SERVER_DBUS_INTERFACE, "AnswerQuery")) {
return handle_answer_query (greeter_server, connection, message);
} else if (dbus_message_is_method_call (message, GDM_GREETER_SERVER_DBUS_INTERFACE, "SelectSession")) {
@@ -500,6 +522,8 @@ do_introspect (DBusConnection *connection,
xml = g_string_append (xml,
" <interface name=\"org.gnome.DisplayManager.GreeterServer\">\n"
" <method name=\"BeginVerification\">\n"
+ " </method>\n"
+ " <method name=\"BeginVerificationForUser\">\n"
" <arg name=\"username\" direction=\"in\" type=\"s\"/>\n"
" </method>\n"
" <method name=\"AnswerQuery\">\n"
@@ -910,6 +934,16 @@ gdm_greeter_server_class_init (GdmGreeterServerClass *klass)
G_STRUCT_OFFSET (GdmGreeterServerClass, begin_verification),
NULL,
NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+ signals [BEGIN_VERIFICATION_FOR_USER] =
+ g_signal_new ("begin-verification-for-user",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GdmGreeterServerClass, begin_verification_for_user),
+ NULL,
+ NULL,
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE,
1,
diff --git a/daemon/gdm-greeter-server.h b/daemon/gdm-greeter-server.h
index d888f609..daa3ba83 100644
--- a/daemon/gdm-greeter-server.h
+++ b/daemon/gdm-greeter-server.h
@@ -45,21 +45,22 @@ typedef struct
{
GObjectClass parent_class;
- void (* begin_verification)(GdmGreeterServer *greeter_server,
- const char *username);
- void (* query_answer) (GdmGreeterServer *greeter_server,
- const char *text);
- void (* session_selected) (GdmGreeterServer *greeter_server,
- const char *name);
- void (* hostname_selected) (GdmGreeterServer *greeter_server,
- const char *hostname);
- void (* language_selected) (GdmGreeterServer *greeter_server,
- const char *name);
- void (* user_selected) (GdmGreeterServer *greeter_server,
- const char *name);
- void (* cancelled) (GdmGreeterServer *greeter_server);
- void (* connected) (GdmGreeterServer *greeter_server);
- void (* disconnected) (GdmGreeterServer *greeter_server);
+ void (* begin_verification_for_user)(GdmGreeterServer *greeter_server,
+ const char *username);
+ void (* begin_verification) (GdmGreeterServer *greeter_server);
+ void (* query_answer) (GdmGreeterServer *greeter_server,
+ const char *text);
+ void (* session_selected) (GdmGreeterServer *greeter_server,
+ const char *name);
+ void (* hostname_selected) (GdmGreeterServer *greeter_server,
+ const char *hostname);
+ void (* language_selected) (GdmGreeterServer *greeter_server,
+ const char *name);
+ void (* user_selected) (GdmGreeterServer *greeter_server,
+ const char *name);
+ void (* cancelled) (GdmGreeterServer *greeter_server);
+ void (* connected) (GdmGreeterServer *greeter_server);
+ void (* disconnected) (GdmGreeterServer *greeter_server);
} GdmGreeterServerClass;
GType gdm_greeter_server_get_type (void);
diff --git a/daemon/gdm-product-slave.c b/daemon/gdm-product-slave.c
index b237945f..20879449 100644
--- a/daemon/gdm-product-slave.c
+++ b/daemon/gdm-product-slave.c
@@ -982,18 +982,17 @@ on_session_secret_info_query (GdmSession *session,
static void
on_relay_begin_verification (DBusGProxy *proxy,
- const char *username,
gpointer data)
{
GdmProductSlave *slave = GDM_PRODUCT_SLAVE (data);
GError *error;
gboolean res;
- g_debug ("Relay Begin Verification");
+ g_debug ("Relay BeginVerification");
error = NULL;
res = gdm_session_begin_verification (slave->priv->session,
- username,
+ NULL,
&error);
if (! res) {
g_warning ("Unable to begin verification: %s", error->message);
@@ -1002,6 +1001,27 @@ on_relay_begin_verification (DBusGProxy *proxy,
}
static void
+on_relay_begin_verification_for_user (DBusGProxy *proxy,
+ const char *username,
+ gpointer data)
+{
+ GdmProductSlave *slave = GDM_PRODUCT_SLAVE (data);
+ GError *error;
+ gboolean res;
+
+ g_debug ("Relay BeginVerificationForUser");
+
+ error = NULL;
+ res = gdm_session_begin_verification (slave->priv->session,
+ username,
+ &error);
+ if (! res) {
+ g_warning ("Unable to begin verification for user: %s", error->message);
+ g_error_free (error);
+ }
+}
+
+static void
on_relay_answer (DBusGProxy *proxy,
const char *text,
gpointer data)
@@ -1286,6 +1306,11 @@ connect_to_session_relay (GdmProductSlave *slave)
slave,
NULL);
dbus_g_proxy_connect_signal (slave->priv->session_relay_proxy,
+ "BeginVerificationForUser",
+ G_CALLBACK (on_relay_begin_verification_for_user),
+ slave,
+ NULL);
+ dbus_g_proxy_connect_signal (slave->priv->session_relay_proxy,
"AnswerQuery",
G_CALLBACK (on_relay_answer),
slave,
diff --git a/daemon/gdm-session-relay.c b/daemon/gdm-session-relay.c
index 4d98e608..5baf3246 100644
--- a/daemon/gdm-session-relay.c
+++ b/daemon/gdm-session-relay.c
@@ -160,11 +160,18 @@ gdm_session_relay_open (GdmSessionRelay *session_relay)
}
void
-gdm_session_relay_begin_verification (GdmSessionRelay *session_relay,
- const char *username)
+gdm_session_relay_begin_verification (GdmSessionRelay *session_relay)
{
g_debug ("Sending signal BeginVerification");
- send_dbus_string_signal (session_relay, "BeginVerification", username);
+ send_dbus_void_signal (session_relay, "BeginVerification");
+}
+
+void
+gdm_session_relay_begin_verification_for_user (GdmSessionRelay *session_relay,
+ const char *username)
+{
+ g_debug ("Sending signal BeginVerificationForUser");
+ send_dbus_string_signal (session_relay, "BeginVerificationForUser", username);
}
void
diff --git a/daemon/gdm-session-relay.h b/daemon/gdm-session-relay.h
index a286bed1..fe0b3d18 100644
--- a/daemon/gdm-session-relay.h
+++ b/daemon/gdm-session-relay.h
@@ -83,8 +83,9 @@ typedef struct
GType gdm_session_relay_get_type (void);
GdmSessionRelay * gdm_session_relay_new (void);
-void gdm_session_relay_begin_verification (GdmSessionRelay *session_relay,
- const char *username);
+void gdm_session_relay_begin_verification (GdmSessionRelay *session_relay);
+void gdm_session_relay_begin_verification_for_user (GdmSessionRelay *session_relay,
+ const char *username);
void gdm_session_relay_answer_query (GdmSessionRelay *session_relay,
const char *text);
void gdm_session_relay_open (GdmSessionRelay *session_relay);
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index aa831b0d..00270baa 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -842,7 +842,6 @@ on_greeter_stop (GdmGreeterSession *greeter,
static void
on_greeter_begin_verification (GdmGreeterServer *greeter_server,
- const char *username,
GdmSimpleSlave *slave)
{
GError *error;
@@ -851,7 +850,7 @@ on_greeter_begin_verification (GdmGreeterServer *greeter_server,
g_debug ("begin verification");
error = NULL;
res = gdm_session_begin_verification (slave->priv->session,
- username,
+ NULL,
&error);
if (! res) {
g_warning ("Unable to begin verification: %s", error->message);
@@ -860,6 +859,25 @@ on_greeter_begin_verification (GdmGreeterServer *greeter_server,
}
static void
+on_greeter_begin_verification_for_user (GdmGreeterServer *greeter_server,
+ const char *username,
+ GdmSimpleSlave *slave)
+{
+ GError *error;
+ gboolean res;
+
+ g_debug ("begin verification");
+ error = NULL;
+ res = gdm_session_begin_verification (slave->priv->session,
+ username,
+ &error);
+ if (! res) {
+ g_warning ("Unable to begin verification for user: %s", error->message);
+ g_error_free (error);
+ }
+}
+
+static void
on_greeter_answer (GdmGreeterServer *greeter_server,
const char *text,
GdmSimpleSlave *slave)
@@ -1038,6 +1056,10 @@ run_greeter (GdmSimpleSlave *slave)
G_CALLBACK (on_greeter_begin_verification),
slave);
g_signal_connect (slave->priv->greeter_server,
+ "begin-verification-for-user",
+ G_CALLBACK (on_greeter_begin_verification_for_user),
+ slave);
+ g_signal_connect (slave->priv->greeter_server,
"query-answer",
G_CALLBACK (on_greeter_answer),
slave);
diff --git a/gui/simple-greeter/gdm-greeter-client.c b/gui/simple-greeter/gdm-greeter-client.c
index 32bc0cbd..5ae36a4f 100644
--- a/gui/simple-greeter/gdm-greeter-client.c
+++ b/gui/simple-greeter/gdm-greeter-client.c
@@ -166,8 +166,7 @@ on_secret_info_query (DBusGProxy *proxy,
}
void
-gdm_greeter_client_call_begin_verification (GdmGreeterClient *client,
- const char *username)
+gdm_greeter_client_call_begin_verification (GdmGreeterClient *client)
{
gboolean res;
GError *error;
@@ -180,7 +179,6 @@ gdm_greeter_client_call_begin_verification (GdmGreeterClient *client,
res = dbus_g_proxy_call (client->priv->server_proxy,
"BeginVerification",
&error,
- G_TYPE_STRING, username,
G_TYPE_INVALID,
G_TYPE_INVALID);
if (! res) {
@@ -189,6 +187,31 @@ gdm_greeter_client_call_begin_verification (GdmGreeterClient *client,
}
}
+
+void
+gdm_greeter_client_call_begin_verification_for_user (GdmGreeterClient *client,
+ const char *username)
+{
+ gboolean res;
+ GError *error;
+
+ g_return_if_fail (GDM_IS_GREETER_CLIENT (client));
+
+ g_debug ("GREETER begin verification for user: '%s'", username);
+
+ error = NULL;
+ res = dbus_g_proxy_call (client->priv->server_proxy,
+ "BeginVerificationForUser",
+ &error,
+ G_TYPE_STRING, username,
+ G_TYPE_INVALID,
+ G_TYPE_INVALID);
+ if (! res) {
+ g_warning ("Unable to send BeginVerificationForUser: %s", error->message);
+ g_error_free (error);
+ }
+}
+
void
gdm_greeter_client_call_answer_query (GdmGreeterClient *client,
const char *text)
diff --git a/gui/simple-greeter/gdm-greeter-client.h b/gui/simple-greeter/gdm-greeter-client.h
index 95a7d677..766e5739 100644
--- a/gui/simple-greeter/gdm-greeter-client.h
+++ b/gui/simple-greeter/gdm-greeter-client.h
@@ -66,33 +66,34 @@ typedef enum _GdmGreeterClientError {
GDM_GREETER_CLIENT_ERROR_GENERIC = 0,
} GdmGreeterClientError;
-GType gdm_greeter_client_get_type (void);
-GQuark gdm_greeter_client_error_quark (void);
+GType gdm_greeter_client_get_type (void);
+GQuark gdm_greeter_client_error_quark (void);
-GdmGreeterClient * gdm_greeter_client_new (void);
+GdmGreeterClient * gdm_greeter_client_new (void);
-gboolean gdm_greeter_client_start (GdmGreeterClient *client,
+gboolean gdm_greeter_client_start (GdmGreeterClient *client,
GError **error);
-void gdm_greeter_client_stop (GdmGreeterClient *client);
-
-gboolean gdm_greeter_client_get_display_is_local (GdmGreeterClient *client);
-
-char * gdm_greeter_client_call_get_display_id (GdmGreeterClient *client);
-
-void gdm_greeter_client_call_begin_verification (GdmGreeterClient *client,
- const char *username);
-void gdm_greeter_client_call_cancel (GdmGreeterClient *client);
-void gdm_greeter_client_call_disconnect (GdmGreeterClient *client);
-void gdm_greeter_client_call_select_hostname (GdmGreeterClient *client,
- const char *text);
-void gdm_greeter_client_call_select_user (GdmGreeterClient *client,
- const char *text);
-void gdm_greeter_client_call_select_language (GdmGreeterClient *client,
- const char *text);
-void gdm_greeter_client_call_select_session (GdmGreeterClient *client,
- const char *text);
-void gdm_greeter_client_call_answer_query (GdmGreeterClient *client,
- const char *text);
+void gdm_greeter_client_stop (GdmGreeterClient *client);
+
+gboolean gdm_greeter_client_get_display_is_local (GdmGreeterClient *client);
+
+char * gdm_greeter_client_call_get_display_id (GdmGreeterClient *client);
+
+void gdm_greeter_client_call_begin_verification (GdmGreeterClient *client);
+void gdm_greeter_client_call_begin_verification_for_user (GdmGreeterClient *client,
+ const char *username);
+void gdm_greeter_client_call_cancel (GdmGreeterClient *client);
+void gdm_greeter_client_call_disconnect (GdmGreeterClient *client);
+void gdm_greeter_client_call_select_hostname (GdmGreeterClient *client,
+ const char *text);
+void gdm_greeter_client_call_select_user (GdmGreeterClient *client,
+ const char *text);
+void gdm_greeter_client_call_select_language (GdmGreeterClient *client,
+ const char *text);
+void gdm_greeter_client_call_select_session (GdmGreeterClient *client,
+ const char *text);
+void gdm_greeter_client_call_answer_query (GdmGreeterClient *client,
+ const char *text);
G_END_DECLS
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index d70b2e09..e5f767f3 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -76,6 +76,7 @@ enum {
enum {
BEGIN_VERIFICATION,
+ BEGIN_VERIFICATION_FOR_USER,
QUERY_ANSWER,
SESSION_SELECTED,
LANGUAGE_SELECTED,
@@ -435,10 +436,21 @@ on_user_chosen (GdmUserChooserWidget *user_chooser,
char *user_name;
user_name = gdm_user_chooser_widget_get_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser));
+ if (user_name == NULL) {
+ return;
+ }
- g_signal_emit (login_window, signals[BEGIN_VERIFICATION], 0, user_name);
+ if (strcmp (user_name, GDM_USER_CHOOSER_USER_OTHER) == 0) {
+ g_signal_emit (login_window, signals[BEGIN_VERIFICATION], 0);
+ } else if (strcmp (user_name, GDM_USER_CHOOSER_USER_GUEST) == 0) {
+ /* FIXME: handle guest account stuff */
+ } else {
+ g_signal_emit (login_window, signals[BEGIN_VERIFICATION_FOR_USER], 0, user_name);
+ }
switch_mode (login_window, MODE_AUTHENTICATION);
+
+ g_free (user_name);
}
static void
@@ -788,6 +800,16 @@ gdm_greeter_login_window_class_init (GdmGreeterLoginWindowClass *klass)
G_STRUCT_OFFSET (GdmGreeterLoginWindowClass, begin_verification),
NULL,
NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+ signals [BEGIN_VERIFICATION_FOR_USER] =
+ g_signal_new ("begin-verification-for-user",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GdmGreeterLoginWindowClass, begin_verification_for_user),
+ NULL,
+ NULL,
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE,
1, G_TYPE_STRING);
diff --git a/gui/simple-greeter/gdm-greeter-login-window.h b/gui/simple-greeter/gdm-greeter-login-window.h
index e8f28fc2..497b55d2 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.h
+++ b/gui/simple-greeter/gdm-greeter-login-window.h
@@ -45,20 +45,21 @@ typedef struct
GtkWindowClass parent_class;
/* signals */
- void (* begin_verification) (GdmGreeterLoginWindow *login_window,
- const char *username);
- void (* query_answer) (GdmGreeterLoginWindow *login_window,
- const char *text);
- void (* session_selected) (GdmGreeterLoginWindow *login_window,
- const char *text);
- void (* language_selected) (GdmGreeterLoginWindow *login_window,
- const char *text);
- void (* user_selected) (GdmGreeterLoginWindow *login_window,
- const char *text);
- void (* hostname_selected) (GdmGreeterLoginWindow *login_window,
- const char *text);
- void (* cancelled) (GdmGreeterLoginWindow *login_window);
- void (* disconnected) (GdmGreeterLoginWindow *login_window);
+ void (* begin_verification) (GdmGreeterLoginWindow *login_window);
+ void (* begin_verification_for_user) (GdmGreeterLoginWindow *login_window,
+ const char *username);
+ void (* query_answer) (GdmGreeterLoginWindow *login_window,
+ const char *text);
+ void (* session_selected) (GdmGreeterLoginWindow *login_window,
+ const char *text);
+ void (* language_selected) (GdmGreeterLoginWindow *login_window,
+ const char *text);
+ void (* user_selected) (GdmGreeterLoginWindow *login_window,
+ const char *text);
+ void (* hostname_selected) (GdmGreeterLoginWindow *login_window,
+ const char *text);
+ void (* cancelled) (GdmGreeterLoginWindow *login_window);
+ void (* disconnected) (GdmGreeterLoginWindow *login_window);
} GdmGreeterLoginWindowClass;
diff --git a/gui/simple-greeter/gdm-greeter-session.c b/gui/simple-greeter/gdm-greeter-session.c
index 44004579..fef9583b 100644
--- a/gui/simple-greeter/gdm-greeter-session.c
+++ b/gui/simple-greeter/gdm-greeter-session.c
@@ -122,11 +122,18 @@ on_secret_info_query (GdmGreeterClient *client,
static void
on_begin_verification (GdmGreeterLoginWindow *login_window,
- const char *username,
GdmGreeterSession *session)
{
- gdm_greeter_client_call_begin_verification (session->priv->client,
- username);
+ gdm_greeter_client_call_begin_verification (session->priv->client);
+}
+
+static void
+on_begin_verification_for_user (GdmGreeterLoginWindow *login_window,
+ const char *username,
+ GdmGreeterSession *session)
+{
+ gdm_greeter_client_call_begin_verification_for_user (session->priv->client,
+ username);
}
static void
@@ -221,6 +228,10 @@ toggle_login_window (GdmSessionManager *manager,
G_CALLBACK (on_begin_verification),
session);
g_signal_connect (session->priv->login_window,
+ "begin-verification-for-user",
+ G_CALLBACK (on_begin_verification_for_user),
+ session);
+ g_signal_connect (session->priv->login_window,
"query-answer",
G_CALLBACK (on_query_answer),
session);
diff --git a/gui/simple-greeter/gdm-user-chooser-widget.c b/gui/simple-greeter/gdm-user-chooser-widget.c
index 8fa4f9c8..c72597ac 100644
--- a/gui/simple-greeter/gdm-user-chooser-widget.c
+++ b/gui/simple-greeter/gdm-user-chooser-widget.c
@@ -43,9 +43,6 @@ enum {
#define GDM_USER_CHOOSER_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_USER_CHOOSER_WIDGET, GdmUserChooserWidgetPrivate))
-#define OTHER_USER_ID "__other"
-#define GUEST_USER_ID "__guest"
-
struct GdmUserChooserWidgetPrivate
{
GtkWidget *treeview;
@@ -385,7 +382,7 @@ populate_model (GdmUserChooserWidget *widget)
CHOOSER_LIST_PIXBUF_COLUMN, pixbuf,
CHOOSER_LIST_NAME_COLUMN, _("Other..."),
CHOOSER_LIST_TOOLTIP_COLUMN, _("Choose a different account"),
- CHOOSER_LIST_ID_COLUMN, OTHER_USER_ID,
+ CHOOSER_LIST_ID_COLUMN, GDM_USER_CHOOSER_USER_OTHER,
-1);
gtk_list_store_append (GTK_LIST_STORE (widget->priv->real_model), &iter);
@@ -393,7 +390,7 @@ populate_model (GdmUserChooserWidget *widget)
CHOOSER_LIST_PIXBUF_COLUMN, pixbuf,
CHOOSER_LIST_NAME_COLUMN, _("Guest"),
CHOOSER_LIST_TOOLTIP_COLUMN, _("Login as a temporary guest"),
- CHOOSER_LIST_ID_COLUMN, GUEST_USER_ID,
+ CHOOSER_LIST_ID_COLUMN, GDM_USER_CHOOSER_USER_GUEST,
-1);
if (pixbuf != NULL) {
@@ -550,12 +547,12 @@ user_visible_cb (GtkTreeModel *model,
}
if (! widget->priv->show_other_user
- && strcmp (id, OTHER_USER_ID) == 0) {
+ && strcmp (id, GDM_USER_CHOOSER_USER_OTHER) == 0) {
ret = FALSE;
goto out;
}
if (! widget->priv->show_guest_user
- && strcmp (id, GUEST_USER_ID) == 0) {
+ && strcmp (id, GDM_USER_CHOOSER_USER_GUEST) == 0) {
ret = FALSE;
goto out;
}
diff --git a/gui/simple-greeter/gdm-user-chooser-widget.h b/gui/simple-greeter/gdm-user-chooser-widget.h
index f89a2945..9c1ef6f8 100644
--- a/gui/simple-greeter/gdm-user-chooser-widget.h
+++ b/gui/simple-greeter/gdm-user-chooser-widget.h
@@ -49,6 +49,9 @@ typedef struct
void (* user_chosen) (GdmUserChooserWidget *widget);
} GdmUserChooserWidgetClass;
+#define GDM_USER_CHOOSER_USER_OTHER "__other"
+#define GDM_USER_CHOOSER_USER_GUEST "__guest"
+
GType gdm_user_chooser_widget_get_type (void);
GtkWidget * gdm_user_chooser_widget_new (void);