[gnue] r10229 - in trunk/gnue-forms: . src/GFObjects

[email protected] Thu, 28 Oct 2010 15:59:53 -0500 (CDT)
Newsgroups gmane.comp.cms.gnue.cvs
Message-ID <[email protected]>
Author: reinhard
Date: 2010-10-28 15:59:53 -0500 (Thu, 28 Oct 2010)
New Revision: 10229

Modified:
   trunk/gnue-forms/
   trunk/gnue-forms/src/GFObjects/commanders.py
Log:
Fix for cases where actions are enabled or disabled before the UI is crea=
ted.



Property changes on: trunk/gnue-forms
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2010-10-28 21:46:06.186000109 +0200
committer: Reinhard M=C3=BCller <[email protected]>
properties:=20
	branch-nick: forms

   + timestamp: 2010-10-28 22:58:55.194000006 +0200
committer: Reinhard M=C3=BCller <[email protected]>
properties:=20
	branch-nick: forms

Name: bzr:file-ids
   - src/GFObjects/GFField.py	1459@3a364389-8fce-0310-8f11-cc363fde16c7:t=
runk%2Fgnue-forms:src%2FGFObjects%2FGFField.py

   + src/GFObjects/commanders.py	8506@3a364389-8fce-0310-8f11-cc363fde16c=
7:trunk%2Fgnue-forms:src%2FGFObjects%2Fcommanders.py

Name: bzr:revision-id:v4
   - 3116 [email protected]
3117 [email protected]
3118 [email protected]
3119 [email protected]
3120 [email protected]
3121 [email protected]
3122 [email protected]
3123 [email protected]
3124 [email protected]
3125 [email protected]
3126 [email protected]
3127 [email protected]
3128 [email protected]
3129 [email protected]
3130 [email protected]
3131 [email protected]
3132 [email protected]
3133 [email protected]
3134 [email protected]
3135 [email protected]
3136 [email protected]
3137 [email protected]
3138 [email protected]
3139 [email protected]
3140 [email protected]
3141 [email protected]
3142 [email protected]
3143 [email protected]
3144 [email protected]
3145 [email protected]
3146 [email protected]

   + 3116 [email protected]
3117 [email protected]
3118 [email protected]
3119 [email protected]
3120 [email protected]
3121 [email protected]
3122 [email protected]
3123 [email protected]
3124 [email protected]
3125 [email protected]
3126 [email protected]
3127 [email protected]
3128 [email protected]
3129 [email protected]
3130 [email protected]
3131 [email protected]
3132 [email protected]
3133 [email protected]
3134 [email protected]
3135 [email protected]
3136 [email protected]
3137 [email protected]
3138 [email protected]
3139 [email protected]
3140 [email protected]
3141 [email protected]
3142 [email protected]
3143 [email protected]
3144 [email protected]
3145 [email protected]
3146 [email protected]
3147 [email protected]

Name: bzr:text-parents
   - src/GFObjects/GFField.py	[email protected]=
-522p7574jw2e11jj

   + src/GFObjects/commanders.py	svn-v3-single1-dHJ1bmsvZ251ZS1mb3Jtcw..:=
3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-forms:10149


Modified: trunk/gnue-forms/src/GFObjects/commanders.py
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/gnue-forms/src/GFObjects/commanders.py	2010-10-28 19:46:32 UTC =
(rev 10228)
+++ trunk/gnue-forms/src/GFObjects/commanders.py	2010-10-28 20:59:53 UTC =
(rev 10229)
@@ -83,11 +83,8 @@
         #: operation of the commander.
         self.__action_off =3D None
=20
-        #: Whether the UI widget is enabled or not. The UIxxx implementa=
tions
-        #: read this variable on initialisation; if at some point the UI
-        #: widgets are initialized with parameters, this variable can be=
 made
-        #: private.
-        self._ui_enabled =3D False
+        #: Whether the UI widget is enabled or not.
+        self.__ui_enabled =3D False
=20
         self._inits.append(self._phase_2_init_)
=20
@@ -131,7 +128,7 @@
             # Set a variable to determine whether the UI widget should b=
e
             # enabled or not.
             if self.action_off is None or not self.state:
-                self._ui_enabled =3D self.enabled and self.__action.enab=
led
+                self.__ui_enabled =3D self.enabled and self.__action.ena=
bled
=20
         # Link to action_off object
         if self.action_off is not None:
@@ -144,7 +141,7 @@
             # Set a variable to determine whether the UI widget should b=
e
             # enabled or not.
             if self.state:
-                self._ui_enabled =3D self.enabled and self.__action_off.=
enabled
+                self.__ui_enabled =3D self.enabled and self.__action_off=
.enabled
=20
=20
     # ------------------------------------------------------------------=
-------
@@ -278,10 +275,11 @@
         else:
             new_ui_enabled =3D False
=20
-        if new_ui_enabled !=3D self._ui_enabled:
+        if new_ui_enabled !=3D self.__ui_enabled:
             if self.uiWidget is not None:
                 self.uiWidget._ui_set_enabled_(new_ui_enabled)
-            self._ui_enabled =3D new_ui_enabled
+                # Store this only if the uiWidget already exists.
+                self.__ui_enabled =3D new_ui_enabled
=20
=20
     # ------------------------------------------------------------------=
-------