+2006-07-24 Richard Hult <richard@imendio.com>
+
+ * gdk/quartz/gdkevents-quartz.c (gdk_screen_get_setting): Implement
+ getting the double click threshold.
+
2006-07-24 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_type_hint): Set the
+2006-07-24 Richard Hult <richard@imendio.com>
+
+ * gdk/quartz/gdkevents-quartz.c (gdk_screen_get_setting): Implement
+ getting the double click threshold.
+
2006-07-24 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_type_hint): Set the
const gchar *name,
GValue *value)
{
+ /* FIXME: This should be fetched from the correct preference value. See:
+ http://developer.apple.com/documentation/UserExperience/\
+ Conceptual/OSXHIGuidelines/XHIGText/chapter_13_section_2.html
+ */
if (strcmp (name, "gtk-font-name") == 0)
{
- /* FIXME: This should be fetched from the correct preference value */
g_value_set_string (value, "Lucida Grande 13");
return TRUE;
}
+ else if (strcmp (name, "gtk-double-click-time") == 0)
+ {
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ float t;
+
+ GDK_QUARTZ_ALLOC_POOL;
+
+ t = [defaults floatForKey:@"com.apple.mouse.doubleClickThreshold"];
+ if (t == 0.0)
+ {
+ /* No user setting, use the default in OS X. */
+ t = 0.5;
+ }
+
+ GDK_QUARTZ_RELEASE_POOL;
+
+ g_value_set_int (value, t * 1000);
+ return TRUE;
+ }
/* FIXME: Add more settings */