]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/_core.py
compilation fix for !wxUSE_STATBOX
[wxWidgets.git] / wxPython / src / gtk / _core.py
index fe4aaa4a0d38ef85b827398b491c03499f29258d..bcdab6ff04982301e5ba054fcaf452399bbef468 100644 (file)
@@ -3847,6 +3847,15 @@ class PyEventBinder(object):
             success += target.Disconnect(id1, id2, et)
         return success != 0
 
             success += target.Disconnect(id1, id2, et)
         return success != 0
 
+    def _getEvtType(self):
+        """
+        Make it easy to get to the default wxEventType typeID for this
+        event binder.
+        """
+        return self.evtType[0]
+    
+    typeId = property(_getEvtType)
+
     
     def __call__(self, *args):
         """
     
     def __call__(self, *args):
         """
@@ -10728,9 +10737,15 @@ class Menu(EvtHandler):
         """Remove(self, int id) -> MenuItem"""
         return _core_.Menu_Remove(*args, **kwargs)
 
         """Remove(self, int id) -> MenuItem"""
         return _core_.Menu_Remove(*args, **kwargs)
 
-    def RemoveItem(*args, **kwargs):
+    def RemoveItem(self, item):
         """RemoveItem(self, MenuItem item) -> MenuItem"""
         """RemoveItem(self, MenuItem item) -> MenuItem"""
-        return _core_.Menu_RemoveItem(*args, **kwargs)
+        #// The return object is always the parameter, so return that 
+        #// proxy instead of the new one
+        val = _core_.Menu_RemoveItem(self, item)
+        item.this.own(val.this.own())
+        val.this.disown()
+        return item
+
 
     def Delete(*args, **kwargs):
         """Delete(self, int id) -> bool"""
 
     def Delete(*args, **kwargs):
         """Delete(self, int id) -> bool"""
@@ -11036,13 +11051,14 @@ class MenuItem(Object):
     __repr__ = _swig_repr
     def __init__(self, *args, **kwargs): 
         """
     __repr__ = _swig_repr
     def __init__(self, *args, **kwargs): 
         """
-        __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString, 
+        __init__(self, Menu parentMenu=None, int id=ID_SEPARATOR, String text=EmptyString, 
             String help=EmptyString, int kind=ITEM_NORMAL, 
             Menu subMenu=None) -> MenuItem
         """
         _core_.MenuItem_swiginit(self,_core_.new_MenuItem(*args, **kwargs))
     __swig_destroy__ = _core_.delete_MenuItem
     __del__ = lambda self : None;
             String help=EmptyString, int kind=ITEM_NORMAL, 
             Menu subMenu=None) -> MenuItem
         """
         _core_.MenuItem_swiginit(self,_core_.new_MenuItem(*args, **kwargs))
     __swig_destroy__ = _core_.delete_MenuItem
     __del__ = lambda self : None;
+    def Destroy(self): pass 
     def GetMenu(*args, **kwargs):
         """GetMenu(self) -> Menu"""
         return _core_.MenuItem_GetMenu(*args, **kwargs)
     def GetMenu(*args, **kwargs):
         """GetMenu(self) -> Menu"""
         return _core_.MenuItem_GetMenu(*args, **kwargs)
@@ -13318,6 +13334,16 @@ class GridBagSizer(FlexGridSizer):
         """
         return _core_.GridBagSizer_FindItem(*args)
 
         """
         return _core_.GridBagSizer_FindItem(*args)
 
+    def GetItem(self, item):
+        gbsi = None
+        si = wx.FlexGridSizer.GetItem(self, item)
+        if not si:
+            return None
+        if type(item) is not int:
+            gbsi = self.FindItem(item)
+        if gbsi: return gbsi
+        return si
+
     def FindItemAtPosition(*args, **kwargs):
         """
         FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
     def FindItemAtPosition(*args, **kwargs):
         """
         FindItemAtPosition(self, GBPosition pos) -> GBSizerItem