reinhard | 1 Aug 2006 15:53

[gnue] r8547 - trunk/gnue-forms/src

Author: reinhard
Date: 2006-08-01 08:53:35 -0500 (Tue, 01 Aug 2006)
New Revision: 8547

Modified:
   trunk/gnue-forms/src/GFForm.py
Log:
Moved initialisation of trigger system to Phase 2 init so that imported
elements are also visible.

Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py	2006-07-31 19:48:34 UTC (rev 8546)
+++ trunk/gnue-forms/src/GFForm.py	2006-08-01 13:53:35 UTC (rev 8547)
 <at>  <at>  -99,7 +99,7  <at>  <at> 
         self._exiting = False

         # The "None" init gives datasources time to setup master/detail
-        self._inits = [self.phase_1_init, None, self.phase_3_init]
+        self._inits = [self.phase_1_init, self.phase_2_init, self.phase_3_init]

         # Trigger support
         self._triggerns = {}
 <at>  <at>  -208,6 +208,19  <at>  <at> 
         ConnectionTriggerObj.add_connections_to_tree(
                 self._instance.connections, self)

+
+    # -------------------------------------------------------------------------
+    # Phase 2 initialization
(Continue reading)

reinhard | 2 Aug 2006 11:52

[gnue] r8548 - trunk/gnue-common/src/logic

Author: reinhard
Date: 2006-08-02 04:52:46 -0500 (Wed, 02 Aug 2006)
New Revision: 8548

Modified:
   trunk/gnue-common/src/logic/GTrigger.py
   trunk/gnue-common/src/logic/usercode.py
Log:
Moved finding of the root object from _buildObject to phaseInit, because the
parent of the parent is still wrong in _buildObject for children of imported
objects.

Modified: trunk/gnue-common/src/logic/GTrigger.py
===================================================================
--- trunk/gnue-common/src/logic/GTrigger.py	2006-08-01 13:53:35 UTC (rev 8547)
+++ trunk/gnue-common/src/logic/GTrigger.py	2006-08-02 09:52:46 UTC (rev 8548)
 <at>  <at>  -82,9 +82,7  <at>  <at> 

         UserCode.__init__(self, parent, 'GCTrigger')

-        self._inits = [self.__initialize]

-
     # -------------------------------------------------------------------------
     # Nice string representation
     # -------------------------------------------------------------------------
 <at>  <at>  -98,8 +96,10  <at>  <at> 
     # Phase 1 initialization
     # -------------------------------------------------------------------------

(Continue reading)

reinhard | 3 Aug 2006 17:49

[gnue] r8549 - trunk/gnue-forms/src/uidrivers/wx26/widgets

Author: reinhard
Date: 2006-08-03 10:49:49 -0500 (Thu, 03 Aug 2006)
New Revision: 8549

Modified:
   trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py
Log:
Implemented screen dump function for wx26.

Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py	2006-08-02 09:52:46 UTC (rev 8548)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/form.py	2006-08-03 15:49:49 UTC (rev 8549)
 <at>  <at>  -24,10 +24,12  <at>  <at> 
 Implementation of the UI layer for the <form> and <dialog> tag.
 """

+import time
+import os.path
 import wx
-import os.path

 from gnue.common.apps import GConfig
+from gnue.forms import VERSION
 from gnue.forms.uidrivers.wx26.MenuBar import MenuBar
 from gnue.forms.uidrivers.wx26.ToolBar import ToolBar
 from gnue.forms.uidrivers.wx26.widgets._base import UIHelper
 <at>  <at>  -349,7 +351,161  <at>  <at> 
         self.show_page(page.page_index)

(Continue reading)

reinhard | 8 Aug 2006 18:59

[gnue] r8550 - in trunk/gnue-forms/src: . uidrivers/_base uidrivers/curses/widgets uidrivers/gtk2/widgets/form uidrivers/win32/widgets/form uidrivers/wx uidrivers/wx/widgets/form uidrivers/wx26

Author: reinhard
Date: 2006-08-08 11:59:12 -0500 (Tue, 08 Aug 2006)
New Revision: 8550

Modified:
   trunk/gnue-forms/src/GFForm.py
   trunk/gnue-forms/src/GFInstance.py
   trunk/gnue-forms/src/uidrivers/_base/UIdriver.py
   trunk/gnue-forms/src/uidrivers/curses/widgets/form.py
   trunk/gnue-forms/src/uidrivers/gtk2/widgets/form/widget.py
   trunk/gnue-forms/src/uidrivers/win32/widgets/form/widget.py
   trunk/gnue-forms/src/uidrivers/wx/PrintForm.py
   trunk/gnue-forms/src/uidrivers/wx/UIdriver.py
   trunk/gnue-forms/src/uidrivers/wx/widgets/form/widget.py
   trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py
Log:
Properly display Cancel button in wx26 if requested.
New function GFForm.__must_save() to ask user if changes should be 
saved.
A few files that have been forgotten at last commit (screen dump).

Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py	2006-08-03 15:49:49 UTC (rev 8549)
+++ trunk/gnue-forms/src/GFForm.py	2006-08-08 16:59:12 UTC (rev 8550)
 <at>  <at>  -156,6 +156,8  <at>  <at> 
             'rollback': {
                 'function': self.__trigger_rollback,
                 'global': True},
+            'printout': {
(Continue reading)

reinhard | 8 Aug 2006 20:59

[gnue] r8551 - trunk/gnue-forms/src

Author: reinhard
Date: 2006-08-08 13:59:06 -0500 (Tue, 08 Aug 2006)
New Revision: 8551

Modified:
   trunk/gnue-forms/src/GFForm.py
   trunk/gnue-forms/src/GFInstance.py
Log:
Moved code to close form to GFForm.

Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py	2006-08-08 16:59:12 UTC (rev 8550)
+++ trunk/gnue-forms/src/GFForm.py	2006-08-08 18:59:06 UTC (rev 8551)
 <at>  <at>  -1698,6 +1698,26  <at>  <at> 

 
     # -------------------------------------------------------------------------
+    # Close this window
+    # -------------------------------------------------------------------------
+
+    def execute_close(self):
+
+        self.processTrigger('Pre-Exit', ignoreAbort = False)
+
+        if self._currentBlock.autoCommit and not self.isSaved():
+            self.commit()
+
+        if not self.__must_save():
+            return
(Continue reading)

reinhard | 8 Aug 2006 22:10

[gnue] r8552 - trunk/gnue-forms/src

Author: reinhard
Date: 2006-08-08 15:10:36 -0500 (Tue, 08 Aug 2006)
New Revision: 8552

Modified:
   trunk/gnue-forms/src/GFForm.py
Log:
Fixed behaviour for forms where first (or even only) control is a button.

issue111 testing

Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py	2006-08-08 18:59:06 UTC (rev 8551)
+++ trunk/gnue-forms/src/GFForm.py	2006-08-08 20:10:36 UTC (rev 8552)
 <at>  <at>  -340,7 +340,10  <at>  <at> 
     # -------------------------------------------------------------------------

     def __trigger_get_current_block_name(self):
-        return self._currentBlock.name
+        if self._currentBlock is not None:
+            return self._currentBlock.name
+        else:
+            return None

     # -------------------------------------------------------------------------

 <at>  <at>  -632,7 +635,7  <at>  <at> 

     def update_record_status(self):
(Continue reading)

reinhard | 8 Aug 2006 22:11

[gnue] r8553 - trunk/gnue-forms/src

Author: reinhard
Date: 2006-08-08 15:11:47 -0500 (Tue, 08 Aug 2006)
New Revision: 8553

Modified:
   trunk/gnue-forms/src/GFParser.py
Log:
Removed requirement for forms to have at least one block. There might be, for
example, forms with only buttons on it.

Modified: trunk/gnue-forms/src/GFParser.py
===================================================================
--- trunk/gnue-forms/src/GFParser.py	2006-08-08 20:10:36 UTC (rev 8552)
+++ trunk/gnue-forms/src/GFParser.py	2006-08-08 20:11:47 UTC (rev 8553)
 <at>  <at>  -327,7 +327,6  <at>  <at> 

       'block': {
          'BaseClass': GFObjects.GFBlock,
-         'Required': True,
          'Importable': True,
          'Attributes': {
             'name': {
reinhard | 8 Aug 2006 23:32

[gnue] r8554 - trunk/gnue-forms/src/uidrivers/wx26

Author: reinhard
Date: 2006-08-08 16:32:32 -0500 (Tue, 08 Aug 2006)
New Revision: 8554

Modified:
   trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py
Log:
wx26: No need to explicitly exit the main loop, this is done implicitly when
the last window is destroyed.

Modified: trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py	2006-08-08 20:11:47 UTC (rev 8553)
+++ trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py	2006-08-08 21:32:32 UTC (rev 8554)
 <at>  <at>  -174,8 +174,6  <at>  <at> 
       for child in self._children:
         child.main_window.Close (True)

-      wx.GetApp ().ExitMainLoop ()
-
     assert gLeave (6)

 
reinhard | 8 Aug 2006 23:38

[gnue] r8555 - trunk/gnue-forms/src/uidrivers/wx26

Author: reinhard
Date: 2006-08-08 16:38:49 -0500 (Tue, 08 Aug 2006)
New Revision: 8555

Modified:
   trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py
Log:
Start main loop only once.

Modified: trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py	2006-08-08 21:32:32 UTC (rev 8554)
+++ trunk/gnue-forms/src/uidrivers/wx26/UIdriver.py	2006-08-08 21:38:49 UTC (rev 8555)
 <at>  <at>  -191,7 +191,9  <at>  <at> 
     if self.__splash is not None:
       self.__splash.Close ()

-    self.app.MainLoop ()
+    # Main loop might already be running if this has been called with runForm()
+    if not self.app.IsMainLoopRunning():
+        self.app.MainLoop ()

     assert gLeave (6)

reinhard | 9 Aug 2006 00:23

[gnue] r8556 - trunk/gnue-forms/src

Author: reinhard
Date: 2006-08-08 17:23:29 -0500 (Tue, 08 Aug 2006)
New Revision: 8556

Modified:
   trunk/gnue-forms/src/GFForm.py
Log:
Fixes for tabbing through forms without a block.

issue111 testing

Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py	2006-08-08 21:38:49 UTC (rev 8555)
+++ trunk/gnue-forms/src/GFForm.py	2006-08-08 22:23:29 UTC (rev 8556)
 <at>  <at>  -1336,7 +1336,8  <at>  <at> 
         currentBlock = self._currentBlock
         mode = self.getCurrentMode()

-        if currentBlock.transparent and not ( \
+        if currentBlock is None or ( \
+            currentBlock.transparent and not ( \
               onlyInBlock or \
               currentBlock.autoNextRecord and not ( \
                   currentBlock.isEmpty() or \
 <at>  <at>  -1344,7 +1345,7  <at>  <at> 
                        not (currentBlock.autoCreate and \
                             currentBlock.editable in ('Y', 'new')) or \
                   (reverse and currentBlock.isFirstRecord()) \
-              ))):
(Continue reading)


Gmane