Commit a9e82cd4 authored by William Jon McCann's avatar William Jon McCann

Deprecate and ignore gtk-enable-tooltips setting

It is enabled by default except on touch input devices.
parent 85c06147
......@@ -1151,6 +1151,8 @@ gtk_settings_class_init (GtkSettingsClass *class)
* Whether tooltips should be shown on widgets.
*
* Since: 2.14
*
* Deprecated: 3.10: This setting is ignored.
*/
result = settings_install_property_parser (class,
g_param_spec_boolean ("gtk-enable-tooltips",
......
......@@ -1582,26 +1582,15 @@ tooltips_enabled (GdkEvent *event)
{
GdkDevice *source_device;
GdkInputSource source;
GdkWindow *window;
gboolean enabled;
GdkScreen *screen;
GtkSettings *settings;
window = event->any.window;
source_device = gdk_event_get_source_device (event);
if (!source_device)
return FALSE;
source = gdk_device_get_source (source_device);
screen = gdk_window_get_screen (window);
settings = gtk_settings_get_for_screen (screen);
g_object_get (settings,
"gtk-enable-tooltips", &enabled,
NULL);
if (enabled && source != GDK_SOURCE_TOUCHSCREEN)
if (source != GDK_SOURCE_TOUCHSCREEN)
return TRUE;
return FALSE;
......
......@@ -1200,22 +1200,6 @@ set_toolbar_both_horiz (GtkWidget *widget,
gtk_toolbar_set_style (GTK_TOOLBAR (data), GTK_TOOLBAR_BOTH_HORIZ);
}
static void
set_toolbar_enable (GtkWidget *widget,
gpointer data)
{
GtkSettings *settings = gtk_widget_get_settings (widget);
g_object_set (settings, "gtk-enable-tooltips", TRUE, NULL);
}
static void
set_toolbar_disable (GtkWidget *widget,
gpointer data)
{
GtkSettings *settings = gtk_widget_get_settings (widget);
g_object_set (settings, "gtk-enable-tooltips", FALSE, NULL);
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
static GtkActionEntry create_toolbar_items[] = {
{ NULL, GTK_STOCK_NEW, NULL, NULL, "Stock icon: New",
......@@ -1240,11 +1224,6 @@ static GtkActionEntry create_toolbar_items[] = {
NULL },
{ NULL },
{ NULL },
{ NULL, NULL, "Enable", NULL, "Enable tooltips",
G_CALLBACK (set_toolbar_enable) },
{ NULL, NULL, "Disable", NULL, "Disable tooltips",
G_CALLBACK (set_toolbar_disable) },
{ NULL },
{ NULL, NULL, "Frobate", NULL, "Frobate tooltip",
NULL },
{ NULL, NULL, "Baz", NULL, "Baz tooltip",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment