chiark / gitweb /
Made iter argument to TREE-MODEL-ITER-N-CHILDREN optional
[clg] / gtk / gtkaction.lisp
index 736e16ae10d3c69760862cc40b81907a55b0fc84..4ffce9e08f4bf26cf9b8ee6eda8d6a8868b2f32b 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.6 2005-10-21 11:50:50 espen Exp $
+;; $Id: gtkaction.lisp,v 1.10 2006-08-14 13:57:37 espen Exp $
 
 
 (in-package "GTK")
@@ -33,7 +33,7 @@ (defmethod initialize-instance ((action action) &key callback)
     (apply #'signal-connect action 'activate (mklist callback))))
 
 (defmethod action-accelerator ((action action))
-  (object-data action 'accelerator))
+  (user-data action 'accelerator))
 
 (defbinding (action-is-sensitive-p "gtk_action_is_sensitive") () boolean
   (action action))
@@ -85,7 +85,7 @@ (defbinding action-group-remove-action () nil
 
 (defmethod initialize-instance ((action radio-action) &key group)
   (call-next-method)
-  (setf (slot-value action 'self) (sap-int (proxy-location action)))
+  (setf (slot-value action 'self) (pointer-address (foreign-location action)))
   (when group
     (add-to-radio-group action group)))
 
@@ -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
@@ -180,24 +180,20 @@ (defbinding %ui-manager-add-ui-from-string (ui-manager ui) int
   (ui-manager ui-manager)
   (ui string)
   ((length ui) int)
-  (gerror pointer :out))
+  (gerror gerror-signal :out))
+
+(defgeneric ui-manager-add-ui (ui-manager ui-spec))
 
 (defmethod ui-manager-add-ui ((ui-manager ui-manager) (ui-spec string))
-  (let ((id (%ui-manager-add-ui-from-string ui-manager ui-spec)))
-    (when (zerop id)
-      (error "We need to handle GError in som way"))
-    id))
+  (%ui-manager-add-ui-from-string ui-manager ui-spec))
 
 (defbinding %ui-manager-add-ui-from-file () int
   (ui-manager ui-manager)
   (filename pathname)
-  (gerror pointer :out))
+  (gerror gerror-signal :out))
 
 (defmethod ui-manager-add-ui ((ui-manager ui-manager) (path pathname))
-  (let ((id (%ui-manager-add-ui-from-file ui-manager path)))
-    (when (zerop id)
-      (error "We need to handle GError in som way"))
-    id))
+  (%ui-manager-add-ui-from-file ui-manager path))
 
 (defbinding %ui-manager-new-merge-id () unsigned-int
   (ui-manager ui-manager))