[gtk+/gestures] settings: Add gtk-long-press-time setting



commit 3164a0c8bf3edcb35fc732b769cc403822e21e8f
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Mar 31 12:22:11 2014 +0200

    settings: Add gtk-long-press-time setting
    
    This setting determines the duration of a button/touch press to
    be considered a long press.

 gtk/gtksettings.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 5c834ef..86697d6 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -218,7 +218,8 @@ enum {
   PROP_DECORATION_LAYOUT,
   PROP_DIALOGS_USE_HEADER,
   PROP_ENABLE_PRIMARY_PASTE,
-  PROP_RECENT_FILES_ENABLED
+  PROP_RECENT_FILES_ENABLED,
+  PROP_LONG_PRESS_TIME
 };
 
 /* --- prototypes --- */
@@ -1634,6 +1635,22 @@ gtk_settings_class_init (GtkSettingsClass *class)
                                                                    GTK_PARAM_READWRITE),
                                              NULL);
   g_assert (result == PROP_RECENT_FILES_ENABLED);
+
+  /**
+   * GtkSettings:gtk-long-press-time:
+   *
+   * The time for a button or touch press to be considered a "long press".
+   *
+   * Since: 3.14
+   */
+  result = settings_install_property_parser (class,
+                                             g_param_spec_uint ("gtk-long-press-time",
+                                                               P_("Long press time"),
+                                                               P_("Time for a button/touch press to be 
considered a long press (in milliseconds)"),
+                                                               0, G_MAXINT, 500,
+                                                               GTK_PARAM_READWRITE),
+                                             NULL);
+  g_assert (result == PROP_LONG_PRESS_TIME);
 }
 
 static void


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