Use data_files for trelby.desktop in setup.py.

Move trelby's "own" data files installation to distutils' package_data parameter,
and (ab)use data_files for stuff that needs to go to system locations
(as trelby.desktop, or a prospective manpage) when installing via a package manager,
and needs to be omitted when "manually" installing the source tarball.
Remove some entries from the name database.
Bump Debian Standards-Version to 3.9.4.
Fix selection bug when spell dialog appears.

If there is selected text active when the spell checker is started, the
selected area will be extended to the first misspelled word.

This fixes that bug.
Add make uppercase feature

Select text, then convert to upper case via menu option,
right-click pop-up menu item, or shortcut key.

Docs are included.
Add double-click selection behavior.

While editing text:

* a single double-click selects the current word.
* a second double-click selects the current element.

The double-clicking selection behavior cycles.

Docs are included.
Small clarifications to README.dev
Implement undo for convertToUpper.
Fix undo for toupper.

It was broken because it was calling reformatAll after Oskusalerma's change.

Removing the call seemes to have fixed it, and it appears to work fine.

(also fixed a formatting tab instead of spaces issue)
Implement auto-save feature. (EXPERIMENTAL)

See code for caveat regarding notification in case where
default save directory doesn't have write permission.
Add label to auto-save to indicate it is experimental.
Make paper size default to "Letter" when run in Americas

Determine if the local timezone is between GMT-10 and GMT-3,
or roughly from HAST (HI) in the west to NFT (T-N) in the east.
This range includes the US, Canada, Mexico, and much of Latin
America.  If the timezone falls in that range, use "Letter"
default paper size rather than "A4" ISO standard, as this is
a common standard in most (but not all) of these countries.

There are many, many page standards in use, and at some
point it may be a good idea to match specific country codes
to page sizes, but this is a decent rough method to select
a default, especially for newer North American industry users
who may be confused by the default A4 paper size and not
immediately know what's wrong or how to fix it via the
settings.
Port to MacOS X (Fixes #93)

Installer script creates self-contained Trelby.app package,
which should be dragged to /Applications.  To run directly
from source without packaging, you will need to install lxml,
Python 2.7, and wxPython 2.9 to your Mac.  Then just symlink
/Applications/Trelby.app to the source directory and it should run.

The Makefile command "make dist-osx" uses py2app, which must be
installed if you want to create a self-contained package.  Once the
package is built, the result can be found in /dist.  Trelby.app
can be dragged to /Applications and should run even on Macs with older
Python or without lxml or wxPython previously installed.

If you want to install to /Applications automatically, just use:

make install-osx

This will also create a folder on the desktop with the license,
sample documents, and some other helpful files, including a simlink
to the app in the /Applications folder.

Thanks to anilgulecha and Max F for getting this port started at
http://tinyurl.com/8z8nmbb

Features:

*  Runs on MacOS X (tested on 10.6.x/10.8.x)
*  Runs as native app at /Applications/Trelby.app
*  Self-contained- no additional libraries/python required
*  Moved menu items to better match Mac conventions
*  Recognizes native Quit instruction
*  Modify "ALT"->"CMD" in shortcut settings
*  Launches Viewer.app for print feature
*  Makes the manual xslt xml->html conversion compatible with OS X
*  Adds MacOS X native warnings for missing/old Python/wx (for devs)
*  MacOS native warning to run in /Applications (for users)
*  Sets Desktop as default script destination (also fixes for unix)
*  Uses MacOS X native color palette
*  Adds installation scripts to generate standalone Trelby.app + archive
*  Adds MacOS X build instructions
*  Uses 256x256 Trelby icon as app & document icons
*  Auto-opens Trelby document on double-click from Finder

This is a first pass at this port, so there may be bugs and things
to work out.
Associate Trelby file type for Linux (Fixes #265)

Creates "application/trelby" MIME type on *nix-based
systems following freedesktop.org standards.  This
results in documents ending in ".trelby" having a
custom icon and auto-opening w/double-click.

Commit summary:

* Sets up "application/trelby" MIME type
* Any file ending in ".trelby" is associated
* Sets up five icon sizes
* Automate install by generated .deb packages
* Auto-check for xdg-* support
* If Trelby is uninstalled, filetype association
  should be automatically removed

Note that this is installed for Debian-type installations.
Just use a simple "make deb" and then dpkg -i the .deb file.

Support can be easily added to support local "make install"
This was not implemented here as the Makefile is still
installing to /opt and it is unclear if this is the final
directory or if there are plans to use debian-style
locations.  In any event, the Makefile to support /opt/trelby
is already written and can be added in another commit.

This is a first pass, but it seems to work fine.  However,
there always may be issues that need addressing.