add wx.icon in init for class beremiz class
authorgreg
Wed, 27 Feb 2008 09:43:02 +0100
changeset 116 ff860001a377
parent 115 9ffdac9cf609
child 117 32099ee16154
add wx.icon in init for class beremiz class
Beremiz.py
--- a/Beremiz.py	Tue Feb 26 17:14:06 2008 +0100
+++ b/Beremiz.py	Wed Feb 27 09:43:02 2008 +0100
@@ -338,6 +338,13 @@
         
         self.Log = LogPseudoFile(self.LogConsole)
         
+        # Add beremiz's icon in top left corner of the frame
+        if wx.Platform == '__WXMSW__':
+            icon = wx.Icon(os.path.join(CWD,"brz.ico"),wx.BITMAP_TYPE_ICO)
+        else:
+            icon = wx.Icon(os.path.join(CWD,"brz.png"),wx.BITMAP_TYPE_PNG)
+        self.SetIcon(icon)
+        
         self.PluginRoot = PluginsRoot(self)
         self.DisableEvents = False
         
@@ -1288,12 +1295,5 @@
     
     frame = Beremiz(None, projectOpen)
     
-    # Add beremiz's icon in top left corner of the frame
-    if wx.Platform == '__WXMSW__':
-        winicon = wx.Icon(os.path.join(CWD,"brz.ico"),wx.BITMAP_TYPE_ICO)
-        frame.SetIcon(winicon)
-    else:
-		linicon = wx.Icon(os.path.join(CWD,"brz.png"),wx.BITMAP_TYPE_PNG)
-		frame.SetIcon(linicon)
     frame.Show()
     app.MainLoop()