dabo Commit
Revision 3189
Date: 2007-06-21 12:46:41 -0700 (Thu, 21 Jun 2007)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/3189

Changed:
U   trunk/dabo/ui/uiwx/dGlWindow.py

Log:
Removed the "PyOpenGL is not loaded..." message from displaying during 
dabo.ui.loadUI().
Instead, an exception is raised when you try to instantiate dGlWindow.



Diff:
Modified: trunk/dabo/ui/uiwx/dGlWindow.py
===================================================================
--- trunk/dabo/ui/uiwx/dGlWindow.py     2007-06-21 14:37:33 UTC (rev 3188)
+++ trunk/dabo/ui/uiwx/dGlWindow.py     2007-06-21 19:46:41 UTC (rev 3189)
@@ -15,11 +15,15 @@
 try:
        from OpenGL.GL import *
        from OpenGL.GLUT import *
+       openGL = True
 except ImportError:
-       dabo.infoLog.write(_("PyOpenGL not present, so dGlWindow is not 
loaded."))
+       openGL = False
 
 class dGlWindow(cm.dControlMixin, glcanvas.GLCanvas):
        def __init__(self, parent, properties=None, attProperties=None, *args, 
**kwargs):
+               if not openGL:
+                       raise ImportError, "PyOpenGL is not present, so 
dGlWindow cannot instantiate."
+
                self.init = False
                self._rotate = self._pan = False
                
@@ -220,4 +224,4 @@
 if __name__ == "__main__":
        import test
        test.Test().runTest(_dGlWindow_test)
-       test.Test().runTest(_dGlWindow_test2)
\ No newline at end of file
+       test.Test().runTest(_dGlWindow_test2)




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to