Commit Graph

26095 Commits

Author SHA1 Message Date
Michael Natterer c6fb6d0ceb Implement GimpDrawable::convert_type()
Move pixel conversion code from gimp_layer_convert() to the new
gimp_layer_convert_type() implementation and call
gimp_drawable_convert_type() from convert(). In convert_type(), simply
chain up to convert to gray and rgb and only implement indexed
conversion ourselves.
2009-09-11 22:03:54 +02:00
Michael Natterer 86a264e9f2 Add new virtual function GimpDrawable::convert_type()
This may look like duplication of GimpItem::convert() but in fact will
fix the longstanding uglyness that GimpItem::convert() both transfers
an item to another image *and* converts the image type of drawables.
When this refactoring is done, GimpItem::convert() will only move an
item to another image, and its implementation in GimpDrawable classes
will call GimpDrawable::convert_type() to convert the pixels to
whatever format.

Takes a "dest_image" parameter anyway because for converting to
indexed we need the destination colormap. The default impl in
GimpDrawable can only convert to gray and rgb however.
2009-09-11 22:03:54 +02:00
Manish Singh f857e70e26 Ignore libapp.a 2009-09-11 12:58:13 -07:00
Manish Singh 2182dec09b Bug 594651 - layer.scale() raises RuntimeError
Add "interpolation" to kwlist for pygimp layer.scale()
2009-09-11 12:55:25 -07:00
Martin Nordholts 45a8d1f487 app: Pass dock roles as construction parameters
In order to keep window specific settings as local as possible, also
move the role setting to dock construction instead of having it in
init.
2009-09-10 22:25:00 +02:00
Martin Nordholts 5b74dd27ef app: Move window init code from GimpDock to GimpDockWindow
Move window init code common to all docks from GimpDock to
GimpDockWindow.
2009-09-10 22:13:21 +02:00
Martin Nordholts 26fbeebf02 app: Set the dock-window-hint centrally in GimpDockWindow
Set the dock-window-hint centrally in GimpDockWindow instead of both
in GimpToolbox and GimpMenuDock.
2009-09-10 22:03:39 +02:00
Martin Nordholts 81d961423a app: Add GimpContext property to GimpDockWindow
The GimpDockWindow will need to have a GimpContext so add such a
property but call it "gimp-context" for now to avoid clashing with
"context" of GimpDock.
2009-09-10 22:03:30 +02:00
Manish Singh 15497c1d68 Explicit shared lib deps to support gold 2009-09-09 17:41:20 -07:00
Manish Singh 3682f7680f Fix syntax error 2009-09-09 17:38:42 -07:00
Martin Nordholts 76a2522a43 app: Cleanup PROP_WEB_BROWSER code 2009-09-09 23:40:44 +02:00
Martin Nordholts e1faf82e7d Get rid of toolbox-window-hint, use dock-window-hint instead
Since the toolbox no longer is the main window with a menu, use the
same hint for the toolbox (which actually is a dock) as for the other
docks.
2009-09-09 23:37:38 +02:00
Martin Nordholts 0110eb0cdf app: Introduce GimpDockWindow
Introduce GimpDockWindow and make GimpDock inherit from it. Right now
it is just a GimpWindow, but window logic from GimpDock and subclasses
will gradually be moved here so that we eventually can make GimpDock a
GtkBin. That in turn will allow us to put several GimpDocks next to
each other in columns, or GimpDocks in an image window.
2009-09-09 18:22:05 +02:00
Michael Natterer 45f05b272c gimp_item_real_duplicate(): don't set lock-content if it can't be set
Also use the proper APIs to set visible, linked and lock-content
instead of accessing the item struct directly.
2009-09-08 22:09:53 +02:00
Michael Natterer a8b0e3c943 gimp_layer_duplicate(): don't set lock-alpha if it can't be set 2009-09-08 22:09:03 +02:00
Michael Natterer 0c57e8c68e gimp_layer_transform_color(): don't assume the dest region has alpha
Don't blindly fill the dest region's alpha channel even if it has
none. Fixes longstanding bug that made things without alpha dropped
to indexed images to arrive broken.
2009-09-08 20:54:51 +02:00
Michael Natterer f2f741a26e Add gimp_drawable_convert_rgb() and gimp_drawable_convert_grayscale()
The new functions reall convert the drawable this time, using the
previously renamed convert_tiles functions. Remove tile manager
fiddling from all callers and leave it there only for converting to
indexed.
2009-09-08 20:36:51 +02:00
Michael Natterer 83c79bad5d Use gboolean instead of gint for boolean value 2009-09-08 19:57:50 +02:00
Michael Natterer f3bae9ac57 Remove "old_base_type" parameters from gimp_drawable_convert_tiles_foo()
I have no idea how ancient these parameters were, but the drawable
knows about its type itself, so no need to pass it in.
2009-09-08 19:46:20 +02:00
Michael Natterer 1ecf6b5bc8 Rename the functions in gimpdrawable-convert.[ch]
Rename them from gimp_drawable_convert_foo() to
gimp_drawable_convert_tiles_foo() because they don't convert the
drawable itself, they convert its tiles into passed-in tiles.
2009-09-08 19:46:19 +02:00
Michael Natterer e77f6b10f4 Use gimp_drawable_type() instead of drawable->type 2009-09-08 19:46:19 +02:00
Michael Natterer 13ac22d800 Add %T which expends to the active drawable's type
This is not really generally useful, but I needed it for debugging and
it doesn't hurt.
2009-09-08 19:46:19 +02:00
Michael Natterer 42fe565f5d Add the new drawable and vectors lock-content APIs to the docs 2009-09-08 19:46:19 +02:00
Michael Natterer 332ebeb5d3 Add enum GimpTextHintStyle and gimp_rectangle_union() to the docs 2009-09-08 19:46:18 +02:00
Michael Natterer d1f767d9b6 Make gimp_image_get_layer,channel,vectors_by_name,tattoo() more readable
Add local GimpItemStack variables instead of having the functions'
entire code in one line.
2009-09-08 19:46:18 +02:00
Martin Nordholts 810f325a16 app: Add regression test for window roles 2009-09-08 19:32:39 +02:00
Martin Nordholts 86f8e996d7 app: Add gimp_init_for_gui_testing()
In order to allow test cases to test GUI code, add
gimp_init_for_gui_testing() which is like gimp_init_for_testing() but
includes initializations of GUI parts.
2009-09-08 19:28:43 +02:00
Martin Nordholts b61c971f22 app: Add gimp_set/get_show_gui()
For test cases we typically don't want to present any windows, so
allow test cases to turn that off.
2009-09-08 19:26:57 +02:00
Martin Nordholts a8e5dea309 app: Print error message when tag cache parsing fails 2009-09-08 17:48:39 +02:00
Michael Natterer 67847b4aca Add section for 2.7.1 and the changes that happened so far 2009-09-07 23:06:16 +02:00
Martin Nordholts 3e6f6088ee app: Create libapp.a for convenient test case linking
Create libapp.a for convenient test case linking and link the existing
tests against that.
2009-09-07 23:05:11 +02:00
Michael Natterer 84b02fb978 Refuse to convert layer trees to indexed 2009-09-07 21:09:24 +02:00
Michael Natterer 60ac874cd0 Refuse to add group layers to indexed images 2009-09-07 21:08:25 +02:00
Michael Natterer 1961036f5e Add gimp_item_stack_is_flat() which returns TRUE if it's not a tree 2009-09-07 21:07:44 +02:00
Michael Natterer 5bb149fa9d Add some more checks that come for free to the existing tests 2009-09-07 20:52:10 +02:00
Michael Natterer a0914f8df1 Add test-layers to .gitignore 2009-09-07 19:11:21 +02:00
Michael Natterer a17f7e0d4f Add a layers test
Contains the add-layers test from the "template" test and also a
remove-layers one.
2009-09-07 19:09:48 +02:00
Michael Natterer 6542617751 Initialize some more stuff so real tests are possible
* tests.[ch]: initialize base so we have a tile cache and add
  parameter "gboolean use_cpu_accel" so we can test stuff both with
  and without using CPU features.

* tests/test-layer-grouping.c: changed accordingly. Call g_thread_init()
  so the tile cache works (and to be on the safe side in general).
2009-09-07 19:06:57 +02:00
Michael Natterer 2e2c7aaf34 Minor formatting cleanup 2009-09-07 18:55:18 +02:00
Michael Natterer 4df9b25217 Add facility to compress multiple group layer resizings into one
* app/core/gimpgrouplayer.[ch]: add gimp_group_layer_suspend_resize()
  and gimp_group_layer_resume_resize() and call them around functions
  where all a group's children are transformed (translated, resized
  etc).  This way we go from the worst case of reallocating the
  group's projection tiles once for each child down to exactly one
  reallocation.

* app/core/Makefile.am
* app/core/core-enums.[ch]
* app/core/core-types.h
* app/core/gimpimage-undo-push.[ch]
* app/core/gimpgrouplayerundo.[ch]: add new undo class
  GimpGroupLayerUndo which implements undos for suspend/resume of
  group layers and calls them in reverse order when undoing.
2009-09-07 13:12:54 +02:00
Inaki Larranaga 6a10485f6b Updated Basque translation 2009-09-07 12:36:54 +02:00
Michael Natterer c552d2f065 (SUBDIRS): gegl and text live on top of core, xcf on top of plug-ins 2009-09-07 11:06:12 +02:00
Michael Natterer 56a17ed118 Forgot one "Group Layer" -> "Layer Group" string change 2009-09-07 10:58:55 +02:00
Aron Xu ef9d82054e Updated Simplified Chinese translations. 2009-09-07 16:29:17 +08:00
Alexandre Prokoudine e7e4351ccf Slightly updated Russian translation 2009-09-07 11:53:46 +04:00
Petr Kovar 2959ccceae Updated Czech translation by Jaroslav Krejci
Reviewed by: Petr Kovar
2009-09-06 01:06:15 +02:00
Martin Nordholts 60b90b817a app: GimpDockPriv -> GimpDockPrivate, priv -> p 2009-09-06 00:15:25 +02:00
Martin Nordholts 04ef83c795 app: Add some comments on classes used for the dock system 2009-09-05 23:52:32 +02:00
Julien Hardelin af3e894844 Fix po-script-fu French translation 2009-09-05 23:29:44 +02:00
Claude Paroz 2f678cb7f3 Completed French translation 2009-09-05 23:21:26 +02:00