+Sat Feb 23 15:43:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktogglebutton.c: Make button draw depressed whenever
+ the user clicks / activates it, whether it's off/on/inconsistent.
+
Sat Feb 23 11:54:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/*.h gdk/*.h: Massive padding addition to class structures.
+Sat Feb 23 15:43:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktogglebutton.c: Make button draw depressed whenever
+ the user clicks / activates it, whether it's off/on/inconsistent.
+
Sat Feb 23 11:54:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/*.h gdk/*.h: Massive padding addition to class structures.
+Sat Feb 23 15:43:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktogglebutton.c: Make button draw depressed whenever
+ the user clicks / activates it, whether it's off/on/inconsistent.
+
Sat Feb 23 11:54:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/*.h gdk/*.h: Massive padding addition to class structures.
+Sat Feb 23 15:43:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktogglebutton.c: Make button draw depressed whenever
+ the user clicks / activates it, whether it's off/on/inconsistent.
+
Sat Feb 23 11:54:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/*.h gdk/*.h: Massive padding addition to class structures.
+Sat Feb 23 15:43:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktogglebutton.c: Make button draw depressed whenever
+ the user clicks / activates it, whether it's off/on/inconsistent.
+
Sat Feb 23 11:54:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/*.h gdk/*.h: Massive padding addition to class structures.
+Sat Feb 23 15:43:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktogglebutton.c: Make button draw depressed whenever
+ the user clicks / activates it, whether it's off/on/inconsistent.
+
Sat Feb 23 11:54:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/*.h gdk/*.h: Massive padding addition to class structures.
+Sat Feb 23 15:43:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktogglebutton.c: Make button draw depressed whenever
+ the user clicks / activates it, whether it's off/on/inconsistent.
+
Sat Feb 23 11:54:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/*.h gdk/*.h: Massive padding addition to class structures.
}
}
-static void
-gtk_toggle_button_update_depress_on_activate (GtkToggleButton *toggle_button)
-{
- GtkButton *button = GTK_BUTTON (toggle_button);
-
- if (toggle_button->draw_indicator || toggle_button->inconsistent)
- button->depress_on_activate = FALSE;
- else
- button->depress_on_activate = !toggle_button->active;
-}
-
void
gtk_toggle_button_set_mode (GtkToggleButton *toggle_button,
gboolean draw_indicator)
if (toggle_button->draw_indicator != draw_indicator)
{
toggle_button->draw_indicator = draw_indicator;
-
- gtk_toggle_button_update_depress_on_activate (toggle_button);
+ GTK_BUTTON (toggle_button)->depress_on_activate = !draw_indicator;
if (GTK_WIDGET_VISIBLE (toggle_button))
gtk_widget_queue_resize (GTK_WIDGET (toggle_button));
{
toggle_button->inconsistent = setting;
- gtk_toggle_button_update_depress_on_activate (toggle_button);
gtk_toggle_button_update_state (GTK_BUTTON (toggle_button));
gtk_widget_queue_draw (GTK_WIDGET (toggle_button));
GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button);
toggle_button->active = !toggle_button->active;
- gtk_toggle_button_update_depress_on_activate (toggle_button);
-
gtk_toggle_button_toggled (toggle_button);
gtk_toggle_button_update_state (button);
if (toggle_button->inconsistent)
depressed = FALSE;
else if (button->in_button && button->button_down)
- depressed = !toggle_button->active;
+ depressed = TRUE;
else
depressed = toggle_button->active;