Example #1
0
 def remove(self, *args, **kwds):
     if not kwds.get('do_nothing', False):
         if self.parent.widget: self.parent.widget.SetStatusBar(None)
         try: self.parent.properties['statusbar'].set_value(0)
         except KeyError: pass
         if self.widget: self.widget.Hide()
         EditBase.remove(self)
     else:
         if EditStatusBar._hidden_frame is None:
             EditStatusBar._hidden_frame = wx.Frame(None, -1, "")
         if self.widget is not None:
             self.widget.Reparent(EditStatusBar._hidden_frame)
         self.widget = None
Example #2
0
 def remove(self, *args, **kwds):
     if self.parent is not None:
         self.parent.properties['toolbar'].set_value(0)
         if kwds.get('do_nothing', False):  # and wxPlatform == '__WXGTK__':
             # this probably leaks memory, but avoids segfaults
             self.widget = None
         else:
             if self.parent.widget:
                 self.parent.widget.SetToolBar(None)
     else:
         if self.widget:
             self.widget.Destroy()
             self.widget = None
     EditBase.remove(self)
Example #3
0
 def remove(self, *args, **kwds):
     if self.parent is not None:
         self.parent.properties['toolbar'].set_value(0)
         if kwds.get('do_nothing', False): # and wxPlatform == '__WXGTK__':
             # this probably leaks memory, but avoids segfaults
             self.widget = None
         else:
             if self.parent.widget:
                 self.parent.widget.SetToolBar(None)
     else:
         if self.widget:
             self.widget.Destroy()
             self.widget = None
     EditBase.remove(self)
Example #4
0
 def remove(self, *args, **kwds):
     if self.parent is not None:
         self.parent.properties['toolbar'].set(False)
         self.parent._toolbar = None
         if kwds.get('do_nothing', False):
             # this probably leaks memory, but avoids segfaults
             self.widget = None
         else:
             if self.parent.widget:
                 self.parent.widget.SetToolBar(None)
     else:
         if self.widget:
             compat.DestroyLater(self.widget)
             self.widget = None
     EditBase.remove(self)
Example #5
0
 def remove(self, *args, **kwds):
     if not kwds.get('do_nothing', False):
         if self.parent.widget: self.parent.widget.SetStatusBar(None)
         try:
             self.parent.properties['statusbar'].set_value(0)
         except KeyError:
             pass
         if self.widget: self.widget.Hide()
         EditBase.remove(self)
     else:
         if misc.check_wx_version(2, 6):
             if EditStatusBar._hidden_frame is None:
                 EditStatusBar._hidden_frame = wx.Frame(None, -1, "")
             if self.widget is not None:
                 self.widget.Reparent(EditStatusBar._hidden_frame)
         self.widget = None
Example #6
0
 def remove(self, *args, **kwds):
     if self.parent is not None:
         self.parent.properties['menubar'].set_value(0)
         if kwds.get('gtk_do_nothing', False) and wx.Platform == '__WXGTK__':
             # workaround to prevent some segfaults on GTK: unfortunately,
             # I'm not sure that this works in all cases, and moreover it
             # could probably leak some memory (but I'm not sure)
             self.widget = None
         else:
             if self.parent.widget:
                 self.parent.widget.SetMenuBar(None)
     else:
         if self.widget:
             self.widget.Destroy()
             self.widget = None
     EditBase.remove(self)
 def remove(self, *args, **kwds):
     if self.parent is not None:
         self.parent.properties['menubar'].set(False)
         self.parent._menubar = None
         if kwds.get('gtk_do_nothing', False) and wx.Platform == '__WXGTK__':
             # workaround to prevent some segfaults on GTK: unfortunately,
             # I'm not sure that this works in all cases, and moreover it
             # could probably leak some memory (but I'm not sure)
             self.widget = None
         else:
             if self.parent.widget:
                 self.parent.widget.SetMenuBar(None)
     else:
         if self.widget:
             compat.DestroyLater(self.widget)
             self.widget = None
     EditBase.remove(self)
Example #8
0
 def remove(self, *args, **kwds):
     if not kwds.get('do_nothing', False):
         if self.parent.widget:
             self.parent.widget.SetStatusBar(None)
         try:
             self.parent._statusbar = None
         except KeyError:
             pass
         if self.widget:
             self.widget.Hide()
         EditBase.remove(self)
     else:
         if EditStatusBar._hidden_frame is None:
             EditStatusBar._hidden_frame = wx.Frame(None, -1, "")
         if self.widget is not None:
             self.widget.Reparent(EditStatusBar._hidden_frame)
         self.widget = None
Example #9
0
 def remove(self, *args, **kwds):
     if self.parent is not None:
         self.parent.properties['menubar'].set_value(0)
         if kwds.get('gtk_do_nothing', False) and wx.Platform == '__WXGTK__':
             # workaround to prevent some segfaults on GTK: unfortunately,
             # I'm not sure that this works in all cases, and moreover it
             # could probably leak some memory (but I'm not sure)
             self.widget = None
         else:
             if self.parent.widget:
                 if wx.Platform == '__WXGTK__' and \
                        not misc.check_wx_version(2, 5):
                     self.widget.Reparent(EditMenuBar.__hidden_frame)
                     self.widget.Hide()
                 self.parent.widget.SetMenuBar(None)
     else:
         if self.widget:
             self.widget.Destroy()
             self.widget = None
     EditBase.remove(self)
Example #10
0
 def remove(self, user=True):
     EditBase.remove(self, user=user)
     self.parent.properties['statusbar'].set(False)
     return None   # explicitely return not a Slot; see history
Example #11
0
 def remove(self, user=True):
     EditBase.remove(self, user=user)
     self.parent.properties['statusbar'].set(False)
Example #12
0
 def remove(self):
     EditBase.remove(self)
     if 'toolbar' in self.parent.properties:
         self.parent.properties['toolbar'].set(False)
Example #13
0
 def remove(self, user=True):
     EditBase.remove(self, user=user)
     if 'menubar' in self.parent.properties:
         self.parent.properties['menubar'].set(False)
Example #14
0
 def remove(self):
     EditBase.remove(self)
     self.parent.properties['statusbar'].set(False)