chiark / gitweb /
Fixed toggle-action activation bug
authorespen <espen>
Mon, 14 Aug 2006 13:57:37 +0000 (13:57 +0000)
committerespen <espen>
Mon, 14 Aug 2006 13:57:37 +0000 (13:57 +0000)
gtk/gtkaction.lisp
gtk/gtktypes.lisp

index 537a7ccaedb04e043d92991ded7899bc7d60f3e3..21ca99301c0a087297974725458a691c5220ac85 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: gtkaction.lisp,v 1.9 2006/04/26 12:32:04 espen Exp $
+;; $Id: gtkaction.lisp,v 1.10 2006/08/14 13:57:37 espen Exp $
 
 
 (in-package "GTK")
@@ -118,7 +118,7 @@ (defun radio-action-get-current-value (action)
 
 ;;; Toggle Action
 
-(defmethod initialize-instance ((action toggle-action) &rest initargs &key callback)
+(defmethod initialize-instance ((action toggle-action) &rest initargs &key callback active)
   (remf initargs :callback)
   (apply #'call-next-method action initargs)
   (when callback
@@ -130,7 +130,7 @@ (defmethod initialize-instance ((action toggle-action) &rest initargs &key callb
         #'(lambda ()
             (funcall function (toggle-action-active-p action))))
        :object object :after after)))
-  (when (toggle-action-active-p action)
+  (when active
     (action-activate action)))
 
 (defbinding toggle-action-toggled () nil
index 18d19238d4aa1cc9ab5da40a73520fb5a9f43986..645d1ba9cf623bc186c49527a59f58a6bccc31c3 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: gtktypes.lisp,v 1.48 2006/06/23 12:25:38 espen Exp $
+;; $Id: gtktypes.lisp,v 1.49 2006/08/14 13:57:37 espen Exp $
 
 (in-package "GTK")
 
@@ -998,7 +998,7 @@     (default-height :merge t :unbound -1)))
      :allocation :virtual
      :getter "gtk_toggle_action_get_active"
      :setter "gtk_toggle_action_set_active"
-     :initarg :active
+;     :initarg :active
      :accessor toggle-action-active-p
      :type boolean)))