commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r10133 - in trunk/gnue-forms/src/uidrivers: qt3 qt4


From: reinhard
Subject: [gnue] r10133 - in trunk/gnue-forms/src/uidrivers: qt3 qt4
Date: Thu, 17 Dec 2009 01:56:24 -0600 (CST)

Author: reinhard
Date: 2009-12-17 01:56:23 -0600 (Thu, 17 Dec 2009)
New Revision: 10133

Modified:
   trunk/gnue-forms/src/uidrivers/qt3/UIdriver.py
   trunk/gnue-forms/src/uidrivers/qt3/dialogs.py
   trunk/gnue-forms/src/uidrivers/qt4/UIdriver.py
   trunk/gnue-forms/src/uidrivers/qt4/dialogs.py
Log:
Use the current form's title as the window title of error message dialogs.


Modified: trunk/gnue-forms/src/uidrivers/qt3/UIdriver.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/qt3/UIdriver.py      2009-12-16 19:33:19 UTC 
(rev 10132)
+++ trunk/gnue-forms/src/uidrivers/qt3/UIdriver.py      2009-12-17 07:56:23 UTC 
(rev 10133)
@@ -149,7 +149,8 @@
     def _ui_show_error_(self, message):
 
         self.hide_splash()
-        qt.QMessageBox.critical(None, "GNU Enterprise", message)
+        qt.QMessageBox.critical(None, self._qtapp.activeWindow().caption(),
+                message)
 
 
     # -------------------------------------------------------------------------

Modified: trunk/gnue-forms/src/uidrivers/qt3/dialogs.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/qt3/dialogs.py       2009-12-16 19:33:19 UTC 
(rev 10132)
+++ trunk/gnue-forms/src/uidrivers/qt3/dialogs.py       2009-12-17 07:56:23 UTC 
(rev 10133)
@@ -27,6 +27,7 @@
 import qt
 
 from gnue.forms import VERSION
+from gnue.forms.uidrivers.qt3.QTApp import getQtApp
 
 __all__ = ['ExceptionDialog', 'InputDialog', 'AboutBox']
 
@@ -40,10 +41,6 @@
     available via a detail button.
     """
 
-    _TITLE = {'system'     : u_("GNUe Internal System Error"),
-              'admin'      : u_("GNUe Unexpected Error"),
-              'application': u_("GNUe Application Error")}
-
     _FORMAT = {
        'system': u_("An unexpected internal error has occured:\n%s.\n"
                     "This means you have found a bug in GNU Enterprise. "
@@ -101,7 +98,7 @@
 
         self.vbox.addLayout(bbox, 0)
 
-        self.setCaption(self._TITLE.get(group, u'Error'))
+        self.setCaption(getQtApp().activeWindow().caption())
 
     # -------------------------------------------------------------------------
 

Modified: trunk/gnue-forms/src/uidrivers/qt4/UIdriver.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/qt4/UIdriver.py      2009-12-16 19:33:19 UTC 
(rev 10132)
+++ trunk/gnue-forms/src/uidrivers/qt4/UIdriver.py      2009-12-17 07:56:23 UTC 
(rev 10133)
@@ -141,7 +141,8 @@
     def _ui_show_error_(self, message):
 
         self.hide_splash()
-        qt.QMessageBox.critical(None, "GNU Enterprise", message)
+        qt.QMessageBox.critical(None, self._qtapp.activeWindow().windowTitle(),
+                message)
 
 
     # -------------------------------------------------------------------------

Modified: trunk/gnue-forms/src/uidrivers/qt4/dialogs.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/qt4/dialogs.py       2009-12-16 19:33:19 UTC 
(rev 10132)
+++ trunk/gnue-forms/src/uidrivers/qt4/dialogs.py       2009-12-17 07:56:23 UTC 
(rev 10133)
@@ -27,6 +27,7 @@
 from PyQt4 import Qt as qt
 
 from gnue.forms import VERSION
+from gnue.forms.uidrivers.qt4.QTApp import getQtApp
 
 __all__ = ['ExceptionDialog', 'InputDialog', 'AboutBox']
 
@@ -40,10 +41,6 @@
     available via a detail button.
     """
 
-    _TITLE = {'system'     : u_("GNUe Internal System Error"),
-              'admin'      : u_("GNUe Unexpected Error"),
-              'application': u_("GNUe Application Error")}
-
     _FORMAT = {
        'system': u_("An unexpected internal error has occured:\n%s.\n"
                     "This means you have found a bug in GNU Enterprise. "
@@ -103,7 +100,7 @@
 
         self.vbox.addLayout(bbox, 0)
 
-        self.setWindowTitle(self._TITLE.get(group, u'Error'))
+        self.setWindowTitle(getQtApp().activeWindow().windowTitle())
 
     # -------------------------------------------------------------------------
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]