diff options
author | George Lebl <jirka@5z.com> | 2002-08-07 23:13:30 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2002-08-07 23:13:30 +0000 |
commit | 2e27aa69067ed58bc4482d257ce007e00e993d97 (patch) | |
tree | d47843f6264b9f8f320bc6acd4b970e9be80ad61 /gui | |
parent | 587fe4731d6702e85a0c8eb51df10c2231d390d7 (diff) | |
download | gdm-2e27aa69067ed58bc4482d257ce007e00e993d97.tar.gz |
ignore up/down/tab just like in the standard greeter
Wed Aug 07 16:19:13 2002 George Lebl <jirka@5z.com>
* gui/greeter/greeter_pam_item.c: ignore up/down/tab just like
in the standard greeter
Diffstat (limited to 'gui')
-rw-r--r-- | gui/greeter/greeter_item_pam.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/gui/greeter/greeter_item_pam.c b/gui/greeter/greeter_item_pam.c index 53e1fcd7..f74d4360 100644 --- a/gui/greeter/greeter_item_pam.c +++ b/gui/greeter/greeter_item_pam.c @@ -26,7 +26,6 @@ user_pw_activate (GtkEntry *entry, GreeterItemInfo *info) { char *tmp; GreeterItemInfo *error_info; - GreeterItemInfo *message_info; gtk_widget_set_sensitive (GTK_WIDGET (entry), FALSE); @@ -60,6 +59,28 @@ user_pw_activate (GtkEntry *entry, GreeterItemInfo *info) g_free (tmp); } +static gboolean +key_press_handler (GtkWidget *widget, GdkEventKey *event) +{ + if (event == NULL) + return FALSE; + + switch (event->keyval) { + + case GDK_Up: + case GDK_Down: + case GDK_Tab: + g_signal_stop_emission_by_name (G_OBJECT (widget), + "key_press_event"); + return TRUE; + + default: + break; + } + + return FALSE; +} + gboolean greeter_item_pam_setup (void) { @@ -84,6 +105,9 @@ greeter_item_pam_setup (void) g_signal_connect (entry, "activate", GTK_SIGNAL_FUNC (user_pw_activate), entry_info); + g_signal_connect (entry, "key_press_event", + G_CALLBACK (key_press_handler), + NULL); } return TRUE; } |