[Inteproxy-commits] r157 - in trunk: . inteproxy

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jul 4 21:30:10 CEST 2008


Author: bh
Date: 2008-07-04 21:30:10 +0200 (Fri, 04 Jul 2008)
New Revision: 157

Modified:
   trunk/ChangeLog
   trunk/inteproxy/gtkapp.py
Log:
* inteproxy/gtkapp.py (InteProxyApplication.__init__): Workaround
a problem with the keyboard focus on WindowsXP.  See the comment
for details.  Cures the symptom of bug #616.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-06-27 09:52:20 UTC (rev 156)
+++ trunk/ChangeLog	2008-07-04 19:30:10 UTC (rev 157)
@@ -1,3 +1,9 @@
+2008-07-04  Bernhard Herzog  <bh at intevation.de>
+
+	* inteproxy/gtkapp.py (InteProxyApplication.__init__): Workaround
+	a problem with the keyboard focus on WindowsXP.  See the comment
+	for details.  Cures the symptom of bug #616.
+
 2008-06-27  Bernhard Herzog  <bh at intevation.de>
 
 	* inteproxy/transcoder.py (TranscoderMap.rewrite_urls): Also

Modified: trunk/inteproxy/gtkapp.py
===================================================================
--- trunk/inteproxy/gtkapp.py	2008-06-27 09:52:20 UTC (rev 156)
+++ trunk/inteproxy/gtkapp.py	2008-07-04 19:30:10 UTC (rev 157)
@@ -17,7 +17,7 @@
 
 import inteproxy.app
 import inteproxy.main
-from inteproxy.resources import image_filename, gettext as _
+from inteproxy.resources import in_py2exe, image_filename, gettext as _
 
 
 def run_password_dialog(title):
@@ -376,6 +376,19 @@
             #  - Show the main window immediately.
             self.ui.get_action("/Menubar/FileMenu/Close").set_visible(False)
             self.main_window.show()
+        elif in_py2exe():
+            # On WindowsXP at least when running from a py2exe
+            # executable, the password dialog cannot acquire the
+            # keyboard focus properly when it is shown for the first
+            # time under some circumstances.  The only work around seems
+            # to be to make sure at least one top-level window has been
+            # shown before the password dialog is run for the first
+            # time.  To this end, we show the main window very briefly
+            # and move it to a position well outside the visible area to
+            # avoid it actually appearing on screen.
+            self.main_window.move(gtk.gdk.screen_width() + 1000, 0)
+            self.main_window.show()
+            self.main_window.hide()
 
     def create_ui(self):
         """Internal: Parses the ui_definition"""



More information about the Inteproxy-commits mailing list