From 0c9b793214eb0e2acf0aad3cc1f83425ca24d748 Mon Sep 17 00:00:00 2001 From: espen Date: Mon, 14 Aug 2006 13:57:37 +0000 Subject: [PATCH 1/1] Fixed toggle-action activation bug --- gtk/gtkaction.lisp | 6 +++--- gtk/gtktypes.lisp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gtk/gtkaction.lisp b/gtk/gtkaction.lisp index c8c80d7..4ffce9e 100644 --- a/gtk/gtkaction.lisp +++ b/gtk/gtkaction.lisp @@ -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 @@ ;;; 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 @@ #'(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 diff --git a/gtk/gtktypes.lisp b/gtk/gtktypes.lisp index c762663..1927a52 100644 --- a/gtk/gtktypes.lisp +++ b/gtk/gtktypes.lisp @@ -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 @@ :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))) -- 2.11.0