Commit 729df8c4 authored by William Jon McCann's avatar William Jon McCann Committed by William Jon McCann

Don't auto-activate g-p-m. Try to get focus in entry.

2007-09-10  William Jon McCann  <mccann@jhu.edu>

	* gui/simple-greeter/gdm-simple-greeter.c: (set_focus),
	(reset_dialog), (gdm_simple_greeter_info_query),
	(gdm_simple_greeter_secret_info_query):
	* gui/simple-greeter/gdm-simple-greeter.glade:
	* gui/simple-greeter/greeter-main.c:
	Don't auto-activate g-p-m.  Try to get focus in entry.


svn path=/branches/mccann-gobject/; revision=5236
parent 9dcf648c
2007-09-10 William Jon McCann <mccann@jhu.edu>
* gui/simple-greeter/gdm-simple-greeter.c: (set_focus),
(reset_dialog), (gdm_simple_greeter_info_query),
(gdm_simple_greeter_secret_info_query):
* gui/simple-greeter/gdm-simple-greeter.glade:
* gui/simple-greeter/greeter-main.c:
Don't auto-activate g-p-m. Try to get focus in entry.
2007-09-08 William Jon McCann <mccann@jhu.edu>
* daemon/gdm-greeter-server.c: (greeter_server_message_handler),
......
......@@ -146,6 +146,23 @@ set_sensitive (GdmSimpleGreeter *greeter,
gtk_widget_set_sensitive (box, sensitive);
}
static void
set_focus (GdmSimpleGreeter *greeter)
{
GtkWidget *top_level;
GtkWidget *entry;
entry = glade_xml_get_widget (GDM_SIMPLE_GREETER (greeter)->priv->xml, "auth-entry");
top_level = glade_xml_get_widget (greeter->priv->xml, "auth-window");
gdk_window_focus (top_level->window, GDK_CURRENT_TIME);
if (! GTK_WIDGET_HAS_FOCUS (entry)) {
gtk_widget_grab_focus (entry);
}
}
static void
set_message (GdmSimpleGreeter *greeter,
const char *text)
......@@ -180,14 +197,11 @@ reset_dialog (GdmSimpleGreeter *greeter)
label = glade_xml_get_widget (GDM_SIMPLE_GREETER (greeter)->priv->xml, "auth-label");
gtk_label_set_text (GTK_LABEL (label), "");
if (! GTK_WIDGET_HAS_FOCUS (entry)) {
gtk_widget_grab_focus (entry);
}
set_message (greeter, "");
set_ready (greeter);
set_sensitive (greeter, TRUE);
set_ready (greeter);
set_focus (GDM_SIMPLE_GREETER (greeter));
}
static gboolean
......@@ -253,13 +267,14 @@ gdm_simple_greeter_info_query (GdmGreeter *greeter,
label = glade_xml_get_widget (GDM_SIMPLE_GREETER (greeter)->priv->xml, "auth-label");
gtk_label_set_text (GTK_LABEL (label), text);
set_sensitive (GDM_SIMPLE_GREETER (greeter), TRUE);
set_ready (GDM_SIMPLE_GREETER (greeter));
set_focus (GDM_SIMPLE_GREETER (greeter));
if (! GTK_WIDGET_HAS_FOCUS (entry)) {
gtk_widget_grab_focus (entry);
}
set_ready (GDM_SIMPLE_GREETER (greeter));
set_sensitive (GDM_SIMPLE_GREETER (greeter), TRUE);
return TRUE;
}
......@@ -283,12 +298,9 @@ gdm_simple_greeter_secret_info_query (GdmGreeter *greeter,
label = glade_xml_get_widget (GDM_SIMPLE_GREETER (greeter)->priv->xml, "auth-label");
gtk_label_set_text (GTK_LABEL (label), text);
if (! GTK_WIDGET_HAS_FOCUS (entry)) {
gtk_widget_grab_focus (entry);
}
set_ready (GDM_SIMPLE_GREETER (greeter));
set_sensitive (GDM_SIMPLE_GREETER (greeter), TRUE);
set_ready (GDM_SIMPLE_GREETER (greeter));
set_focus (GDM_SIMPLE_GREETER (greeter));
return TRUE;
}
......
......@@ -6,7 +6,7 @@
<widget class="GtkWindow" id="auth-window">
<property name="border_width">12</property>
<property name="visible">True</property>
<property name="title" translatable="yes">window1</property>
<property name="title" translatable="yes">Authentication Dialog</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
......@@ -15,7 +15,7 @@
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
......@@ -148,4 +148,5 @@
</widget>
</child>
</widget>
</glade-interface>
......@@ -289,7 +289,7 @@ proxy_destroyed (GObject *object,
g_debug ("GREETER Proxy disconnected");
}
#if 1
#if 0
static void
activate_power_manager (void)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment