Commit 03e2d79d authored by SVN-Git Migration's avatar SVN-Git Migration

Imported Upstream version 2.0.13+ds1

parent fdf7ceeb
......@@ -2,6 +2,117 @@ ChangeLog of Frescobaldi, http://www.frescobaldi.org/
=====================================================
Changes in 2.0.13 -- December 31st, 2013
* Translations:
- updated: nl, fr
* New features:
- A new option LilyPond->Auto-engrave, that runs the engraver in preview mode
everytime the document changes
- An option to hide log display for automatically started engraving jobs
- Real-time Midi capturing, contributed by Manuel Mchalwat (this was actually
in 2.0.12, I just forgot to write it in the ChangeLog!)
- Basic MusicXML export, contributed by Peter Bjuhr (this was also already
added in Frescobaldi 2.0.12)
- The "master" variable is back, allbeit in a slightly different
implementation: the redirected filename is not directly given to a LilyPond
process running on behalf of the current document, but the other document
is loaded (if it wasn't already) and LilyPond is run on that document.
* Bug fixes:
- Fix UnboundLocalError in ly.docinfo e.g. when showing the Tools->Pitch->
Language menu
- Fix issue 332: Cursor didn't move on undo/redo
- Fix issue 315: chords: \include "predefined-guitar-fretboards.ly"
(the file was added, but the include files weren't written in the document)
Changes in 2.0.12 -- December 26th, 2013
* Translations:
- updated: cs, nl, fr, es
* New features:
- Edit->Select Block has finally been implemented
- A viewer for LilyPond-generated SVG files has been added by Peter Bjuhr.
This viewer (accessible via Tools->SVG Viewer) currently has one-way point
and click. This only works with recent development versions of LilyPond,
that add the point and click information to SVG files. In the future, the
SVG view may become a fully fledged graphical music editor.
- The default output format can be set in the LilyPond preferences (the
current options are PDF or SVG, the default is PDF)
* Improvements:
- The indenter's handling of tabs and spaces has been improved. A tab always
starts a new indent level, and aligning is now always done with spaces.
The default is still using 2 spaces for indent, but it is now configurable
in a new settings panel Editor Preferences.
- Besides the good old Preview and Publish modes a new mode has been added:
Layout Control. This mode uses the settings on the preview mode panel, which
has been renamed to Layout Control Options. The layout of the panel has been
improved. The Preview mode is reverted back to enabling only point and click
links. In the Engrave (custom) dialog the run mode can be chosen and the
commandline edited directly.
- Entering staccatissimo writes -! when the document specifies a LilyPond
version >= 2.17.25, otherwise -|
- When editing keyboard shortcuts, conflicts are directly shown as they are
entered; better support French keyboards (contributed by Nicolas Malarmey)
- Better Mac OS X icons (contributed by Davide Liessi)
- The internal handling of manipulations like transpose, translate, and the
various rhythm commands has become less dependent on Frescobaldi code.
These functionality now resides in the ly module and could be used by
other applications. The commands now can work on any ly.document, which
need not be a Frescobaldi document.
- The internal help system has seen a massive overhaul: help files are now
very easy to write in a simplified markdown-like syntax. Adding help pages
is very easy by dropping a *.md file in the userguide/ directory. Every
paragraph in a help file is automatically added to the POT file and can be
translated by editing the language's PO file.
* Bug fixes:
- Music View: horizontal scrolling using trackpad now works with kinetic mode
enabled. Fixes #248.
* Removed feature:
- The 'master' variable is no longer supported, it's goal has been superseded
by the 'Always Engrave' option, which is also saved in the session. This
decision was taken to simplify the handling of files created on behalf of
a document.
Changes in 2.0.11 -- October 16th, 2013
* Translations:
- updated: cs, nl, fr, es
* New features:
- New preview mode tool, enabling different modes to debug layout issues,
contributed by Urs Liska and some other LilyPond developers
- Frescobaldi now has a manpage, kindly provided by Ryan Kavanagh
- Import MusicXML (using musicxml2ly), contributed by Peter Bjuhr
- New Quick Insert buttons for different kinds of grace notes, contributed
by Peter Bjuhr
- Import and export of keyboard shortcuts and font & color schemes,
contributed by Nicolas Malarmey.
- New Modal Transpose action, contributed by Christopher Bryan
- New actions to remove articulations etc. from music (wish #180)
- Edit->Copy to Snippet, to copy the selection or the full document
contents to a new snippet
* Improvements:
- highlighting and auto-completion of Scheme code has been improved
by Nicolas Malarmey.
- when switching documents with multiple editor views open, and one of the
views displays the document, that view is made current, instead of changing
the document in the current view.
- the tempo-tapping button in the score wizard now uses the average clicking
speed instead of computing the bpm at each click (implementing wish #169)
- under the File menu there is also a New with Wizard... action calling the
score wizard, creating a new document when clicking Ok, contributed by Urs
Liska
- Word-related cursor movements have been improved. The backslash is now
considered a word boundary, even if there are no spaces between several
backslashed commands. Fixes wish #106.
* Bug fixes:
- various fixes and improvements on Mac OS X by Davide Liessi
- fix splash screen shown as grey rectangle on some systems
- in the LilyPond log, clicking on error mesages in files with '..' in their
path (happens when using e.g. \include "../blabla.ly") now works.
Changes in 2.0.10 -- May 12th, 2013
* Translations:
......
include README* COPYING THANKS INSTALL TODO ChangeLog
include frescobaldi.desktop
include frescobaldi.1
include frescobaldi.png
include *.py
include frescobaldi-wininst.bmp
recursive-include frescobaldi_app README*
......@@ -7,4 +9,7 @@ recursive-include frescobaldi_app *.png *.svg *.ico index.theme
recursive-include frescobaldi_app *.ly *.ily Makefile
recursive-include frescobaldi_app *.pot *.po *.mo
recursive-include frescobaldi_app *.dic
recursive-include frescobaldi_app *.js
recursive-include frescobaldi_app *.md
recursive-include macosx *.svg *.icns
global-exclude *~
......@@ -18,6 +18,7 @@ Features:
- Use multiple versions of LilyPond, automatically selects the correct version
- Built-in LilyPond documentation browser and built-in help
- Configurable document outline view to navigate large LilyPond scores easily
- Smart layout-control functions like coloring specific objects in the PDF
- Modern user iterface with configurable colors, fonts and keyboard shortcuts
- Translated into: Dutch, English, French, German, Italian, Czech, Russian,
Spanish, Galician, Turkish, Polish, Brazillian and Ukrainian.
......
......@@ -30,6 +30,13 @@ import frescobaldi_app.main
This ensures the application starts up and uses the correct SIP api (2) for
QString and QVariant.
Alternatively, you can enter:
from frescobaldi_app.debug import *
This will also start up Frescobaldi and then install some handlers that print
debugging information on certain events. And it imports the most used modules.
Currently Python 2.6 and 2.7 are supported, but the code should be designed such
that Frescobaldi works as well with Python 3.
......@@ -98,3 +105,143 @@ portmidi: Access the PortMidi library in different ways
midifile: Load and play MIDI files
Contributing, Coding Style
==========================
A clean pythonic coding style is preferred, with short methods and method names,
and small modules and classes that encapsulate functionality in a sensible way.
See also PEP8 (http://www.python.org/dev/peps/pep-0008/)
Indent: 4 spaces indent with no tabs
Case: ClassName, module_name, methodname() (or methodName() for classes that
inherit from Qt classes). Instance attributes that are not meant to be
used from outside an instance are prefixed with an underscore, e.g.
self._document.
There is a habit, inspired by Qt, to use setters and getters for such
attributes: obj.setDocument(document) and obj.document().
Names for actions (e.g. file_open) and QSettings keys should always be
lowercase and use underscores where needed.
Write code so that adding or extending functionality later only adds lines, not
changes or removes existing lines.
Module imports: one per line. First the Python standard library imports, then
PyQt4, then the generic Frescobaldi imports and then imports from the current
package. The different groups separated by a blank line:
import os # stdlib imports
import sys
from PyQt4.QtCore import ... # PyQt4 imports
import app # generic Frescobaldi imports
import icons
from . import widget # imports from current package
Adding Functionality
====================
Separate out core functionality from its GUI. Put core functionality in a basic
module. For the GUI preferably make a new package/__init__.py, importing that
e.g. from menu.py while constructing the GUI. An example is the documentwatcher
base module, it automatically watches open documents on disk, simply by
listening to signals sent from app. It sends a documentChanged() signal when
something happens, nothing else. The externalchanges package that gets imported
from mainwindow.py, starts up the documentwatcher if the user has it enabled.
So the documentwatcher watcher is a module just capable of performing a task,
without needing to have logic for accessing the preferences, constructing a
particular GUI, etc. It could, like app and many other modules, be used almost
unchanged in any other application.
New features that add menu actions can be imported in meny.py, while building
the menu. Features that should run in a global background thread can have their
toplevel file (<feature>/__init__.py) imported from main.py or mainwindow.py,
loading as few as possible on first import.
Preparing patches or Pull Requests
==================================
When preparing a patch or pull request, please add new functionality first.
Old functionality that is superseded by the newer functions can be removed later
when the new functionality has been tested thoroughly. Change existing files
as less as possible. Preferably add new files and packages.
User Interface strings that are meant to be translated should be wrapped in
_("Message Text") constructs. See also README-translations for vital information
about how to use the translation mechanism and how to use variables inside
messages.
Objects that are longer-lived should be able to retranslate their GUIs. This can
be done by adding a method named translateUI(self), in which you set the texts
to the user interface objects, and calling app.translateUI() at the end of the
constructor. Frescobaldi will call your translateUI() method once and also take
care of calling it again when the user changes the UI language in the
preferences. You can also do this directly by connecting the method that sets
the texts to the app.languageChanged signal.
Guidelines for writing GUI texts
================================
* Write short, directly and non-technical
* For help pages: each paragraph is one translatable string
* Avoid HTML in texts (but <code>\include</code> is ok)
* In help pages you can construct html using some helper functions
* Avoid hard line breaks (<br>) in any texts: use short paragraphs instead
* Use named format fields: not "page {0} of {1}" but "page {num} of {total}"
* Don't change existing strings just for cosmetics, it breaks translations
Testing and developing under Windows
====================================
Linux is the recommended developing platform, but it might be necessary to test
specific functionality or behaviour under Windows. It can be difficult to get
all the dependencies right, especially the right combi of poppler, pyqt4 and
sip.
There is an easy way to get setup under Windows and be able to do quite a lot
of testing and development, you don't even need to install Python at all.
1. install a recent version of Frescobaldi into C:/Program Files/Frescobaldi,
using the Frescobaldi.Setup.exe installer
2. install Git Bash for Windows from http://msysgit.github.com/
3. open up the Git Bash command prompt (now you're in a powerful UNIX shell!)
4. make a directory to do Frescobaldi development in:
mkdir dev
cd dev
5. download the frescobaldi source code from GitHub:
git clone https://github.com/wbsoft/frescobaldi.git
6. go to the frescobaldi directory and copy all the files from the installed
version, except for the frescobaldi_app directory:
cd frescobaldi
cp /c/Program\ Files/Frescobaldi/*.pyd .
cp /c/Program\ Files/Frescobaldi/frescobaldi.exe .
cp /c/Program\ Files/Frescobaldi/*.dll .
cp /c/Program\ Files/Frescobaldi/library.zip .
cp -r /c/Program\ Files/Frescobaldi/iconengines .
cp -r /c/Program\ Files/Frescobaldi/imageformats .
7. Now you can modify files in frescobaldi_app and run and test Frescobaldi:
./frescobaldi.exe
8. Make commits of your changes and either push them to a fork of yours of
frescobaldi on GitHub or send them via e-mail.
Without the help of other people, Frescobaldi would not have been possible.
Besides the credits listed here, there is also information in about.py and
info.py from the frescobaldi_app/ directory.
Thanks go to all the users, contributors and bug reporters of Frescobaldi!
Thanks go to the Python and Qt4 developers for providing excellent tools to
develop Frescobaldi with.
And thanks to the LilyPond developers for creating an amazing music engraver!
See frescobaldi_app/userguide/credits.md for the full list of contributors.
Main author and core developer:
* Wilbert Berendsen (www.wilbertberendsen.nl)
Other developers:
* Richard Cognot: implemented Kinetic Scrolling for the music view
French translation:
* Raphaël Doursenaud
* Denis Bitouzé
* Philippe Massart
* Valentin Villenave (valentin.villenave.info)
* Yann Collette
* David Bouriaud
* Ryan Kavanagh (also: Debian/Ubuntu packaging)
* Richard Cognot
Turkish translation:
* Server ACİM (www.serveracim.net)
Spanish translation:
* Francisco Vila (www.paconet.org)
Russian translation:
* Sergey Poltavski
* Artem Zolochevskiy
* Mikhail Iglizky
Italian translation:
* Gianluca D'Orazio
German translation:
* Henrik Evers
* Georg Hennig
* Markus W. Kropp
* Urs Liska
Czech translation:
* Pavel Fric
Polish translation:
* Piotr Komorowski
Galician translation:
* Manuel A. Vázquez
Brazillian translation:
* Édio Mazera
Ukrainian translation:
* Dmytro O. Redchuk
Finding lots of bugs:
* Mario Moles
See also https://github.com/wbsoft/frescobaldi/graphs/contributors
Contents of this TODO file:
- Frescobaldi paradigm
- TODO and wishes for Frescobaldi 2.x
- ROADMAP for Frescobaldi 3.0
- Other ideas/wishes
Frescobaldi paradigm
====================
With all the feature ideas, Frescobaldi should remain a simple and
straightforward application to use. Which means:
- Not too much configurability. Just good defaults
- Shortcuts for the basic tasks
- Quick startup by loading modules only when the user requests a certain action
- Predictable behaviour
- Coding: separation of concerns, messages, modularity, encapsulation
See also README-development.
TODO and wishes for Frescobaldi 2.x
===================================
- LilyPond context help
- wizard to download and unpack LilyPond documentation and/or LilyPond itself
- Edit->Select Block
- Load .ly file specifying other encoding than UTF-8
(this can be done from the command line but not via the user interface)
......@@ -16,6 +39,7 @@ TODO and wishes for Frescobaldi 2.x
- Midi input and import. Probably using a basic sequencer, allowing changes,
corrections and quantizing touchups before putting the LilyPond representation
in the editor.
* mamoch is working on Midi input like the 1.x rumor did.
- tool to separate out things from music and attach them to invisible rests (s)
in a separate expression
......@@ -30,10 +54,27 @@ TODO and wishes for Frescobaldi 2.x
stub: qpopplerview/toc.py
ROADMAP for Frescobaldi 3.0
===========================
At a certain point, master will become Frescobaldi 3 and Frescobaldi 2 will
get it's own branch "v2"
1. Use Python 3 (Frescobaldi 2.0 should also run with Python 3)
2. Require and make use of PyQt5 and Qt5 (recompile/update poppler-qt4)
3. SVG music view and editor
Make a new music view that displays the SVG output of LilyPond and allows
for very fine-grained editing, both via altering the LilyPond source but
also editing and saving the SVG file manually to provide a final PDF
rendering. Probably using QGraphicsWebView.
Other ideas/wishes
==================
- continuous autocompile (run LilyPond whenever deemed suitable)
stub: engrave/autocompile.py
......
......@@ -2,4 +2,6 @@
import sys
import frescobaldi_app.main
import app
sys.excepthook = app.excepthook
sys.exit(app.run())
.\" Copyright (C) 2008–2013 Ryan Kavanagh <rak@debian.org>
.TH FRESCOBALDI 1 "May 2013" "LilyPond Music Editor"
.SH NAME
frescobaldi
\- LilyPond Music Editor
.SH SYNOPSIS
frescobaldi [options] files
.SH DESCRIPTION
LilyPond Music Editor
.SH OPTIONS
.SS
.SS Arguments:
.TP
.B files
LilyPond files to open, may also be textedit URLs
.SS Options:
.TP
.B \-v, \-\-version
Show version information
.TP
.B \-h, \-\-help
Show help about options and exit
.TP
.B \-e ENC, \-\-encoding=ENC
Encoding to use
.TP
.B \-l NUM, \-\-line=NUM
Line number to go to, starting at 1
.TP
.B \-c NUM, \-\-column=NUM
Column to go to, starting at 0
.TP
.B \-\-start <session>
Session to start (`-' for empty session)
.TP
.B \-\-list\-sessions
List the session names and exit
.TP
.B \-n, \-\-new
Always start a new instance
.SH SEE ALSO
Frescobaldi features a user manual accessible via the
.BR "User Guide"
entry in the
.BR "Help"
menu.
.SH AUTHORS
\fBfrescobaldi\fR is written and is copyrighted by:
Copyright \[co] 2008\(en2013 Wilbert Berendsen
<info\@wilbertberendsen.nl>
On Debian systems, the full list of contributors and copyright
holders may be found at
.BR "`/usr/share/doc/frescobaldi/copyright'" .
This man page was written by Ryan Kavanagh <rak\@debian.org> for the Debian
project, but may be used by others. Both this manpage and \fBfrescobaldi\fR are
released under the GNU General Public License, version 2 or (at your option) any
later version.
......@@ -34,45 +34,7 @@ import info
import icons
import helpers
import bugreport
import language_names
def credits():
"""Iterating over this should return paragraphs for the credits page."""
yield _(
"{appname} is written in {python} and uses the {qt} toolkit.").format(
appname=info.appname,
# L10N: the Python programming language
python='<a href="http://www.python.org/">{0}</a>'.format(_("Python")),
# L10N: the Qt4 application framework
qt='<a href="http://qt.nokia.com/">{0}</a>'.format(_("Qt4")))
yield _(
"The Music View is powered by the {poppler} library by "
"{authors} and others.").format(
poppler='<a href="http://poppler.freedesktop.org/">{0}</a>'.format(
# L10N: the Poppler PDF library
_("Poppler")),
authors='Kristian Høgsberg, Albert Astals Cid')
yield _(
"Most of the bundled icons are created by {tango}.").format(
tango='<a href="http://tango.freedesktop.org/">{0}</a>'.format(_(
"The Tango Desktop Project")))
yield _("The following people contributed to {appname}:").format(
appname=info.appname)
# list other credits here
yield _("{author}: Kinetic Scrolling for the Music View").format(
author="Richard Cognot")
# translations
yield _(
"{appname} is translated into the following languages:").format(
appname=info.appname)
lang = QSettings().value("language", "", type("")) or None
langs = [(language_names.languageName(code, lang), names)
for code, names in info.translators.items()]
for lang, names in sorted(langs):
yield lang + ": " + (', '.join(names))
import userguide.page
class AboutDialog(QDialog):
......@@ -132,7 +94,7 @@ class Credits(QTextBrowser):
super(Credits, self).__init__(parent)
self.setOpenLinks(False)
self.anchorClicked.connect(helpers.openUrl)
self.setHtml('\n'.join(map('<p>{0}</p>'.format, credits())))
self.setHtml(userguide.page.Page('credits').body())
class Version(QTextBrowser):
......
......@@ -95,7 +95,11 @@ class ActionCollectionBase(object):
return self._actions[name].shortcuts()
except KeyError:
pass
def setShortcuts(self, name, shortcuts):
"""Implement to set the shortcuts list for our action."""
pass
def settingsGroup(self):
"""Returns settings group to load/save shortcuts from or to."""
s = QSettings()
......@@ -157,6 +161,27 @@ class ActionCollection(ActionCollectionBase):
if action.shortcuts():
self.setDefaultShortcuts(name, action.shortcuts())
def setShortcuts(self, name, shortcuts):
"""Sets the shortcuts list for our action. Use an empty list to remove the shortcuts."""
action = self.actions().get(name)
if not action:
return
default = self.defaultShortcuts(name)
setting = self.settingsGroup()
action.setShortcuts(shortcuts)
setting.setValue(name, shortcuts)
if default:
if shortcuts == default:
setting.remove(name)
else:
setting.setValue(name, shortcuts)
else:
if shortcuts:
setting.setValue(name, shortcuts)
else:
setting.remove(name)
def load(self, restoreDefaults=True):
"""Reads keyboard shortcuts from the settings.
......
......@@ -29,8 +29,6 @@ from __future__ import unicode_literals
import weakref
from PyQt4.QtGui import QMessageBox
import actioncollection
import plugin
import qutil
......@@ -40,6 +38,15 @@ def manager(mainwindow):
"""Returns the ActionCollectionManager belonging to mainwindow."""
return ActionCollectionManager.instance(mainwindow)
def action(collection_name, action_name):
"""Return a QAction from the application.