def __init__(self, parent, y_pos): wx.Frame.__init__(self, parent, -1, "", pos=(-1, y_pos), style = wx.FRAME_SHAPED | wx.SIMPLE_BORDER | \ wx.FRAME_NO_TASKBAR | wx.STAY_ON_TOP ) self.Bind(wx.EVT_PAINT, self.OnPaint) self.bmp = wx.Bitmap(os.path.join(RESOURCES_PATH, "Cecilia_splash.png"), wx.BITMAP_TYPE_PNG) w, h = self.bmp.GetWidth(), self.bmp.GetHeight() self.SetClientSize((w, h)) if wx.Platform == "__WXGTK__": self.Bind(wx.EVT_WINDOW_CREATE, self.SetWindowShape) else: self.SetWindowShape() dc = wx.ClientDC(self) dc.DrawBitmap(self.bmp, 0,0,True) self.fc = wx.FutureCall(3000, self.OnClose) self.Center(wx.HORIZONTAL) if CeciliaLib.getPlatform() == 'win32': self.Center(wx.VERTICAL) self.Show(True)
if not os.path.isfile(os.path.join(TMP_PATH,'.recent.txt')): f = open(os.path.join(TMP_PATH,'.recent.txt'), "w") f.close() if not os.path.isdir(AUTOMATION_SAVE_PATH): os.mkdir(AUTOMATION_SAVE_PATH) file = None if len(sys.argv) >= 2: file = sys.argv[1] csound = CsoundLib.Csound() CeciliaLib.setCsound(csound) app = CeciliaApp() wx.SetDefaultPyEncoding('utf-8') X,Y = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_X), wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y) if CeciliaLib.getPlatform() == 'linux2': bmp = wx.Bitmap(os.path.join(RESOURCES_PATH, "Cecilia_splash.png"), wx.BITMAP_TYPE_PNG) sp = wx.SplashScreen(bitmap=bmp, splashStyle=wx.SPLASH_TIMEOUT, milliseconds=3000, parent=None) sp.Center() else: sp_y = Y/4 sp = CeciliaSplashScreen(None, sp_y) display = wx.Display() numDisp = display.GetCount() CeciliaLib.setNumDisplays(numDisp) print 'Numbers of displays:', numDisp displays = [] displayOffset = [] displaySize = [] for i in range(numDisp): displays.append(wx.Display(i))