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:
Richard Hult 2006-07-24 12:31:17 +00:00 committed by Richard Hult
parent ae9bd354c1
commit 348bffc856
3 changed files with 33 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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 */