gdm r5794 - in trunk: . gui/simple-greeter
- From: halfline svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r5794 - in trunk: . gui/simple-greeter
- Date: Mon, 18 Feb 2008 21:34:51 +0000 (GMT)
Author: halfline
Date: Mon Feb 18 21:34:51 2008
New Revision: 5794
URL: http://svn.gnome.org/viewvc/gdm?rev=5794&view=rev
Log:
2008-02-18 Ray Strode <rstrode redhat com>
* gui/simple-greeter/gdm-greeter-client.[ch]:
(on_saved_language_name_read),
(on_saved_session_name_read),
(client_dbus_handle_message):
(gdm_greeter_client_class_init):
inform greeter session about language and
session name changes in slave
* gui/simple-greeter/gdm-greeter-panel.[ch]:
(gdm_greeter_panel_set_language_name_hint),
(gdm_greeter_panel_set_session_name_hint):
* gui/simple-greeter/gdm-greeter-session.c:
(on_saved_language_name_read),
(on_saved_session_name_read):
(gdm_greeter_session_init):
Set greeter language and session based on ~/.dmrc.
We'll probably need some policy here so we don't
override the user's explicit choice in the event
~/.dmrc doesn't get read right away.
Modified:
trunk/ChangeLog
trunk/gui/simple-greeter/gdm-greeter-client.c
trunk/gui/simple-greeter/gdm-greeter-client.h
trunk/gui/simple-greeter/gdm-greeter-panel.c
trunk/gui/simple-greeter/gdm-greeter-panel.h
trunk/gui/simple-greeter/gdm-greeter-session.c
Modified: trunk/gui/simple-greeter/gdm-greeter-client.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-greeter-client.c (original)
+++ trunk/gui/simple-greeter/gdm-greeter-client.c Mon Feb 18 21:34:51 2008
@@ -64,6 +64,8 @@
READY,
RESET,
SELECTED_USER_CHANGED,
+ SAVED_LANGUAGE_NAME_READ,
+ SAVED_SESSION_NAME_READ,
LAST_SIGNAL
};
@@ -132,6 +134,20 @@
}
static void
+on_saved_language_name_read (GdmGreeterClient *client,
+ DBusMessage *message)
+{
+ emit_string_signal_for_message (client, "SavedLanguageNameRead", message, SAVED_LANGUAGE_NAME_READ);
+}
+
+static void
+on_saved_session_name_read (GdmGreeterClient *client,
+ DBusMessage *message)
+{
+ emit_string_signal_for_message (client, "SavedSessionNameRead", message, SAVED_SESSION_NAME_READ);
+}
+
+static void
on_info_query (GdmGreeterClient *client,
DBusMessage *message)
{
@@ -497,6 +513,10 @@
on_reset (client, message);
} else if (dbus_message_is_signal (message, GREETER_SERVER_DBUS_INTERFACE, "SelectedUserChanged")) {
on_selected_user_changed (client, message);
+ } else if (dbus_message_is_signal (message, GREETER_SERVER_DBUS_INTERFACE, "SavedLanguageNameRead")) {
+ on_saved_language_name_read (client, message);
+ } else if (dbus_message_is_signal (message, GREETER_SERVER_DBUS_INTERFACE, "SavedSessionNameRead")) {
+ on_saved_session_name_read (client, message);
} else {
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
@@ -754,6 +774,26 @@
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE,
1, G_TYPE_STRING);
+ gdm_greeter_client_signals[SAVED_LANGUAGE_NAME_READ] =
+ g_signal_new ("saved-language-name-read",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GdmGreeterClientClass, saved_language_name_read),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE,
+ 1, G_TYPE_STRING);
+ gdm_greeter_client_signals[SAVED_SESSION_NAME_READ] =
+ g_signal_new ("saved-session-name-read",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GdmGreeterClientClass, saved_session_name_read),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE,
+ 1, G_TYPE_STRING);
}
static void
Modified: trunk/gui/simple-greeter/gdm-greeter-client.h
==============================================================================
--- trunk/gui/simple-greeter/gdm-greeter-client.h (original)
+++ trunk/gui/simple-greeter/gdm-greeter-client.h Mon Feb 18 21:34:51 2008
@@ -60,6 +60,11 @@
void (* selected_user_changed) (GdmGreeterClient *client,
const char *username);
+ void (* saved_session_name_read) (GdmGreeterClient *client,
+ const char *session_name);
+ void (* saved_language_name_read) (GdmGreeterClient *client,
+ const char *language_name);
+
} GdmGreeterClientClass;
#define GDM_GREETER_CLIENT_ERROR (gdm_greeter_client_error_quark ())
Modified: trunk/gui/simple-greeter/gdm-greeter-panel.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-greeter-panel.c (original)
+++ trunk/gui/simple-greeter/gdm-greeter-panel.c Mon Feb 18 21:34:51 2008
@@ -583,3 +583,20 @@
gtk_widget_hide (panel->priv->session_option_widget);
gtk_widget_hide (panel->priv->language_option_widget);
}
+
+void
+gdm_greeter_panel_set_language_name_hint (GdmGreeterPanel *panel,
+ const char *language_name)
+{
+ gdm_language_option_widget_set_current_language_name (GDM_LANGUAGE_OPTION_WIDGET (panel->priv->language_option_widget),
+ language_name);
+}
+
+void
+gdm_greeter_panel_set_session_name_hint (GdmGreeterPanel *panel,
+ const char *session_name)
+{
+
+ gdm_session_option_widget_set_current_session (GDM_SESSION_OPTION_WIDGET (panel->priv->session_option_widget),
+ session_name);
+}
Modified: trunk/gui/simple-greeter/gdm-greeter-panel.h
==============================================================================
--- trunk/gui/simple-greeter/gdm-greeter-panel.h (original)
+++ trunk/gui/simple-greeter/gdm-greeter-panel.h Mon Feb 18 21:34:51 2008
@@ -59,6 +59,10 @@
void gdm_greeter_panel_show_user_options (GdmGreeterPanel *panel);
void gdm_greeter_panel_hide_user_options (GdmGreeterPanel *panel);
+void gdm_greeter_panel_set_language_name_hint (GdmGreeterPanel *panel,
+ const char *language_name);
+void gdm_greeter_panel_set_session_name_hint (GdmGreeterPanel *panel,
+ const char *session_name);
G_END_DECLS
#endif /* __GDM_GREETER_PANEL_H */
Modified: trunk/gui/simple-greeter/gdm-greeter-session.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-greeter-session.c (original)
+++ trunk/gui/simple-greeter/gdm-greeter-session.c Mon Feb 18 21:34:51 2008
@@ -118,6 +118,26 @@
}
static void
+on_saved_language_name_read (GdmGreeterClient *client,
+ const char *text,
+ GdmGreeterSession *session)
+{
+ g_debug ("GdmGreeterSession: saved language name read: %s", text);
+ gdm_greeter_panel_set_language_name_hint (GDM_GREETER_PANEL (session->priv->panel),
+ text);
+}
+
+static void
+on_saved_session_name_read (GdmGreeterClient *client,
+ const char *text,
+ GdmGreeterSession *session)
+{
+ g_debug ("GdmGreeterSession: saved session name read: %s", text);
+ gdm_greeter_panel_set_session_name_hint (GDM_GREETER_PANEL (session->priv->panel),
+ text);
+}
+
+static void
on_info_query (GdmGreeterClient *client,
const char *text,
GdmGreeterSession *session)
@@ -697,6 +717,14 @@
"selected-user-changed",
G_CALLBACK (on_selected_user_changed),
session);
+ g_signal_connect (session->priv->client,
+ "saved-language-name-read",
+ G_CALLBACK (on_saved_language_name_read),
+ session);
+ g_signal_connect (session->priv->client,
+ "saved-session-name-read",
+ G_CALLBACK (on_saved_session_name_read),
+ session);
/* We want to listen for panel mnemonics even if the
* login window is focused, so we intercept them here.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]