]> Pileus Git - ~andy/gtk/commitdiff
Make button draw depressed whenever the user clicks / activates it,
authorOwen Taylor <otaylor@redhat.com>
Sat, 23 Feb 2002 20:47:03 +0000 (20:47 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Sat, 23 Feb 2002 20:47:03 +0000 (20:47 +0000)
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.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktogglebutton.c

index bc83b5098b735a25950649f7fcecb6e0538ca289..45aadc77cc5e36575b2c37f5e42618b63daf8814 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
index bc83b5098b735a25950649f7fcecb6e0538ca289..45aadc77cc5e36575b2c37f5e42618b63daf8814 100644 (file)
@@ -1,3 +1,8 @@
+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.
index bc83b5098b735a25950649f7fcecb6e0538ca289..45aadc77cc5e36575b2c37f5e42618b63daf8814 100644 (file)
@@ -1,3 +1,8 @@
+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.
index bc83b5098b735a25950649f7fcecb6e0538ca289..45aadc77cc5e36575b2c37f5e42618b63daf8814 100644 (file)
@@ -1,3 +1,8 @@
+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.
index bc83b5098b735a25950649f7fcecb6e0538ca289..45aadc77cc5e36575b2c37f5e42618b63daf8814 100644 (file)
@@ -1,3 +1,8 @@
+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.
index bc83b5098b735a25950649f7fcecb6e0538ca289..45aadc77cc5e36575b2c37f5e42618b63daf8814 100644 (file)
@@ -1,3 +1,8 @@
+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.
index bc83b5098b735a25950649f7fcecb6e0538ca289..45aadc77cc5e36575b2c37f5e42618b63daf8814 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 27088291da9c7de59a296acf572c3bc8108a02d8..32409d5a8f6edf15dfbf7ea808aa9a631307e668 100644 (file)
@@ -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;