mailr10260 - in /branches/bieri_gui/gui_bieri: __init__.py res/about.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on January 20, 2010 - 08:56:
Author: bugman
Date: Wed Jan 20 08:56:41 2010
New Revision: 10260

URL: http://svn.gna.org/viewcvs/relax?rev=10260&view=rev
Log:
The about relaxGUI panel does not create its own wx application.

removed in about.py:
- app = wx.PySimpleApp(0)
- wx.InitAllImageHandlers()
- start = MyFrame(None, -1, "")
- app.SetTopWindow(start)
- start.Show()
- app.MainLoop()

changed:
xw.Frame to wx.Dialog in about.py

moved in _init_.py (main folder):

+ # start wx Application
+ relaxGUI = wx.PySimpleApp(0)
+ wx.InitAllImageHandlers()

--> to start one wx application for about panel and main relaxGUI window


Modified:
    branches/bieri_gui/gui_bieri/__init__.py
    branches/bieri_gui/gui_bieri/res/about.py

Modified: branches/bieri_gui/gui_bieri/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/__init__.py?rev=10260&r1=10259&r2=10260&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/__init__.py (original)
+++ branches/bieri_gui/gui_bieri/__init__.py Wed Jan 20 08:56:41 2010
@@ -62,6 +62,10 @@
     sys.stdout.write('##############################################\n')
     sys.stdout.write('\n\n\n\n')
 
+    # start wx Application
+    relaxGUI = wx.PySimpleApp(0)
+    wx.InitAllImageHandlers()
+
     # show about panel
     about_relax()
 
@@ -71,8 +75,6 @@
         sys.exit()
 
     # Build the GUI.
-    relaxGUI = wx.PySimpleApp(0)
-    wx.InitAllImageHandlers()
     relaxGUI_main = main(None, -1, "")
     relaxGUI.SetTopWindow(relaxGUI_main)
     relaxGUI_main.Show()

Modified: branches/bieri_gui/gui_bieri/res/about.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/res/about.py?rev=10260&r1=10259&r2=10260&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/res/about.py (original)
+++ branches/bieri_gui/gui_bieri/res/about.py Wed Jan 20 08:56:41 2010
@@ -26,11 +26,11 @@
 import sys
 
 
-class MyFrame(wx.Frame):
+class MyFrame(wx.Dialog):
     def __init__(self, *args, **kwds):
         # begin wxGlade: MyFrame.__init__
         kwds["style"] = wx.CLOSE_BOX|wx.STAY_ON_TOP
-        wx.Frame.__init__(self, *args, **kwds)
+        wx.Dialog.__init__(self, *args, **kwds)
         self.panel_1 = wx.Panel(self, -1)
         self.panel_2 = wx.Panel(self, -1)
         self.bitmap_1 = wx.StaticBitmap(self.panel_1, -1, 
wx.Bitmap(sys.path[-1]+sep+'gui_bieri'+sep+'res'+sep+'pics'+sep+'start.png', 
wx.BITMAP_TYPE_ANY))
@@ -81,9 +81,5 @@
 
 
 def about_relax():
-    app = wx.PySimpleApp(0)
-    wx.InitAllImageHandlers()
-    start = MyFrame(None, -1, "")
-    app.SetTopWindow(start)
-    start.Show()
-    app.MainLoop()
+    about = MyFrame(None, -1, "")
+    about.ShowModal()




Related Messages


Powered by MHonArc, Updated Wed Jan 20 09:20:01 2010