mirror of
https://github.com/brl/mutter.git
synced 2025-08-05 16:14:51 +00:00
Get and use double-click speed from GtkSettings (Bug #103218).
2003-05-29 Ray Strode <halfline@hawaii.rr.com> Get and use double-click speed from GtkSettings (Bug #103218). * src/ui.c, src/ui.h: add function meta_ui_get_double_click_timeout for looking up the global double-click speed. * src/display.c, src/display.h: remove double_click_time field from MetaDisplay and use meta_ui_get_double_click_timeout instead.
This commit is contained in:
20
src/ui.c
20
src/ui.c
@@ -765,3 +765,23 @@ meta_stock_icons_init (void)
|
||||
|
||||
g_object_unref (G_OBJECT (factory));
|
||||
}
|
||||
|
||||
int
|
||||
meta_ui_get_double_click_timeout (void)
|
||||
{
|
||||
GtkSettings *settings;
|
||||
GObjectClass *klass;
|
||||
int timeout = 0;
|
||||
|
||||
settings = gtk_settings_get_default ();
|
||||
|
||||
klass = G_OBJECT_CLASS (GTK_SETTINGS_GET_CLASS (settings));
|
||||
if (g_object_class_find_property (klass, "gtk-double-click-time") == NULL)
|
||||
{
|
||||
return 250;
|
||||
}
|
||||
|
||||
g_object_get (G_OBJECT (settings), "gtk-double-click-time", &timeout, NULL);
|
||||
|
||||
return timeout;
|
||||
}
|
||||
|
Reference in New Issue
Block a user