# -*- coding: utf-8 -*- import i18n i18n.register("PreferencesDialog") # -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Oct 8 2012) ## http://www.wxformbuilder.org/ ## ## PLEASE DO "NOT" EDIT THIS FILE! ########################################################################### import wx import wx.xrc from FontComboBox import FontComboBox import Editor ########################################################################### ## Class PreferencesDialog ########################################################################### class PreferencesDialog(wx.Dialog): def __init__(self, parent): wx.Dialog.__init__( self, parent, id=wx.ID_ANY,
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Aug 25 2009) ## http://www.wxformbuilder.org/ ## ## PLEASE DO "NOT" EDIT THIS FILE! ########################################################################### import wx import i18n i18n.register('NotationDialog') ########################################################################### ## Class NotationDialog ########################################################################### class NotationDialog ( wx.Dialog ): def __init__( self, parent ): wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _(u"Change notation"), pos = wx.DefaultPosition, size = wx.Size( -1,-1 ), style = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER ) self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) bSizer1 = wx.BoxSizer( wx.VERTICAL ) bSizer2 = wx.BoxSizer( wx.HORIZONTAL ) self.label1 = wx.StaticText( self, wx.ID_ANY, _(u"From notation:"), wx.DefaultPosition, wx.DefaultSize, 0 ) self.label1.Wrap( -1 ) bSizer2.Add( self.label1, 0, wx.ALL, 5 )
############################################################## from UpdateDialog import * from xmlrpclib import Server import datetime from Globals import glb from MyUpdatePanel import MyUpdatePanel import wx.lib.delayedresult as delayedresult import platform import wx import traceback import logging from proxiedxmlrpclib import ProxyTransport import i18n i18n.register('MyUpdateDialog') def check_and_update(parent, preferences, force=False): """ Check for updates, and interact with user. Update mode is automatic if force=False, else manual. parent: parent window of any created modal dialogs """ def check_for_updates(): """ Check and return available updates. Honour the frequency of update checking unless force is True.
# Created: 2009-10-02 # Copyright: Luca Allulli (http://www.skeed.it/songpress.html) # License: GNU GPL v2 ############################################################## import wx from FontComboBox import FontComboBox import i18n import Editor from Globals import glb from PreferencesDialog import PreferencesDialog from MyDecoSlider import MyDecoSlider from Transpose import * from Preferences import get_update_frequencies i18n.register('MyPreferencesDialog') class MyPreferencesDialog(PreferencesDialog): def __init__(self, parent, preferences, easyChords): self.pref = preferences self.frame = self PreferencesDialog.__init__(self, parent) self.easyChords = easyChords self.fontCB.Bind(wx.EVT_TEXT_ENTER, self.OnFontSelected, self.fontCB) self.fontCB.Bind(wx.EVT_COMBOBOX, self.OnFontSelected, self.fontCB) previewSong = _("{t:My Bonnie}\n\nMy [D]Bonnie lies [G]over the [D]ocean\noh [G]bring back my [A]Bonnie to [D]me!\n\n{soc}\n[D]Bring back, [E-]bring back,\n[A]bring back my Bonnie to [D]me!\n{eoc}") self.editor.SetText(previewSong) self.editor.SetFont(self.pref.editorFace, self.pref.editorSize)
############################################################## from UpdateDialog import * from xmlrpc.client import Server import datetime from Globals import glb from MyUpdatePanel import MyUpdatePanel import wx.lib.delayedresult as delayedresult import platform import wx import traceback import logging from proxiedxmlrpclib import RequestsTransport import i18n i18n.register('MyUpdateDialog') def check_and_update(parent, preferences, force=False): """ Check for updates, and interact with user. Update mode is automatic if force=False, else manual. parent: parent window of any created modal dialogs """ def check_for_updates(): """ Check and return available updates. Honour the frequency of update checking unless force is True.
# Created: 2009-10-02 # Copyright: Luca Allulli (https://www.skeed.it/songpress) # License: GNU GPL v2 ############################################################## import wx from FontComboBox import FontComboBox import i18n import Editor from Globals import glb from PreferencesDialog import PreferencesDialog from MyDecoSlider import MyDecoSlider from Transpose import * from Preferences import get_update_frequencies i18n.register('MyPreferencesDialog') class MyPreferencesDialog(PreferencesDialog): def __init__(self, parent, preferences, easyChords): self.pref = preferences self.frame = self PreferencesDialog.__init__(self, parent) self.easyChords = easyChords self.fontCB.Bind(wx.EVT_TEXT_ENTER, self.OnFontSelected, self.fontCB) self.fontCB.Bind(wx.EVT_COMBOBOX, self.OnFontSelected, self.fontCB) previewSong = _( "{t:My Bonnie}\n\nMy [D]Bonnie lies [G]over the [D]ocean\noh [G]bring back my [A]Bonnie to [D]me!\n\n{soc}\n[D]Bring back, [E-]bring back,\n[A]bring back my Bonnie to [D]me!\n{eoc}"
# Name: Preferences.py # Purpose: Hold program preferences # Author: Luca Allulli ([email protected]) # Created: 2010-01-31 # Copyright: Luca Allulli (http://www.skeed.it/songpress.html) # License: GNU GPL v2 ############################################################## from SongFormat import * from decorators import StandardVerseNumbers from SongDecorator import SongDecorator from Transpose import * import i18n import datetime i18n.register('Preferences') def get_update_frequencies(): return { 0: _("Never"), 7: _("Week"), 14: _("Two weeks"), 30: _("Month"), 60: _("Two months"), } class Preferences(object): """ Available preferences * format
############################################################### # Name: PreviewCanvas.py # Purpose: Window containing preview # Author: Luca Allulli ([email protected]) # Created: 2009-02-21 # Copyright: Luca Allulli (http://www.skeed.it/songpress.html) # License: GNU GPL v2 ############################################################## import wx import platform from Renderer import * import i18n i18n.register('PreviewCanvas') class PreviewCanvas(object): def __init__(self, parent, sf, notations, sd=SongDecorator(), embedded=False): object.__init__(self) if not embedded: self.main_panel = wx.Window(parent) bSizer = wx.BoxSizer(wx.VERTICAL) self.link = wx.HyperlinkCtrl(self.main_panel, 0, _("Copy formatted song to clipboard"), '') tt = wx.ToolTip(_("Copy formatted song to clipboard, so that it can be pasted in any program and printed")) self.link.SetToolTip(tt) if platform.system() != 'Linux': bSizer.Add(self.link, 0, wx.EXPAND) parent = self.main_panel self.panel = wx.ScrolledWindow(parent, style=wx.BORDER_DOUBLE) self.panel.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)
############################################################### # Name: Transpose.py # Purpose: Transposing services # Author: Luca Allulli ([email protected]) # Created: 2009-11-18 # Copyright: Luca Allulli (http://www.skeed.it/songpress.html) # License: GNU GPL v2 ############################################################## from Globals import * import i18n import re import math i18n.register('Transpose') class Notation(object): def __init__(self, id, desc, chords, repl, replrev): object.__init__(self) self.id = id self.descv = desc self.chords = chords self.chordDict = {} i = 0 for k in chords: self.chordDict[k.upper()] = i i += 1 self.repl = [(re.compile(x[0]), x[1]) for x in repl] self.replrev = [(re.compile(x[0]), x[1]) for x in replrev]
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Aug 25 2009) ## http://www.wxformbuilder.org/ ## ## PLEASE DO "NOT" EDIT THIS FILE! ########################################################################### import wx import i18n i18n.register('NormalizeDialog') # -*- coding: utf-8 -*- ########################################################################### ## Class NormalizeDialog ########################################################################### class NormalizeDialog(wx.Dialog): def __init__(self, parent): wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=_(u"Cleanup Chords"), pos=wx.DefaultPosition, size=wx.Size(-1, -1), style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Mar 10 2018) ## http://www.wxformbuilder.org/ ## ## PLEASE DO *NOT* EDIT THIS FILE! ########################################################################### import wx import i18n i18n.register('NotationDialog') ########################################################################### ## Class NotationDialog ########################################################################### class NotationDialog(wx.Dialog): def __init__(self, parent): wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=_(u"Change notation"), pos=wx.DefaultPosition, size=wx.Size(361, 175), style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) self.SetSizeHints(wx.DefaultSize, wx.DefaultSize) bSizer1 = wx.BoxSizer(wx.VERTICAL)
from MyNotationDialog import * from MyNormalizeDialog import * from MyListDialog import MyListDialog import MyUpdateDialog from Globals import glb from Preferences import Preferences import subprocess import os import os.path import i18n import platform if platform.system() == 'Windows': import wx.msw i18n.register('SongpressFrame') class SongpressFindReplaceDialog(object): def __init__(self, owner, replace=False): object.__init__(self) self.down = True self.st = '' self.data = wx.FindReplaceData(wx.FR_DOWN) self.owner = owner self.flags = 0 self.dialog = wx.FindReplaceDialog( owner.frame, self.data, _("Replace") if replace else _("Find"), wx.FR_REPLACEDIALOG if replace else 0) owner.frame.Bind(wx.EVT_FIND, self.OnFind, self.dialog)
from MyPreferencesDialog import MyPreferencesDialog from HTML import HtmlExporter from Transpose import * from MyTransposeDialog import * from MyNotationDialog import * from MyNormalizeDialog import * import MyUpdateDialog from Globals import glb from Preferences import Preferences import subprocess import os import os.path import i18n import platform i18n.register('SongpressFrame') class SongpressFindReplaceDialog(object): def __init__(self, owner, replace = False): object.__init__(self) self.down = True self.st = '' self.data = wx.FindReplaceData(wx.FR_DOWN) self.owner = owner self.flags = 0 self.dialog = wx.FindReplaceDialog( owner.frame, self.data, _("Replace") if replace else _("Find"), wx.FR_REPLACEDIALOG if replace else 0 )
############################################################### # Name: PreviewCanvas.py # Purpose: Window containing preview # Author: Luca Allulli ([email protected]) # Created: 2009-02-21 # Copyright: Luca Allulli (https://www.skeed.it/songpress) # License: GNU GPL v2 ############################################################## import wx, wx.adv import platform from Renderer import * import i18n i18n.register('PreviewCanvas') class PreviewCanvas(object): def __init__(self, parent, sf, notations, sd=SongDecorator(), embedded=False): object.__init__(self) show_link = not embedded and platform.system() != 'Linux' self.link = None if show_link: self.main_panel = wx.Window(parent) bSizer = wx.BoxSizer(wx.VERTICAL)
############################################################### # Name: Transpose.py # Purpose: Transposing services # Author: Luca Allulli ([email protected]) # Created: 2009-11-18 # Copyright: Luca Allulli (https://www.skeed.it/songpress) # License: GNU GPL v2 ############################################################## from Globals import * import i18n import re import math i18n.register('Transpose') class Notation(object): def __init__(self, id, desc, chords, repl, replrev): object.__init__(self) self.id = id self.descv = desc self.chords = chords self.chordDict = {} i = 0 for k in chords: self.chordDict[k.upper()] = i i += 1 self.repl = [(re.compile(x[0]), x[1]) for x in repl] self.replrev = [(re.compile(x[0]), x[1]) for x in replrev]
# -*- coding: utf-8 -*- import i18n i18n.register('UpdatePanel') # -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Sep 8 2010) ## http://www.wxformbuilder.org/ ## ## PLEASE DO "NOT" EDIT THIS FILE! ########################################################################### import wx import wx.html ########################################################################### ## Class UpdatePanel ########################################################################### class UpdatePanel ( wx.Panel ): def __init__( self, parent ): wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( -1,-1 ), style = wx.TAB_TRAVERSAL ) bSizer17 = wx.BoxSizer( wx.VERTICAL ) fgSizer1 = wx.FlexGridSizer( 2, 2, 0, 0 ) fgSizer1.AddGrowableCol( 1 ) fgSizer1.AddGrowableRow( 1 )
############################################################### # Name: FontFaceDialog.py # Purpose: wxWidgets dialog with a FontComboBox # selector # Author: Luca Allulli ([email protected]) # Created: 2009-08-14 # Copyright: Luca Allulli (https://www.skeed.it/songpress) # License: GNU GPL v2 ############################################################## import wx from PreviewCanvas import * from FontComboBox import FontComboBox import i18n i18n.register('FontFaceDialog') class FontFaceDialog(wx.Dialog): def __init__(self, parent, id, title, songFormat, songDecorator, decoratorFormat): self.format = songFormat self.originalFont = songFormat.face self.decoratorFormat = decoratorFormat wx.Dialog.__init__(self, parent, id, title, size=wx.Size(540, 320)) bSizer1 = wx.BoxSizer(wx.VERTICAL) hSizer1 = wx.BoxSizer(wx.HORIZONTAL) m_staticText1 = wx.StaticText(self, wx.ID_ANY, _("Font")) m_staticText1.Wrap(-1)
# -*- coding: utf-8 -*- import i18n i18n.register("UpdatePanel") # -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Sep 8 2010) ## http://www.wxformbuilder.org/ ## ## PLEASE DO "NOT" EDIT THIS FILE! ########################################################################### import wx import wx.html ########################################################################### ## Class UpdatePanel ########################################################################### class UpdatePanel(wx.Panel): def __init__(self, parent): wx.Panel.__init__( self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.Size(-1, -1), style=wx.TAB_TRAVERSAL ) bSizer17 = wx.BoxSizer(wx.VERTICAL)
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Aug 25 2009) ## http://www.wxformbuilder.org/ ## ## PLEASE DO "NOT" EDIT THIS FILE! ########################################################################### import wx import i18n i18n.register('NormalizeDialog') # -*- coding: utf-8 -*- ########################################################################### ## Class NormalizeDialog ########################################################################### class NormalizeDialog ( wx.Dialog ): def __init__( self, parent ): wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _(u"Cleanup Chords"), pos = wx.DefaultPosition, size = wx.Size( -1,-1 ), style = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER ) self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) bSizer1 = wx.BoxSizer( wx.VERTICAL ) bSizer2 = wx.BoxSizer( wx.HORIZONTAL ) self.label1 = wx.StaticText( self, wx.ID_ANY, _(u"Notation:"), wx.DefaultPosition, wx.DefaultSize, 0 )
# Copyright: Luca Allulli (https://www.skeed.it/songpress) # License: GNU GPL v2 ############################################################## import wx # import wx.aui as aui from wx.lib.agw import aui from wx import xrc import os import os.path import sys import i18n import platform import time i18n.register('SDIMainFrame') class SDIDropTarget(wx.FileDropTarget): def __init__(self, sdi): wx.FileDropTarget.__init__(self) self.sdi = sdi def OnDropFiles(self, x, y, arr): return self.sdi.OnDropFiles(arr) class SDIMainFrame(wx.FileDropTarget): """Abstract class. Override methods New, Open, Save""" ###UI generation###
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Aug 25 2009) ## http://www.wxformbuilder.org/ ## ## PLEASE DO "NOT" EDIT THIS FILE! ########################################################################### import wx import i18n i18n.register('TransposeDialog') ########################################################################### ## Class TransposeDialog ########################################################################### class TransposeDialog ( wx.Dialog ): def __init__( self, parent ): wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _(u"Transpose"), pos = wx.DefaultPosition, size = wx.Size( -1,-1 ), style = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER ) self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) bSizer1 = wx.BoxSizer( wx.VERTICAL ) bSizer2 = wx.BoxSizer( wx.HORIZONTAL ) self.label1 = wx.StaticText( self, wx.ID_ANY, _(u"Chord notation:"), wx.DefaultPosition, wx.DefaultSize, 0 ) self.label1.Wrap( -1 ) bSizer2.Add( self.label1, 0, wx.ALL, 5 )
# Purpose: Abstract class for SDI Main Frames # 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,
# Purpose: Abstract class for SDI Main Frames # 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('SDIMainFrame') 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,
# Name: Preferences.py # Purpose: Hold program preferences # Author: Luca Allulli ([email protected]) # Created: 2010-01-31 # Copyright: Luca Allulli (https://www.skeed.it/songpress) # License: GNU GPL v2 ############################################################## from SongFormat import * from decorators import StandardVerseNumbers from SongDecorator import SongDecorator from Transpose import * import i18n import datetime i18n.register('Preferences') def get_update_frequencies(): return { 0: _("Never"), 7: _("Week"), 14: _("Two weeks"), 30: _("Month"), 60: _("Two months"), } class Preferences(object): """ Available preferences * format
############################################################### # Name: FontFaceDialog.py # Purpose: wxWidgets dialog with a FontComboBox # selector # Author: Luca Allulli ([email protected]) # Created: 2009-08-14 # Copyright: Luca Allulli (http://www.skeed.it/songpress.html) # License: GNU GPL v2 ############################################################## import wx from PreviewCanvas import * from FontComboBox import FontComboBox import i18n i18n.register("FontFaceDialog") class FontFaceDialog(wx.Dialog): def __init__(self, parent, id, title, songFormat, songDecorator, decoratorFormat): self.format = songFormat self.originalFont = songFormat.face self.decoratorFormat = decoratorFormat wx.Dialog.__init__(self, parent, id, title, size=wx.Size(540, 320)) bSizer1 = wx.BoxSizer(wx.VERTICAL) hSizer1 = wx.BoxSizer(wx.HORIZONTAL) m_staticText1 = wx.StaticText(self, wx.ID_ANY, _("Font")) m_staticText1.Wrap(-1) hSizer1.Add(m_staticText1, 0, wx.ALL, 5)