OSDN Git Service
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.
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.
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%)
Martin Renold [Sun, 7 Aug 2011 11:54:11 +0000 (13:54 +0200)]
testing: fix GUI tests
Application() takes extradata argument now.
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.
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.
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...
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...)
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.
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).
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.
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.
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
Ben O'Steen [Mon, 1 Aug 2011 12:09:55 +0000 (13:09 +0100)]
Scratchpad: Wired new/save/load/revert menu functionality up
Ben O'Steen [Mon, 1 Aug 2011 11:50:52 +0000 (12:50 +0100)]
Scratchpad: fixed issue with user-set button functionality in pad
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
Ben O'Steen [Mon, 1 Aug 2011 00:18:44 +0000 (01:18 +0100)]
Scratchpad: Tweaking the newly refactored palette methods
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
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.
Ben O'Steen [Sun, 31 Jul 2011 23:13:19 +0000 (00:13 +0100)]
Scratchpad: Shorten the text for scratchpad bg option
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
Ben O'Steen [Sun, 31 Jul 2011 22:44:54 +0000 (23:44 +0100)]
Scratchpad: Altered the icon
Ben O'Steen [Sun, 31 Jul 2011 22:15:29 +0000 (23:15 +0100)]
Scratchpad: now uses the new icon
Ben O'Steen [Sun, 31 Jul 2011 22:14:05 +0000 (23:14 +0100)]
Scratchpad: Adding icon files for the scratchpad
Ben O'Steen [Sun, 31 Jul 2011 22:06:55 +0000 (23:06 +0100)]
Scratchpad: Adding the scratchpad icon svgz
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
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.
Martin Renold [Sun, 31 Jul 2011 19:21:36 +0000 (21:21 +0200)]
fix 'scons install'
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.
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.
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.)
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).
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.
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.
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.
Andrew Chadwick [Tue, 26 Jul 2011 22:48:41 +0000 (23:48 +0100)]
drawwindow: more GNOME HIG ellipsis compliance
Andrew Chadwick [Tue, 26 Jul 2011 22:47:19 +0000 (23:47 +0100)]
layout: remove a few remnants of experimental code
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.
Andrew Chadwick [Tue, 26 Jul 2011 22:13:41 +0000 (23:13 +0100)]
toolbar: don't draw a line for the expander
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.
Andrew Chadwick [Tue, 26 Jul 2011 22:02:38 +0000 (23:02 +0100)]
various: misc trailing whitespace fixes
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.
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.
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.
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.
Martin Renold [Sun, 31 Jul 2011 13:02:00 +0000 (15:02 +0200)]
git: treat .svg files as binary
Ben O'Steen [Thu, 28 Jul 2011 00:10:19 +0000 (01:10 +0100)]
Scratchpad: Further tweaking of grid layout
Ben O'Steen [Wed, 27 Jul 2011 23:18:51 +0000 (00:18 +0100)]
Scratchpad: Tweaked palette layout grid
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.
Ben O'Steen [Wed, 27 Jul 2011 21:35:52 +0000 (22:35 +0100)]
Scratchpad: renamed for clarity
Ben O'Steen [Wed, 27 Jul 2011 21:32:45 +0000 (22:32 +0100)]
Scratchpad: Tweaked feedback message
Ben O'Steen [Wed, 27 Jul 2011 21:26:01 +0000 (22:26 +0100)]
Scratchpad: Added Gimp Palette parser
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.
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.
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
Ben O'Steen [Wed, 27 Jul 2011 19:38:23 +0000 (20:38 +0100)]
Scratchpad: Added GPL license declaration
Ben O'Steen [Wed, 27 Jul 2011 19:09:15 +0000 (20:09 +0100)]
Changed my misuse of '_' to '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 :-)
Martin Renold [Wed, 27 Jul 2011 18:42:40 +0000 (20:42 +0200)]
testing: fix exception in test_memory_leak.py
fixes "gui_test"
Ben O'Steen [Wed, 27 Jul 2011 18:29:08 +0000 (19:29 +0100)]
Added a means to clear the autosaved scratchpad
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
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
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.
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
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.
Ben O'Steen [Thu, 21 Jul 2011 18:55:58 +0000 (19:55 +0100)]
Scratchpad: Added workround to get Ctrl colourpicker working
Ben O'Steen [Thu, 21 Jul 2011 18:31:00 +0000 (19:31 +0100)]
Scratchpad: Added panning ability with spacebar
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
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.
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.
Ben O'Steen [Thu, 21 Jul 2011 14:23:33 +0000 (15:23 +0100)]
Scratchpad: Added a widget toggle option in top menu
Ben O'Steen [Thu, 21 Jul 2011 14:16:50 +0000 (15:16 +0100)]
Scratchpad: Now saves scratchpad when opening another
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!
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)
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/
Ben O'Steen [Mon, 18 Jul 2011 19:59:49 +0000 (20:59 +0100)]
Fixed action group bug w/ scratchpad
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 ;))
Ben O'Steen [Mon, 18 Jul 2011 16:27:09 +0000 (17:27 +0100)]
Erroneously took away the Scratchpad's action_group. Reverted
Ben O'Steen [Mon, 18 Jul 2011 16:21:35 +0000 (17:21 +0100)]
Added the scratchpad toggle switch to the main menu
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
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.
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.
Martin Renold [Sun, 31 Jul 2011 19:21:36 +0000 (21:21 +0200)]
fix 'scons install'
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.
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.)
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).
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.
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.
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.
Andrew Chadwick [Tue, 26 Jul 2011 22:48:41 +0000 (23:48 +0100)]
drawwindow: more GNOME HIG ellipsis compliance
Andrew Chadwick [Tue, 26 Jul 2011 22:47:19 +0000 (23:47 +0100)]
layout: remove a few remnants of experimental code
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.
Andrew Chadwick [Tue, 26 Jul 2011 22:13:41 +0000 (23:13 +0100)]
toolbar: don't draw a line for the expander
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.
Andrew Chadwick [Tue, 26 Jul 2011 22:02:38 +0000 (23:02 +0100)]
various: misc trailing whitespace fixes
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.
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.
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.
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.
Martin Renold [Sun, 31 Jul 2011 13:02:00 +0000 (15:02 +0200)]
git: treat .svg files as binary