layers list: set real GUI states on the layers

Don't just paint using gtk.STATE_SELECTED's colours when in
STATE_NORMAL, actually set the correct state for the widget when the
selection changes. Fixes the layers not respecting the user's style the
first time they're drawn.

https://gna.org/bugs/?18303
dialogs: ask_for_name cosmetic tweaks

Mouse positioning is nicer when asking for a name.
GNOME HIG compliant dialog spacing.
Wider text entry box.
layers: make buttons insensitive when inapplicable

The layer control buttons in the layers tool now grey out when they can
do nothing to the layers list.

https://gna.org/bugs/?18303
layers tool: quick markup fixes

Markup was being parsed from layer names, and styles weren't being set
after a layer's first change_name().

Use bold text for the current layer as a temporary workaround for a
visibility problem with the oxygen-gtk theme.
lock_alpha: fix problem getting rid of the mode

When a brush was loaded with lock_alpha stored in the preset,
drop lock_alpha instead of entering lock_alpha mode.

Partial fix for https://gna.org/bugs/?18292
Fix spelling and grammar in various places.

I tried to make sure things were consistent (e.g., same parts of
speech within a group), sentences made sense, etc.
Update .po files.
Don't translate a sentence fragment.

It's not a good idea to translate sentence fragments, especially ones
involving plurals. Depending on the language, the whole sentence might
translate differently (e.g., French plural verbs). This also translates
formatting, which is probably not a good idea.

I tried to combine the translations as best I could, but some of them
weren't translated completely. Some were fuzzy, also, which is probably
because of the sentence fragment, but I'm just guessing.
Add Canadian English translation.

I just hate when people spell colour incorrectly! :P
save_ora: fix translation of rendered background

The offset of the background image was wrong in stack.xml,
leading to a background layer that was translated out of the
image bounds in GIMP.
Added a brush reset when changing devices - workround for older? wacom's that may miss zero pressure readings from a stylus when removed from surface quickly
reset brush after device change

Fixes the problem where a faint stroke appears after changing between
stylus/eraser tip under certain circumstances.

https://gna.org/bugs/?18322
accept empty settings.json

https://gna.org/bugs/index.php?18314
brushmanager: fix brush saving after device change

Make selected_brush always the same as the highlighted brush.

When selecting a devbrush (because of switching devices), we used
to highlight the parent brush, but behind the scenes the temporary
devbrush was selected. In the brush editor, saving the brush settings
would save into the temporary devbrush, instead of the selected brush.
Reported here:
http://forum.intilinux.com/mypaint-general-discussion/brushes-not-saving/

Remove find_brushlist_ancestor(). We don't need to do a deep search,
because the parent of a brush, if it exists, is always a ManagedBrush.
layers tool: redo as a gtk list

Re-express the layers list as a GTK ListStore and TreeView combination
rather than as a custom widget. Layers can now be dragged around within
the list to reorder them, and the list scrolls to keep up when the user
moves the current layer out of sight using the keys or buttons.

https://gna.org/bugs/?18302
https://gna.org/bugs/?18304
app: correct a whitelist/default pos typo

Fixes exception when opening frame dialog.

https://gna.org/bugs/?18316
layers list: fix layerblink regression

Fix a cosmetic regression in the new layers list code: layers now blink
when changed as they did before moving to the TreeView code.

https://gna.org/bugs/?18302#comment7
app: fix crasher with malformed settings.json

Fix: MyPaint would crash on startup if exposed to a malformed settings.json.

https://gna.org/bugs/?18314
layers: better fake names for untitled layers

Anonymous layers are now assigned sticky fake names on document opening
and when they're first created. Numbers for new layers are handed out in
strict monotonically increasing sequence, initially in stack order and
subsequently in order of creation.

https://gna.org/bugs/?17991
layout: persuade metacity even harder about focus

Fix a regression with metacity whereby keyboard focus would be given to
floating windows which don't need it, breaking flow. Now declare tool
windows as never receiving input focus, and push re-focusing the parent
window back into the "map" event handler.

https://gna.org/bugs/?17899