OSDN Git Service

mypaint-anime/master.git
12 years agobrushsettings: allow presets to restore active color
Martin Renold [Sat, 3 Sep 2011 20:41:56 +0000 (22:41 +0200)]
brushsettings: allow presets to restore active color

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

12 years agobrusheditor: don't undo non-strokes for live update
Martin Renold [Tue, 30 Aug 2011 17:49:22 +0000 (19:49 +0200)]
brusheditor: don't undo non-strokes for live update

https://gna.org/bugs/?18581
And move some code closer to where it belongs.

12 years agobrushsettings: increase maximum jitter
Martin Renold [Mon, 29 Aug 2011 19:45:47 +0000 (21:45 +0200)]
brushsettings: increase maximum jitter

Requested by Ramón Miranda.
(Hm, maybe it should be made logarithmic?)

12 years agobrushmanager: fix a reliance on the Deevad group
Andrew Chadwick [Sat, 27 Aug 2011 02:42:50 +0000 (03:42 +0100)]
brushmanager: fix a reliance on the Deevad group

The brushkey and history initialisation code was relying on
DEFAULT_STARTUP_GROUP existing, which causes knock-on effects in the
brush history meny if it's missing doesn't. Now default to whatever
looks like the biggest group.

Tentative fix for https://gna.org/bugs/?18575

12 years agoapp, layout: initial pos updates, better defaults
Andrew Chadwick [Fri, 26 Aug 2011 22:51:48 +0000 (23:51 +0100)]
app, layout: initial pos updates, better defaults

Give the Scratchpad a better initial position, and update the other
positions to make better use of screen space. All tools are initially
hidden since we now have a way of changing both brush and colour very
immediately on the toolbar. Hopefully that's sensible initial behaviour.

All windows now have an explicit "hidden" in prefs, and default values
are now chosen from the prefs in the same way everywhere it matters for
first display.

https://gna.org/bugs/?18518
https://gna.org/bugs/?18519

12 years agotoolbar: add a brush chooser & history dropdown
Andrew Chadwick [Fri, 26 Aug 2011 22:59:52 +0000 (23:59 +0100)]
toolbar: add a brush chooser & history dropdown

Add a brush chooser MenuToolButton to the toolbar. Button icon shows the
current brush. Clicking the button reveals a quick brush choice dialog,
and its dropdown menu contains history, brush blend modes, and a toggle
for the Brush List window.

Remove the file actions from the toolbar since those can be accessed
from the menu, and they're moderately rare actions in the middle of
painting. Some reordering.

Toolbar icons are now 32x32 pixels to make brush previews more readable.
Hopefully that looks OK with most icon themes and doesn't consume too
much space.

Towards http://forum.intilinux.com/mypaint-development-and-suggestions/top-panel-dockables/

12 years agotoolbar: add a colour button-menu control
Andrew Chadwick [Thu, 25 Aug 2011 17:38:35 +0000 (18:38 +0100)]
toolbar: add a colour button-menu control

Add a colour button to the toolbar with a dropdown menu containing
recent colours and a selection of colour-changing tools. The "primary"
action on the button is currently bound to the details dialog, but we
can reprioritise if necessary.

Move toolbar code and special widgets to a separate file.

12 years agocolor selector: factor out the details dialog
Andrew Chadwick [Thu, 25 Aug 2011 17:35:54 +0000 (18:35 +0100)]
color selector: factor out the details dialog

Make the Color Details dialog more reusable by other code, and simplify
its implementation a bit.

12 years agofloating windows: don't make invalid-sized icons
Andrew Chadwick [Thu, 25 Aug 2011 15:04:44 +0000 (16:04 +0100)]
floating windows: don't make invalid-sized icons

12 years agolayout: normal subwindows, remove drag-snap-in
Andrew Chadwick [Thu, 4 Aug 2011 10:07:04 +0000 (11:07 +0100)]
layout: normal subwindows, remove drag-snap-in

User reports were fairly consistent about dragging to snap floating
panels back in being annoying - mostly complaints about the sidebar
opening up and eating windows during drag. Provide a "tear off" strip
looking like a TearoffMenuItem for snapping back in: hopefully the
analogy's sensible. Reinstate normal-looking subwindows too, since we
don't need the special titlebar in that state now.

Squashes prior to rebase+push: hide resize bar in snapped out mode too;
remove dead code for snapping out.

12 years agolayout: undo focus rejection
Andrew Chadwick [Mon, 22 Aug 2011 19:25:23 +0000 (20:25 +0100)]
layout: undo focus rejection

Attempt to fix some keypress weirdnesses I've been seeing recently with
the recent focus rejection stuff. This seems to be OK in metacity under
xephyr and in Compiz.

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

12 years agobrushes: fix classic/knife color hue
Martin Renold [Tue, 23 Aug 2011 18:22:23 +0000 (20:22 +0200)]
brushes: fix classic/knife color hue

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

12 years agotoolbars: make configurable through a menu item
Andrew Chadwick [Tue, 23 Aug 2011 12:28:45 +0000 (13:28 +0100)]
toolbars: make configurable through a menu item

The UI toolbar and menubar changes are confusing to users. Move their
settings to a submenu, and simplify by reflecting what's actually
tristate behaviour using radio buttons.

12 years agoMenubar hiding, menu button on the toolbar
Andrew Chadwick [Mon, 22 Aug 2011 18:21:16 +0000 (19:21 +0100)]
Menubar hiding, menu button on the toolbar

To save vertical space, the menu bar can now be hidden in the same way
as the toolbar. When the menu bar is hidden, a menu button appears on
the toolbar. This is roughly the way newer Firefox versions do it.

The defaults are now to show the toolbar and its menu button, and hide
the menubar.

12 years agosplit_stroke optimization #2
Martin Renold [Sun, 21 Aug 2011 13:03:06 +0000 (15:03 +0200)]
split_stroke optimization #2

Turns out that we call load_snapshot() after every completed stroke.
While this seems to be pointless, it doesn't cause any harm if we
check whether the snapshots are equal before doing more work.

12 years agosplit_stroke optimization
Martin Renold [Sun, 21 Aug 2011 12:17:26 +0000 (14:17 +0200)]
split_stroke optimization

This decreases the delay from "end of undoable stroke" until "ready
for the next stroke" which is notable mainly during automatic splits
of very long strokes.

Obvious optimization. In the profile this lead to <method 'items'
of 'dict' objects> making up 40% of the split_stroke() time.
Setting: big image, zoomed out, small-radius brushing over the
whole image.

12 years agorename warmer/colder to "change hue"
Martin Renold [Sat, 20 Aug 2011 18:51:41 +0000 (20:51 +0200)]
rename warmer/colder to "change hue"

Follow-up on the previous commit. Also, simplify the implementation.
Let's see if anyone actually misses the warmer/colder.

12 years agochange warmer/colder keyboard shortcut
Griatch [Tue, 16 Aug 2011 08:48:27 +0000 (10:48 +0200)]
change warmer/colder keyboard shortcut

Changed the warmer/colder keyboard shortcut to not stop at a designated
"cold/warm point" but instead go all the way around the hue circle.

The reason for this is simple -- combined with brighter/darker and
purer/grayer these keyboard shortcuts make for a very powerful way to
select colour using the keyboard without having to click in the selector
-- something I've not seen in any other program. With the hue selection
(cooler/warmer is not really a good name for it in this case -- maybe
 hue plus/minus?) wrapping around, I can put the colour selector on a
different screen entirely and only use it as a visual cue when
navigating it via the keyboard.

12 years agobuild: reinstate chmod on launcher script
Andrew Chadwick [Wed, 17 Aug 2011 10:16:38 +0000 (11:16 +0100)]
build: reinstate chmod on launcher script

Was removed by accident, and not having it is beginning to annoy me.

12 years agoinstall: fix prefix perms, detext sandboxing
Andrew Chadwick [Mon, 15 Aug 2011 01:39:03 +0000 (02:39 +0100)]
install: fix prefix perms, detext sandboxing

Detect when sandboxing is active, and don't try to be clever and set
permissions on surrounding directories. Improve detection of the $prefix
root when not sandboxed. Document the new installer properly.

12 years agoinstall: set permissions on the shared lib too
Andrew Chadwick [Sun, 14 Aug 2011 23:48:35 +0000 (00:48 +0100)]
install: set permissions on the shared lib too

12 years agoinstall: docs, and set permissions via postactions
Andrew Chadwick [Sun, 14 Aug 2011 23:34:09 +0000 (00:34 +0100)]
install: docs, and set permissions via postactions

Introduce a recursive Install()-generator, use $prefix everywhere for
understandability, and set permissions on installed files and
intermediate parts of the installation tree to ensure accessibility as
best we can. Also force a specific umask on systems that support it.

Document uninstall mechanism, and clarify wording regarding icon caches.

12 years agocolorsel: fix exception
Andrew Chadwick [Sun, 14 Aug 2011 17:51:31 +0000 (18:51 +0100)]
colorsel: fix exception

Remove an exception with the color selector. Thanks to tillux1 and Juan
Pablo Carbajal for the report.

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

12 years agodoc: fix missing arg when picking strokes
Andrew Chadwick [Sun, 14 Aug 2011 14:39:29 +0000 (15:39 +0100)]
doc: fix missing arg when picking strokes

12 years agocolorsel: support older pygtk, add x2click details
Andrew Chadwick [Sun, 14 Aug 2011 14:18:31 +0000 (15:18 +0100)]
colorsel: support older pygtk, add x2click details

Since the PPA builds (and Windows builds if you want pressure support)
need to support an ancient pygtk without a wrapped gtk.HSV, go back to
the nasty old trick of rummaging around in a donor gtk.ColorSelection
for spare parts. Sigh. Featurewise, this is slightly better. We regain
draggable colours from the prev and next widgets, which we can use
elsewhere: bits of the UI are now sensitive to having colours dropped on
them, so might as well provide a source.

Also add a trivial but nice to have colour details modal dialog on a
double-click of the colour comparison boxes. You can now type hex codes
into the dialog to set the current colour.

12 years agorestore last used brush/color when loading ORA
Martin Renold [Sun, 14 Aug 2011 14:19:52 +0000 (16:19 +0200)]
restore last used brush/color when loading ORA

12 years agoabout box: move all artists to Artists
Andrew Chadwick [Sat, 13 Aug 2011 16:55:47 +0000 (17:55 +0100)]
about box: move all artists to Artists

This duplicates some lines, but that's OK given the context of the box.
MrMamurk was already credited - pseudonym of Сан Саныч, so combine the
two lines.

12 years agoabout box: update credits
Andrew Chadwick [Sat, 13 Aug 2011 00:08:31 +0000 (01:08 +0100)]
about box: update credits

Thanks to BenO and MrMamurk, and apologies for not crediting you earlier.

12 years agoREADME: icon caches, sandbox installs
Andrew Chadwick [Thu, 11 Aug 2011 20:44:47 +0000 (21:44 +0100)]
README: icon caches, sandbox installs

Several users creating packages and local installs have been bitten by
icon trouble recently. Include some instructions about how to rebuild
the icon cache for the hicolor theme after a standard install, and a
note on sandbox installs since that's a standard thing even if we don't
require it.

12 years agoapp, doc: scratchpad follows primary doc
Andrew Chadwick [Wed, 10 Aug 2011 23:23:34 +0000 (00:23 +0100)]
app, doc: scratchpad follows primary doc

Reduce code duplication by using the same class for both, making the
scratchpad doc register with the main doc to receive certain events if
the main doc can't handle them.

12 years agodrawwindow: reword scratchpad menu entries
Andrew Chadwick [Wed, 10 Aug 2011 22:36:48 +0000 (23:36 +0100)]
drawwindow: reword scratchpad menu entries

Slight rewording and letter case changes for consistency. Dots where
interaction's required off the next step, and not when it's not.

12 years agoScratchpad: catch up to master
Andrew Chadwick [Wed, 10 Aug 2011 21:53:26 +0000 (22:53 +0100)]
Scratchpad: catch up to master

Change scratchpad hotkey to Shift+S since people probably use [ and ]
for paired operations. And it's nice to keep the symbols free.

12 years agopixops: dithering for display and for saving PNG
Martin Renold [Sun, 7 Aug 2011 12:32:22 +0000 (14:32 +0200)]
pixops: dithering for display and for saving PNG

Since dithering is a cheap operation now, also enable it for
the display when converting from 15bpc to 8bpc. When saving
a solid PNG it is now dithered, too (not only transparent PNGs).

I'm not claiming I can see the difference on my display, but
you can certainly see when you post-process the PNG.

scroll_nozoom_onelayer: performance seems to be unchanged (<5%)

12 years agotesting: fix GUI tests
Martin Renold [Sun, 7 Aug 2011 11:54:11 +0000 (13:54 +0200)]
testing: fix GUI tests

Application() takes extradata argument now.

12 years agosave_ora: 33% faster
Martin Renold [Sun, 7 Aug 2011 10:41:56 +0000 (12:41 +0200)]
save_ora: 33% faster

Use precalculated noise for dithering, don't call rand().
The speed is now the same it was for rounding, but we keep the quality.

12 years agostrokemap: thresholds tuning
Martin Renold [Sat, 6 Aug 2011 11:54:27 +0000 (13:54 +0200)]
strokemap: thresholds tuning

Replace ugly thresholding code with more ugly thresholding code.

The previous code did compare the difference of premultiplied
color components, with the result that white strokes had more
weight than black strokes. This at least is fixed now, and
hopefully everything is better tuned, too.

12 years agostrokemap: fix2 for choice of stroke to pick
Martin Renold [Fri, 5 Aug 2011 21:06:50 +0000 (23:06 +0200)]
strokemap: fix2 for choice of stroke to pick

Fix FIXME in stroke recording. Was ignoring the
threshold, caused by some past code refactoring...

12 years agostrokemap: fix choice of the stroke to pick
Martin Renold [Fri, 5 Aug 2011 20:44:11 +0000 (22:44 +0200)]
strokemap: fix choice of the stroke to pick

Fix the code that should have prevented a very faint stroke from
being recorded where a strong stroke was below.

(integer math for dummies...)

12 years agotoolbar: quick fix for exception
Andrew Chadwick [Fri, 5 Aug 2011 09:15:21 +0000 (10:15 +0100)]
toolbar: quick fix for exception

Should really test my commits before pushing. Ahem.

12 years agotoolbar: force into icons-only mode
Andrew Chadwick [Fri, 5 Aug 2011 09:02:42 +0000 (10:02 +0100)]
toolbar: force into icons-only mode

Workaround for a (py)GTK bug. The style-changed signal fires at startup
with an erroneous GTK_TOOLBAR_BOTH setting even when overridden both in
the user's gtkrc and in gconf, and even when the docs say the default is
GTK_TOOLBAR_BOTH_HORIZ. Forcing a style at that point means we can't
respect the user's style changes later, and rather than fiddle and set
up handlers within handlers and state flags to model GTK's peculiar
world view, it's simpler for our code to just do something that'll be
right for most users (who yes, tend to be graphical thinkers with good
eyesight; but for those who aren't: we still allow overriding the
toolbar icon size, and tooltips still work).

12 years agotoolbar: ignore really huge style defaults
Andrew Chadwick [Thu, 4 Aug 2011 16:58:18 +0000 (17:58 +0100)]
toolbar: ignore really huge style defaults

Override user settings of gtk.TOOLBAR_BOTH for the toolbar becuase
that's way too big for sensible display of the number of buttons we
have even at this early stage. Use gtk.TOOLBAR_BOTH_HORIZ instead since
that partly respects the user's desire for text (or it would if we
declared any items as important).

gtk.TOOLBAR_BOTH_HORIZ is the default for most systems these days.

12 years agoicons: correct some accidental misnamings
Andrew Chadwick [Tue, 2 Aug 2011 22:18:53 +0000 (23:18 +0100)]
icons: correct some accidental misnamings

Fix the scaled eraser and normal mode icons having the wrong name.

12 years agoapp: use an explicit path for icon searches
Andrew Chadwick [Tue, 2 Aug 2011 21:20:55 +0000 (22:20 +0100)]
app: use an explicit path for icon searches

Create the app instance with an explicit extra location for the icons,
based in the install prefix as derived from argv[0]. Fixes the app not
beeing able to start sensibly if installed somewhere not within the
bases for the usual icon search path. Be even more picky about missing
needed icons too so that people doing odd things get nicer feedback.

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

12 years agoScratchpad: Wired new/save/load/revert menu functionality up
Ben O'Steen [Mon, 1 Aug 2011 12:09:55 +0000 (13:09 +0100)]
Scratchpad: Wired new/save/load/revert menu functionality up

12 years agoScratchpad: fixed issue with user-set button functionality in pad
Ben O'Steen [Mon, 1 Aug 2011 11:50:52 +0000 (12:50 +0100)]
Scratchpad: fixed issue with user-set button functionality in pad

12 years agoScratchpad: Adjusted the menu bar + added placeholders
Ben O'Steen [Mon, 1 Aug 2011 11:00:04 +0000 (12:00 +0100)]
Scratchpad: Adjusted the menu bar + added placeholders

New, save as, load and revert

12 years agoScratchpad: Tweaking the newly refactored palette methods
Ben O'Steen [Mon, 1 Aug 2011 00:18:44 +0000 (01:18 +0100)]
Scratchpad: Tweaking the newly refactored palette methods

12 years agoScratchpad: Refactored palette drawing code for reuse
Ben O'Steen [Mon, 1 Aug 2011 00:08:26 +0000 (01:08 +0100)]
Scratchpad: Refactored palette drawing code for reuse

Moved the code to lib/scratchpad_palette.py:

squiggle, *_squiggle --> various methods to generate brush 'events' that
draw different 'squiggles'.

draw_palette --> parameterised method to draw the palette. Can be given any document.Document
object to draw on, and can be passed a palette of colours, offset and squiggle method to use.

GimpPalette --> palette that can load in a gimp palette. May need to be renamed to simply 'Palette' and
change 'load' method to reference gimp format as this palette object is more generic

12 years agoScratchpad: Refactored scratchpad vars to be ref'd in self.app
Ben O'Steen [Sun, 31 Jul 2011 23:20:16 +0000 (00:20 +0100)]
Scratchpad: Refactored scratchpad vars to be ref'd in self.app

Moved from self.filehandler.scratchpad_doc and scratchpad_filename to
self.app.scratcpad_doc, etc.

12 years agoScratchpad: Shorten the text for scratchpad bg option
Ben O'Steen [Sun, 31 Jul 2011 23:13:19 +0000 (00:13 +0100)]
Scratchpad: Shorten the text for scratchpad bg option

12 years agoScratchpad: fixed bug on opening autosaved file when widget is hidden
Ben O'Steen [Sun, 31 Jul 2011 22:52:45 +0000 (23:52 +0100)]
Scratchpad: fixed bug on opening autosaved file when widget is hidden

12 years agoScratchpad: Altered the icon
Ben O'Steen [Sun, 31 Jul 2011 22:44:54 +0000 (23:44 +0100)]
Scratchpad: Altered the icon

12 years agoScratchpad: now uses the new icon
Ben O'Steen [Sun, 31 Jul 2011 22:15:29 +0000 (23:15 +0100)]
Scratchpad: now uses the new icon

12 years agoScratchpad: Adding icon files for the scratchpad
Ben O'Steen [Sun, 31 Jul 2011 22:14:05 +0000 (23:14 +0100)]
Scratchpad: Adding icon files for the scratchpad

12 years agoScratchpad: Adding the scratchpad icon svgz
Ben O'Steen [Sun, 31 Jul 2011 22:06:55 +0000 (23:06 +0100)]
Scratchpad: Adding the scratchpad icon svgz

12 years agoScratchpad: Intergrated with toolbar changes
Ben O'Steen [Sun, 31 Jul 2011 20:28:10 +0000 (21:28 +0100)]
Scratchpad: Intergrated with toolbar changes

TODO: apply unique stock icon for scratchpad

12 years agoAdded background copying for the scratchpad
Ben O'Steen [Sun, 31 Jul 2011 19:51:25 +0000 (20:51 +0100)]
Added background copying for the scratchpad

Current scratchpad adopts the chosen background for the canvas.

12 years agofix 'scons install'
Martin Renold [Sun, 31 Jul 2011 19:21:36 +0000 (21:21 +0200)]
fix 'scons install'

12 years agoScratchpad: Fixed palette drawing off by 1 at start
Ben O'Steen [Sun, 31 Jul 2011 18:25:10 +0000 (19:25 +0100)]
Scratchpad: Fixed palette drawing off by 1 at start

First colour would be overwritten due to the wrong recalculation of
where the next palette 'squiggle' needs to start.

12 years agobrush modifier: fix eraser size regression
Andrew Chadwick [Sun, 31 Jul 2011 18:06:09 +0000 (19:06 +0100)]
brush modifier: fix eraser size regression

Some bad logic meant that when leaving eraser mode, the radius change
wasn't being stored. That also meant that it wasn't being reset either,
so the brush size would just continue to grow and grow (or shrink and
shrink) with a non-zero document.eraser_mode_radius_change setting.

12 years agoapp: refuse to start if icons are missing
Martin Renold [Sun, 31 Jul 2011 17:24:22 +0000 (19:24 +0200)]
app: refuse to start if icons are missing

Now that we have some important icons, it's probably better to
exit earily and print an error, rather than to let the user stare
puzzled at blank icons.

(Trouble ahead. IIRC this is broken at least on Mac, maybe Windows too.)

12 years agotoolbar: lay out using a UIManager definition file
Andrew Chadwick [Sun, 31 Jul 2011 17:14:19 +0000 (18:14 +0100)]
toolbar: lay out using a UIManager definition file

Simplifies the code a bit, and makes editing the toolbar layout easier
(since it's by no means in its final form yet).

12 years agobrushmodifier: improve tooltips for advanced users
Andrew Chadwick [Sun, 31 Jul 2011 14:23:10 +0000 (15:23 +0100)]
brushmodifier: improve tooltips for advanced users

Make the tooltips explain what the buttons do in terms advanced users
can understand without requiring trial and error. Retain existing
glosses for newer or less advanced users.

12 years agolayout: minor code cleanup
Andrew Chadwick [Wed, 27 Jul 2011 22:13:12 +0000 (23:13 +0100)]
layout: minor code cleanup

Remove some cruft and make get_x_by_role methods work similarly.

12 years agowindow toggles: fix annoying saved pos regression
Andrew Chadwick [Wed, 27 Jul 2011 15:56:26 +0000 (16:56 +0100)]
window toggles: fix annoying saved pos regression

Fixes a regression against master. Windows were being hidden twice when
toggled off, which was screwing up position saving: most apparent under
Compiz when Hide Subwindows was invoked.

12 years agodrawwindow: more GNOME HIG ellipsis compliance
Andrew Chadwick [Tue, 26 Jul 2011 22:48:41 +0000 (23:48 +0100)]
drawwindow: more GNOME HIG ellipsis compliance

12 years agolayout: remove a few remnants of experimental code
Andrew Chadwick [Tue, 26 Jul 2011 22:47:19 +0000 (23:47 +0100)]
layout: remove a few remnants of experimental code

12 years agostock: GNOME HIG conformance for the labels
Andrew Chadwick [Tue, 26 Jul 2011 22:13:49 +0000 (23:13 +0100)]
stock: GNOME HIG conformance for the labels

Remove trailing ellipses for labels that get used for menus: also
makes them better for tool window titles.

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.