OSDN Git Service

mypaint-anime/master.git
12 years agotoolbar: don't draw a line for the expander
Andrew Chadwick [Tue, 26 Jul 2011 22:13:41 +0000 (23:13 +0100)]
toolbar: don't draw a line for the expander

12 years agostock: use for tool subwindow icons and titles
Andrew Chadwick [Tue, 26 Jul 2011 22:11:12 +0000 (23:11 +0100)]
stock: use for tool subwindow icons and titles

Using the defined stock IDs used elsewhere makes things more consistent.

12 years agovarious: misc trailing whitespace fixes
Andrew Chadwick [Tue, 26 Jul 2011 22:02:38 +0000 (23:02 +0100)]
various: misc trailing whitespace fixes

12 years agolayout: track opens & closes of all subwindows
Andrew Chadwick [Tue, 26 Jul 2011 20:38:09 +0000 (21:38 +0100)]
layout: track opens & closes of all subwindows

Keep the new ToggleActions in sync with actual window states for the
prefs window, the background selection window, and the brush editor.

12 years agobrushmodifier: redo states using gtk.ToggleActions
Andrew Chadwick [Sat, 23 Jul 2011 22:42:20 +0000 (23:42 +0100)]
brushmodifier: redo states using gtk.ToggleActions

It's fiddly to have toolbar and menu toggleactions track the state of an
internal StateGroup's states, so rewrite brushmodifier using normal
gtk.Actions.

We now distingush between brushes that are dedicated eraser brushes and
ones which aren't when entering and leaving eraser mode.

This emulates a group of radio items, but since two of them can be
toggled off by clicking them or pressing their key, it makes sense for
them to be ToggleActions instead.

12 years agovarious: toolbar, toggle items, stock
Andrew Chadwick [Wed, 27 Jul 2011 23:13:00 +0000 (00:13 +0100)]
various: toolbar, toggle items, stock

Add support for custom stock items.

Initial stab at a toolbar, which can of course be toggled off permanently

Add prefs settings to _allow_ individual pieces of the UI in fullscreen.
They're off by default.

Toggles for all the subwindows. Better UI for the toolbar.

Make the blend mode settings a radio trio, though unsure whether radio
buttons are really appropriate.

More tooltip blurb, since that benefits toolbar uses.

Add several stock icons for tools and SVGZ sources.

12 years agocommand stack: add an observer interface
Andrew Chadwick [Wed, 27 Jul 2011 22:47:43 +0000 (23:47 +0100)]
command stack: add an observer interface

Allow the state of the command stack to be observed.

12 years agogit: treat .svg files as binary
Martin Renold [Sun, 31 Jul 2011 13:02:00 +0000 (15:02 +0200)]
git: treat .svg files as binary

12 years agoScratchpad: Further tweaking of grid layout
Ben O'Steen [Thu, 28 Jul 2011 00:10:19 +0000 (01:10 +0100)]
Scratchpad: Further tweaking of grid layout

12 years agoScratchpad: Tweaked palette layout grid
Ben O'Steen [Wed, 27 Jul 2011 23:18:51 +0000 (00:18 +0100)]
Scratchpad: Tweaked palette layout grid

12 years agoScratchpad: Added palette drawing feature
Ben O'Steen [Wed, 27 Jul 2011 23:10:41 +0000 (00:10 +0100)]
Scratchpad: Added palette drawing feature

Provides a menu option in the Scratchpad tab to Draw a palette in the current
scratchpad. This will open a file dialog and let the user select a Gimp Palette
from the filesystem.

The colours within this palette will be used to draw a grid of colours, using
the current brush.

12 years agoScratchpad: renamed for clarity
Ben O'Steen [Wed, 27 Jul 2011 21:35:52 +0000 (22:35 +0100)]
Scratchpad: renamed for clarity

12 years agoScratchpad: Tweaked feedback message
Ben O'Steen [Wed, 27 Jul 2011 21:32:45 +0000 (22:32 +0100)]
Scratchpad: Tweaked feedback message

12 years agoScratchpad: Added Gimp Palette parser
Ben O'Steen [Wed, 27 Jul 2011 21:26:01 +0000 (22:26 +0100)]
Scratchpad: Added Gimp Palette parser

12 years agoScratchpad: scratchwindow.py reuses bstracted button_press/release
Ben O'Steen [Wed, 27 Jul 2011 20:31:56 +0000 (21:31 +0100)]
Scratchpad: scratchwindow.py reuses bstracted button_press/release

Moved the button_release_cb and button_press_cb logic to methods in the
drawwindow module, outside of the Window class to allow for reuse in this
manner.

12 years agoScratchpad: Abstracted drawwindow button cb's for reuse
Ben O'Steen [Wed, 27 Jul 2011 20:10:23 +0000 (21:10 +0100)]
Scratchpad: Abstracted drawwindow button cb's for reuse

Abstracted and given param referencing which document they should apply to.

12 years agoScratchpadL Refactored scratchpad save as dialog code
Ben O'Steen [Wed, 27 Jul 2011 19:56:45 +0000 (20:56 +0100)]
ScratchpadL Refactored scratchpad save as dialog code

Reuses the dialog code between normal document save_as and the
scratchpad save_as

12 years agoScratchpad: Added GPL license declaration
Ben O'Steen [Wed, 27 Jul 2011 19:38:23 +0000 (20:38 +0100)]
Scratchpad: Added GPL license declaration

12 years agoChanged my misuse of '_' to 'junk'
Ben O'Steen [Wed, 27 Jul 2011 19:09:15 +0000 (20:09 +0100)]
Changed my misuse of '_' to 'junk'

12 years agorename "trash" --> "junk"
Martin Renold [Wed, 27 Jul 2011 18:45:32 +0000 (20:45 +0200)]
rename "trash" --> "junk"

I used to call unused arguments "trash", but I expect Andrew
knows better than me which word is appropriate :-)

12 years agotesting: fix exception in test_memory_leak.py
Martin Renold [Wed, 27 Jul 2011 18:42:40 +0000 (20:42 +0200)]
testing: fix exception in test_memory_leak.py

fixes "gui_test"

12 years agoAdded a means to clear the autosaved scratchpad
Ben O'Steen [Wed, 27 Jul 2011 18:29:08 +0000 (19:29 +0100)]
Added a means to clear the autosaved scratchpad

12 years agowin32: fix "Bad file descriptor" exceptions
Tumagonx [Sun, 24 Jul 2011 15:28:57 +0000 (17:28 +0200)]
win32: fix "Bad file descriptor" exceptions

proposed patch to enable logfile when not defined
https://gna.org/bugs/?17999

12 years agoallow to save empty documents
Martin Renold [Sun, 24 Jul 2011 15:23:21 +0000 (17:23 +0200)]
allow to save empty documents

https://gna.org/bugs/index.php?18412

12 years agofix brushlib Python exception handling
Martin Renold [Sun, 24 Jul 2011 09:36:05 +0000 (11:36 +0200)]
fix brushlib Python exception handling

Return NULL from the original python call (stroke_to) if an
exception has occurred while trying to get the tile memory.

Also, move some Python specific code away from brushlib.

12 years agofix segfault during exception handling
Martin Renold [Sun, 24 Jul 2011 07:31:27 +0000 (09:31 +0200)]
fix segfault during exception handling

Proper python exception handling. Turns out this sloppy handling
can crash MyPaint when a Python exception (eg. out-of-memory) happens.

https://gna.org/bugs/index.php?18408

12 years agolayout: more focus rejection & metacity persuasion
Andrew Chadwick [Fri, 22 Jul 2011 11:34:25 +0000 (12:34 +0100)]
layout: more focus rejection & metacity persuasion

Extend focus rejection to all transient, saved-position immediate subwindows
of the main window, along with the Metacity-persuasion code. Doesn't
affect prefs stuff or other dialogs, just the brush editor.

12 years agoScratchpad: Added workround to get Ctrl colourpicker working
Ben O'Steen [Thu, 21 Jul 2011 18:55:58 +0000 (19:55 +0100)]
Scratchpad: Added workround to get Ctrl colourpicker working

12 years agoScratchpad: Added panning ability with spacebar
Ben O'Steen [Thu, 21 Jul 2011 18:31:00 +0000 (19:31 +0100)]
Scratchpad: Added panning ability with spacebar

12 years agoScratchpad: Implemented default and autosave scratchpad logic
Ben O'Steen [Thu, 21 Jul 2011 18:13:27 +0000 (19:13 +0100)]
Scratchpad: Implemented default and autosave scratchpad logic

'autosave.ora' in the scratchpad directory <- autosaved scratchpad

'scratchpad_default.ora' <- default template for all scratchpads

12 years agoScratchpad: Fixed 'Save a copy' bug
Ben O'Steen [Thu, 21 Jul 2011 15:12:40 +0000 (16:12 +0100)]
Scratchpad: Fixed 'Save a copy' bug

When warned about scratchpad autosaving over a file not in the scratchpad
directory, the save a copy option didn't update the filename variable so
that resuming after closing MyPaint would open the original instead of the
safe copy.

12 years agoScratchpad: Added warning dialog about autosaving
Ben O'Steen [Thu, 21 Jul 2011 14:56:37 +0000 (15:56 +0100)]
Scratchpad: Added warning dialog about autosaving

Allows the user to load a compatible file from anywhere on disc, but offers
the user a chance to save a copy within the scratchpad directory so that
inadvertent changes to the scratchpad are not propagated to the file loaded.

For example, you may want to load a painting to copy its style, colour and
framing, using 'Pick Context' to load brushes from it but not actually
affect the underlying painting by accident.

12 years agoScratchpad: Added a widget toggle option in top menu
Ben O'Steen [Thu, 21 Jul 2011 14:23:33 +0000 (15:23 +0100)]
Scratchpad: Added a widget toggle option in top menu

12 years agoScratchpad: Now saves scratchpad when opening another
Ben O'Steen [Thu, 21 Jul 2011 14:16:50 +0000 (15:16 +0100)]
Scratchpad: Now saves scratchpad when opening another

12 years agoScratchpads: Added New, Open, Save as + Revert
Ben O'Steen [Thu, 21 Jul 2011 14:15:07 +0000 (15:15 +0100)]
Scratchpads: Added New, Open, Save as + Revert

Now with open/save as goodness!

12 years agoFixed scratchpad (un)dock panning glitch
Ben O'Steen [Thu, 21 Jul 2011 13:19:05 +0000 (14:19 +0100)]
Fixed scratchpad (un)dock panning glitch

Undocking or docking the scratchpad used to cause the view to pan,
as it was calculating the view from the top of the container window, not the widget.

Wrapping the scratchpad canvas in an gtk.EventBox solved that issue (thx to achadwick)

12 years agoScratchpad as simple, persistent area
Ben O'Steen [Mon, 18 Jul 2011 20:43:56 +0000 (21:43 +0100)]
Scratchpad as simple, persistent area

Alters the scratchpad behaviour so that there is only one scratchpad, which
is saved on exit. Zoom, pan, etc all still work/

12 years agoFixed action group bug w/ scratchpad
Ben O'Steen [Mon, 18 Jul 2011 19:59:49 +0000 (20:59 +0100)]
Fixed action group bug w/ scratchpad

12 years agoGot 'Pick Context' working while the cursor is in a scratchpad! (there you go, achadw...
Ben O'Steen [Mon, 18 Jul 2011 16:55:44 +0000 (17:55 +0100)]
Got 'Pick Context' working while the cursor is in a scratchpad! (there you go, achadwick ;))

12 years agoErroneously took away the Scratchpad's action_group. Reverted
Ben O'Steen [Mon, 18 Jul 2011 16:27:09 +0000 (17:27 +0100)]
Erroneously took away the Scratchpad's action_group. Reverted

12 years agoAdded the scratchpad toggle switch to the main menu
Ben O'Steen [Mon, 18 Jul 2011 16:21:35 +0000 (17:21 +0100)]
Added the scratchpad toggle switch to the main menu

12 years agoAdded feature - Home button links the scratchpad to the current file - opening the...
Ben O'Steen [Mon, 18 Jul 2011 15:53:23 +0000 (16:53 +0100)]
Added feature - Home button links the scratchpad to the current file - opening the same file and clicking on the home button will reload that scratchpad

12 years agoAdded some documentation on what the scratchpad is and how it works.
Ben O'Steen [Mon, 18 Jul 2011 07:52:21 +0000 (08:52 +0100)]
Added some documentation on what the scratchpad is and how it works.

12 years agoAdded new widget - a scratchpad. Uses similar mechanics as 'Scrap' for saving/loading...
Ben O'Steen [Mon, 18 Jul 2011 02:15:52 +0000 (03:15 +0100)]
Added new widget - a scratchpad. Uses similar mechanics as 'Scrap' for saving/loading. Handy for colour pallettes that should persist between pictures. Responds like the normal drawing surface, but is unaffected by Undo's/etc.

12 years agoMerge branch 'master' of git://gitorious.org/mypaint/mypaint
Ben O'Steen [Thu, 21 Jul 2011 12:58:24 +0000 (13:58 +0100)]
Merge branch 'master' of git://gitorious.org/mypaint/mypaint

12 years agoinvert drag-zoom direction
Martin Renold [Mon, 18 Jul 2011 17:35:55 +0000 (19:35 +0200)]
invert drag-zoom direction

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

12 years agoMerge branch 'master' of git://gitorious.org/mypaint/mypaint
Ben O'Steen [Fri, 15 Jul 2011 14:13:07 +0000 (15:13 +0100)]
Merge branch 'master' of git://gitorious.org/mypaint/mypaint

12 years agotdw: redo code for avoiding spurious recenterings
Andrew Chadwick [Fri, 15 Jul 2011 00:18:49 +0000 (01:18 +0100)]
tdw: redo code for avoiding spurious recenterings

Simplify code, respond to repositions within the container instead of
resizes, and account for future reallocations which are positive in dx
or dy. Clears the way for sidebars on the left.

12 years agostategroup: color pick with buttons 2 or 3 only
Andrew Chadwick [Wed, 13 Jul 2011 23:19:12 +0000 (00:19 +0100)]
stategroup: color pick with buttons 2 or 3 only

Bugfix: when the colour picker was bound to buttons 2 or 3 without
modifiers, it couldn't be started at all. Now permit buttons other than
button 1 to start popup UI states, and exit from the state by releasing
that button.

12 years agostategroup: documentation fixes
Andrew Chadwick [Wed, 13 Jul 2011 23:08:30 +0000 (00:08 +0100)]
stategroup: documentation fixes

Fix some broken docstrings and move docs around to the object they're
about. Use epydoc doc comments for variables.

12 years agodrawwindow: support dnd to set color
David Gowers [Mon, 27 Jun 2011 02:30:11 +0000 (12:00 +0930)]
drawwindow: support dnd to set color

The history popup currently doesn't appear, as I've had difficulty
getting it to fully cooperate (it tries to immediately cycle the
history, but I want it to just display.)

http://forum.intilinux.com/mypaint-development-and-suggestions/dnd-to-prepare-color-history/

12 years agotdw: minor correction to recenter-avoidance code
Andrew Chadwick [Mon, 11 Jul 2011 23:16:07 +0000 (00:16 +0100)]
tdw: minor correction to recenter-avoidance code

Minifix: always record the new size even when recenter-on-resize is
temporarily turned off for UI rearrangement reasons.

12 years agoapp: simplify handling of malformed settings.json
Martin Renold [Sun, 10 Jul 2011 19:43:42 +0000 (21:43 +0200)]
app: simplify handling of malformed settings.json

Special case for empty file not needed any more.
https://gna.org/bugs/?18314

12 years agolayout: persuade metacity even harder about focus
Andrew Chadwick [Sun, 10 Jul 2011 18:25:01 +0000 (19:25 +0100)]
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

12 years agolayers: better fake names for untitled layers
Andrew Chadwick [Sun, 10 Jul 2011 17:07:38 +0000 (18:07 +0100)]
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

12 years agoapp: fix crasher with malformed settings.json
Andrew Chadwick [Sun, 10 Jul 2011 16:04:54 +0000 (17:04 +0100)]
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

12 years agolayers list: fix layerblink regression
Andrew Chadwick [Sun, 10 Jul 2011 15:35:25 +0000 (16:35 +0100)]
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

12 years agoapp: correct a whitelist/default pos typo
Andrew Chadwick [Sat, 9 Jul 2011 23:28:29 +0000 (00:28 +0100)]
app: correct a whitelist/default pos typo

Fixes exception when opening frame dialog.

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

12 years agolayers tool: redo as a gtk list
Andrew Chadwick [Sat, 9 Jul 2011 22:50:39 +0000 (23:50 +0100)]
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

12 years agobrushmanager: fix brush saving after device change
Martin Renold [Sat, 9 Jul 2011 18:17:52 +0000 (20:17 +0200)]
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.

12 years agoaccept empty settings.json
Martin Renold [Sat, 9 Jul 2011 13:25:11 +0000 (15:25 +0200)]
accept empty settings.json

https://gna.org/bugs/index.php?18314

12 years agoreset brush after device change
Martin Renold [Sat, 9 Jul 2011 08:21:38 +0000 (10:21 +0200)]
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

12 years agoAdded a brush reset when changing devices - workround for older? wacom's that may...
Ben O'Steen [Sat, 9 Jul 2011 00:19:43 +0000 (01:19 +0100)]
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

12 years agosave_ora: fix translation of rendered background
Martin Renold [Fri, 8 Jul 2011 13:14:07 +0000 (15:14 +0200)]
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.

12 years agoAdd Canadian English translation.
Elliott Sales de Andrade [Mon, 2 May 2011 06:05:03 +0000 (02:05 -0400)]
Add Canadian English translation.

I just hate when people spell colour incorrectly! :P

12 years agoDon't translate a sentence fragment.
Elliott Sales de Andrade [Mon, 2 May 2011 05:19:11 +0000 (01:19 -0400)]
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.

12 years agoUpdate .po files.
Elliott Sales de Andrade [Mon, 2 May 2011 04:20:31 +0000 (00:20 -0400)]
Update .po files.

12 years agoFix spelling and grammar in various places.
Elliott Sales de Andrade [Mon, 2 May 2011 04:01:01 +0000 (00:01 -0400)]
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.

12 years agolock_alpha: fix problem getting rid of the mode
Martin Renold [Tue, 5 Jul 2011 19:10:12 +0000 (21:10 +0200)]
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

12 years agolayers tool: quick markup fixes
Andrew Chadwick [Mon, 4 Jul 2011 10:19:33 +0000 (11:19 +0100)]
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.

12 years agolayers: make buttons insensitive when inapplicable
Andrew Chadwick [Sun, 3 Jul 2011 22:59:34 +0000 (23:59 +0100)]
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

12 years agodialogs: ask_for_name cosmetic tweaks
Andrew Chadwick [Sun, 3 Jul 2011 21:40:30 +0000 (22:40 +0100)]
dialogs: ask_for_name cosmetic tweaks

Mouse positioning is nicer when asking for a name.
GNOME HIG compliant dialog spacing.
Wider text entry box.

12 years agolayers list: set real GUI states on the layers
Andrew Chadwick [Sun, 3 Jul 2011 21:35:48 +0000 (22:35 +0100)]
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

12 years agolayers tool: give anon layers nicer display names
Andrew Chadwick [Sun, 3 Jul 2011 20:46:48 +0000 (21:46 +0100)]
layers tool: give anon layers nicer display names

Layers which do not have names are now displayed as "Unnamed layer
<num>", and we use a tooltip to explain how to rename the layer.
Anonymous layer display names are assigned as needed, and are shown in a
smaller font to help emphasize the fact that the display names aren't
saved.

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

12 years agotool titles: rename some for consistency
Andrew Chadwick [Sat, 2 Jul 2011 20:57:37 +0000 (21:57 +0100)]
tool titles: rename some for consistency

Retitle the brush selection tool, and the 2 color chooser tools for
consistency with their menu entries.

12 years agowindowing: ignore non-existing windows from config
Martin Renold [Sun, 3 Jul 2011 19:45:00 +0000 (21:45 +0200)]
windowing: ignore non-existing windows from config

Cleaner fix for 80cac93831177bc5. Don't try to load modules
that might not exist (any more). Instead, drop windows that
don't exist from the config dict. Add assertion to guard
against missing default for new windows.

12 years agowindowing: workaround for old config files
Martin Renold [Sun, 3 Jul 2011 17:46:20 +0000 (19:46 +0200)]
windowing: workaround for old config files

Reported by deevad via IRC:
File "/usr/local/share/mypaint/gui/windowing.py", line 46, in window_factory
    module = __import__(role.lower(), globals(), locals(), [])
ImportError: No module named null

Not sure why exactly we get 'null' here, but it's the obvious fix to
replace the old catch-all exception handler from 780ba0.

12 years agocolor sampler: add color picker
Andrew Chadwick [Sat, 2 Jul 2011 20:45:06 +0000 (21:45 +0100)]
color sampler: add color picker

The color sampler window now has a color picker (eye dropper) button.

12 years agocolor selector: refactor picking
Andrew Chadwick [Sat, 2 Jul 2011 20:42:57 +0000 (21:42 +0100)]
color selector: refactor picking

Remove some code duplication.

12 years agobrush editor: improve live-update
Martin Renold [Sat, 2 Jul 2011 20:26:48 +0000 (22:26 +0200)]
brush editor: improve live-update

Render updates in idle callback, instead of immediately.
This avoids many unneccessary renders, especially when selecting
a different brush.

12 years agowindowing: don't ignore exceptions
Martin Renold [Sat, 2 Jul 2011 20:15:41 +0000 (22:15 +0200)]
windowing: don't ignore exceptions

I made a broken import statement by mistake, and instead of
complaining about it, mypaint did not show the brush window
any more.

12 years agofix compiler warning
Martin Renold [Sat, 2 Jul 2011 17:33:59 +0000 (19:33 +0200)]
fix compiler warning

12 years agofloating tools: resize using the wm if we can
Andrew Chadwick [Fri, 1 Jul 2011 22:14:28 +0000 (23:14 +0100)]
floating tools: resize using the wm if we can

On reflection this is is the nicer approach, and it's quite widely
supported. Resizing oddities only seem to occur under a small number of
WM configurations, and might be limited to Ubuntu 11.04 only. It's a
small effect there too, most of the time.

12 years agotool windows: add icons to the drag handles
Andrew Chadwick [Fri, 1 Jul 2011 01:13:27 +0000 (02:13 +0100)]
tool windows: add icons to the drag handles

Small icons are now displayed on the left of each tool's title to help
users understand what they're for. The Tango palette should be fairly
inoffensive on all systems for this sort of thing.

12 years agolayout: floating tools are now undecorated
Andrew Chadwick [Fri, 1 Jul 2011 00:23:31 +0000 (01:23 +0100)]
layout: floating tools are now undecorated

Remove the window manager decorations from tool windows in the floating
state. This avoids witlessly repeating the title and close button at the
top of the tool, and it saves a bit of vertical space too. Also the
snap-out drag preview rectangle now shows you exactly where the window
will go when you drop the window. To me it all looks and feels a little
tighter and more consistent.

Possibly controversial because people choose window managers for the
looks and behaviour they like, but this commit should be easy to revert
since it's just one line. OTOH, not every WM will respect the
decoratedness hint anyway, so we may be fine there. The windows are
still managed normally, so alt-tab should work normally where it's
already supported.

12 years agoresize grip: display when floating
Andrew Chadwick [Fri, 1 Jul 2011 00:17:24 +0000 (01:17 +0100)]
resize grip: display when floating

Display the resize grip when the window is floating, and make it more
useful in that state. This is intended to support future changes to the
floating windows' appearance, but it might be helpful on its own in WMs
which don't allow tool windows to be resized.

12 years agoresize grip: add a frame
Andrew Chadwick [Fri, 1 Jul 2011 00:10:02 +0000 (01:10 +0100)]
resize grip: add a frame

Add a frame to outline the resize grip widget.

12 years agosidebar tools: hide roll up button when floating
Andrew Chadwick [Thu, 30 Jun 2011 23:48:41 +0000 (00:48 +0100)]
sidebar tools: hide roll up button when floating

The roll-up triangle doesn't do anything useful when tool windows are
floating. Hide it in that state.

12 years agosidebar: fix positioning glitches
Andrew Chadwick [Thu, 30 Jun 2011 23:25:03 +0000 (00:25 +0100)]
sidebar: fix positioning glitches

Fix a couple of annoying positioning glitches when snapping out tools
which are docked in the sidebar:

* If the tool window hadn't yet been mapped, the WM would reliably
choose a position other than what the user chose. Now the windows should
go to where the user dragged the drag handle and not somewhere random.
Tested with evilwm, compiz, wm2, metacity.

* Using the snap out button would put the tool in its last-known
location (or the wm default as above) rather than close to the button
you just pressed. The user shouldn't have to remember where they dragged
the tool in from, so the button now puts them close by in a cascading
fashion.

12 years agowidget styles: plainer drag handles, state fix
Andrew Chadwick [Thu, 30 Jun 2011 23:01:15 +0000 (00:01 +0100)]
widget styles: plainer drag handles, state fix

Cosmetic: some GTK styles use overly glossy buttons or draw with ugly
indented borders. There's also the problem that what we drew as a button
wasn't a button, which is confusing and bad UI. It's better to draw with
a slight gradient instead and let the ordinary frame border take care of
the outlining.

Cosmetic: draw the resize grip using the current state, not "normal".

Document some override methods.

12 years agosidebar: don't recenter the view on hide or show
Andrew Chadwick [Thu, 30 Jun 2011 22:36:09 +0000 (23:36 +0100)]
sidebar: don't recenter the view on hide or show

Cosmetic: showing or hiding the sidebar would cause the main viewport to
recenter or "jump around" due to the resize. Fix by oberving sidebar
shows and hides then ignoring the next size-allocate event.

12 years agolayout: minor cosmetic fixes & code cleanup
Andrew Chadwick [Thu, 30 Jun 2011 22:15:44 +0000 (23:15 +0100)]
layout: minor cosmetic fixes & code cleanup

Remove some visual clutter and clean up the code a bit. Better and
localizable tooltips for the tools' sidebar snap and close buttons.

12 years agowin32: fix build
Martin Renold [Sat, 18 Jun 2011 14:16:39 +0000 (16:16 +0200)]
win32: fix build

Don't try to build mypaint_exe.c, which doesn't exist any more.
Refer to commit f4756b775.

12 years agostartup: fix error message
Martin Renold [Sat, 18 Jun 2011 14:14:11 +0000 (16:14 +0200)]
startup: fix error message

Fix exception while showing an error message if we are not
correctly installed.

12 years agoundo: slightly increase number of steps
Martin Renold [Sat, 18 Jun 2011 14:07:25 +0000 (16:07 +0200)]
undo: slightly increase number of steps

Moderate increase from 20 to 30 steps.

Seems some people thought we have too few steps now, which is
probably because we started to split strokes more often.

Memory usage of a step can be significant if the stroke goes
all over the image. Ideally we would take the diff and compress
the history during natural breaks, like with the strokemap...

13 years agobrushlib: dab_mask optimization
Martin Renold [Sun, 12 Jun 2011 12:41:20 +0000 (14:41 +0200)]
brushlib: dab_mask optimization

Precalculate slope/offset for hardness calculation outside the loop.
Document the hardness calculation a bit.
brushengine_paint_hires: 7% faster

13 years agobrushlib: refactor (get_color)
Martin Renold [Sat, 4 Jun 2011 12:52:02 +0000 (14:52 +0200)]
brushlib: refactor (get_color)

Move performance critical code into own function.

13 years agobrushlib: small optimization
Martin Renold [Sat, 4 Jun 2011 11:04:12 +0000 (13:04 +0200)]
brushlib: small optimization

Move statements touching the mask memory closer together.
brushengine_paint_hires: 1% speedup

13 years agobrushlib: refactor get_color
Martin Renold [Sat, 4 Jun 2011 10:17:26 +0000 (12:17 +0200)]
brushlib: refactor get_color

use render_dab_mask for both get_color() and draw_dab()
(remove code duplication)

13 years agobrushlib: split render_dab_mask() into own method
Martin Renold [Sat, 4 Jun 2011 09:32:15 +0000 (11:32 +0200)]
brushlib: split render_dab_mask() into own method

Refactoring step.
brushengine_paint_hires: no significant performance change