[gtk+] Add a gtk-keynav-use-caret mode setting



commit c9371f6a185fe1fef1669ffb52a4c4964478042a
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Mar 4 22:25:37 2016 -0500

    Add a gtk-keynav-use-caret mode setting
    
    For accessibility reasons, it is useful to have a global setting
    that makes carets visible in all text.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=602526
    https://bugzilla.gnome.org/show_bug.cgi?id=762799

 gtk/gtksettings.c |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 0b158a6..3be0fff 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -220,7 +220,8 @@ enum {
   PROP_DIALOGS_USE_HEADER,
   PROP_ENABLE_PRIMARY_PASTE,
   PROP_RECENT_FILES_ENABLED,
-  PROP_LONG_PRESS_TIME
+  PROP_LONG_PRESS_TIME,
+  PROP_KEYNAV_USE_CARET
 };
 
 /* --- prototypes --- */
@@ -1723,6 +1724,24 @@ gtk_settings_class_init (GtkSettingsClass *class)
                                                                GTK_PARAM_READWRITE),
                                              NULL);
   g_assert (result == PROP_LONG_PRESS_TIME);
+
+  /**
+   * GtkSettings:gtk-keynav-use-caret:
+   *
+   * Whether GTK+ should make sure that text can be navigated with
+   * a caret, even if it is not editable. This is useful when using
+   * a screen reader.
+   *
+   * Since: 3.20
+   */
+  result = settings_install_property_parser (class,
+                                             g_param_spec_boolean ("gtk-keynav-use-caret",
+                                                                   P_("Whether to show cursor in text"),
+                                                                   P_("Whether to show cursor in text"),
+                                                                   FALSE,
+                                                                   GTK_PARAM_READWRITE),
+                                             NULL);
+  g_assert (result == PROP_KEYNAV_USE_CARET);
 }
 
 static void


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