mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
Disable tooltips if gtk-touchscreen-mode is activated (#315112).
2006-03-02 Ross Burton <ross@openedhand.com> * gtk/gtktooltips.c: Disable tooltips if gtk-touchscreen-mode is activated (#315112).
This commit is contained in:
parent
d8467db6ce
commit
b05e988d77
@ -1,3 +1,8 @@
|
||||
2006-03-02 Ross Burton <ross@openedhand.com>
|
||||
|
||||
* gtk/gtktooltips.c:
|
||||
Disable tooltips if gtk-touchscreen-mode is activated (#315112).
|
||||
|
||||
2006-03-01 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
* gtk/gtktreeselection.c (row_is_selectable): rename to
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-03-02 Ross Burton <ross@openedhand.com>
|
||||
|
||||
* gtk/gtktooltips.c:
|
||||
Disable tooltips if gtk-touchscreen-mode is activated (#315112).
|
||||
|
||||
2006-03-01 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
* gtk/gtktreeselection.c (row_is_selectable): rename to
|
||||
|
@ -610,6 +610,21 @@ stop_keyboard_mode (GtkWidget *widget)
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
tooltips_enabled (GtkTooltips *tooltips, GtkWidget *w)
|
||||
{
|
||||
GtkSettings *settings;
|
||||
gboolean touchscreen;
|
||||
|
||||
if (!tooltips->enabled)
|
||||
return FALSE;
|
||||
|
||||
settings = gtk_widget_get_settings (w);
|
||||
g_object_get (settings, "gtk-touchscreen-mode", &touchscreen, NULL);
|
||||
|
||||
return !touchscreen;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_tooltips_start_delay (GtkTooltips *tooltips,
|
||||
GtkWidget *widget)
|
||||
@ -617,7 +632,7 @@ gtk_tooltips_start_delay (GtkTooltips *tooltips,
|
||||
GtkTooltipsData *old_tips_data;
|
||||
|
||||
old_tips_data = tooltips->active_tips_data;
|
||||
if (tooltips->enabled &&
|
||||
if (tooltips_enabled (tooltips, widget) &&
|
||||
(!old_tips_data || old_tips_data->widget != widget))
|
||||
{
|
||||
guint delay;
|
||||
|
Loading…
Reference in New Issue
Block a user