[gtk+] Show lock warning for num lock as well as caps lock



commit 85e3f22c19b1322a7469f985feedf55fdff0dd6f
Author: William Jon McCann <jmccann redhat com>
Date:   Thu Jul 1 18:52:13 2010 -0400

    Show lock warning for num lock as well as caps lock
    
    https://bugzilla.gnome.org/show_bug.cgi?id=623239

 gtk/gtkentry.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 3c7aa25..f0fd92c 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -10016,7 +10016,12 @@ keymap_state_changed (GdkKeymap *keymap,
 
   if (gtk_entry_get_display_mode (entry) != DISPLAY_NORMAL && priv->caps_lock_warning)
     { 
-      if (gdk_keymap_get_caps_lock_state (keymap))
+      if (gdk_keymap_get_num_lock_state (keymap)
+          && gdk_keymap_get_caps_lock_state (keymap))
+        text = _("Caps Lock and Num Lock are on");
+      else if (gdk_keymap_get_num_lock_state (keymap))
+        text = _("Num Lock is on");
+      else if (gdk_keymap_get_caps_lock_state (keymap))
         text = _("Caps Lock is on");
     }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]