jcater | 2 Nov 06:50 2006

[gnue] r8973 - trunk/gnue-common/src/definitions

Author: jcater
Date: 2006-11-01 23:50:01 -0600 (Wed, 01 Nov 2006)
New Revision: 8973

Modified:
   trunk/gnue-common/src/definitions/GParser.py
Log:
the object_created virtual function was happening at the wrong time and also didn't stick to the GNUe
naming convention of _virtual_func_().

Modified: trunk/gnue-common/src/definitions/GParser.py
===================================================================
--- trunk/gnue-common/src/definitions/GParser.py	2006-10-31 18:34:19 UTC (rev 8972)
+++ trunk/gnue-common/src/definitions/GParser.py	2006-11-02 05:50:01 UTC (rev 8973)
 <at>  <at>  -565,9 +565,10  <at>  <at> 
         if self.xmlStack [0] != None:
           GContent (self.xmlStack [0], text)

+    # Let any subclasses know that the object was created
+    self._object_created_(object)

 
-
   # ---------------------------------------------------------------------------
   # Process text which is not part of a tag (=contents)
   # ---------------------------------------------------------------------------
 <at>  <at>  -622,12 +623,10  <at>  <at> 

     assert gDebug (7, "</%s>" % tname)

(Continue reading)

jcater | 4 Nov 01:17 2006

[gnue] r8974 - trunk/gnue-common/src/definitions

Author: jcater
Date: 2006-11-03 18:17:03 -0600 (Fri, 03 Nov 2006)
New Revision: 8974

Modified:
   trunk/gnue-common/src/definitions/GObjects.py
   trunk/gnue-common/src/definitions/GParser.py
   trunk/gnue-common/src/definitions/GParserHelpers.py
Log:
removed redundant dict lookups in Parser (instead of refering to attrs[foo] 12 times, do
attr_foo=attrs[foo]); instead of having GParser do an object.__dict__.update() for attributes, call
a subclassable ParserObj method to do it (needed by designer)

Modified: trunk/gnue-common/src/definitions/GObjects.py
===================================================================
--- trunk/gnue-common/src/definitions/GObjects.py	2006-11-02 05:50:01 UTC (rev 8973)
+++ trunk/gnue-common/src/definitions/GObjects.py	2006-11-04 00:17:03 UTC (rev 8974)
 <at>  <at>  -125,7 +125,7  <at>  <at> 
   # ---------------------------------------------------------------------------
   # phaseInit
   # ---------------------------------------------------------------------------
-  
+
   def phaseInit (self, iterations = 0):
     """
     Starts GNUe's phased initialization system from this object down.
 <at>  <at>  -189,7 +189,7  <at>  <at> 
     if hasattr (object, '_inits'):
       self._initCount = max (self._initCount, len (object._inits))

(Continue reading)

jcater | 4 Nov 01:18 2006

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

Author: jcater
Date: 2006-11-03 18:18:30 -0600 (Fri, 03 Nov 2006)
New Revision: 8975

Modified:
   trunk/gnue-forms/src/GFParser.py
Log:
added labels to tags; converted some plain-text descriptions to u_()

Modified: trunk/gnue-forms/src/GFParser.py
===================================================================
--- trunk/gnue-forms/src/GFParser.py	2006-11-04 00:17:03 UTC (rev 8974)
+++ trunk/gnue-forms/src/GFParser.py	2006-11-04 00:18:30 UTC (rev 8975)
 <at>  <at>  -46,6 +46,7  <at>  <at> 

 

+root_tag = 'form'

 
 ##
 <at>  <at>  -61,7 +62,7  <at>  <at> 
   be used in the Forms Designer package where we will
   not want the loaded form to connect to databases, etc)
   """
-  return GParser.loadXMLObject (buffer, xmlFormsHandler, 'GFForm', 'form',
+  return GParser.loadXMLObject (buffer, xmlFormsHandler, 'GFForm', root_tag,
            initialize, attributes={"_instance": instance,
                                "_connections": instance.connections },
            url = url)
(Continue reading)

jcater | 4 Nov 03:38 2006

[gnue] r8976 - trunk/gnue-common/src/events

Author: jcater
Date: 2006-11-03 20:38:58 -0600 (Fri, 03 Nov 2006)
New Revision: 8976

Modified:
   trunk/gnue-common/src/events/Event.py
   trunk/gnue-common/src/events/EventAware.py
   trunk/gnue-common/src/events/EventController.py
Log:
cleaned up events, adding new-style property() and removing duplicate code where appropriate/possible
(should not break compatability with other tools)

Modified: trunk/gnue-common/src/events/Event.py
===================================================================
--- trunk/gnue-common/src/events/Event.py	2006-11-04 00:18:30 UTC (rev 8975)
+++ trunk/gnue-common/src/events/Event.py	2006-11-04 02:38:58 UTC (rev 8976)
 <at>  <at>  -32,151 +32,164  <at>  <at> 
 # =============================================================================

 class Event(object):
-  """
-  An Event is the actual event object passed back and forth between the event
-  listeners.
+    """
+    An Event is the actual event object passed back and forth between the event
+    listeners.

-  Any parameters passed to the Event's __init__ are added as attributes of the
-  event. The first attribute, however, should always be the case-sensitive
-  event name.
(Continue reading)

btami | 5 Nov 23:41 2006

[gnue] r8977 - in trunk/gnue-forms/src/uidrivers/win32: . widgets/form

Author: btami
Date: 2006-11-05 16:41:57 -0600 (Sun, 05 Nov 2006)
New Revision: 8977

Modified:
   trunk/gnue-forms/src/uidrivers/win32/UIdriver.py
   trunk/gnue-forms/src/uidrivers/win32/dialog.py
   trunk/gnue-forms/src/uidrivers/win32/dialogs.py
   trunk/gnue-forms/src/uidrivers/win32/widgets/form/widget.py
Log:
making native dialogs modal

Modified: trunk/gnue-forms/src/uidrivers/win32/UIdriver.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/win32/UIdriver.py	2006-11-04 02:38:58 UTC (rev 8976)
+++ trunk/gnue-forms/src/uidrivers/win32/UIdriver.py	2006-11-05 22:41:57 UTC (rev 8977)
 <at>  <at>  -188,8 +188,8  <at>  <at> 
   # ---------------------------------------------------------------------------

   def _getInput (self, title, fields, cancel = True):
-
-    dialog = dialogs.InputDialog (title, fields, cancel)
+
+    dialog = dialogs.InputDialog (self._win32app._MainWindowList[0].GetHwnd(), title, fields, cancel)
     dialog.DoModal ()
     return dialog.inputData

 <at>  <at>  -210,7 +210,7  <at>  <at> 

   def _ui_show_exception_(self, group, name, message, detail):
(Continue reading)

jcater | 6 Nov 07:39 2006

[gnue] r8978 - in trunk/gnue-common/src: definitions events

Author: jcater
Date: 2006-11-06 00:39:20 -0600 (Mon, 06 Nov 2006)
New Revision: 8978

Modified:
   trunk/gnue-common/src/definitions/GParser.py
   trunk/gnue-common/src/events/Event.py
Log:
minor namespace cleanup in events; switch to {}.iteritems() instead of {}.items(), as it is supposedly
more correct in python2.3+

Modified: trunk/gnue-common/src/definitions/GParser.py
===================================================================
--- trunk/gnue-common/src/definitions/GParser.py	2006-11-05 22:41:57 UTC (rev 8977)
+++ trunk/gnue-common/src/definitions/GParser.py	2006-11-06 06:39:20 UTC (rev 8978)
 <at>  <at>  -457,7 +457,7  <at>  <at> 
             # self.uniqueIDs ["%s" % qattr_data] = True

 
-      for attr, attrdata in baseAttrs.items():
+      for attr, attrdata in baseAttrs.iteritems():
         try:
           if not attr in lattrs:
             # Pull default values for missing attributes

Modified: trunk/gnue-common/src/events/Event.py
===================================================================
--- trunk/gnue-common/src/events/Event.py	2006-11-05 22:41:57 UTC (rev 8977)
+++ trunk/gnue-common/src/events/Event.py	2006-11-06 06:39:20 UTC (rev 8978)
 <at>  <at>  -69,7 +69,7  <at>  <at> 
(Continue reading)

reinhard | 6 Nov 10:54 2006

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

Author: reinhard
Date: 2006-11-06 03:54:17 -0600 (Mon, 06 Nov 2006)
New Revision: 8979

Modified:
   trunk/gnue-forms/src/uidrivers/wx26/widgets/gridline.py
Log:
Fixed function parameters.

Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/gridline.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/gridline.py	2006-11-06 06:39:20 UTC (rev 8978)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/gridline.py	2006-11-06 09:54:17 UTC (rev 8979)
 <at>  <at>  -119,7 +119,7  <at>  <at> 
     # Add an UI widget to the Grid container
     # -------------------------------------------------------------------------

-    def add_widgets(self, ui_widget, spacer):
+    def add_widgets(self, ui_widget, spacer, border=0):
         """
         Add a given UI widget to the gridline.

reinhard | 6 Nov 11:04 2006

[gnue] r8980 - trunk/gnue-common/src/events

Author: reinhard
Date: 2006-11-06 04:04:45 -0600 (Mon, 06 Nov 2006)
New Revision: 8980

Modified:
   trunk/gnue-common/src/events/EventController.py
Log:
Fixed typo. This fixes all forms not accepting keypresses any more.

Modified: trunk/gnue-common/src/events/EventController.py
===================================================================
--- trunk/gnue-common/src/events/EventController.py	2006-11-06 09:54:17 UTC (rev 8979)
+++ trunk/gnue-common/src/events/EventController.py	2006-11-06 10:04:45 UTC (rev 8980)
 <at>  <at>  -145,7 +145,7  <at>  <at> 
             event = Event(event, *args, **kwargs)

 
-        for key in ('___before__', event.__event__, '__after__'):
+        for key in ('__before__', event.__event__, '__after__'):
             for handler in registered_events.get(key, ()): 
                 handler(event)
                 if event.__error__ or event.__dropped__: 
 <at>  <at>  -165,4 +165,4  <at>  <at> 
     dispatchEvent = dispatch_event
     startCachingEvents = start_event_cache
     stopCachingEvents = stop_event_cache
-    
\ No newline at end of file
+    
(Continue reading)

kilo | 6 Nov 11:23 2006

[gnue] r8981 - trunk/gnue-forms/samples/intro

Author: kilo
Date: 2006-11-06 04:23:29 -0600 (Mon, 06 Nov 2006)
New Revision: 8981

Modified:
   trunk/gnue-forms/samples/intro/intro.gfd
Log:
Eliminate encode error when string is still empty.

Modified: trunk/gnue-forms/samples/intro/intro.gfd
===================================================================
--- trunk/gnue-forms/samples/intro/intro.gfd	2006-11-06 10:04:45 UTC (rev 8980)
+++ trunk/gnue-forms/samples/intro/intro.gfd	2006-11-06 10:23:29 UTC (rev 8981)
 <at>  <at>  -17,7 +17,12  <at>  <at> 
 import string
 from gnue.common.apps import GConfig

-s = SampleBlock.NameEntry.get().encode(gConfig('textEncoding'))
+s = SampleBlock.NameEntry.get()
+if s:
+ s = s.encode(gConfig('textEncoding'))
+else:
+ s = ''
+
 try:
  out = ''

johannes | 7 Nov 15:57 2006

[gnue] r8982 - trunk/gnue-forms/src/uidrivers/qt3/widgets

Author: johannes
Date: 2006-11-07 08:57:09 -0600 (Tue, 07 Nov 2006)
New Revision: 8982

Modified:
   trunk/gnue-forms/src/uidrivers/qt3/widgets/form.py
   trunk/gnue-forms/src/uidrivers/qt3/widgets/grid.py
Log:
Grid widgets can add/remove rows on resizing

Modified: trunk/gnue-forms/src/uidrivers/qt3/widgets/form.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/qt3/widgets/form.py	2006-11-06 10:23:29 UTC (rev 8981)
+++ trunk/gnue-forms/src/uidrivers/qt3/widgets/form.py	2006-11-07 14:57:09 UTC (rev 8982)
 <at>  <at>  -75,6 +75,7  <at>  <at> 
         self._form = None
         self.__status_bar = None
         self.__status_fields = []
+        self.sizing_enabled = False

 
     # -------------------------------------------------------------------------
 <at>  <at>  -139,6 +140,7  <at>  <at> 
         Show the form or dialog modeless
         """

+        self.sizing_enabled = True
         self.main_window.show()
         self._uiDriver.hide_splash()

(Continue reading)


Gmane