[gtk+/touchscreens: 62/65] gtk, togglebutton: Remove gtk-touchcreen-mode usage
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/touchscreens: 62/65] gtk, togglebutton: Remove gtk-touchcreen-mode usage
- Date: Tue, 13 Dec 2011 19:01:18 +0000 (UTC)
commit ae01e94979d3689c5ccd89b53d534b97b4d48f9f
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Dec 12 19:11:41 2011 +0100
gtk,togglebutton: Remove gtk-touchcreen-mode usage
Emulated crossing events with mode GDK_CROSSING_TOUCH_PRESS/RELEASE
already catter dinamically for the "don't prelight on touch devices"
usecase.
gtk/gtktogglebutton.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index 5ff3bb0..9cbdf08 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -658,13 +658,9 @@ gtk_toggle_button_update_state (GtkButton *button)
{
GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button);
GtkToggleButtonPrivate *priv = toggle_button->priv;
- gboolean depressed, touchscreen;
+ gboolean depressed;
GtkStateFlags new_state = 0;
- g_object_get (gtk_widget_get_settings (GTK_WIDGET (button)),
- "gtk-touchscreen-mode", &touchscreen,
- NULL);
-
new_state = gtk_widget_get_state_flags (GTK_WIDGET (button)) &
~(GTK_STATE_FLAG_INCONSISTENT |
GTK_STATE_FLAG_PRELIGHT |
@@ -680,7 +676,7 @@ gtk_toggle_button_update_state (GtkButton *button)
else
depressed = priv->active;
- if (!touchscreen && button->priv->in_button && (!button->priv->button_down || priv->draw_indicator))
+ if (button->priv->in_button && (!button->priv->button_down || priv->draw_indicator))
new_state |= GTK_STATE_FLAG_PRELIGHT;
if (depressed)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]