From 399580f9e15b68f0e462779bb2c2d5d29d581618 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 1 Sep 2010 20:21:21 -0400 Subject: [PATCH] Remove GtkEntry::state-hint This was a style property to let theme engines 'opt-in' to more correct behaviour while maintaining compatibility with existing themes. GTK+ 3 engines are expected to handle the more correct behaviour. --- gtk/gtkentry.c | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index ff325092d7..ff00922f67 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -1743,21 +1743,6 @@ gtk_entry_class_init (GtkEntryClass *class) GTK_TYPE_BORDER, GTK_PARAM_READABLE)); - /** - * GtkEntry:state-hint: - * - * Indicates whether to pass a proper widget state when - * drawing the shadow and the widget background. - * - * Since: 2.16 - */ - gtk_widget_class_install_style_property (widget_class, - g_param_spec_boolean ("state-hint", - P_("State Hint"), - P_("Whether to pass a proper state when drawing shadow or background"), - FALSE, - GTK_PARAM_READABLE)); - gtk_settings_install_property (g_param_spec_boolean ("gtk-entry-select-on-focus", P_("Select on focus"), P_("Whether to select the contents of an entry when it is focused"), @@ -3298,7 +3283,6 @@ gtk_entry_draw_frame (GtkWidget *widget, GtkStyle *style; GdkWindow *window; gint x = 0, y = 0, width, height; - gboolean state_hint; GtkStateType state; window = gtk_widget_get_window (widget); @@ -3327,12 +3311,8 @@ gtk_entry_draw_frame (GtkWidget *widget, } style = gtk_widget_get_style (widget); - gtk_widget_style_get (widget, "state-hint", &state_hint, NULL); - if (state_hint) - state = gtk_widget_has_focus (widget) ? - GTK_STATE_ACTIVE : gtk_widget_get_state (widget); - else - state = GTK_STATE_NORMAL; + state = gtk_widget_has_focus (widget) ? + GTK_STATE_ACTIVE : gtk_widget_get_state (widget); gtk_paint_shadow (style, window, state, priv->shadow_type, @@ -3478,19 +3458,13 @@ gtk_entry_expose (GtkWidget *widget, { GtkEntry *entry = GTK_ENTRY (widget); GtkStyle *style; - gboolean state_hint; GtkStateType state; GtkEntryPrivate *priv = GTK_ENTRY_GET_PRIVATE (entry); style = gtk_widget_get_style (widget); - gtk_widget_style_get (widget, "state-hint", &state_hint, NULL); - - if (state_hint) - state = gtk_widget_has_focus (widget) ? - GTK_STATE_ACTIVE : gtk_widget_get_state (widget); - else - state = gtk_widget_get_state(widget); + state = gtk_widget_has_focus (widget) ? + GTK_STATE_ACTIVE : gtk_widget_get_state (widget); if (gtk_widget_get_window (widget) == event->window) {