commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/designer/src base/ToolBar.py base/docks/Ba...


From: Jason Cater
Subject: gnue/designer/src base/ToolBar.py base/docks/Ba...
Date: Mon, 16 Jun 2003 23:13:52 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Branch:         
Changes by:     Jason Cater <address@hidden>    03/06/16 23:13:51

Modified files:
        designer/src/base: ToolBar.py 
        designer/src/base/docks: BasePane.py DockedPane.py Docker.py 
                                 FloatingPane.py SplitDock.py 
        designer/src/forms/LayoutEditor: LayoutEditorTools.py 

Log message:
        more work on the docking system (may be broken)

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/ToolBar.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/docks/BasePane.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/docks/DockedPane.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/docks/Docker.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/docks/FloatingPane.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/base/docks/SplitDock.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/forms/LayoutEditor/LayoutEditorTools.py.diff?tr1=1.26&tr2=1.27&r1=text&r2=text

Patches:
Index: gnue/designer/src/base/ToolBar.py
diff -c gnue/designer/src/base/ToolBar.py:1.5 
gnue/designer/src/base/ToolBar.py:1.6
*** gnue/designer/src/base/ToolBar.py:1.5       Mon Jun  9 20:43:08 2003
--- gnue/designer/src/base/ToolBar.py   Mon Jun 16 23:13:51 2003
***************
*** 33,38 ****
--- 33,41 ----
  
  iconlocation = 
os.path.join(GConfig.getInstalledBase('designer_images','common_images') 
,'designer')
  
+ def getIcon(name, w, h):
+   return wxImage(os.path.join(iconlocation,"%s-%sx%s.png" % (name,w, h)),
+                   wxBITMAP_TYPE_PNG).ConvertToBitmap()
  
  class BaseToolBar(wxToolBar, EventAware):
  
***************
*** 53,59 ****
      self.init()
      self.Realize()
  
- 
    def addToolbarMapping(self, mapping):
      for type in string.split(mapping,';'):
        if not len(type):
--- 56,61 ----
***************
*** 72,79 ****
          self.mapping[handle] = id
  
          self.AddTool(id,
!           wxImage(os.path.join(iconlocation,"%s-%sx%s.png" % ((image,) + 
self.ICON_SIZE)),
!                   wxBITMAP_TYPE_PNG).ConvertToBitmap(),
            isToggle=1,
            shortHelpString=help,
            longHelpString=help)
--- 74,80 ----
          self.mapping[handle] = id
  
          self.AddTool(id,
!           getIcon(image, *self.ICON_SIZE),
            isToggle=1,
            shortHelpString=help,
            longHelpString=help)
Index: gnue/designer/src/base/docks/BasePane.py
diff -c gnue/designer/src/base/docks/BasePane.py:1.3 
gnue/designer/src/base/docks/BasePane.py:1.4
*** gnue/designer/src/base/docks/BasePane.py:1.3        Mon Jun 16 17:17:48 2003
--- gnue/designer/src/base/docks/BasePane.py    Mon Jun 16 23:13:51 2003
***************
*** 35,41 ****
      self.parent = parent
      self.instance = instance
      self.tool = tool
-     self.minimized = 0
  
      # Reparent the tool to be under our control...
      tool.Reparent(self)
--- 35,40 ----
Index: gnue/designer/src/base/docks/DockedPane.py
diff -c gnue/designer/src/base/docks/DockedPane.py:1.3 
gnue/designer/src/base/docks/DockedPane.py:1.4
*** gnue/designer/src/base/docks/DockedPane.py:1.3      Mon Jun 16 17:17:48 2003
--- gnue/designer/src/base/docks/DockedPane.py  Mon Jun 16 23:13:51 2003
***************
*** 94,106 ****
      nid = wxNewId()
      menu.Append(nid, _("Hide Tool"))
      EVT_MENU(self, nid, self.__Hide)
!     if self.minimized:
        menu.Enable(nid, 0)
  
      nid = wxNewId()
      menu.Append(nid, _("Show Tool"))
      EVT_MENU(self, nid, self.__Restore)
!     if not self.minimized:
        menu.Enable(nid, 0)
  
      menu.AppendSeparator()
--- 94,106 ----
      nid = wxNewId()
      menu.Append(nid, _("Hide Tool"))
      EVT_MENU(self, nid, self.__Hide)
!     if self.tool._visible:
        menu.Enable(nid, 0)
  
      nid = wxNewId()
      menu.Append(nid, _("Show Tool"))
      EVT_MENU(self, nid, self.__Restore)
!     if not self.tool._visible:
        menu.Enable(nid, 0)
  
      menu.AppendSeparator()
***************
*** 141,144 ****
      self.parent.resize(self, newHeight)
  
    def setFeedback(self, text):
!     self.instance.statusbar.SetStatusText(text)
\ No newline at end of file
--- 141,144 ----
      self.parent.resize(self, newHeight)
  
    def setFeedback(self, text):
!     self.instance.statusbar.SetStatusText(text)
Index: gnue/designer/src/base/docks/Docker.py
diff -c gnue/designer/src/base/docks/Docker.py:1.5 
gnue/designer/src/base/docks/Docker.py:1.6
*** gnue/designer/src/base/docks/Docker.py:1.5  Mon Jun 16 17:17:48 2003
--- gnue/designer/src/base/docks/Docker.py      Mon Jun 16 23:13:51 2003
***************
*** 41,53 ****
      wxPanel.__init__(self, parent, -1)
      self.parent = parent
      self.instance = instance
  
      self.horizSplitter = horizSplitter = wxSplitterWindow(self, -1, 
style=wxSP_3D)
      self.leftDock = leftWin = SplitDock(horizSplitter, self, 'left')
      self.rightDock = rightWin = SplitDock(horizSplitter, self,'right')
      EVT_SIZE(instance, self.__OnSize)
  
!     instance.registerEventListeners({'Docker:Undock': self.undock})
      self.tools = []
  
      #
--- 41,57 ----
      wxPanel.__init__(self, parent, -1)
      self.parent = parent
      self.instance = instance
+     self.runtime_section = runtime_section = '%s-Docker' % 
instance.properties.nickname
  
      self.horizSplitter = horizSplitter = wxSplitterWindow(self, -1, 
style=wxSP_3D)
      self.leftDock = leftWin = SplitDock(horizSplitter, self, 'left')
      self.rightDock = rightWin = SplitDock(horizSplitter, self,'right')
      EVT_SIZE(instance, self.__OnSize)
  
!     instance.registerEventListeners({
!                    'Docker:Undock': self.undock,
!                    'Docker:Dock': self.dock})
! 
      self.tools = []
  
      #
***************
*** 57,89 ****
  
        GDebug.printMesg(2,'Adding tool %s [%s]' % (title,id))
  
-       pos = RuntimeSettings.get(instance.runtime_section, 'Dock-%s' % id, 
baseclass.default_dock)
-       visible = RuntimeSettings.get(instance.runtime_section, 'Visible-%s' % 
id, baseclass.default_visible)
- 
-       #### Historical stuff... remove before 1.0 ####
-       if pos in ('topleft','topright','bottomleft','bottomright'):
-         pos = baseclass.default_dock
-       ####
- 
-       appd = (id, title, baseclass, hotkey, pos)
- 
        indx = '0'
        if '-' in pos:
          pos, indx = pos.split('-')
  
        tool = baseclass(id, title, instance, instance.rootObject, self)
  
!       if pos not in ('left','right'):  # i.e., 'frame' or something old
!         # Frame type
!         FloatingPane(instance, instance, tool)
!       else:
          # Docked type
!         if pos == 'left':
!           dock = leftWin
!         elif pos == 'right':
            dock = rightWin
!         dock.add(DockedPane(dock, instance, tool), indx)
  
        self.tools.append(tool)
  
        # Add ourselves to the Window menu
--- 61,92 ----
  
        GDebug.printMesg(2,'Adding tool %s [%s]' % (title,id))
  
        indx = '0'
+       pos = baseclass.default_dock
        if '-' in pos:
          pos, indx = pos.split('-')
  
        tool = baseclass(id, title, instance, instance.rootObject, self)
  
!       tool._docked = RuntimeSettings.getint(self.runtime_section, '%s-docked' 
% id, pos != 'frame')
!       tool._dock_location = RuntimeSettings.get(self.runtime_section, 
'%s-location' % id, (pos == 'frame' and 'left' or pos))
!       tool._dock_index = RuntimeSettings.getint(self.runtime_section, 
'%s-index' % id, indx)
!       tool._visible = RuntimeSettings.getint(self.runtime_section, 
'%s-visible' % id, tool.default_visible)
! 
!       appd = (id, title, baseclass, hotkey, pos)
! 
!       if tool._docked:
          # Docked type
!         if tool._dock_location == 'right':
            dock = rightWin
!         else:
!           dock = leftWin
!         dock.add(DockedPane(dock, instance, tool), tool._dock_index)
!       else:
!         # Frame type
!         FloatingPane(instance, instance, tool)
  
+       # Keep track of the tools we created
        self.tools.append(tool)
  
        # Add ourselves to the Window menu
***************
*** 92,112 ****
                                icon=None, hotkey=hotkey)
  
  
- ##      instance.__dict__["%sWindow" % id] = window
        instance.__dict__[id] = tool
  
!       if visible:
          instance.dispatchEvent('Show:Tool:%s' % id)
        else:
          instance.dispatchEvent('Hide:Tool:%s' % id)
  
- ##      instance.registerEventListeners({'Show:Tool:%s'% id: self.showTool
- 
      leftWin.refresh()
      rightWin.refresh()
      horizSplitter.SplitVertically(leftWin, rightWin,
!               RuntimeSettings.getint(instance.runtime_section, 
'DockSplitter-TopBottom',500))
!     leftWin.restoreSettings(instance.runtime_section)
  
    def __OnSize(self, event):
      self.SetSize(self.instance.GetClientSize())
--- 95,111 ----
                                icon=None, hotkey=hotkey)
  
  
        instance.__dict__[id] = tool
  
!       if tool._visible:
          instance.dispatchEvent('Show:Tool:%s' % id)
        else:
          instance.dispatchEvent('Hide:Tool:%s' % id)
  
      leftWin.refresh()
      rightWin.refresh()
      horizSplitter.SplitVertically(leftWin, rightWin,
!               RuntimeSettings.getint(self.runtime_section, 
'DockSplitter-TopBottom',500))
  
    def __OnSize(self, event):
      self.SetSize(self.instance.GetClientSize())
***************
*** 114,119 ****
--- 113,125 ----
  
    def saveSettings(self):
      settings = {'docksplitter-topbottom': 
self.horizSplitter.GetSashPosition()}
+     for tool in self.tools:
+       tid = tool.id
+       settings['%s-docked' % tid] = tool._docked
+       settings['%s-dock-location' % tid] = tool._dock_location
+       settings['%s-dock-index' % tid] = tool._dock_index
+       settings['%s-visible' % tid] = tool._visible
+ 
      settings.update(self.leftDock.saveSettings())
      settings.update(self.rightDock.saveSettings())
  
***************
*** 126,130 ****
      panel = dockpane.parent.remove(dockpane)
      FloatingPane(instance, instance, tool)
      dockpane.Destroy()
!     instance.dispatchEvent('Show:Tool:%s' % tool.id)
  
--- 132,147 ----
      panel = dockpane.parent.remove(dockpane)
      FloatingPane(instance, instance, tool)
      dockpane.Destroy()
!     instance.dispatchEvent('Show:Tool:%s' % id)
  
+   def dock(self, event):
+     tool = event.tool
+     if not tool._docked:
+       frame = tool.dockpane
+       if tool._dock_location == 'right':
+         dock = self.rightDock
+       else:
+         dock = self.leftDock
+       dock.add(DockedPane(dock, instance, tool), tool._dock_index)
+       frame.Destroy()
+     instance.dispatchEvent('Show:Tool:%s' % id)
Index: gnue/designer/src/base/docks/FloatingPane.py
diff -c gnue/designer/src/base/docks/FloatingPane.py:1.3 
gnue/designer/src/base/docks/FloatingPane.py:1.4
*** gnue/designer/src/base/docks/FloatingPane.py:1.3    Mon Jun 16 17:17:48 2003
--- gnue/designer/src/base/docks/FloatingPane.py        Mon Jun 16 23:13:51 2003
***************
*** 33,39 ****
  from wxPython.wx import *
  from gnue.common.apps import GDebug
  from BasePane import BasePane
! from gnue.designer.base.ToolBar import BaseToolBar
  
  #
  # Any tool frames inherit from this
--- 33,39 ----
  from wxPython.wx import *
  from gnue.common.apps import GDebug
  from BasePane import BasePane
! from gnue.designer.base.ToolBar import BaseToolBar, getIcon
  
  #
  # Any tool frames inherit from this
***************
*** 44,50 ****
  
    default_width = 300
    default_height = 200
-   default_visible = 0
  
    def __init__(self, parent, instance, tool):
      if sys.platform[:3] == 'win':
--- 44,49 ----
***************
*** 57,89 ****
      wxFrame.__init__(self, instance, -1, tool.title, style=style)
      BasePane.__init__(self, parent, instance, tool)
  
      if tool.uses_feedback_bar:
        self.statusbar = self.CreateStatusBar()
  
      if tool.uses_toolbar:
        toolbar = tool.createToolbar(self)
        self.SetToolBar(toolbar)
  
! 
      EVT_CLOSE(self, self.OnClose)
      self.Refresh()
  
! ##    self.SetPosition((
! ##       RuntimeSettings.getint(self.runtime_section, 'x', -1),
! ##       RuntimeSettings.getint(self.runtime_section, 'y', -1)))
! 
! ##    self.SetSize((
! ##       RuntimeSettings.getint(
! ##           self.runtime_section, 'width', self.default_width),
! ##       RuntimeSettings.getint(
! ##           self.runtime_section, 'height', self.default_height)))
! 
! ##    if RuntimeSettings.getint(
! ##           self.runtime_section, 'visible', self.default_visible):
! ##      self.show()
  
  
! ##    RuntimeSettings.registerRuntimeSettingHandler(self.instance, self)
  
  ##    instance.registerEventListeners(
  ##               { 'Show:Tool:%s' % self.id : self.show,
--- 56,95 ----
      wxFrame.__init__(self, instance, -1, tool.title, style=style)
      BasePane.__init__(self, parent, instance, tool)
  
+     self.runtime_section = '%s-%s-frame' % (instance.properties.nickname, 
tool.id)
+ 
      if tool.uses_feedback_bar:
        self.statusbar = self.CreateStatusBar()
  
      if tool.uses_toolbar:
        toolbar = tool.createToolbar(self)
        self.SetToolBar(toolbar)
+     else:
+       toolbar = self.CreateToolBar()
+       toolbar.SetToolBitmapSize(wxSize(24,24))
+       toolbar.ICON_SIZE = (24,24)
+ 
+     toolbar.InsertSeparator(0)
+     wid = wxNewId()
+     toolbar.InsertTool(0, wid, getIcon("tb_dock", *toolbar.ICON_SIZE))
+     toolbar.Realize()
  
!     EVT_MENU(self, wid, self.__redock)
      EVT_CLOSE(self, self.OnClose)
      self.Refresh()
  
!     self.SetPosition((
!        RuntimeSettings.getint(self.runtime_section, 'x', -1),
!        RuntimeSettings.getint(self.runtime_section, 'y', -1)))
! 
!     self.SetSize((
!        RuntimeSettings.getint(
!            self.runtime_section, 'width', self.default_width),
!        RuntimeSettings.getint(
!            self.runtime_section, 'height', self.default_height)))
  
  
!     RuntimeSettings.registerRuntimeSettingHandler(self.instance, self)
  
  ##    instance.registerEventListeners(
  ##               { 'Show:Tool:%s' % self.id : self.show,
***************
*** 96,102 ****
      return ( self.runtime_section,
               {'x': x,
                'y': y,
-               'visible': self.visible,
                'height': height,
                'width': width,  } )
  
--- 102,107 ----
***************
*** 111,115 ****
      self.instance.dispatchEvent('Hide:Tool:%s' % self.tool.id)
      event.Veto()
  
! 
  
--- 116,121 ----
      self.instance.dispatchEvent('Hide:Tool:%s' % self.tool.id)
      event.Veto()
  
!   def __redock(self, event):
!     self.instance.dispatchEvent('Docker:Dock', tool=self.tool)
  
Index: gnue/designer/src/base/docks/SplitDock.py
diff -c gnue/designer/src/base/docks/SplitDock.py:1.3 
gnue/designer/src/base/docks/SplitDock.py:1.4
*** gnue/designer/src/base/docks/SplitDock.py:1.3       Mon Jun 16 17:17:48 2003
--- gnue/designer/src/base/docks/SplitDock.py   Mon Jun 16 23:13:51 2003
***************
*** 34,50 ****
  from gnue.common.apps import RuntimeSettings
  
  class SplitDock(wxPanel):
!   def __init__(self, parent, instance, name):
      wxPanel.__init__(self, parent, -1)
      self.parent = parent
      self.name = name
!     self.instance = instance
      self.panels = []
      self.child = None
      self.sashSize = 0
      self.sizer = MySizer()
      self.SetAutoLayout(1)
      self.SetSizer(self.sizer)
  
    #
    # Rebuild our dock
--- 34,51 ----
  from gnue.common.apps import RuntimeSettings
  
  class SplitDock(wxPanel):
!   def __init__(self, parent, docker, name):
      wxPanel.__init__(self, parent, -1)
      self.parent = parent
      self.name = name
!     self.docker = docker
      self.panels = []
      self.child = None
      self.sashSize = 0
      self.sizer = MySizer()
      self.SetAutoLayout(1)
      self.SetSizer(self.sizer)
+     self.__initialize = 1
  
    #
    # Rebuild our dock
***************
*** 70,93 ****
          panel.SetSashVisible(wxSASH_TOP,1)
  
        self.sizer.Add(panel, 1, wxEXPAND)
!       panel.dock = "%s-%s" % (self.name, index)
  
  
        index += 1
  
  
      # Redraw screen
      self.Layout()
  
  ##    self.sashSize = self.GetClientSizeTuple()[1] - \
! ##                    self.splitters[0].GetWindow1().GetClientSizeTuple()[1] 
- \
! ##                    self.splitters[0].GetWindow2().GetClientSizeTuple()[1]
  
  
  ##    self.titlebarSize = self.panels[0][1].minimumVerticalSize -2
  ##    self.minimumPaneSize = self.titlebarSize + self.sashSize
  
! ##    for splitter in self.splitters:
  ##      splitter.SetMinimumPaneSize(self.minimumPaneSize)
  
  
--- 71,106 ----
          panel.SetSashVisible(wxSASH_TOP,1)
  
        self.sizer.Add(panel, 1, wxEXPAND)
!       panel._dock_index = "%s" % (index)
!       panel._dock_location = self.name
  
  
        index += 1
  
+     # Restore settings from last exit
+     # if this is first time refresh
+     # has been called since startup.
+     if self.__initialize:
+       self.__initialize = 0
+       baseName = '%s-Sash-' % self.name
+       index = 0
+       for foo, panel in self.panels:
+         panel.SetSize((10, 
RuntimeSettings.getint(self.docker.runtime_section, baseName + str(index), 
100)))
+         index += 1
+ 
  
      # Redraw screen
      self.Layout()
  
  ##    self.sashSize = self.GetClientSizeTuple()[1] - \
! ##                    self.panels[0].GetWindow1().GetClientSizeTuple()[1] - \
! ##                    self.panels[0].GetWindow2().GetClientSizeTuple()[1]
  
  
  ##    self.titlebarSize = self.panels[0][1].minimumVerticalSize -2
  ##    self.minimumPaneSize = self.titlebarSize + self.sashSize
  
! ##    for splitter in self.panels:
  ##      splitter.SetMinimumPaneSize(self.minimumPaneSize)
  
  
***************
*** 104,132 ****
      self.panels.append((indx, panel))
  
      # Save state information on the tool panel
-     panel._dock_ = self
      panel._dock_index = indx
  
-   #
-   # Restore sizes.. used by RuntimeSettings
-   #
-   def restoreSettings(self, section):
-     baseName = 'Docker%s-' % self.name
-     index = 0
- ##    for splitter in self.splitters:
- ##      splitter.SetSashPosition(RuntimeSettings.getint(section, baseName + 
str(index), 100))
- ##      index += 1
  
    #
    # Save sizes.. used by RuntimeSettings
    #
    def saveSettings(self):
!     baseName = 'Docker%s-' % self.name
      rs = {}
      index = 0
! ##    for splitter in self.splitters:
! ##      rs[baseName + str(index)] = splitter.GetSashPosition()
! ##      index += 1
      return rs
  
  
--- 117,135 ----
      self.panels.append((indx, panel))
  
      # Save state information on the tool panel
      panel._dock_index = indx
  
  
    #
    # Save sizes.. used by RuntimeSettings
    #
    def saveSettings(self):
!     baseName = '%s-Sash-' % self.name
      rs = {}
      index = 0
!     for foo, panel in self.panels:
!       rs[baseName + str(index)] = panel.GetSizeTuple()[1]
!       index += 1
      return rs
  
  
***************
*** 150,170 ****
      numPanels = len(self.panels)
      # No splitters in use?  Nothing to do.
      # Already minimized? Ditto.
!     if numPanels < 2 or panel.minimized:
        return
  
      # One splitter?  Treat as special case...
      # Only one of the tools can be minimized.
      if numPanels == 2:
        other = self.panels[0][1] != panel and self.panels[0][1] or 
self.panels[1][1]
!       other.minimized = 0
      else:
  
        # Find out how many are already minimized.
        # One must remain visible at all times.
        numMinimized = 0
        for foo, p in self.panels:
!         if p.minimized:
            numMinimized += 1
        if numMinimized == numPanels - 1:
          return
--- 153,174 ----
      numPanels = len(self.panels)
      # No splitters in use?  Nothing to do.
      # Already minimized? Ditto.
!     if numPanels < 2 or not panel.tool._visible:
        return
  
      # One splitter?  Treat as special case...
      # Only one of the tools can be minimized.
      if numPanels == 2:
        other = self.panels[0][1] != panel and self.panels[0][1] or 
self.panels[1][1]
!       other.tool._visible = 1
! ##      self.docker.instance.dispatchEvent
      else:
  
        # Find out how many are already minimized.
        # One must remain visible at all times.
        numMinimized = 0
        for foo, p in self.panels:
!         if not p.tool._visible:
            numMinimized += 1
        if numMinimized == numPanels - 1:
          return
***************
*** 173,179 ****
      # Save the current size so
      # tool can be restored later
      panel.lastSize = panel.GetSizeTuple()[1]
!     panel.minimized = 1
      self.Layout()
  
  
--- 177,183 ----
      # Save the current size so
      # tool can be restored later
      panel.lastSize = panel.GetSizeTuple()[1]
!     panel.tool._visible = 0
      self.Layout()
  
  
***************
*** 182,193 ****
    #
    def restore(self, panel):
      # No splitters in use?  Nothing to do.
!     # Already minimized? Ditto.
!     if len(self.panels) < 2 or not panel.minimized:
        return
  
      # Restore to the last known size
!     panel.minimized = 0
      self.sizer.RecalcSizes(panel, panel.lastSize)
  
  
--- 186,197 ----
    #
    def restore(self, panel):
      # No splitters in use?  Nothing to do.
!     # Already visible? Ditto.
!     if len(self.panels) < 2 or panel.tool._visible:
        return
  
      # Restore to the last known size
!     panel.tool._visible = 1
      self.sizer.RecalcSizes(panel, panel.lastSize)
  
  
***************
*** 209,215 ****
      for foo, p in self.panels:
        if p == panel:
          break
!       elif not p.minimized:
          above = p
        maxResize += p.GetSizeTuple()[1] - p.minimumVerticalSize
  
--- 213,219 ----
      for foo, p in self.panels:
        if p == panel:
          break
!       elif p.tool._visible:
          above = p
        maxResize += p.GetSizeTuple()[1] - p.minimumVerticalSize
  
***************
*** 228,234 ****
    # i.e., if it is minimized, restore it;
    # if it is not minimized, minimize it.
    def toggleMinimized(self, panel):
!     if panel.minimized:
        self.restore(panel)
      else:
        self.minimize(panel)
--- 232,238 ----
    # i.e., if it is minimized, restore it;
    # if it is not minimized, minimize it.
    def toggleMinimized(self, panel):
!     if not panel.tool._visible:
        self.restore(panel)
      else:
        self.minimize(panel)
***************
*** 267,273 ****
      sizes = {}
      variable = []
      for child in self.__objects:
!       if child.minimized:
          sizes[child] = self.__childHideSize
          allocated += self.__childHideSize
        elif child == absolute:
--- 271,277 ----
      sizes = {}
      variable = []
      for child in self.__objects:
!       if not child.tool._visible:
          sizes[child] = self.__childHideSize
          allocated += self.__childHideSize
        elif child == absolute:
Index: gnue/designer/src/forms/LayoutEditor/LayoutEditorTools.py
diff -c gnue/designer/src/forms/LayoutEditor/LayoutEditorTools.py:1.26 
gnue/designer/src/forms/LayoutEditor/LayoutEditorTools.py:1.27
*** gnue/designer/src/forms/LayoutEditor/LayoutEditorTools.py:1.26      Mon Jun 
 9 20:40:14 2003
--- gnue/designer/src/forms/LayoutEditor/LayoutEditorTools.py   Mon Jun 16 
23:13:51 2003
***************
*** 55,60 ****
--- 55,63 ----
      self.AddSeparator()
      self.AddControl(wxStaticText(self,-1,_("Block: ")))
      self.blockCombo = wxComboBox(self, -1)
+     w, h = self.blockCombo.GetSizeTuple()
+     self.blockCombo.SetSize((int(w*1.4), h))
+ 
      self.AddControl(self.blockCombo)
  
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]