mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
Implement getting the double click threshold.
2006-07-24 Richard Hult <richard@imendio.com> * gdk/quartz/gdkevents-quartz.c (gdk_screen_get_setting): Implement getting the double click threshold.
This commit is contained in:
parent
ae9bd354c1
commit
348bffc856
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -1598,12 +1598,34 @@ gdk_screen_get_setting (GdkScreen *screen,
|
||||
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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user