daboide Commit
Revision 736
Date: 2007-01-04 06:29:29 -0800 (Thu, 04 Jan 2007)
Author: Ed

Changed:
U   trunk/ClassDesigner.py
U   trunk/ClassDesignerFormMixin.py
U   trunk/CxnEditor.py
U   trunk/Editor.py

Log:
Various interface tweaks to make things behave nicely on Windows.

Diff:
Modified: trunk/ClassDesigner.py
===================================================================
--- trunk/ClassDesigner.py      2007-01-03 22:50:58 UTC (rev 735)
+++ trunk/ClassDesigner.py      2007-01-04 14:29:29 UTC (rev 736)
@@ -1354,6 +1354,7 @@
        def updateLayout(self):
                """Called whenever the sizer layout is changed. """
                # Make sure that the selected objects are still 'live'
+#-             topform = self.ActiveForm
                for ct in self._selection:
                        try:
                                junk = ct.Name
@@ -1366,7 +1367,8 @@
                dabo.ui.callAfterInterval(200, self.currentForm.layout)
                dabo.ui.callAfterInterval(200, self.currentForm.refresh)
                dabo.ui.callAfterInterval(200, self.ControlPalette.update)
-               
+#-             if topform and topform is not self.ActiveForm:
+#-                     dabo.ui.callAfterInterval(200, topform.bringToFront)
        
        def flushCodeEditor(self):
                self.EditorForm.updateText()
@@ -3251,6 +3253,8 @@
                                lbl.Caption = fldData["caption"]
                                ctlClass = 
self.getControlClass(fldData["class"])
                                ctl = ctlClass(pnl, DataSource=table, 
DataField=fld)
+                               if isinstance(ctl, dui.dTextBox):
+                                       ctl.Value = ""
                                ctls.append(ctl)
                                if self.UseSizers:
                                        sz.append(lbl, halign=lblAlign)

Modified: trunk/ClassDesignerFormMixin.py
===================================================================
--- trunk/ClassDesignerFormMixin.py     2007-01-03 22:50:58 UTC (rev 735)
+++ trunk/ClassDesignerFormMixin.py     2007-01-04 14:29:29 UTC (rev 736)
@@ -112,7 +112,7 @@
                                app.currentForm = self
                                self._selection = [obj for obj in 
self._selection if obj]
                                app.Selection = self._selection
-                       app.updateLayout()
+                       dabo.ui.callAfterInterval(200, app.updateLayout)
                
                
        def onDeactivate(self, evt):

Modified: trunk/CxnEditor.py
===================================================================
--- trunk/CxnEditor.py  2007-01-03 22:50:58 UTC (rev 735)
+++ trunk/CxnEditor.py  2007-01-04 14:29:29 UTC (rev 736)
@@ -423,6 +423,7 @@
                                        pth += self.fileExtension
                                self.connFile = pth
                open(self.connFile, "w").write(xml)
+               dabo.ui.callAfter(self.bringToFront)
        
        
 def main():

Modified: trunk/Editor.py
===================================================================
--- trunk/Editor.py     2007-01-03 22:50:58 UTC (rev 735)
+++ trunk/Editor.py     2007-01-04 14:29:29 UTC (rev 736)
@@ -63,7 +63,6 @@
                
                self.splitter.Panel1.Sizer.append1x(self.editor)
                self.splitter.Panel2.Sizer.append1x(self.output)
-               self.splitter.unsplit()
                
                self.Sizer = dabo.ui.dSizer()
                self.Sizer.append1x(self.splitter)
@@ -84,7 +83,7 @@
                dabo.ui.callAfter(self.splitter._setOrientation, "h") #Its 
weird without this, self.splitter._constructed is not true
                dabo.ui.callAfter(self.updateSashPos)
 
-               
+
        def onResize(self, evt):
                self.splitter.SashPosition = self.Height - self._outputSashExtra
 
@@ -120,6 +119,23 @@
        
        def onPageLeave(self, evt):
                self.editor.setInactive()
+       
+       
+       def onDestroy(self, evt):
+               dabo.ui.callAfter(self.Form.onTitleChanged, evt)
+
+
+       def _getPathInfo(self):
+               try:
+                       ret = self.editor._fileName
+               except:
+                       ret = ""
+               return ret
+
+
+       PathInfo = property(_getPathInfo, None, None,
+                       _("Path to the file being edited  (str)") )
+                       
                
                
 
@@ -222,6 +238,7 @@
        
        def edFocus(self):
                self.SelectedPage.editor.setFocus()
+       
                
        def _getCurrentEditor(self):
                try:
@@ -231,11 +248,15 @@
                        
                        
        def _getTitle(self):
+               sp = self.SelectedPage
                try:
-                       ret = self.SelectedPage.Caption
+                       ret = sp.PathInfo
+                       if sp.editor.Modified:
+                               ret += " *"
                except:
                        ret = ""
                return ret
+
        
        CurrentEditor = property(_getCurrentEditor, None, None,
                        _("References the currently active editor  (dEditor)"))
@@ -472,7 +493,9 @@
                runMenu.append(_("&Run Script\tF7"), bindfunc=self.onRunScript,
                                bmp="", help=_("Run Script"))           
                runMenu.append(_("Hide/Show Output\tF8"), 
bindfunc=self.onOutput, bmp="",
-                               help=_("Control the visibility of the Output 
pane"), menutype="check")
+                               help=_("Toggle the visibility of the Output 
pane"), menutype="check")
+               runMenu.append(_("Clear Output"), bindfunc=self.onClearOutput, 
bmp="",
+                               help=_("Clear the contents of the Output pane"))
                if self.Application.getUserSetting("visibleOutput", True):
                        runMenu.setCheck(_("Hide/Show Output"), 
unCheckOthers=False)
 
@@ -642,7 +665,6 @@
                self.pgfEditor.closeEditor()
                if self.pgfEditor.PageCount == 0:
                        self.release()
-               self.onEditorPageChanged(None)
                evt.stop()
                
                
@@ -754,6 +776,10 @@
                        pg.showOutput(show)
 
 
+       def onClearOutput(self, evt):
+               self.pgfEditor.ActivePage.outputText = ""
+               
+               
        def onPrevPg(self, evt):
                self.pgfEditor.cyclePages(-1)
                self.pgfEditor.edFocus()




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to