diff options
author | Brian Cameron <Brian.Cameron@Sun.Com> | 2005-03-19 03:54:46 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2005-03-19 03:54:46 +0000 |
commit | 2113558129ae8a86e83252b2fe6a524857395c84 (patch) | |
tree | 0b27caa8b4a59e2ef607af3d32d9745bcb41f047 /gui/greeter | |
parent | 1eb8e52ee503813856b97a19dda775a1839a82b3 (diff) | |
download | gdm-2113558129ae8a86e83252b2fe6a524857395c84.tar.gz |
Fixed messages - fixes bug 170531. Now use ve_locale_from_utf in the
Fri Mar 18 21:45:0000 2005 Brian Cameron <Brian.Cameron@Sun.Com>
* daemon/slave.c, daemon/verify-crypt.c,
daemon/verify-shadow.c, gui/gdmcomm.c,
gui/gdmphotosetup.c, gui/gdmsetup.c,
vicious-extensions/glade-helper.c:
Fixed messages - fixes bug 170531.
* gui/gdmlogin.c: Now use ve_locale_from_utf in
the gdm_login_enter function since it's used
everywhere else and in the same logic in the
greeter.
* gui/greeter/greeter.c, gui/greeter_item_pam.[hc],
gui/greeter_greeter_parser.c,
gui/greeter/themes/circles/circles.xml,
gui/greeter/themes/happygnome/happygnome.xml,
gui/greeter/themes/happygnome-list/happygnome.xml,
docs/C/gdm.xml: Added OK button to greeter so GDM
now properly follows the Sun HCI recommendations.
Fixes bug 98470.
Diffstat (limited to 'gui/greeter')
-rw-r--r-- | gui/greeter/greeter.c | 21 | ||||
-rw-r--r-- | gui/greeter/greeter_item_pam.c | 6 | ||||
-rw-r--r-- | gui/greeter/greeter_item_pam.h | 1 | ||||
-rw-r--r-- | gui/greeter/greeter_parser.c | 5 | ||||
-rw-r--r-- | gui/greeter/themes/circles/circles.xml | 14 | ||||
-rw-r--r-- | gui/greeter/themes/happygnome-list/happygnome.xml | 14 | ||||
-rw-r--r-- | gui/greeter/themes/happygnome/happygnome.xml | 14 |
7 files changed, 70 insertions, 5 deletions
diff --git a/gui/greeter/greeter.c b/gui/greeter/greeter.c index 52a8256b..5e5c6c6f 100644 --- a/gui/greeter/greeter.c +++ b/gui/greeter/greeter.c @@ -579,8 +579,22 @@ key_press_event (GtkWidget *widget, GdkEventKey *key, gpointer data) return FALSE; } -static -void +static void +greeter_action_ok (GreeterItemInfo *info, + gpointer user_data) +{ + GreeterItemInfo *entry_info = greeter_lookup_id ("user-pw-entry"); + if (entry_info && entry_info->item && + GNOME_IS_CANVAS_WIDGET (entry_info->item) && + GTK_IS_ENTRY (GNOME_CANVAS_WIDGET (entry_info->item)->widget)) + { + GtkWidget *entry; + entry = GNOME_CANVAS_WIDGET (entry_info->item)->widget; + greeter_item_pam_login (entry, entry_info); + } +} + +static void greeter_action_cancel (GreeterItemInfo *info, gpointer user_data) { @@ -600,6 +614,9 @@ greeter_setup_items (void) greeter_item_capslock_setup (window); greeter_item_timed_setup (); + greeter_item_register_action_callback ("ok_button", + greeter_action_ok, + window); greeter_item_register_action_callback ("cancel_button", greeter_action_cancel, window); diff --git a/gui/greeter/greeter_item_pam.c b/gui/greeter/greeter_item_pam.c index 223762b0..c6e660e5 100644 --- a/gui/greeter/greeter_item_pam.c +++ b/gui/greeter/greeter_item_pam.c @@ -71,8 +71,8 @@ set_text (GreeterItemInfo *info, const char *text) info->item); } -static void -user_pw_activate (GtkEntry *entry, GreeterItemInfo *info) +void +greeter_item_pam_login (GtkEntry *entry, GreeterItemInfo *info) { const char *str; char *tmp; @@ -160,7 +160,7 @@ greeter_item_pam_setup (void) } g_signal_connect (entry, "activate", - G_CALLBACK (user_pw_activate), entry_info); + G_CALLBACK (greeter_item_pam_login), entry_info); g_signal_connect (G_OBJECT (entry), "key_press_event", G_CALLBACK (key_press_event), NULL); } diff --git a/gui/greeter/greeter_item_pam.h b/gui/greeter/greeter_item_pam.h index c98c2fc8..0d7f8eb1 100644 --- a/gui/greeter/greeter_item_pam.h +++ b/gui/greeter/greeter_item_pam.h @@ -11,6 +11,7 @@ void greeter_item_pam_message (const char *message); void greeter_item_pam_error (const char *message); void greeter_item_pam_set_user (const char *user); void greeter_item_pam_leftover_messages (void); +void greeter_item_pam_login (GtkEntry *entry, GreeterItemInfo *info); extern gchar *greeter_current_user; diff --git a/gui/greeter/greeter_parser.c b/gui/greeter/greeter_parser.c index 962464f8..8ba6ee7c 100644 --- a/gui/greeter/greeter_parser.c +++ b/gui/greeter/greeter_parser.c @@ -1064,6 +1064,11 @@ parse_stock (xmlNodePtr node, g_free (*translated_text); *translated_text = g_strdup (_("Username:")); } + else if (g_ascii_strcasecmp (prop, "ok") == 0) + { + g_free (*translated_text); + *translated_text = g_strdup (_("_OK")); + } else if (g_ascii_strcasecmp (prop, "cancel") == 0) { g_free (*translated_text); diff --git a/gui/greeter/themes/circles/circles.xml b/gui/greeter/themes/circles/circles.xml index 901536a0..5f82877c 100644 --- a/gui/greeter/themes/circles/circles.xml +++ b/gui/greeter/themes/circles/circles.xml @@ -172,6 +172,20 @@ </item> </fixed> </item> + <item type="rect" id="ok_button" button="true"> + <normal color="#ffffff"/> + <pos anchor="n" x="50%" width="50%" height="20"/> + <box orientation="vertical" spacing="10" xpadding="10"> + <item type="label"> + <normal color="#000000" font="Sans 12"/> + <prelight color="#666666" font="Sans 12"/> + <active color="#ff0000" font="Sans 12"/> + <pos anchor="n" x="50%" height="24" width="50%"/> + <!-- Stock label for: _OK --> + <stock type="ok"/> + </item> + </box> + </item> <item type="rect" id="cancel_button" button="true"> <normal color="#ffffff"/> <pos anchor="n" x="50%" width="50%" height="20"/> diff --git a/gui/greeter/themes/happygnome-list/happygnome.xml b/gui/greeter/themes/happygnome-list/happygnome.xml index 44c42284..23610d1d 100644 --- a/gui/greeter/themes/happygnome-list/happygnome.xml +++ b/gui/greeter/themes/happygnome-list/happygnome.xml @@ -188,6 +188,20 @@ </item> </fixed> </item> + <item type="rect" id="ok_button" button="true"> + <normal color="#ffffff"/> + <pos anchor="n" x="50%" width="50%" height="20"/> + <box orientation="vertical" spacing="10" xpadding="10"> + <item type="label"> + <normal color="#000000" font="Sans 12"/> + <prelight color="#666666" font="Sans 12"/> + <active color="#ff0000" font="Sans 12"/> + <pos anchor="n" x="50%" height="24" width="50%"/> + <!-- Stock label for: _OK --> + <stock type="ok"/> + </item> + </box> + </item> <item type="rect" id="cancel_button" button="true"> <normal color="#ffffff"/> <pos anchor="n" x="50%" width="50%" height="20"/> diff --git a/gui/greeter/themes/happygnome/happygnome.xml b/gui/greeter/themes/happygnome/happygnome.xml index 1adca450..dd52de1b 100644 --- a/gui/greeter/themes/happygnome/happygnome.xml +++ b/gui/greeter/themes/happygnome/happygnome.xml @@ -172,6 +172,20 @@ </item> </fixed> </item> + <item type="rect" id="ok_button" button="true"> + <normal color="#ffffff"/> + <pos anchor="n" x="50%" width="50%" height="20"/> + <box orientation="vertical" spacing="10" xpadding="10"> + <item type="label"> + <normal color="#000000" font="Sans 12"/> + <prelight color="#666666" font="Sans 12"/> + <active color="#ff0000" font="Sans 12"/> + <pos anchor="n" x="50%" height="24" width="50%"/> + <!-- Stock label for: _OK --> + <stock type="ok"/> + </item> + </box> + </item> <item type="rect" id="cancel_button" button="true"> <normal color="#ffffff"/> <pos anchor="n" x="50%" width="50%" height="20"/> |