diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-02-23 20:47:03 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-02-23 20:47:03 +0000 |
commit | 50fbc10b83a774d729f38e9a84e3f6ad3bf2e8f4 (patch) | |
tree | 96c5fa04a0940ebc65b7b080b66bc1e19fed34af /gtk/gtktogglebutton.c | |
parent | e5d1ea8cfefac95f9011fffcff66345e4d2de70d (diff) | |
download | gtk+-50fbc10b83a774d729f38e9a84e3f6ad3bf2e8f4.tar.gz |
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.
Diffstat (limited to 'gtk/gtktogglebutton.c')
-rw-r--r-- | gtk/gtktogglebutton.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c index 27088291da..32409d5a8f 100644 --- a/gtk/gtktogglebutton.c +++ b/gtk/gtktogglebutton.c @@ -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; |