Commit b675a132 authored by Benjamin Otte's avatar Benjamin Otte

button: Remove depressed_on_activate

All buttons should always be marked as :active when they are pressed.
That includes checkboxes (which are never activated in real code anyway,
so this change pretty much doesn't matter).
parent 1abe9237
......@@ -628,7 +628,6 @@ gtk_button_init (GtkButton *button)
priv->button_down = FALSE;
priv->use_stock = FALSE;
priv->use_underline = FALSE;
priv->depress_on_activate = TRUE;
priv->focus_on_click = TRUE;
priv->xalign = 0.5;
......@@ -2458,7 +2457,7 @@ gtk_button_update_state (GtkButton *button)
gboolean depressed;
if (priv->activate_timeout)
depressed = priv->depress_on_activate;
depressed = TRUE;
else
depressed = priv->in_button && priv->button_down;
......
......@@ -53,7 +53,6 @@ struct _GtkButtonPrivate
guint align_set : 1;
guint button_down : 1;
guint constructed : 1;
guint depress_on_activate : 1;
guint focus_on_click : 1;
guint image_is_stock : 1;
guint in_button : 1;
......
......@@ -208,8 +208,6 @@ gtk_radio_button_init (GtkRadioButton *radio_button)
_gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio_button), TRUE);
GTK_BUTTON (radio_button)->priv->depress_on_activate = FALSE;
priv->group = g_slist_prepend (NULL, radio_button);
gtk_widget_set_state_flags (GTK_WIDGET (radio_button), GTK_STATE_FLAG_CHECKED, TRUE);
......
......@@ -229,8 +229,6 @@ gtk_toggle_button_init (GtkToggleButton *toggle_button)
toggle_button->priv = gtk_toggle_button_get_instance_private (toggle_button);
toggle_button->priv->active = FALSE;
toggle_button->priv->draw_indicator = FALSE;
GTK_BUTTON (toggle_button)->priv->depress_on_activate = TRUE;
}
static void
......@@ -419,7 +417,6 @@ gtk_toggle_button_set_mode (GtkToggleButton *toggle_button,
GtkStyleContext *context;
priv->draw_indicator = draw_indicator;
GTK_BUTTON (toggle_button)->priv->depress_on_activate = !draw_indicator;
if (gtk_widget_get_visible (GTK_WIDGET (toggle_button)))
gtk_widget_queue_resize (GTK_WIDGET (toggle_button));
......
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