mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 16:30:15 +00:00
Drop support for GTK_TEST_TOUCHSCREEN
This environment variable is undocumented, and you can just use GTK_DEBUG=touchscreen insead.
This commit is contained in:
parent
d2faa38eed
commit
fedeb51f31
@ -623,13 +623,8 @@ gtk_set_debug_flags (GtkDebugFlags flags)
|
||||
gboolean
|
||||
gtk_simulate_touchscreen (void)
|
||||
{
|
||||
static int test_touchscreen;
|
||||
|
||||
if (test_touchscreen == 0)
|
||||
test_touchscreen = g_getenv ("GTK_TEST_TOUCHSCREEN") != NULL ? 1 : -1;
|
||||
|
||||
return test_touchscreen > 0 || (gtk_get_debug_flags () & GTK_DEBUG_TOUCHSCREEN) != 0;
|
||||
}
|
||||
return (gtk_get_debug_flags () & GTK_DEBUG_TOUCHSCREEN) != 0;
|
||||
}
|
||||
|
||||
#ifdef G_PLATFORM_WIN32
|
||||
#undef gtk_init_check
|
||||
|
@ -919,17 +919,6 @@ init_touchscreen (GtkInspectorVisual *vis)
|
||||
gtk_switch_set_active (GTK_SWITCH (vis->touchscreen_switch), (gtk_get_debug_flags () & GTK_DEBUG_TOUCHSCREEN) != 0);
|
||||
g_signal_connect (vis->touchscreen_switch, "notify::active",
|
||||
G_CALLBACK (update_touchscreen), NULL);
|
||||
|
||||
if (g_getenv ("GTK_TEST_TOUCHSCREEN") != 0)
|
||||
{
|
||||
GtkWidget *row;
|
||||
|
||||
/* hardcoded, nothing we can do */
|
||||
gtk_switch_set_active (GTK_SWITCH (vis->touchscreen_switch), TRUE);
|
||||
gtk_widget_set_sensitive (vis->touchscreen_switch, FALSE);
|
||||
row = gtk_widget_get_ancestor (vis->touchscreen_switch, GTK_TYPE_LIST_BOX_ROW);
|
||||
gtk_widget_set_tooltip_text (row, _("Setting is hardcoded by GTK_TEST_TOUCHSCREEN"));
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user