Esempio n. 1
0
	def OnInit(self):
		self.config = wx.FileConfig("songpress")
		wx.Config.Set(self.config)
		i18n.init(glb.default_language, [l for l in glb.languages])
		self.config.SetPath("/App")
		l = self.config.Read("locale")
		if l:
			i18n.setLang(l)
		else:
			i18n.setSystemLang()
		self.res = xrc.XmlResource(glb.AddPath("xrc/songpress.xrc"))
		songpressFrame = SongpressFrame(self.res)
		
		return True
Esempio n. 2
0
 def OnInit(self):
     self.SetAppName("songpress")
     glb.InitDataPath()
     self.config = wx.FileConfig(
         localFilename=os.path.join(glb.data_path, "config.ini"))
     wx.Config.Set(self.config)
     i18n.init(glb.default_language, [l for l in glb.languages])
     self.config.SetPath("/App")
     l = self.config.Read("locale")
     if l:
         i18n.setLang(l)
     else:
         i18n.setSystemLang()
     self.res = wx.xrc.XmlResource(glb.AddPath("xrc/songpress.xrc"))
     songpressFrame = SongpressFrame.SongpressFrame(self.res)
     return True
# Author:		 Luca Allulli ([email protected])
# Created:	 2009-01-16
# Copyright: Luca Allulli (http://www.skeed.it/songpress.html)
# License:	 GNU GPL v2
##############################################################

import wx
import wx.aui
from wx import xrc
import os
import os.path
import sys
import i18n

i18n.register()
i18n.setLang("it")

class SDIDropTarget(wx.FileDropTarget):
	def __init__(self, sdi):
		wx.FileDropTarget.__init__(self)
		self.sdi = sdi
	def OnDropFiles(self, x, y, arr):
		self.sdi.OnDropFiles(arr)

class SDIMainFrame(wx.FileDropTarget):
	"""Abstract class. Override methods New, Open, Save"""
	###UI generation###

	def __init__(
		self,
		res,