Added class definition for event type GRAB-BROKEN
[clg] / gtk / gtkaction.lisp
index c8c80d7..3124075 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.12 2008-03-10 18:51:13 espen Exp $
 
 
 (in-package "GTK")
@@ -32,9 +32,6 @@
   (when callback
     (apply #'signal-connect action 'activate (mklist callback))))
 
-(defmethod action-accelerator ((action action))
-  (user-data action 'accelerator))
-
 (defbinding (action-is-sensitive-p "gtk_action_is_sensitive") () boolean
   (action action))
 
 
 ;;; Toggle Action
 
-(defmethod initialize-instance ((action toggle-action) &rest initargs &key callback)
+(defmethod initialize-instance ((action toggle-action) &rest initargs &key callback #?-(pkg-exists-p "gtk+-2.0" :atleast-version "2.10.0")active)
   (remf initargs :callback)
   (apply #'call-next-method action initargs)
   (when callback
         #'(lambda ()
             (funcall function (toggle-action-active-p action))))
        :object object :after after)))
-  (when (toggle-action-active-p action)
+  #?-(pkg-exists-p "gtk+-2.0" :atleast-version "2.10.0")
+  (when active
     (action-activate action)))
 
 (defbinding toggle-action-toggled () nil
 (defvar *valid-ui-elements*
   '((:ui :menubar :toolbar :popup :accelerator)
     (:menubar :menuitem :separator :placeholder :menu)
-    (:menu :menuitem :separator :placehoder :menu)
-    (:popup :menuitem :separator :placehoder :menu)
-    (:toolbar :toolitem :separator :placehoder)
+    (:menu :menuitem :separator :placeholder :menu)
+    (:popup :menuitem :separator :placeholder :menu)
+    (:toolbar :toolitem :separator :placeholder)
     (:placeholder :menuitem :toolitem :separator :placeholder :menu)
     (:menuitem)
     (:toolitem)