Commit Graph

12199 Commits

Author SHA1 Message Date
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 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 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
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
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
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
Martin Nordholts 6fd1e5d50b app: Compile vectors and paint after core
Compile vectors and paint after core since they need the
core-generated core/gimpmarshal.h
2009-09-05 19:11:39 +02:00
Martin Nordholts 8f999e0842 app: Don't initialize Gimp verbosely in gimp_init_for_testing()
The verbose output of Gimp has little relevance to unit testing,
disable it.
2009-09-05 16:19:52 +02:00
Martin Nordholts d6c8fa9783 app: Update .gitignore 2009-09-05 16:09:57 +02:00
Martin Nordholts 071153124a app: Reverse order of SUBDIRS
The SUBDIRS var should be sorted on build-order, not link-order.
2009-09-05 16:08:23 +02:00
Martin Nordholts 14aa5314af app: Add GIMP core unit testing framework and a simple first test
Enable us to have regression testing by introducing a core testing
framework that uses the GLib JUnit-like test library.

Do this by adding a new subdir app/tests that will contain all our
tests (it contains one trivial test already). Also add app/tests.[ch]
with a new function gimp_init_for_testing() so that test cases can
easily setup the core object system.
2009-09-05 16:02:32 +02:00
Michael Natterer df9e9e2609 Disable layer masks on group layers for the time being
Will enable it again when I fixed it properly, it's clearly a
non-trivial problem that needs some thinking. Disabled for now because
it causes crashes.
2009-09-05 15:37:48 +02:00
Martin Nordholts 871e41c062 app: Clean up subsystem linking dependencies
Clean up subsystem linking dependencies by
* Rearranging LDADD entries to better match architectural layers
* Being clear about why we need to pass -u in LDFLAGS some times
* Adding FIXMEs when we have broken dependencies
* Introducing a helper variable so we can share LDADD between
  gimp-console and gimp
2009-09-05 14:33:48 +02:00
Martin Nordholts b43659fa62 app: Fix non-string-literal warning for g_print() test-config.c 2009-09-05 14:33:48 +02:00
Michael Natterer 5b85642e94 Reorder some functions so item and drawable methods are together 2009-09-04 11:31:19 +02:00
Sven Neumann 8405d69e86 formatting 2009-09-03 20:54:06 +02:00
Martin Nordholts 9359c5d44f app: Escape the file names in export menu items
We need to escape _ in the filenames we use for the 'Overwrite' and
'Export to' menu items, otherwise they show up as mnemonics.
2009-09-03 20:14:15 +02:00
Michael Natterer c1f3872141 Fix loading of layer masks of group layers
Don't add layer masks to their layers while loading because a newly
loaded group layer's size doesn't match its mask's size. Instead,
attach all layer masks to their layers using g_object_set_data(), and
add them after all layers have been loaded.
2009-09-03 19:11:02 +02:00
Michael Natterer c8b0cb68fa xcf_save_layer(): add comment about where we store the layer mask offset 2009-09-03 19:08:22 +02:00
Michael Natterer 9e18f771c4 Replace "Group Layer" by "Layer Group" in all user visible strings 2009-09-03 14:57:18 +02:00
Michael Natterer efd5018420 gimp_editor_set_box_style(): small optimization
Don't set set icon again if the icon size has not actually changed.
2009-09-03 13:24:30 +02:00
Michael Natterer 402408db1a gimp_item_tree_view_style_set(): set the style of the lock buttons
Honor the "button-relief" and "button-icon-size" style properties for
the lock buttons.
2009-09-03 13:22:17 +02:00
Michael Natterer 2d5b6d83d5 Use plain togglebuttons, not checkbuttons for the "lock" toggles
The checkbox is not really needed, the icons can just as well be
toggles themselves.
2009-09-03 13:07:06 +02:00
Michael Natterer f1f186c718 Change mnemonic of "New Group Layer..." to "G" 2009-09-03 09:10:42 +02:00
Michael Natterer 4347c67964 Use gimp_drawable_get_tiles() in a few places instead of direct access 2009-09-03 08:16:26 +02:00
Michael Natterer c39dfab87c Don't access image->width and ->height directly 2009-09-03 01:03:29 +02:00
Michael Natterer 0b09278c17 Don't access item->width and ->height directly 2009-09-03 01:00:14 +02:00
Michael Natterer f3e640f2d2 gimp_projection_projectable_changed(): some fixes and optimizations
When the projectable's size or image type changes, stop the idle
renderer and remove all queued update area because everything needs to
be re-rendered anyway. Also honor the projectable's offset when
invalidating the entire projection after clearing the pyramid.
2009-09-02 21:55:14 +02:00
Michael Natterer 228da1d32e gimp_group_layer_update_size(): remove bogus optimization
The optimization here which would change only the group layer's offset
if the extents of the union of its children has not changed is
completely bogus. That case can only happen if one of the chldren was
moved in a way that does not change the extents of all children's
union, but this doesn't mean that the childrens' positions relative to
each other have not changed.

Instead, invalidate the entire projection to at least avoid constant
reallocation of the tile pyramid.

Found by group layer testing hero Tobias Jakobs.

(will have to optimize real translations of the entire group (or of the
only child in the group) differently)
2009-09-02 21:47:28 +02:00
Michael Natterer 1735f86d25 Kill plug-ins that write to tiles of locked drawables or group layers
Yes this is pretty lame, but we must prevent write access to these
items under all circumstances, and we have no other way but killing
the plug-in (it should not write to the drawable directly anyway)
2009-09-02 19:48:46 +02:00
Michael Natterer b2fa005445 Chain up unconditionally in GimpViewable::invalidate_preview() 2009-09-01 23:36:46 +02:00
Sven Neumann 70fdac012e Minor UI tweak in the Keyboard Shortcuts Editor dialog
Use a Clear icon embedded into the Search entry instead of an extra
button next to it.
2009-09-01 22:26:01 +02:00
Michael Natterer 096ff4b093 Remove all wrong and useless comments
Remove all outdated comments that we just plain wrong and all
useless ones that are like:

/*  do foo bar  */
foo_bar();
2009-09-01 19:23:44 +02:00
Michael Natterer c6c0817602 Don't make the action that invokes the tool insensitive for locked vectors 2009-09-01 12:44:30 +02:00
Michael Natterer a12a9fa70e gimp_vector_tool_button_press(): don't edit locked vectors 2009-09-01 12:43:43 +02:00
Michael Natterer a3558e3cb8 Remove GIMP_OBJECT() casts when calling gimp_object_get_name() 2009-08-31 22:47:18 +02:00
Michael Natterer a0e1fe6a21 gimp_layer_boundary(): come cleanup
Don't allocate the BoundSegs just to free it a few lines later, simply
allocate them before they are actually filled.
2009-08-31 21:23:35 +02:00
Martin Nordholts 5fbe68c26b app: Enforce privacy of GimpObject members
Use g_type_class_add_private() for GimpObject to prevent private data
from being modified "accidentally".
2009-08-31 21:23:29 +02:00
Michael Natterer 3915601544 Remove gimp_image_layer_boundary()
Having a function that only abstracts whether there is an active
layer or not is pretty useless. This also doesn't make the code in
selection_generate_segs() more complex but rather more obvious.
2009-08-31 20:57:52 +02:00
Michael Natterer bbc83d33b5 gimp_drawable_fs_update() takes a GimpLayer, not a GimpDrawable 2009-08-31 20:55:03 +02:00
Michael Natterer 44be1b5d7b Various small cleanups (no code changes) 2009-08-31 20:42:02 +02:00
Michael Natterer 064448cb50 Bug 563770 - Layer border visibility don't work with masks
(gimp_display_shell_selection_control): don't draw the layer boundary
if it is hidden.
2009-08-31 19:25:25 +02:00
Michael Natterer d50d5b5878 Let the drawable connect to its floating selection's "update" signal
When attaching/detaching a floating selection to/from its drawable,
connect/disconnect the floating selection's "update" signal and update
the drawable in the callback, because changes to the floating
selection affect the drawable and not the projection directly. Fixes
floating selection compositing in layer trees and is the right thing
to do anyway.
2009-08-31 17:37:22 +02:00
Michael Natterer cdbb8e1697 Fix loading of layer trees when there is a floating selection
A floating selection is always the first layer in the image, but on
XCF loading it is attached *after* all layers are loaded, so the item
paths for child layers read from the XCF are off-by-one in their
toplevel index. Adjust them so everything loads as it should.
2009-08-31 15:15:30 +02:00
Michael Natterer c6fa4f7206 Implement saving and loading of layer trees in the XCF
* app/xcf/xcf-private.h: add properties PROP_GROUP_ITEM and
  PROP_ITEM_PATH

* app/xcf/xcf-save.c: when saving a group layer, save a
  PROP_GROUP_ITEM.  When saving a child item, save a PROP_ITEM_PATH
  which contains the path indices returned by gimp_item_get_path().

* app/xcf/xcf-load.c: when loading a PROP_GROUP_ITEM, replace the
  layer that is being loaded by a GimpGroupLayer, also ignore that
  layer's hierarchy (it makes no sense to load the tiles of a layer
  that's generated from its children). When loading a PROP_ITEM_PATH,
  pass the loaded path up to xcf_load_image() so it can add the loaded
  layer at the right place in the tree.
2009-08-30 21:28:59 +02:00
Michael Natterer 7f8244d50c Save all an image's layers and channels, but still as flat list
This is actually just an intermediate refactoring that uses
gimp_image_get_foo_list() inetad of get_foo_iter(), but it also
sanitizes saving the image's selection (it's now simply added to the
list of channels to save, instead of using some sick code to save it
in the same loop that saves channels), so i want to have this in a
separate commit from actual tree saving/loading.
2009-08-30 21:19:42 +02:00
Michael Natterer 7eaba5f8fc Move variables to local scopes 2009-08-30 21:07:22 +02:00
Michael Natterer 23749cda2c Don't set "lock-alpha" and "lock-content" on items where it can't be changed 2009-08-30 21:02:43 +02:00
Michael Natterer f9c8bea368 Add gimp_item_stack_get_parent_by_path(), for use un XCF loading
The opposite of gimp_item_get_path(), just that it doesn't return an
item, it returns a parent item and an index that can be used to add
the item to an item tree.
2009-08-30 20:58:24 +02:00
Michael Natterer 3d547c0a70 Add gimp_item_get_path(), to be used in XCF saving
Returns a GList of guint indices that describe the path to an item in
an item tree, pretty much like GtkTreePath does for GtkTreeModels.
2009-08-30 20:56:39 +02:00
Michael Natterer 46b9ffc11f Prepare for changing the layer type in xcf_load_layer_props()
As when loading channel props (which can replace the GimpChannel by a
GimpSelection), pass a GimpLayer** instead of a GimpLayer* to
xcf_load_layer_props(), so the function can replace the GimpLayer to
load by another type (e.g. GimpGroupLayer).
2009-08-30 13:14:28 +02:00
Michael Natterer 03d00c5e0f Save the "lock-content" property on layers and channels in the XCF
Add XCF property PROP_LOCK_CONTENT and save/load it for all layers and
channels. Vectors saving needs some refactoring here I'm afraid, so I
ignored it for now.
2009-08-30 12:44:35 +02:00
Michael Natterer 8f9fc5e2d7 Fix comment: s/layer/channel/ 2009-08-30 11:52:06 +02:00
Michael Natterer 2b3c03593f gimp_text_layer_from_layer(): also copy the "lock-content" property 2009-08-30 10:49:32 +02:00
Michael Natterer e1b743e407 Fix typo in comment 2009-08-30 10:43:09 +02:00
Michael Natterer 27d036b75f Render a layer group's boundary in a different color
This is probably not sufficient, but better than nothing.
2009-08-29 21:26:46 +02:00
Michael Natterer e6235cd982 Don't allow stroking to locked items and group items 2009-08-29 20:20:25 +02:00
Michael Natterer c68f82f4ae Connect to "lock-content-changed" of all items, not "lock-alpha-changed" 2009-08-29 20:19:38 +02:00
Michael Natterer d84e48a82f Make "item" parameter of GimpItem::is_attached() const 2009-08-29 19:47:52 +02:00
Michael Natterer 02903d6970 Use gimp_item_is_content_locked() instead of gimp_item_get_lock_content()
Use the new API whenever we want to determine the item's effective
lock state (whether we can write to the item's content or not). Use
gimp_item_get_lock_content() only in code that actually deals with
*this* item's locked state, which is only the PDB wrappers and GUI to
modify the flag on the item itself.
2009-08-29 15:27:04 +02:00
Michael Natterer 521e790b77 An item is_content_locked() if its parent item is locked 2009-08-29 15:10:38 +02:00
Michael Natterer c730839c1f Implement GimpItem::is_content_locked()
A layer mask is locked if its parent layer is locked.
2009-08-29 15:08:06 +02:00
Michael Natterer 03fafc01a4 Add virtual function GimpItem::is_content_locked() and public API
The purpose of this is to determine an item's effective lock state,
which will also depend on its parent and child items' lock states.
2009-08-29 14:59:07 +02:00
Michael Natterer dc738d229e Don't consider group items as non-lockable any longer 2009-08-29 12:54:25 +02:00
Michael Natterer fecfa95b63 Don't override the "lock-content" property any longer
Group layers can now be locked just as each other item
2009-08-29 12:53:35 +02:00
Michael Natterer 85c6af5d42 Separate checks for "writable" from "is group" when setting sensitivity 2009-08-29 12:51:58 +02:00
Martin Nordholts 957cf2cfa9 app: Always use gimp_object_get_name()
Begin to consider GimpObject::name as private and always use
gimp_object_get_name(). Change gimp_object_get_name() to take an
untyped pointer so we don't have to do so awfully many casts. There is
a runtime check for the type inside the function anyway.
2009-08-29 12:41:29 +02:00
Martin Nordholts 0e82aca27c app: Use gimp_object_name_free() instead of manipulating private data 2009-08-29 12:41:28 +02:00
Michael Natterer 35e67dae43 Don't allow dropping colors and patterns and don't allow pasting to groups 2009-08-29 12:27:57 +02:00
Michael Natterer 13b384e332 Don't allow dropping colors and patterns to group layers 2009-08-29 12:27:23 +02:00
Michael Natterer eb03413b49 Add separate check that prevents merging down to a group layer 2009-08-29 12:26:15 +02:00
Martin Nordholts 5383bf0dc7 app: Fix annoying typos in previous commit 2009-08-29 12:13:28 +02:00
Martin Nordholts cb94993f40 app: Clarify corner case uses of gimp_object_name_changed() 2009-08-29 12:12:08 +02:00
Michael Natterer 585a3fa6e4 Change PDB wrappers to check for "is group" separately
"lock-content" will be separate from "is-group" soon, so add separate
checks for groups. Also remove some checks that were added to make
wrappers invokable even though the group appeared locked.
2009-08-29 09:16:35 +02:00
Michael Natterer 074257bd37 Add gimp_pdb_item_is_not_group()
New function returns FALSE and sets an appropriate error if invoked on
a group item. Use it from gimp_pdb_get_vectors_stroke() because if we
ever get vectors groups, they will have no strokes.
2009-08-28 20:15:13 +02:00
Michael Natterer e979c08133 Start separating the logic for "locked" and "is group" again
The idea that group layers count as locked was a bad one, start adding
separate checks for group layers, and refuse to modify them with
distinct error messages.
2009-08-28 20:07:14 +02:00
Michael Natterer c0785cfc67 Remove all padding from the "visible" and "linked" toggles
Makes the layers, channels and path dialogs much more compact.
2009-08-28 11:11:19 +02:00
Michael Natterer 85885224c3 Also send double-clicks on the expander to GtkTreeView
Enables quickly expanding and collpasing of branches, instead of
disturbingly popping up the peoperties dialog.
2009-08-28 11:06:29 +02:00
Michael Natterer a302e084ab Rename some functions
- gimp_container_tree_view_prepend_toggle_cell_renderer() to
  gimp_container_tree_view_add_toggle_cell()

- gimp_container_tree_view_prepend_cell_renderer() to
  gimp_container_tree_view_add_renderer_cell()

because "prepend" is an implementation detail, "renderer" is obsolete,
and in the second case it's not "cell renderer" but really a "renderer
cell".
2009-08-28 10:59:27 +02:00
Michael Natterer b2a1583c2b Fix GimpContainerView::set_context() to really set all rows of a tree 2009-08-28 10:15:38 +02:00
Michael Natterer 1685388fd0 Fix set_view_size() here too so the layer mask previews are updated too 2009-08-28 10:07:15 +02:00
Martin Nordholts 5317ff7490 app: Make "All images" mean all images in the file dialog
Even though a user can only save to XCF in File->Save, the "All
images" filter shall show all images to allow a user to steal names
from non-XCF images and vice versa for File->Export, so make that
happen.
2009-08-28 08:21:20 +02:00
Martin Nordholts 2238b68d16 app: Add helper function gimp_file_dialog_process_procedure()
Add helper function gimp_file_dialog_process_procedure() to better
isolate logic in gimp_file_dialog_add_filters().
2009-08-28 08:21:20 +02:00
Martin Nordholts cf0db5c6bf app: Don't define stuff in the middle of a file 2009-08-28 08:21:20 +02:00
Michael Natterer 5f3721235e Fix GimpContainerView::set_view_size() implementation for actual trees 2009-08-27 23:21:40 +02:00
Sven Neumann 53aa877346 use G_FILE_TEST_IS_REGULAR instead of G_FILE_TEST_EXISTS
Keeps us from trying to load a directory as a data file.
2009-08-27 23:12:55 +02:00
Michael Natterer 6031800b90 Fix automatic size updates of nested groups (again!)
Make sure a group layer really emits all needed size change signals
when children get added and removed, so the group layer above it can
also update itself based on these signals. Spotted (again) by tobi.
2009-08-27 23:07:38 +02:00
Michael Natterer e0d062aa38 Show a "folder" icon instead of a preview for empty group layers 2009-08-27 22:24:53 +02:00
Michael Natterer 3a0168ee83 When removing a group layer, remove all its children from image->layer_stack 2009-08-27 22:10:36 +02:00
Michael Natterer 1accd760a3 Implement GimpDrawable::estimate_memsize()
Add the scaled sizes of all children and of the projection so the
scale dialog's size warning is correct again.
2009-08-27 19:43:45 +02:00
Michael Natterer ecacf6f0c3 Filter out child items from the list used to estimate the saled memsize 2009-08-27 19:41:14 +02:00
Michael Natterer f05c5ecfdc gimp_image_item_list_filter(): actually honor the passed parameters
Gah, I added these parameters for a reason, so do *not* remove all
child items if remove_children is FALSE.
2009-08-27 19:36:22 +02:00
Michael Natterer 19a168cb9d Mostly revert to the state before group layers
Now that group layers properly implement GimpItem::resize(), ::flip(),
::rotate() and ::scale(), we can go back to just transforming the
toplevel container of layers in the image. Left in and/or added some
special cases anyway, like when resizing sets of layers along with the
image is requested.
2009-08-27 19:31:55 +02:00
Michael Natterer cfaf6501e0 Remove outdated comment 2009-08-27 15:15:57 +02:00
Michael Natterer 4db124defa Don't forget to add the projection in GimpObject::get_memsize() 2009-08-27 14:26:57 +02:00
Michael Natterer 193a0b3bcf Use gimp_item_stack_get_item_iter(stack) instead of GIMP_LIST(stack)->list 2009-08-27 12:26:14 +02:00
Michael Natterer 8f7527616a Make the include guards match the filename 2009-08-27 12:06:09 +02:00
Michael Natterer cd70850990 When scaling a group layer, remove children that are scaled away
When a child's width or height becomes < 1, remove it rather than
trying to scale it to impossible dimensions.
2009-08-27 11:53:47 +02:00
Michael Natterer 2a8f29f00a Minor whitespace cleanup 2009-08-27 11:01:51 +02:00
Tor Lillqvist 347d8db5d1 Explicitly ask for a FT font map for the text tool
Call pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT)
instead of pango_cairo_font_map_new ().

This avoids a crash on Windows where the default font map is for
CAIRO_FONT_TYPE_WIN32. For the text tool we want freetype and
fontconfig -based fonts.

This requires using a cairo that includes the freetype backend, and a
pango that has been built against such a cairo. That is not yet the
case for the "official" Windows binaries of cairo and pango, but I
will make it so in the future.
2009-08-27 00:08:22 +03:00
Michael Natterer c4b9779161 Enable clicking on tree expanders
If we didn't click on any cell, but on empty space in the expander
column of a row that has children, let GtkTreeView process the button
press to maybe handle a click on an expander.
2009-08-26 20:25:30 +02:00
Michael Natterer 98123f3475 Add freeze_notify/thaw_notify around GimpDrawable::set_tiles() 2009-08-26 13:20:18 +02:00
Michael Natterer d442379d5e Change GimpProjectable::update to GimpProjectable:invalidate
The only purpose of this change is to avoid having the "update"
signal twice on GimpGroupLayer (from GimpDrawable and from
GimpProjectable). Switch back to normal g_signal_connect()
in the projection.
2009-08-26 13:06:55 +02:00
Michael Natterer ea33581451 Use gimp_image_set_size() instead of setting width and height manually
This also (really this time) fixes nested group layers. There were
cases when the outer group layer didn't properly resize itself because
gimp_drawable_set_tiles() on the inner group layer failed to emit
notify::width and notify::height.
2009-08-26 13:03:40 +02:00
Michael Natterer ce5d591336 Add lowlevel accessor gimp_item_set_size()
Sets the "width" and "height" properties and emits notifications and
"size-changed" if anything has changed. This in only to be used by
functions that actually resize the item, it does not scale/resize
anything.
2009-08-26 13:00:13 +02:00
Michael Natterer 9683af0d31 Include "gimppdb-utils.h" 2009-08-26 12:01:50 +02:00
Michael Natterer 6aadd0bbc9 Rename gimp_image_pick_correlate_layer() to gimp_image_pick_layer() 2009-08-25 23:18:34 +02:00
Michael Natterer fe84af9fd9 Don't forget to add added drawables' GeglNodes to the stack's GeglNode
I have no clue how this could work before, but fixing it fixes
projection of nested groups. The goat can be evil.
2009-08-25 23:10:31 +02:00
Michael Natterer d37dc64b16 Add GError reporting to gimp_image_merge_down()
- turn g_return_if_fail() of more complex conditions into errors.
- change PDB wrapper accordingly instead of adding a ton of conditions
  there.
2009-08-25 22:02:02 +02:00
Michael Natterer d91a89e157 Make "Merge down" work on trees and start fixing the rest of the merge code
* make internal merge functions aware of the container to merge and
  its parent layer.
* git rid of some cruft in gimp_image_merge_down().
* merge down works within one container (naturally) and needs:
  - the uppper layer not to be a group
  - the lower layer to be writable
* fix action sensitivity accordingly.
2009-08-25 21:26:14 +02:00
Michael Natterer 7a373152f9 Remove boolean variable that was only set and never used after 2009-08-25 20:00:30 +02:00
Michael Natterer 8a4d6c315f Enable "layers-resize" for group layers 2009-08-25 17:32:55 +02:00
Michael Natterer f812d09d1b Enable "layers-crop" for group layers 2009-08-25 17:30:50 +02:00
Michael Natterer 7a4ac0802c Implement GimpItem::resize()
Resize all children, but only crop them (don't enlarge them, unlike
when resizing normal layers).
2009-08-25 17:29:29 +02:00
Michael Natterer 764af4879e Revert almost all item tree related changed in this file
Don't recursively duplicate all items. Instead, just duplicate the
items in the toplevel image containers, because group items duplicate
their children correctly all by themselves.
2009-08-25 16:25:26 +02:00
Michael Natterer d873372262 Don't spoil the names of duplicated groups' children with "copy"s 2009-08-25 16:05:39 +02:00
Michael Natterer f61f435699 Filter out linked children of linked items to translate 2009-08-25 15:57:04 +02:00
Michael Natterer 6fa6aa2686 Filter out linked children of linked items to transform 2009-08-25 15:55:30 +02:00
Michael Natterer 86a76d6237 Skip group layers when transforming the entire image
Group layers update themselves when their children change, so simply
skip them when cropping, flipping, resizing, rotating or scaling the
image.
2009-08-25 15:46:53 +02:00
Michael Natterer cb1e3afba4 Add gimp_image_item_list_filter()
New function takes a GList of items as returned by
gimp_image_item_list_get_list() and can filter out items that:

- have lock_content set to TRUE.
- are children of items that are also in the list (to avoid
  transforming group items *and* their children, because
  the group items already do that for us).
2009-08-25 15:36:03 +02:00
Michael Natterer 40cf6fa62a Allow scaling of group layers even though they appear locked 2009-08-25 14:31:33 +02:00
Michael Natterer bdf01c6495 Fix gimp_group_layer_scale() to do the right thing
Scale all children in relation to the group layer's old and new size
and offset. The group itself will follow the childrens' sizes.
2009-08-25 14:26:26 +02:00
Michael Natterer 62c5b23aaf Add naive and wrong version of GimpItem::convert()
That code will fail badly when dropping layer groups between images of
different types, but will at least work between two RGB images.
2009-08-25 14:23:42 +02:00
Michael Natterer 71134c7f7d gimp_group_layer_duplicate(): insert children in the right order 2009-08-25 12:11:44 +02:00
Michael Natterer 6934a0d2eb Make sure all group layers' projections switch to GEGL with the main projection 2009-08-24 22:38:16 +02:00
Michael Natterer 1403db11ef Fix the layer-offset of the group layer's projection graph
Insert a gegl:translate node into the group layer's projection
graph. Produces identical results as the legacy projection now, but is
not yet switched on by checking View->Use Gegl.
2009-08-24 22:01:16 +02:00
Michael Natterer f65261c8ad Enable simple flip and rotate for group layers
Flipping horizontally and vertically as well as rotating by multiples
of 90° works fine now for group layers, enable it even though they
appear locked. It seems that group == locked idea is not as allmighty
as i thought :(
2009-08-24 20:29:37 +02:00
Michael Natterer 9fd204977d Implement GimpItem's transform methods
Add implementations for GimpItem::translate(), scale(), resize(),
flip(), rotate() and transform(). Simply transform all children, the
group layer will automatically update itself. Also transform the layer
mask.
2009-08-24 19:33:29 +02:00
Michael Natterer c8c6d77c35 Fix finalize() so it doesn't crash 2009-08-24 17:30:41 +02:00
Michael Natterer 4fa06d0405 Add a projection to GimpGroupLayer so we finally have a *visible* layer tree
Implement the GimpProjectable interface and keep a GimpProjection
around that projects the GimpDrawableStack of our children. Propagate
the childrens' "update" signals to our own "update" signal so our
parent projection picks up all changes.
2009-08-24 16:05:39 +02:00
Michael Natterer dd8a7740ab Honor the projectable's offset in the projection
Add/Subtract the projectable's offset whenever we go from coordinates
from our public interface (which are always image coordinates) and
coordinates in out internal tile pyramid (wihch always starts at 0,0).

The Gegl projection still needs an offset node that is missing.

Also, connect to the projectable's "update" signal using
g_signal_connect_closure_by_id() instead of simply g_signal_connect(),
so we really connect to the signal of the GimpProjectable interface
and not to the "update" signal of GimpDrawable (which is a conflict
that will happen on group layers).
2009-08-24 16:05:38 +02:00
Michael Natterer 0f668e411e Add an offset API to the GimpProjectable interface
Add GimpProjectable::get_offset() and gimp_projectable_get_offset()
which returns the offset of the projectable in image coordinates, so
we can have projections that act as a viewport onto things that live
in image coordinates.
2009-08-24 16:05:38 +02:00
Michael Natterer a451eb950c Use gimp_item_stack_get_item_iter() 2009-08-24 16:05:38 +02:00
Michael Natterer ffe1359d84 Add gimp_item_stach_get_item_iter()
Simply an accessor for GIMP_LIST (stack)->list.
2009-08-24 16:05:37 +02:00
Michael Natterer 2ec53512c5 Change local variable names from "layer" to "group" 2009-08-24 16:05:37 +02:00
Michael Natterer a136d86c54 Automatically adjust the size of group layers
Connect to size and offset of all children and resize/move the
group layer accordingly.
2009-08-23 23:00:32 +02:00
Michael Natterer e2ed81e310 Revert "Revert "Add a button to create a group layer to the layers dialog""
This reverts commit b72e5a35b1.
2009-08-23 20:27:47 +02:00
Michael Natterer 819abf2fa0 Override the "lock-content" property to default to TRUE 2009-08-23 20:02:36 +02:00
Michael Natterer 922375ceca g_return_if_fail() on attempts to set locks that can't be changed 2009-08-23 19:54:19 +02:00
Michael Natterer aa70c13fd6 Keep the PDB from changing locks that can't be changed 2009-08-23 19:51:59 +02:00
Michael Natterer af794539d8 Make the lock actions insensitive according to the new can_lock functions 2009-08-23 19:45:37 +02:00
Michael Natterer d6dd3ea39b Set the lock toggles insensitive if the resp. lock properties can't be changed 2009-08-23 19:45:37 +02:00
Michael Natterer d52d7e77b3 Add API to determine whether "lock" properties can ba changed
Add gimp_item_can_lock_content() and gimp_layer_can_lock_alpha() which
return TRUE unless the item is a grop (has children), because group
items will be considered to have lock_content always TRUE and
lock_alpha always FALSE.
2009-08-23 18:44:05 +02:00
Michael Natterer b141bcdb60 Minor plug-in sensitivity refactoring
* app/plug-in/gimppluginprocedure.[ch]
  (gimp_plug_in_procedure_get_sensitive): change GimpImageType
  parameter to GimpDrawable and do the type check internally.

* app/actions/plug-in-actions.c (plug_in_actions_update): pass the
  active drawable instead of its type.
2009-08-22 11:03:05 +02:00
Martin Nordholts ee8b53934b app: Use original layer names when importing multi-layered images
We have no reason to believe that the original layer names when
importing multi-layered images are not good enough, so stop adding the
filename as a prefix to the names.
2009-08-22 10:34:15 +02:00
Martin Nordholts b574ae9275 app: Name layers of imported files to filename
After having imported a single-layered image, rename the layer to the
file name.
2009-08-22 10:24:53 +02:00
Martin Nordholts 92df6ae6cd app: Introduce helper function file_open_get_layers() 2009-08-22 09:00:18 +02:00
Martin Nordholts 51cd8c2981 app: Only show 'File->Overwrite' if the source URI has an exporter 2009-08-21 21:40:32 +02:00
Michael Natterer 9040afc0fc Set BAD cursors if the active drawable is locked 2009-08-21 19:34:59 +02:00
Michael Natterer ed2c002fd8 Make the checks in GimpTool::initialize() work reliably
Set tool->display and tool->drawable to NULL in button_release()
so initialize() is actually called before each button_press().
2009-08-21 19:04:45 +02:00
Michael Natterer c9c28be9df Make the checks in GimpTool::initialize() work reliably
Set tool->display and tool->drawable to NULL in button_release()
so initialize() is actually called before each button_press().
2009-08-21 18:27:50 +02:00
Michael Natterer cb8a611e93 Don't PDB-modify locked vectors 2009-08-21 18:06:58 +02:00
Michael Natterer 45aa584b3e Make all vectors PDB manipulation undoable 2009-08-21 17:57:56 +02:00
Michael Natterer 345f88ab04 Make sure we don't PDB-modify locked text layers
* app/pdb/gimppdb-utils.[ch]: add "gboolean writable" to
  gimp_pdb_layer_is_text_layer() because that's called on
  all text layers anyway.

* tools/pdbgen/pdb/text_layer.pdb
* tools/pdbgen/pdb/vectors.pdb: pass TRUE if we want to modify the layer.

* app/pdb/text-layer-cmds.c
* app/pdb/vectors-cmds.c: regenerated.
2009-08-21 14:33:12 +02:00
Michael Natterer 256ac5e62e Add "lock_content" PDB getters and setters for drawables and vectors 2009-08-21 14:30:41 +02:00
Michael Natterer b929a7a67c Don't allow to drop stuff to locked drawables 2009-08-21 14:10:22 +02:00
Michael Natterer a7efe42870 Use a GtkToggleButton instead of GtkCheckButton for "Grab event"
A GtkToggleButton doesn't have to be told that it has no indicator,
because it doesn't have one in the first place.
2009-08-21 13:53:34 +02:00
Michael Natterer b793146bde Remove redundant call to gtk_toggle_button_set_mode()
No need to call that function on an actual GtkToggleButton, because
they never have check indicators anyway.
2009-08-21 13:52:29 +02:00
Michael Natterer b277454760 Don't allow to drop stuff to locked drawables 2009-08-21 13:50:07 +02:00
Michael Natterer cca194ed04 Don't transform the item if it was locked while using the tool
Add additional check to gimp_transform_tool_doit() so it won't
transform an item that was locked while we were adjusting the
transform.
2009-08-21 12:07:55 +02:00
Michael Natterer 7b5e176eee Really don't paint on locked drawables
Remove GimpTool::initialize() implementation again and check for the
drawable being locked in GimpTool::button_press() so we can't paint if
the tool has been used before on the same drawable when it was
unlocked.
2009-08-21 11:55:18 +02:00
Michael Natterer e95b5d9f72 When cropping the active layer, error out if there is none or it is locked 2009-08-20 22:43:01 +02:00
Michael Natterer 0953146be1 Check if there is an active layer if active_layer_only is TRUE 2009-08-20 22:41:49 +02:00
Michael Natterer de409ea52a Fix sensitivity of the "Merge down" action
The command doesn't simply need the next layer in the stack, it
needs the next *visible* layer.
2009-08-20 22:22:17 +02:00
Michael Natterer 3309c35f18 Fix typo: defualt -> default (spotted by Alexia) 2009-08-20 22:11:33 +02:00
Michael Natterer 35a7052b8d Add actions and callbacks to toggle "lock-content" on drawables and vectors 2009-08-20 21:19:43 +02:00
Michael Natterer 28061c23f1 Don't modify locked items from PDB wrappers
* app/pdb/gimppdb-utils.[ch]: add "gboolean writable" parameter to
  gimp_pdb_item_is_attached() because this function is called on
  almost all items where a check for locked is needed.

* tools/pdbgen/pdb/*.pdb: pass writable = TRUE in all checks for items
  that are modified. Add explicit calls to gimp_pdb_item_is_writable()
  in some rare cases.

* app/pdb/*-cmds.c: regenerated.
2009-08-20 20:47:01 +02:00
Michael Natterer b5c3e5a6b6 Also copy "lock_content" when duplicating an item 2009-08-20 19:34:30 +02:00
Michael Natterer 774850c46f Add gimp_pdb_item_is_writable() which sets an error if the item is locked 2009-08-20 18:50:55 +02:00
Michael Natterer 7262e45df9 Made modifying actions insensitive when the active item is locked
Use the term "writable" in the code as a shortcut for "there is an
active item and it is not locked".
2009-08-20 17:11:31 +02:00
Michael Natterer ec6600a0b3 Refuse to edit locked drawables
Check whether the drawable to edit is locked in GimpTool::initialize()
and bail out with an appropriate error if it is. This currently
prevents cloning from locked drawables, will fix that later.
2009-08-20 17:05:23 +02:00
Michael Natterer ee5b8c6552 Make the appearance of the "lock content" toggle configurable
* app/widgets/gimpitemtreeview.[ch]: add class members for the lock
  content button's icon, tooltip and help_id and use them when
  creating the button. Create the button in constructor() instead of
  init() so we have access to our real class structure without the
  need for a custom get_type() function.

* app/widgets/gimpdrawabletreeview.c: configure the button as "Lock pixels".

* app/widgets/gimpvectorstreeview.c: configure it as "Lock path strokes".
2009-08-20 12:50:40 +02:00
Michael Natterer ff31975305 Keep the lock buttons at the end of the options vbox 2009-08-20 12:33:01 +02:00
Michael Natterer 86ad1ff70e Add a "lock content" toggle that needs some more refinement hacking 2009-08-19 21:30:48 +02:00
Michael Natterer a16bfe749f Fix a comment 2009-08-19 21:30:48 +02:00
Michael Natterer fb1a672546 Bug 61019 - add a 'lock' flag per layer to protect it
Took patch from Martin Nordholts and ported it to add a "lock-content"
property, signal and API in the same way as it's done for "visible"
and "linked".
2009-08-19 21:30:48 +02:00
Michael Natterer f7ba1d1f2e Add missing blank line after the vectors group of functions 2009-08-19 21:30:47 +02:00
Michael Natterer 7f94f3213b Pack boolean members into a bitfield to save two integers per item 2009-08-19 21:30:47 +02:00
Michael Natterer 5260a535e5 Use the new option box API of GimpItemTreeView, remove own code for it 2009-08-19 21:30:47 +02:00
Michael Natterer 36530dd8be Add generic code for boxes of options to GimpItemTreeView
- new API to add widgets to a box of options, for stuff like the paint
  mode menu and opacity scale. Set it sensitive automatically and
  update its spacings in GtkWidget::style_set().
- new API to get a hbox for "lock" toggles, for stuff like lock
  pixels and lock alpha.
2009-08-19 21:30:47 +02:00
Sven Neumann d655f03607 correct a comment 2009-08-19 16:59:15 +02:00
Martin Nordholts 966b81992b app: Add "FG to BG (Hardedge)" gradient
Add internal gradient "FG to BG (Hardedge)" based on gradient by
Saul Goode. See bug #589371.
2009-08-15 11:58:08 +02:00
Martin Nordholts 98aaae7cac app: Clean up internal gradient construction
Move code that is not shared between all gradients out of
gimp_gradients_add_gradient() and group the code with comments.
2009-08-15 11:48:36 +02:00
Martin Nordholts b72e5a35b1 Revert "Add a button to create a group layer to the layers dialog"
This reverts commit d2e1f2ac74. If we
keep the layer group button in 2.7.0 people will expect layer groups
to fully work and get mad when that is not the case. We can enable it
again after the release.
2009-08-15 09:41:20 +02:00
Martin Nordholts 8414cf77b0 app: Change default brush to "Round Fuzzy" 2009-08-14 19:57:06 +02:00
Martin Nordholts 1dbf732943 app: Add temp_buf_dump()
Add temp_buf_dump() which can be used to dump TempBufs to disk for
easier analysis, for example with GIMP.
2009-08-14 19:23:01 +02:00
Martin Nordholts 3d0c025a51 app: Support obsolete data resources
Add support for having obsolete data resources. An obsolete resource
is not shown in the UI or managed in any way, but it will be
considered when plug-ins requests resources. This in order to maintain
backwards compatibility for plug-ins.
2009-08-13 21:54:00 +02:00
Martin Nordholts 4df574acd6 Use separate shortcuts for 'File->Export to' and 'File->Overwrite'
Since Ctrl+E previously meant something harmless, don't use that
keyboard shortcut for the destructive command 'File->Overwrite'. We
still keep Ctrl+E for 'File->Export to' though, and we do this by
having 'File->Overwrite' as a separate GtkAction with its own keyboard
shortcut slot.
2009-08-13 21:53:23 +02:00
Sven Neumann 60f11e18ae Bug 591017 – Tablet pan is not working as fast as it should
Use motion event compression for display scrolling.
2009-08-13 20:24:14 +02:00
Michael Natterer ae6828c1cc Add more precondition checks to vectors import functions
(gimp_vectors_import_file)
(gimp_vectors_import_buffer): check the parent item the same
way gimp_image_add_vectors() does.
2009-08-10 13:28:14 +02:00
Michael Natterer d53aad9ffb Use gimp_image_get_layer_list() instead of layer_iter(), some cleanup 2009-08-10 12:15:54 +02:00
Michael Natterer 28aa03e525 Move gimp_image_raise_layer_to_top() around
Reorder functions so layer reorder function are in the same
order as channel and vectors ones.
2009-08-10 00:45:25 +02:00
Michael Natterer dc53e81705 Make sure items passed as "parent" are actually group items
Add precondition checks to all image add() and reorder() functions
2009-08-10 00:45:24 +02:00
Martin Nordholts 6e483e95b2 Remove web-browser gimprc option
The web-browser plug-in uses gtk_show_uri() now.
2009-08-08 15:26:34 +02:00
Martin Nordholts b1e969cc6d app: Fix typo gimpgoruplayer 2009-08-08 15:26:34 +02:00
Martin Nordholts 2591d7e368 app: Don't use plug-in-web-browser in About Dialog
The GtkAboutDialog is implemented with a GtkLinkButton which uses
gtk_show_uri(). We don't need to add any hooks.
2009-08-08 14:43:33 +02:00
Martin Nordholts b9b05e7d39 app: Don't reuse the GeglProcessor
Don't reuse the GeglProcessor as it can't handle dirty rects when
painting in GIMP, and this makes it harder to make GEGL-wise progress
in other parts of GIMP.
2009-08-08 07:03:15 +02:00
Michael Natterer 4e9f198831 Fix dropping an item into an empty group item immediately above it 2009-08-07 09:46:16 +02:00
Michael Natterer d2e1f2ac74 Add a button to create a group layer to the layers dialog
Will probably hide that button again, or make it only appear
when some environment variable is set until the stuff works
completely.
2009-08-06 21:34:54 +02:00
Michael Natterer d059f239ac Make reordering items between groups work in the core and the UI
* app/core/gimpimage.[ch]: rename all gimp_image_reposition_foo() to
  gimp_image_reorder_foo() and added "new_parent" parameters. Factor
  out calculating of the item's new container and index to a utility
  function.

* app/core/core-enums.[ch]: rename the REPOSITION undos to REORDER.

* app/core/gimpimage-undo-push.[ch]
* app/core/gimpchannelpropundo.[ch]
* app/core/gimplayerpropundo.[ch]
* app/vectors/gimpvectorspropundo.[ch]: change accordingly. Remember
  the old parent item in all item reorder undos.

* app/widgets/gimpitemtreeview.h: change GimpReorderItemFunc prototype
  accordingly.

* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c (class_init): follow image API
  name changes.

* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_drop_viewable):
  implement reordering of items between groups.

* app/widgets/gimpcontainertreeview.c
  (gimp_container_tree_view_reorder_item): fix to reorder the item
  within its level of the tree (unrelated to above changes, but needed
  to make them work).
2009-08-06 18:43:57 +02:00
Michael Natterer e8bd830f48 Add action and callback for adding a group layer (works but is not used yet) 2009-08-06 18:37:54 +02:00
Michael Natterer b2c7c4f61b Add infrastructure for dragging things between branches of a tree
* app/widgets/gimpcontainertreeview-dnd.c
  (gimp_container_tree_view_real_drop_possible): support DND within a
  tree and make sure a group item is not dropped into itself.

* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_drop_viewable):
  implement intra-container reordering within all branches; print a
  message for inter-container reordering because that's not yet
  implemented in the core.
2009-08-05 18:57:08 +02:00
Michael Natterer 8cda7dca56 Add gimp_viewable_is_ancestor()
The new functions figures if one viewable is another's parent or
grandparent or grandgrand... Note that unlike gtk_widget_is_ancestor(),
this function has its parameters in the right order.
2009-08-05 14:17:07 +02:00
Sven Neumann 5c630f4ad8 Change the default for the 'trust-dirty-flag' gimprc option back to FALSE
It appears that there are good reasons why a user might want to save
a clean image, for example because the file has been deleted or damaged.
2009-08-04 23:20:49 +02:00
Sven Neumann 57ceb04b32 Only add the language entry if the iso-codes package is available 2009-08-04 22:46:02 +02:00
Sven Neumann 516735f10c add a blurb to the GimpText:language property 2009-08-04 22:46:02 +02:00
Sven Neumann 5febc2e417 Add functions to get the ISO 639-1 language code from GimpLanguageEntry
and to set the language using this code.
2009-08-04 22:46:01 +02:00
Sven Neumann bf8885f637 Bug 132509 – Allow to choose language in text tool
Remove the commented out language entry from the text editor and add
one to the text tool options instead. Work in progress...
2009-08-04 22:46:01 +02:00
Sven Neumann e2dbd56c5a app: add stubs for gimp_prop_language_entry_new() 2009-08-04 22:46:01 +02:00
Michael Natterer 1b806e5fb6 Set handler variables to NULL after disconnecting them 2009-08-04 22:43:53 +02:00
Michael Natterer 86239d3b55 Use GimpTreeHandler to connect to all layers in the image 2009-08-04 22:41:49 +02:00
Michael Natterer 6a64de7f48 Include "core/gimptreehandler.h" 2009-08-04 22:32:24 +02:00
Michael Natterer 6425f5404d Use GimpTreeHandler to connect to all vectors in the image 2009-08-04 22:06:28 +02:00
Sven Neumann 2d5792d1da app: increase the timeout for temporary status-bar messages to 8 seconds 2009-08-04 20:29:07 +02:00
Michael Natterer 57f44b89e8 Use GimpTreeHandler to connect to all items' "visible" and "linked" callbacks
Makes the visibility and link buttons work for all items in a tree.
2009-08-04 20:20:09 +02:00
Michael Natterer 00682ee7cf Replace the hash table of container handlers by a single GimpTreeHandler 2009-08-04 20:19:13 +02:00
Michael Natterer aaab0d40a9 Add GimpTreeHandler, a signal connection helper for object trees
A tree-enabled replacement for gimp_container_add,remove_handler(),
slightly more sane to a degree that makes me think it could replace
GimpContainer's own handler stuff. Public API consists of two
function:

- gimp_tree_handler_connect() which connects recursively to a specific
  signal of all items in a container tree.

- gimp_tree_handler_disconnect() is just a wrapper around unrefing the
  handler, but makes sure that dispose() is really executed (which
  actually disconnects things).
2009-08-04 20:12:34 +02:00
Michael Natterer e8c6e3dbd3 Expand the treeview to newly inserted items 2009-08-04 09:06:03 +02:00
Michael Natterer 3c0df851d0 Make the preview column the expander column 2009-08-04 00:21:07 +02:00
Michael Natterer ea7c07647b Some group layer fixes
- call new group layers "Group Layer" by default.
- when duplicating, don't forget to set the duplicated childrens'
  parent viewable.
2009-08-04 00:14:53 +02:00