Commit 50fbc10b authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Make button draw depressed whenever the user clicks / activates it,

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.
parent e5d1ea8c
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.
......
......@@ -247,17 +247,6 @@ gtk_toggle_button_get_property (GObject *object,
}
}
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)
......@@ -273,8 +262,7 @@ gtk_toggle_button_set_mode (GtkToggleButton *toggle_button,
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));
......@@ -358,7 +346,6 @@ gtk_toggle_button_set_inconsistent (GtkToggleButton *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));
......@@ -444,8 +431,6 @@ gtk_toggle_button_clicked (GtkButton *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);
......@@ -463,7 +448,7 @@ gtk_toggle_button_update_state (GtkButton *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;
......
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