thomas - r7278 - in flumotion/trunk: . flumotion/component/base

flumotion-commit at lists.fluendo.com flumotion-commit at lists.fluendo.com
Sun Aug 24 19:11:19 CEST 2008


Author: thomas
Date: Sun Aug 24 19:11:19 2008
New Revision: 7278

Log:
	* flumotion/component/base/baseadminnode.py:
	  When there is a component UI error in a tab, say which tab.
	  When the error is because the component's Node still uses glade_file
	  then warnings.warn and show a component warning message, but
	  still work.



Modified:
   flumotion/trunk/ChangeLog
   flumotion/trunk/flumotion/component/base/baseadminnode.py

Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog	(original)
+++ flumotion/trunk/ChangeLog	Sun Aug 24 19:11:19 2008
@@ -1,6 +1,14 @@
 2008-08-24  Thomas Vander Stichele  <thomas at apestaart dot org>
 
 	* flumotion/component/base/baseadminnode.py:
+	  When there is a component UI error in a tab, say which tab.
+	  When the error is because the component's Node still uses glade_file
+	  then warnings.warn and show a component warning message, but
+	  still work.
+
+2008-08-24  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+	* flumotion/component/base/baseadminnode.py:
 	  Make the TypeError clearer by saying which method is responsible
 	  for the bug.
 

Modified: flumotion/trunk/flumotion/component/base/baseadminnode.py
==============================================================================
--- flumotion/trunk/flumotion/component/base/baseadminnode.py	(original)
+++ flumotion/trunk/flumotion/component/base/baseadminnode.py	Sun Aug 24 19:11:19 2008
@@ -234,8 +234,8 @@
             # an error label, given a debug string
             self.warning("error rendering component UI; debug %s", debug)
             m = messages.Error(T_(N_(
-                "Internal error in component UI.  "
-                "Please file a bug against the component.")),
+                "Internal error in component UI's '%s' tab.  "
+                "Please file a bug against the component."), self.title),
                 debug=debug, mid="render-%s" % self.title)
             self.addMessage(m)
 
@@ -249,6 +249,19 @@
             return label
 
         def loadGladeFile():
+            # F0.8
+            if hasattr(self, 'glade_file'):
+                self.gladeFile = self.glade_file
+                debug = "class %r should have glade_file " \
+                    "changed to gladeFile" % self.__class__
+                import warnings
+                warnings.warn(debug, DeprecationWarning)
+                m = messages.Warning(T_(N_(
+                    "Internal error in component UI's '%s' tab.  "
+                    "Please file a bug against the component."), self.title),
+                    debug=debug, mid="render-%s" % self.title)
+                self.addMessage(m)
+
             if not self.gladeFile:
                 return defer.succeed(None)
 


More information about the flumotion-commit mailing list