Commit 8ebef872 authored by Søren Sandmann's avatar Søren Sandmann Committed by Søren Sandmann Pedersen

Remove check for previous state being ACTIVE. Bug 153876.

Sat Oct 23 15:17:55 2004  Søren Sandmann  <sandmann@redhat.com>

	* gtk/gtkmenutoolbutton.c (button_state_changed_cb): Remove check
	for previous state being ACTIVE. Bug 153876.
parent a04c0a35
Sat Oct 23 15:17:55 2004 Søren Sandmann <sandmann@redhat.com>
* gtk/gtkmenutoolbutton.c (button_state_changed_cb): Remove check
for previous state being ACTIVE. Bug 153876.
2004-10-22 Matthias Clasen <mclasen@redhat.com> 2004-10-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_drag_data_received) * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_drag_data_received)
......
Sat Oct 23 15:17:55 2004 Søren Sandmann <sandmann@redhat.com>
* gtk/gtkmenutoolbutton.c (button_state_changed_cb): Remove check
for previous state being ACTIVE. Bug 153876.
2004-10-22 Matthias Clasen <mclasen@redhat.com> 2004-10-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_drag_data_received) * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_drag_data_received)
......
Sat Oct 23 15:17:55 2004 Søren Sandmann <sandmann@redhat.com>
* gtk/gtkmenutoolbutton.c (button_state_changed_cb): Remove check
for previous state being ACTIVE. Bug 153876.
2004-10-22 Matthias Clasen <mclasen@redhat.com> 2004-10-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_drag_data_received) * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_drag_data_received)
......
Sat Oct 23 15:17:55 2004 Søren Sandmann <sandmann@redhat.com>
* gtk/gtkmenutoolbutton.c (button_state_changed_cb): Remove check
for previous state being ACTIVE. Bug 153876.
2004-10-22 Matthias Clasen <mclasen@redhat.com> 2004-10-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_drag_data_received) * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_drag_data_received)
......
...@@ -258,32 +258,31 @@ button_state_changed_cb (GtkWidget *widget, ...@@ -258,32 +258,31 @@ button_state_changed_cb (GtkWidget *widget,
GtkMenuToolButton *button) GtkMenuToolButton *button)
{ {
GtkMenuToolButtonPrivate *priv; GtkMenuToolButtonPrivate *priv;
GtkWidget *b; GtkWidget *other;
GtkStateType state = GTK_WIDGET_STATE (widget); GtkStateType state = GTK_WIDGET_STATE (widget);
priv = GTK_MENU_TOOL_BUTTON_GET_PRIVATE (button); priv = GTK_MENU_TOOL_BUTTON_GET_PRIVATE (button);
b = (widget == priv->arrow_button) ? priv->button : priv->arrow_button; other = (widget == priv->arrow_button) ? priv->button : priv->arrow_button;
g_signal_handlers_block_by_func (G_OBJECT (b), g_signal_handlers_block_by_func (G_OBJECT (other),
G_CALLBACK (button_state_changed_cb), G_CALLBACK (button_state_changed_cb),
button); button);
if (state == GTK_STATE_PRELIGHT && if (state == GTK_STATE_PRELIGHT)
previous_state != GTK_STATE_ACTIVE)
{ {
gtk_widget_set_state (b, state); gtk_widget_set_state (other, state);
} }
else if (state == GTK_STATE_NORMAL) else if (state == GTK_STATE_NORMAL)
{ {
gtk_widget_set_state (b, state); gtk_widget_set_state (other, state);
} }
else if (state == GTK_STATE_ACTIVE) else if (state == GTK_STATE_ACTIVE)
{ {
gtk_widget_set_state (b, GTK_STATE_NORMAL); gtk_widget_set_state (other, GTK_STATE_NORMAL);
} }
g_signal_handlers_unblock_by_func (G_OBJECT (b), g_signal_handlers_unblock_by_func (G_OBJECT (other),
G_CALLBACK (button_state_changed_cb), G_CALLBACK (button_state_changed_cb),
button); 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