dabo Commit
Revision 4063
Date: 2008-05-04 11:37:34 -0700 (Sun, 04 May 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4063

Changed:
A   branches/ed-ide/Studio.py
U   branches/ed-ide/components/ClassDesigner/ClassDesignerFormMixin.py
U   branches/ed-ide/components/ClassDesigner/ClassDesignerTreeSheet.py
A   branches/ed-ide/components/ClassDesigner/__init__.py
A   branches/ed-ide/components/CxnEditor/__init__.py
U   branches/ed-ide/components/MenuDesigner/MenuDesignerForm.py
U   branches/ed-ide/components/MenuDesigner/MenuDesignerPropForm.py
A   branches/ed-ide/components/MenuDesigner/__init__.py
U   branches/ed-ide/components/ReportDesigner/ReportDesigner.py
A   branches/ed-ide/components/ReportDesigner/__init__.py
U   branches/ed-ide/components/TextEditor/TextEditor.py
A   branches/ed-ide/components/TextEditor/__init__.py
A   branches/ed-ide/components/__init__.py

Log:
Fixed up some of the issues created by the more modular design.

Diff:
Added: branches/ed-ide/Studio.py
===================================================================
--- branches/ed-ide/Studio.py                           (rev 0)
+++ branches/ed-ide/Studio.py   2008-05-04 18:37:34 UTC (rev 4063)
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import sys
+import os
+
+import dabo
+dabo.ui.loadUI("wx")
+from dabo.dLocalize import _
+import dabo.dEvents as dEvents
+from components.ClassDesigner import ClassDesigner
+from components.CxnEditor import CxnEditor
+from components.MenuDesigner import MenuDesigner
+from components.ReportDesigner import ReportDesigner
+from components.TextEditor import TextEditor
+
+class StudioForm(dabo.ui.dForm):
+       def initProperties(self):
+               self.Caption = _("Dabo Developer Studio")
+
+#      def afterInit(self):    
+#              self.tree = dabo.ui.dTreeView(self.Panel1)
+#              self.tree.makeDirTree("/Users/ed/apps/billing", ignored="*pyc", 
expand=True)
+
+
+def main():
+       app = dabo.dApp()
+       app.MainFormClass = StudioForm
+       app.start()
+       
+
+
+
+
+
+if __name__ == "__main__":
+       main()
\ No newline at end of file


Property changes on: branches/ed-ide/Studio.py
___________________________________________________________________
Name: svn:executable
   + *

Modified: branches/ed-ide/components/ClassDesigner/ClassDesignerFormMixin.py
===================================================================
--- branches/ed-ide/components/ClassDesigner/ClassDesignerFormMixin.py  
2008-05-04 15:55:03 UTC (rev 4062)
+++ branches/ed-ide/components/ClassDesigner/ClassDesignerFormMixin.py  
2008-05-04 18:37:34 UTC (rev 4063)
@@ -13,7 +13,7 @@
 from ClassDesignerControlMixin import ClassDesignerControlMixin as dcm
 import ClassDesignerMenu
 from DragHandle import DragHandle
-from wizards.QuickLayoutWizard import QuickLayoutWizard
+from QuickLayoutWizard import QuickLayoutWizard
 from ClassDesignerComponents import LayoutPanel
 from ClassDesignerComponents import LayoutBasePanel
 from ClassDesignerComponents import LayoutSpacerPanel

Modified: branches/ed-ide/components/ClassDesigner/ClassDesignerTreeSheet.py
===================================================================
--- branches/ed-ide/components/ClassDesigner/ClassDesignerTreeSheet.py  
2008-05-04 15:55:03 UTC (rev 4062)
+++ branches/ed-ide/components/ClassDesigner/ClassDesignerTreeSheet.py  
2008-05-04 18:37:34 UTC (rev 4063)
@@ -12,9 +12,9 @@
 from ClassDesignerComponents import NoSizerBasePanel
 from DragHandle import DragHandle
 import ClassDesignerMenu
-from MenuBarPanel import MenuBarPanel
-from MenuPanel import MenuPanel
-from MenuDesignerComponents import SeparatorPanel
+# from MenuBarPanel import MenuBarPanel
+# from MenuPanel import MenuPanel
+# from MenuDesignerComponents import SeparatorPanel
 dui = dabo.ui
 from dabo.ui import makeProxyProperty
 
@@ -361,7 +361,7 @@
                                        childNode = node.appendChild(cap)
                                childNode.Object = itm
 
-                       if not isinstance(itm, (SeparatorPanel, MenuPanel, 
MenuBarPanel)):
+                       if not isinstance(itm, (SeparatorPanel, )):             
#MenuPanel, MenuBarPanel)):
                                if hasattr(itm, "Sizer") and itm.Sizer:
                                        if isinstance(itm, 
dui.dialogs.WizardPage):
                                                
self._recurseChildren(itm.Children, childNode, noDisplay)

Added: branches/ed-ide/components/ClassDesigner/__init__.py
===================================================================
--- branches/ed-ide/components/ClassDesigner/__init__.py                        
        (rev 0)
+++ branches/ed-ide/components/ClassDesigner/__init__.py        2008-05-04 
18:37:34 UTC (rev 4063)
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# from ClassDesignerPropSheet import PropSheet
+# from ClassDesignerPropSheet import PropertyGrid
+# from ClassDesignerComponents import LayoutSaverMixin
+# from ClassDesignerComponents import LayoutPanel
+# from ClassDesignerComponents import LayoutSpacerPanel
+# from ClassDesignerComponents import LayoutSizerMixin
+# from ClassDesignerComponents import LayoutSizer
+# from ClassDesignerComponents import LayoutBorderSizer
+# from ClassDesignerComponents import LayoutGridSizer
+# from ClassDesignerComponents import LayoutBasePanel
+# from ClassDesignerComponents import NoSizerBasePanel
+# from ClassDesignerTreeSheet import TreeSheet
+# from ClassDesignerObjectPropertySheet import ObjectPropertySheet
+# from ClassDesignerCustomPropertyDialog import 
ClassDesignerCustomPropertyDialog
+# from ClassDesignerControlMixin import ClassDesignerControlMixin
+# from ClassDesignerFormMixin import ClassDesignerFormMixin
+# from ClassDesignerEditor import EditorControl
+# from ClassDesignerEditor import EditorForm
+# from ClassDesignerPemForm import PemForm
+# from ClassDesignerMethodSheet import MethodSheet
+# from ClassDesignerSizerPalette import ContentBoxSizerPanel
+# from ClassDesignerSizerPalette import ContentGridSizerPanel
+# from ClassDesignerSizerPalette import BoxSizerSelfPanel
+# from ClassDesignerSizerPalette import GridSizerSelfPanel
+# from ClassDesignerSizerPalette import SizerInfoFrame
+# from ClassDesignerSizerPalette import SizerContentFrame
+# from ClassDesignerSizerPalette import SizerSelfFrame
+# from ClassDesignerSizerPalette import AbstractSizerPanel
+# from ClassDesignerSizerPalette import SizerContentPanel
+# from ClassDesignerSizerPalette import SizerSelfPanel
+# from ClassDesignerSizerPalette import SizerPaletteForm
+from ClassDesigner import ClassDesigner
+from ClassDesignerExceptions import PropertyUpdateException

Added: branches/ed-ide/components/CxnEditor/__init__.py
===================================================================
--- branches/ed-ide/components/CxnEditor/__init__.py                            
(rev 0)
+++ branches/ed-ide/components/CxnEditor/__init__.py    2008-05-04 18:37:34 UTC 
(rev 4063)
@@ -0,0 +1,4 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from CxnEditor import EditorForm

Modified: branches/ed-ide/components/MenuDesigner/MenuDesignerForm.py
===================================================================
--- branches/ed-ide/components/MenuDesigner/MenuDesignerForm.py 2008-05-04 
15:55:03 UTC (rev 4062)
+++ branches/ed-ide/components/MenuDesigner/MenuDesignerForm.py 2008-05-04 
18:37:34 UTC (rev 4063)
@@ -6,7 +6,7 @@
 from dabo.dLocalize import _
 import dabo.dEvents as dEvents
 import dabo.lib.xmltodict as xtd
-from ClassDesignerExceptions import PropertyUpdateException
+from ..ClassDesigner import PropertyUpdateException
 from MenuBarPanel import MenuBarPanel
 from MenuPanel import MenuPanel
 from MenuDesignerPropForm import MenuPropForm

Modified: branches/ed-ide/components/MenuDesigner/MenuDesignerPropForm.py
===================================================================
--- branches/ed-ide/components/MenuDesigner/MenuDesignerPropForm.py     
2008-05-04 15:55:03 UTC (rev 4062)
+++ branches/ed-ide/components/MenuDesigner/MenuDesignerPropForm.py     
2008-05-04 18:37:34 UTC (rev 4063)
@@ -2,8 +2,8 @@
 import dabo
 from dabo.dLocalize import _
 import dabo.dEvents as dEvents
-from ClassDesignerPropSheet import PropSheet
-from ClassDesignerTreeSheet import TreeSheet
+from ..ClassDesigner.ClassDesignerPropSheet import PropSheet
+from ..ClassDesigner.ClassDesignerTreeSheet import TreeSheet
 
 if __name__ == "__main__":
        dabo.ui.loadUI("wx")

Added: branches/ed-ide/components/MenuDesigner/__init__.py
===================================================================
--- branches/ed-ide/components/MenuDesigner/__init__.py                         
(rev 0)
+++ branches/ed-ide/components/MenuDesigner/__init__.py 2008-05-04 18:37:34 UTC 
(rev 4063)
@@ -0,0 +1,4 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from MenuDesignerForm import MenuDesignerForm

Modified: branches/ed-ide/components/ReportDesigner/ReportDesigner.py
===================================================================
--- branches/ed-ide/components/ReportDesigner/ReportDesigner.py 2008-05-04 
15:55:03 UTC (rev 4062)
+++ branches/ed-ide/components/ReportDesigner/ReportDesigner.py 2008-05-04 
18:37:34 UTC (rev 4063)
@@ -4,11 +4,17 @@
 import dabo, dabo.ui
 dabo.ui.loadUI("wx")
 import dabo.dEvents as dEvents
-from dabo.dReportWriter import dReportWriter
-from dabo.lib.reportWriter import *
+try:
+       from dabo.dReportWriter import dReportWriter
+       from dabo.lib.reportWriter import *
+except ImportError, e:
+       import inspect
+       if "Studio.py" not in inspect.stack()[-1][1]:
+               # Not being run as part of the Studio app
+               raise ImportError, e
 from dabo.dLocalize import _
 from dabo.ui import dKeys
-import ClassDesignerPropSheet
+from ..ClassDesigner import ClassDesignerPropSheet
 
 
 rdc = None

Added: branches/ed-ide/components/ReportDesigner/__init__.py
===================================================================
--- branches/ed-ide/components/ReportDesigner/__init__.py                       
        (rev 0)
+++ branches/ed-ide/components/ReportDesigner/__init__.py       2008-05-04 
18:37:34 UTC (rev 4063)
@@ -0,0 +1,4 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from ReportDesigner import ReportDesigner

Modified: branches/ed-ide/components/TextEditor/TextEditor.py
===================================================================
--- branches/ed-ide/components/TextEditor/TextEditor.py 2008-05-04 15:55:03 UTC 
(rev 4062)
+++ branches/ed-ide/components/TextEditor/TextEditor.py 2008-05-04 18:37:34 UTC 
(rev 4063)
@@ -61,7 +61,7 @@
        def initProperties(self):
                self.p = None
                self.outputText = ""
-               self._outputSashExtra = 
self.Application.getUserSetting("editorform.outputSashExtra", 100)
+               self._outputSashExtra = 
self.Application.getUserSetting("texteditorform.outputSashExtra", 100)
 
 
        def afterInit(self):
@@ -110,7 +110,7 @@
        def updateSashPos(self):
                if self.splitter.SashPosition > 0:
                        self._outputSashExtra = self.Height - 
self.splitter.SashPosition
-               self.Application.setUserSetting("editorform.outputSashExtra", 
self._outputSashExtra)
+               
self.Application.setUserSetting("texteditorform.outputSashExtra", 
self._outputSashExtra)
                
        
        def outputUpdate(self):
@@ -294,9 +294,9 @@
                        
                        
 
-class EditorForm(dabo.ui.dForm):
+class TextEditorForm(dabo.ui.dForm):
        def __init__(self, *args, **kwargs):
-               super(EditorForm, self).__init__(*args, **kwargs)
+               super(TextEditorForm, self).__init__(*args, **kwargs)
                
                
        def afterInit(self):
@@ -306,7 +306,7 @@
                self.Sizer.append1x(pnl)
                pnl.Sizer = dabo.ui.dSizer("v")
                self._lastPath = self.Application.getUserSetting("lastPath", 
os.getcwd())
-               super(EditorForm, self).afterInit()
+               super(TextEditorForm, self).afterInit()
                self.Caption = _("Dabo Editor")
                self.funcButton = dabo.ui.dImage(pnl, ScaleMode="Clip", 
Size=(22,22))
                self.funcButton.Picture = 
dabo.ui.imageFromData(funcButtonData())
@@ -690,7 +690,7 @@
                # Close the editor 
                self.pgfEditor.closeEditor(ed, False)
                # Create a new editor form
-               frm = EditorForm()
+               frm = TextEditorForm()
                frm.onFileNew(None)
                frm.openFile(fname)
                newEd = frm.CurrentEditor
@@ -725,17 +725,17 @@
                that originally opens a file path might get closed, and
                if we bound the MRU action to an instance method, it
                would barf. So we make this a classmethod, and pass 
-               the call to the first EditorForm instance we can find.
+               the call to the first TextEditorForm instance we can find.
                """
                pth = " ".join(evt.prompt.split(" ")[1:])
-               # Find the topmost form that is an EditorForm
+               # Find the topmost form that is an TextEditorForm
                app = dabo.dAppRef
                try:
                        app.ActiveForm.openFile(pth)
                except:
-                       # Call the first available EditorForm
+                       # Call the first available TextEditorForm
                        edf = [frm for frm in app.uiForms
-                                       if isinstance(frm, EditorForm)][0]
+                                       if isinstance(frm, TextEditorForm)][0]
                        edf.openFile(pth)
        onMRUSelection = classmethod(onMRUSelection)
                
@@ -1042,7 +1042,7 @@
        app.MainFormClass = None
        app.setup()
 
-       frm = app.MainForm = EditorForm()
+       frm = app.MainForm = TextEditorForm()
        frm.onFileNew(None)
        for file in files:
                frm.openFile(file)

Added: branches/ed-ide/components/TextEditor/__init__.py
===================================================================
--- branches/ed-ide/components/TextEditor/__init__.py                           
(rev 0)
+++ branches/ed-ide/components/TextEditor/__init__.py   2008-05-04 18:37:34 UTC 
(rev 4063)
@@ -0,0 +1,4 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from TextEditor import TextEditorForm

Added: branches/ed-ide/components/__init__.py
===================================================================
--- branches/ed-ide/components/__init__.py                              (rev 0)
+++ branches/ed-ide/components/__init__.py      2008-05-04 18:37:34 UTC (rev 
4063)
@@ -0,0 +1,8 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import ClassDesigner
+import CxnEditor
+import MenuDesigner
+import ReportDesigner
+import TextEditor




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to