[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r10128 - in trunk/gnue-forms/src/uidrivers/wx: . widgets
From: |
reinhard |
Subject: |
[gnue] r10128 - in trunk/gnue-forms/src/uidrivers/wx: . widgets |
Date: |
Tue, 15 Dec 2009 09:33:13 -0600 (CST) |
Author: reinhard
Date: 2009-12-15 09:33:12 -0600 (Tue, 15 Dec 2009)
New Revision: 10128
Modified:
trunk/gnue-forms/src/uidrivers/wx/UISplashScreen.py
trunk/gnue-forms/src/uidrivers/wx/UIdriver.py
trunk/gnue-forms/src/uidrivers/wx/dialogs.py
trunk/gnue-forms/src/uidrivers/wx/widgets/form.py
Log:
Use the current form's title for the title bar in error messages.
Modified: trunk/gnue-forms/src/uidrivers/wx/UISplashScreen.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx/UISplashScreen.py 2009-12-14 16:03:19 UTC
(rev 10127)
+++ trunk/gnue-forms/src/uidrivers/wx/UISplashScreen.py 2009-12-15 15:33:12 UTC
(rev 10128)
@@ -57,4 +57,8 @@
wx.SplashScreen.__init__ (self, image,
wx.SPLASH_CENTRE_ON_SCREEN, 0, None)
+ # Fake title, will be used by error messages until the main form is
+ # activated.
+ self.SetTitle("GNU Enterprise")
+
wx.GetApp ().Yield ()
Modified: trunk/gnue-forms/src/uidrivers/wx/UIdriver.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx/UIdriver.py 2009-12-14 16:03:19 UTC
(rev 10127)
+++ trunk/gnue-forms/src/uidrivers/wx/UIdriver.py 2009-12-15 15:33:12 UTC
(rev 10128)
@@ -201,7 +201,8 @@
if self.__splash:
self.__splash.Close()
- dialog = wx.MessageDialog(None, message, "GNU Enterprise",
+ dialog = wx.MessageDialog(None, message,
+ wx.GetApp().GetTopWindow().GetTitle(),
wx.ICON_ERROR | wx.OK)
try:
result = dialog.ShowModal()
Modified: trunk/gnue-forms/src/uidrivers/wx/dialogs.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx/dialogs.py 2009-12-14 16:03:19 UTC
(rev 10127)
+++ trunk/gnue-forms/src/uidrivers/wx/dialogs.py 2009-12-15 15:33:12 UTC
(rev 10128)
@@ -426,10 +426,6 @@
class ExceptionDialog (wx.Dialog):
- _TITLE = {'system' : _("GNUe Internal System Error"),
- 'admin' : _("GNUe Unexpected Error"),
- 'application': _("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. "
@@ -446,8 +442,8 @@
def __init__ (self, group, name, message, detail):
wx.Dialog.__init__ (self, None, wx.ID_ANY,
- self._TITLE.get (group, _('Error')), wx.DefaultPosition,
- wx.DefaultSize, wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
+ wx.GetApp().GetTopWindow().GetTitle(), wx.DefaultPosition,
+ wx.DefaultSize, wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
self.dls = dls = wx.BoxSizer (wx.VERTICAL)
self.gbs = gbs = wx.GridBagSizer (6, 6)
Modified: trunk/gnue-forms/src/uidrivers/wx/widgets/form.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx/widgets/form.py 2009-12-14 16:03:19 UTC
(rev 10127)
+++ trunk/gnue-forms/src/uidrivers/wx/widgets/form.py 2009-12-15 15:33:12 UTC
(rev 10128)
@@ -136,6 +136,9 @@
self.main_window.SetTitle(self._form.title)
self.main_window.SetIcons(self.__load_icons())
self._menubar_ = None
+
+ self.main_window.Bind(wx.EVT_ACTIVATE, self.__on_activate)
+
if not self.__embedded:
self.main_window.Bind(wx.EVT_CLOSE, self.__on_close,
self.main_window)
@@ -296,6 +299,13 @@
# Event-handler
# -------------------------------------------------------------------------
+ def __on_activate(self, event):
+
+ if event.GetActive():
+ wx.GetApp().SetTopWindow(self.main_window)
+
+ # -------------------------------------------------------------------------
+
def __on_close(self, event):
if event.CanVeto():
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r10128 - in trunk/gnue-forms/src/uidrivers/wx: . widgets,
reinhard <=