Commit Graph

13681 Commits

Author SHA1 Message Date
Michael Natterer c56f0568c5 pdb: remove deprecated drawable procedures
and do the same stuff as for vectors procedures below.
2010-09-15 21:43:03 +02:00
Michael Natterer ddd3464706 pdb: forgot a few in the last commit 2010-09-15 21:26:31 +02:00
Michael Natterer ec36151277 pdb: don't have compat aliases for procedures which are deprecated themselves
Replace them by aliases for the new procedures instead.
2010-09-15 21:22:53 +02:00
Michael Natterer 548d2e041d pdb: clean up gimp-layer-group-new
There is no need to wrap it with a function with identical
signature. Also move it next to the other layer-new functions.
2010-09-15 21:18:47 +02:00
Michael Natterer 97b35ab332 pdb: remove deprecated vectors procedures
that have a replacement with identical signature. Register them as
compat aliases with the PDB instead. Implement the libgimp API
manually, calling the new item functions.
2010-09-15 21:13:22 +02:00
Michael Natterer f1cf31f9da app: don't pass default names to gimp_drawable_configure()
because gimp_item_configure() uses the default name from GimpItemClass
anyway if a NULL name gets passed.
2010-09-15 16:36:16 +02:00
Barak Itkin 2f62347bf6 pdb: Add a more detailed description to the gimp_image_insert functions 2010-09-15 00:02:28 +02:00
Barak Itkin 805a971d99 pdb: add the procedure gimp_layer_group_new 2010-09-14 22:41:56 +02:00
Martin Nordholts 3c2f0809e3 app/tests: Increase GIMP_UI_WINDOW_POSITION_EPSILON
Increase GIMP_UI_WINDOW_POSITION_EPSILON, we had a nightly build that
failed with

  assertion failed ((int)abs (y_before_hide - y_after_show) <=
                    GIMP_UI_WINDOW_POSITION_EPSILON): (21 <= 10)

so appearently we need to be more liberal.
2010-09-12 18:37:00 +02:00
Sven Neumann 9c8736a56f app: formatting 2010-09-11 23:02:15 +02:00
Sven Neumann 22d5dc9752 app: formatting 2010-09-11 21:34:58 +02:00
Simon Budig 9ffaf94170 fix path import of polylines/polygons 2010-09-11 01:51:13 +02:00
Michael Natterer 7f9a4d51f7 app: get rid of using gdk_draw to construct bitmap cursors
At the same time, get rid of bitmap cursors alltogether. Instead
(because it looks ugly to have GDK convert RGBA cursors into bitmaps
for old X servers), add the bitmaps as proper PNGs and simply use them
as RGBA cursors.
2010-09-10 19:12:52 +02:00
Michael Natterer 3b0c4e2e5e app: port a gdk_draw_rectangle() in GimpComboTagEntry to cairo 2010-09-10 13:47:04 +02:00
Alexia Death d9932ff159 app: Fix potential segfault caused by accessing empty history buffer 2010-09-09 21:56:56 +03:00
Michael Natterer 154eb3d307 app: port the splash's background pixmap drawing to cairo 2010-09-09 03:32:45 +02:00
Michael Natterer fd14818035 app: port GimpDisplayShell transform preview drawing to cairo 2010-09-08 19:32:22 +02:00
Michael Natterer e8f4d4b449 pdb: add transform API for items
Works for all item types, and has much less functions and parameters
than the drawable transform API because it uses the new context
states. Untested and not finished!
2010-09-08 02:48:37 +02:00
Michael Natterer 8b38bde642 app: remove the "auto_center" params from gimpdrawable-transform.[ch]
Instead, add utility functions that calculate the centers for rotate
and flip and use them where we used to pass "auto_center". This looks
pretty much poinless, but a commit will follow that makes it look
better...
2010-09-07 23:43:18 +02:00
Michael Natterer 095ae5cc9b app: move mask_bounds() and mask_intersect() from GimpDrawable to GimpItem
There is nothing drawable-specific in there, and having them on
GimpItem enables some simplifications, esp. in upcoming PDB
wrappers. None of these refactorings is in this commit though.
2010-09-07 21:30:46 +02:00
Sven Neumann 178aa9c6dc app/tools: fix alternative button order 2010-09-07 20:39:45 +02:00
Michael Natterer 24b6c27e42 app: use gimp_drawable_mask_intersect() instead of mask_bounds() 2010-09-07 17:43:39 +02:00
Michael Natterer df1575234c app: make the code in gimp_drawable_mask_intersect() a bit more readable 2010-09-07 17:08:54 +02:00
Michael Natterer bdc2d4520b app: make sure to always show error messages returned by plug-ins
gimp_plug_in_handle_proc_return(): if there is no plug-in main loop
running (the plugin was running asynchronously from a menu), show the
plug-in's error message here, because nobody else will show it
otherwise.
2010-09-07 16:21:40 +02:00
Michael Natterer 23aaf69779 pdb: add a lot of state for a new item-based transform API
interpolation, transform-direction, transform-resize, transform-recursion
2010-09-07 02:33:13 +02:00
Sven Neumann d96b491050 Update use of Pango API and bump required version to 1.22.0
Uodate Pango required version and stop using the deprecated
pango_cairo_font_map_create_context(). Compile with
PANGO_DISABLED_DEPRECATED for pango < 1.30.
2010-09-07 00:53:17 +02:00
Sven Neumann 2cbf8a7c96 pdb: mention gimp_edit_fill() in the gimp_drawable_fill() docs
The gimp_drawable_fill() already mentioned the bucket fill tool.
However the procedure that the developer is most likely looking
for is gimp_edit_fill(), so mention that as well.
2010-09-06 23:19:00 +02:00
Sven Neumann 9486971f07 pdb: the new gimp-image-insert procedures should accept no parent
Allow to pass -1 as parent parameter to the newly added
gimp-image-insert procedures by adding the 'none_ok' flag.
2010-09-06 22:54:53 +02:00
Michael Natterer d0e55640ec pdb: deprecate gimp_image_add_layer,channel,vectors() 2010-09-06 00:15:40 +02:00
Michael Natterer 9e0dccec73 pdb: update docs to mention the new insert procs instead of the add ones 2010-09-06 00:03:29 +02:00
Michael Natterer a547c5d200 pdb: add gimp_image_insert_layer,channel,vectors()
which all take "parent" parameters and allow to insert items in a
tree. We don't have channel or vectors trees (yet) but API symmetry is
more important here than a currently useless parameter.
2010-09-05 23:56:35 +02:00
Michael Natterer 8ab4fbcf28 pdb: add context procedures for the new antialias and feather properties 2010-09-05 23:13:42 +02:00
Michael Natterer e7475c1d52 pdb: add new procedure gimp-item-to-selection
and deprecate all old to-selection APIs. The new procedure uses the
newly added GimpPDBContext properties, so it only has an "operation"
parameter.
2010-09-05 22:38:07 +02:00
Michael Natterer cbcb7515f0 app: increase max value of feather-radius properties to 1000.0 2010-09-05 22:34:24 +02:00
Michael Natterer 2066545b91 app: add GimpPDBContext which holds more state available to procedures
Initially contains antialias, feather and feather radius for the
upcoming gimp-item-to-selection preocedure. Keeping states in the
context reduces the number of parameters of procedures, and both the
state API and the API using the states can be changed/deprecated
independently. Make sure that all procedures and all plug-ins get
GimpPDBContexts instead of plain GimpContexts passed.
2010-09-04 22:17:01 +02:00
Martin Nordholts 3e60cacfd5 app/core: Init bestcolor in gimpimage-convert.c
Init bestcolor in gimpimage-convert.c to fix warning about "may be
used uninitialized in this function".
2010-09-03 08:52:26 +02:00
Martin Nordholts 1801fc70ab app: Use `git describe` for verbose version
Use `git describe` for verbose version, it provides more info than
just the commit ID, and it feels sane to use an existing command for
this. Note that the commit ID is prefixed with 'g'.
2010-09-02 21:28:42 +02:00
Tor Lillqvist 8a8140986f Include cairo.h from correct path 2010-09-02 19:10:10 +03:00
Tor Lillqvist 24386abb3b Increase safety on Windows
Call SetDllDirectory() to reduce risk of DLL hijacking, and call
SetProcessDEPPolicy() to reduce risk of rogue code execution.
2010-09-02 18:40:50 +03:00
Michael Natterer bfce429d24 app: some minor fixes in GimpTextStyleEditor
- initialize all of the color strust in init().
- simplify font_changed().
2010-09-02 00:42:59 +02:00
Michael Natterer ad819263af Bug 620674 - Adding support for multi-colored text layer
Apply slightly modified patch from Barak Itkin that adds colors for
text spans plus GUI to edit these colors.
2010-09-02 00:20:04 +02:00
Michael Natterer 3759b3f0d1 app: render the text layout directly into the layer's pixels
instead of using a mask. Enables color tags. Set the default color
from the text object using a pango color attibute and factor out
GimpTextLayout attribute setting into a utility function.
2010-09-01 23:30:40 +02:00
Sven Neumann 813ee3de88 app: port layout drawing to cairo 2010-08-31 22:59:34 +02:00
Martin Nordholts 0dc4b5de72 Fix a bunch of warnings 2010-08-31 22:46:36 +02:00
Michael Natterer ab852d7409 pdb: add proper error messages for gimp_image_reorder_item() 2010-08-31 17:07:27 +02:00
Michael Natterer b24de26791 libgimp: add gimp_image_reorder_item() for arbitrary reordering in a tree 2010-08-31 11:16:41 +02:00
Michael Natterer 4e2289f736 libgimp: add API to access item groups
A layer tree can be traversed completely now. Tree manipulating
functions still missing.
2010-08-28 18:49:15 +02:00
Michael Natterer 274f210e4c app: remove obsolete includes 2010-08-28 15:33:25 +02:00
Michael Natterer 02abdff8aa app: move the wilber drawing functions to gimpcairo.c 2010-08-28 15:30:02 +02:00
Michael Natterer c0e475e7e2 app: add comment about cairo_t and double buffering 2010-08-28 11:44:11 +02:00
Michael Natterer d1393686ab app: move creating of the cairo_t to gimp_display_shell_canvas_expose()
and pass it down to the drawing functions.
2010-08-28 00:09:31 +02:00
Michael Natterer f0c40d3717 app: port GimpDisplayShell image drawing to cairo 2010-08-27 23:15:25 +02:00
Michael Schumacher 90655d8744 Use $(GIMP_APP_VERSION) in resource object file name 2010-08-27 23:13:34 +02:00
Michael Schumacher 9781cf1523 Bug 574018 - Add a manifest to executables
This step moves the %.rc.o pattern rule to a small include file in the
build/windows/ directory. Michael Natterer suggested this approach in
order to minimize the changes done to each executable's Makefile.am.
2010-08-27 21:31:38 +02:00
Michael Natterer 0d35e8de6d libgimp: add item based API for positions (raise, lower etc.)
and deprecate the resp. functions for layers, channels and vectors.
2010-08-27 16:11:06 +02:00
Sven Neumann ac33ead19d app/widgets: plug memory leak 2010-08-27 15:13:49 +02:00
Michael Natterer 9c63f3d4f1 app: remove gimp_display_shell_draw_selection_segments()
and move its code into selection_render_mask().
2010-08-27 15:03:03 +02:00
Michael Natterer f260cd766e app: add gimp_cairo_add_segments()
which adds an array of GdkSegments to the current path, and use it in
gimpdisplayshell-draw.c instead of duplicating the code three times.
2010-08-27 14:58:43 +02:00
Michael Natterer f4f1c563a2 app: don't include "gimpcanvas.h" any longer 2010-08-27 14:52:27 +02:00
Michael Natterer 3e1b14fd1a app: add widgets/gimpcairo.[ch] for cairo utility functions
and move the stipple pattern creation function there.
2010-08-27 14:41:30 +02:00
Michael Schumacher 82dca2ecf4 Bug 574018 - Add a manifest to executables
Eventually all executables will have the manifest and version resources
linked. In this initial step, the current resources are moved from the
app/ directory to a global build/windows directory.
2010-08-26 22:10:07 +02:00
Sven Neumann b7b93d3d7b app/display: add some const qualifiers 2010-08-26 21:02:47 +02:00
Michael Natterer a6ce99afe0 app: remove point drawing API from GimpCanvas, it's not used any longer 2010-08-26 21:01:21 +02:00
Michael Natterer be2bd189cd app: completely switch to cairo-drawing the selection
and remove all old selection drawing code. Thanks to Benjamin Otte for
pointing out the right optimization.

Also fixes bug #479875 - performance problem drawing a complex selection.
2010-08-26 20:52:52 +02:00
Michael Natterer d745ab3871 app: move the GIMP_CURSOR_SIZE define to a single place in the right header 2010-08-26 19:13:49 +02:00
Martin Nordholts fa6eb03fb2 app/tests: Add 'paintbrush_is_standard_tool' regression test
Add 'paintbrush_is_standard_tool' regression test to prevent bug
624177 from happening again.
2010-08-26 19:05:57 +02:00
Michael Natterer 98ee5e14a2 app: forgot to remove some disabled code 2010-08-26 18:21:04 +02:00
Michael Natterer 58db8a3ef0 app: port GimpDisplayShell selection drawing to cairo
but keep the old code around because it's much faster. The new code is
enabled by defining the CAIRO_SELECTION environment variable.
2010-08-26 18:09:33 +02:00
Sven Neumann f1d89f712d Bug 626446 - segfaults when started with -i argument
We don't need a standard tool-preset object, so just remove the
code that was copied and pasted from other GimpData objects.
Fixes the crash on startup in non-interactive mode.
2010-08-25 21:47:22 +02:00
Michael Natterer cd192adf09 app: undo some of the previous refactorings and keep using GdkSegment
It's not going to be deprecated, so there is no harm in using it; get
rid of all the added _old() functions too.
2010-08-25 21:21:16 +02:00
Michael Natterer d73f088408 app: move the calls to cairo_translate() out of gimpdisplayshell-style.c
and keep them next to the drawing code so it becomes clear why we use
pixel centers in these cases.
2010-08-25 13:01:12 +02:00
Michael Natterer 3f6bb75129 app: pass transformed segments to gimp_display_shell_draw_layer_boundary()
and duplicate quite some code in the spirit of the previous commit
(rename stuff using GdkSegment to _old() and add new functions that
return arrays of BoundSegs, for the lack of a nicer struct). This is
all very ugly and will change.
2010-08-25 01:58:00 +02:00
Michael Natterer 3127d36216 app: rename gimp_display_shell_transform_segments()
to gimp_display_shell_transform_segments_old() as step one
of porting selection drawing to cairo.
2010-08-25 01:37:19 +02:00
Michael Natterer 4e0925a67c app: port GimpDisplayShell layer boundary drawing to cairo
The boundary is temporarily kept around as both BoundSeg and
GdkSegment arrays now, but this uglyness will go away once porting to
cairo is complete.
2010-08-24 18:07:31 +02:00
Michael Natterer b5e49426df app: forgot to remove debug output in xcf_save_choose_format() 2010-08-24 18:04:49 +02:00
Michael Natterer 0d39da7ce8 app: s/num_segs/n_segs/ 2010-08-24 17:36:42 +02:00
Michael Natterer bb40aef9bf Bug 626492 - XCF version not increased when new layers are in layer group
Set the XCF version to 3 when saving an image with layer groups and
add a version 3 loader entry.
2010-08-24 14:04:31 +02:00
Michael Natterer 8fc5fd6c99 app: whitespace and formatting cleanup 2010-08-24 13:43:31 +02:00
Michael Natterer ea5acef4a5 app: remove redundant call to gimp_display_shell_scroll_get_render_start_offset() 2010-08-23 22:18:03 +02:00
Michael Natterer 18d3882c5c app: port GimpDisplayShell pen drawing to cairo 2010-08-23 21:59:27 +02:00
Michael Natterer 3a1ba90507 app: port GimpDisplayShell cursor drawing to cairo
Also add code to invalidate the new cursor location in
gimp_display_shell_update_cursor(), which is needed with
the new manual double buffering code.
2010-08-23 20:39:22 +02:00
Barak Itkin 6411f5e327 app: Add a better tooltip to "Save a Copy" (see Bug 588097) 2010-08-23 16:10:39 +03:00
Sven Neumann 3d6eff1d49 app: minor formatting changes and some const qualifiers 2010-08-22 21:50:18 +02:00
Martin Nordholts 8d0be04e51 app/base: Add gtk-doc to pixel_region_init() 2010-08-21 12:28:24 +02:00
Martin Nordholts 3a447213a9 app/tests: Add layer group regression testing for XCF write and read 2010-08-21 11:14:20 +02:00
David Gowers 1d7dd157e2 Bug 367388 - Small/percentage adjustment actions for tool-value and tip-sizes
Implement actions for relative adjustment of tool values and brush
sizes.
2010-08-20 21:11:16 +02:00
Martin Nordholts 92d0b22653 app: Fix translation, "region_select" => "selection" 2010-08-17 19:08:33 +02:00
Martin Nordholts 9bd423994d app: Make Alt-Click on layer thumbnail in Layers dockable discoverable
Make Alt-Click on layer thumbnail in Layers dockable discoverable, at
least in theory, by adding this info to the menu item tooltips.
2010-08-17 18:59:04 +02:00
Martin Nordholts a0dc12a0f3 Remove "Text to Selection" actions
Remove "Text to Selection" actions. They were added to make the
feature more discoverable. But we should make the original "Alpha to
selection" feature more discoverable, not treating text layers in a
special way where it's not needed.
2010-08-17 18:59:04 +02:00
Martin Nordholts fa441e8d5f app: Refer to splash screen as splash screen, not startup window 2010-08-17 18:59:04 +02:00
Martin Nordholts 876e99fdd0 app: Rectangle tool: Allow 'size' separators in 'aspect' and vice versa
In the Rectangle tool options, allow 'Fixed: Size' separators in
'Fixed: Aspect ratio' and vice versa, no point in being strict.
2010-08-16 22:00:06 +02:00
Michael Natterer 1d1ff1fedd app: port GimpDisplayShell sample point drawing to cairo
Same disclaimer about tool uglyness applies here. Will be fixed.
2010-08-12 13:13:15 +02:00
Michael Natterer 922c330bec app: port GimpDisplayShell guide drawing to cairo
The cairo_t code in GimpMoveTool is still disgusting. This probably
needs some GimpTool API that creates a cairo_t for tools.
2010-08-12 00:51:58 +02:00
Michael Natterer 0985274e8c app: don't call scale functions on an empty display shell 2010-08-12 00:32:34 +02:00
Michael Natterer 03ad3f0027 app: reorder parameters in new style API 2010-08-12 00:09:05 +02:00
Michael Natterer 002003a2ea app: add new files gimpdisplayshell-style.[ch]
which contains functions to set styles on a cairo_t.
2010-08-11 23:47:46 +02:00
Michael Natterer a6d7542c56 app: simplify some GimpDisplayShell drawing code 2010-08-11 15:01:49 +02:00
Michael Natterer 529ce40a5d app: port GimpDisplayShell grid drawing to cairo 2010-08-11 13:16:55 +02:00
Michael Natterer fe72f5985b app: reduce code duplication in gimpimage-duplicate.c 2010-08-08 18:00:08 +02:00
Michael Natterer 1ba9de4567 Bug 620646 - Little defect about duplication of images
Add a dedicated function to duplicate the floating selection and
remove all the evil floating selection code from all other
functions. The new function correctly duplicates floating selections
on channels and layer masks and is also aware of layer groups.
2010-08-08 17:50:08 +02:00
Michael Natterer b2642272a4 app: add gimp_item_stack_get_item_by_path()
which finds an item by its path as returned by gimp_item_get_path().
2010-08-08 17:31:39 +02:00
Michael Natterer 3762e03bf6 Require cairo >= 1.8.0 and add a cairo sanity check to app/sanity.c 2010-08-08 16:49:50 +02:00
Sven Neumann 5c252e323f app: move duplicated code into a helper function 2010-08-07 00:26:58 +02:00
Barak Itkin df0627c0eb app: Unmark the git version string for translation 2010-08-05 21:39:34 +03:00
Mukund Sivaraman 25be82a04b Substitute target header filename like the rest of the code 2010-08-02 02:40:08 +05:30
Mukund Sivaraman 10d11abcd5 Fix typo 2010-08-02 02:29:34 +05:30
Michael Natterer 7df1a4f3df app: clean up GimpColorBar rendering and add cairo_surface_mark_dirty() 2010-07-30 16:25:08 +02:00
Michael Natterer 208096bc7c app: port GimpColorBar drawing to cairo 2010-07-30 14:58:55 +02:00
Michael Natterer ac80163771 app: draw the statusbar's icon with cairo 2010-07-30 13:14:10 +02:00
Michael Natterer 4466b3a35b app: remove code duplication in the histogram and curve views
by letting the histogram view always draw the background and the outer
borders. Also fix a lot of off-by-one problems in the curve view which
occur due to the 0.5,0.5 offset of cairo line drawing.
2010-07-30 12:51:03 +02:00
Michael Natterer c548a593e5 app: port GimpHistogramView drawing to cairo 2010-07-30 12:18:08 +02:00
Michael Natterer 900fd00c00 app: port GimpTagPopup drawing to cairo 2010-07-29 14:41:50 +02:00
Michael Natterer d28a04ac04 app: port GimpFgBgEditor drawing to cairo 2010-07-29 14:20:37 +02:00
Michael Natterer c5951857e1 app: forgot cairo_destroy() 2010-07-29 14:10:01 +02:00
Michael Natterer 8d67b5b69b app: port GimpFgBgView rendering to cairo 2010-07-29 14:05:51 +02:00
Michael Natterer 06488d03fe app: draw the curve view's background with cairo
and fix focus line drawing by one pixel.
2010-07-28 16:15:54 +02:00
Michael Natterer e1d9a32a83 app: draw the splash's strings with cairo, not gdk_draw_layout() 2010-07-28 16:00:50 +02:00
Michael Natterer 9942d5f692 app: draw the about dialog's animated string with cairo, not gdk_draw_layout() 2010-07-27 18:01:34 +02:00
Michael Natterer c3a4825a8a app: simplify GimpOverlayFrame drawing a lot
Thanks to Benjamin Otte for some tips.
2010-07-27 17:26:40 +02:00
Sven Neumann 8cf801c8e0 app: allow to delete curve points
Pressing Delete in the Curve view now deletes the selected point
on the curve.
2010-07-26 01:08:44 +02:00
Michael Natterer f60d456e61 app: add new parameter check function gimp_pdb_item_is_in_tree()
which makes sure the passed item is part of an item hierarchy
(and not for example a selection or a layer mask)
2010-07-23 22:08:28 +02:00
Barak Itkin 5a9f2f1eac app: Add '/' as a seperator for the rectangle tools options (in the Fixed field) 2010-07-23 19:17:12 +03:00
Michael Natterer 4165dfb217 app: move the alt-click selection feature to GimpItemTreeView
so it works the same for layers, channels and vectors and remove the
separate (and different) implementations from all subclasses.
2010-07-20 23:36:16 +02:00
Michael Natterer 3184c440b3 app: introduce GimpItem::to_selection()
Which replaces all the deparate functions to turn layers, channels,
layer masks and vectors into selections. Use the new virtual function
all over the place instead of calling the functions in
gimpchannel-select.c manually.
2010-07-20 23:09:19 +02:00
Michael Natterer 8b31211639 Fix the bulid after GtkNotebookPage got deprecated in gtk-2-22
In all GtkNotebook::switch_page() callbacks, simply replace
GtkNotebookPage* by gpointer.
2010-07-16 15:24:25 +02:00
Michael Natterer e3f0a6a0d4 tools: generate "Deprecated:" sections according to gtk-doc standards
So the comment about replacement functions appears in the red warning
box in the generated HTML.
2010-07-12 23:11:56 +02:00
Martin Nordholts e55b7f30a3 app: Disable dynamics by default 2010-07-12 16:32:18 +02:00
Nils Philippsen 222ffd2360 app: generate git-version.h regardless of branch
Previously, git-version.h always recorded the latest commit on the
master branch. This change should record the current commit (which is
what gets built) regardless of the branch.

I've checked that it does "the right thing" regarding multi-parent
merges by checking out such a merge commit, generating git-version.h and
comparing it to the commit sha1 in the log.
2010-07-09 16:43:56 +02:00
Michael Natterer 2e81453c75 pdb: some doc fixes 2010-07-09 14:24:31 +02:00
Michael Natterer 3c2dcf2df5 pdb: deprecate drawable API that got replaced by item API 2010-07-09 11:25:35 +02:00
Michael Natterer 7314d3fe4f pdb: deprecate the drawable and vectors parasite APIs 2010-07-09 10:36:17 +02:00
Michael Natterer d0c80bae12 pdb: add parasite API for items 2010-07-09 10:19:30 +02:00
Michael Natterer 0fdf7c6e28 pdb: deprecate vectors API that is now in item 2010-07-09 10:10:55 +02:00
Michael Natterer 20c3dc0df9 pdb: remove drawable's and vector's "lock-content" API
because it's new in 2.8 and doesn't need to be deprecated.
2010-07-09 09:46:31 +02:00
Michael Natterer 1bca2d8eb0 pdb: don't talk about "pixels" in items docs 2010-07-09 09:45:30 +02:00
Michael Natterer 2d6f808ff8 pdb: add a new PDB group "item" and move lots of functions to it
The item groups has all the duplicated functionality from drawable
and vectors (name, visible, linked etc).

Hijack the unused GIMP_PDB_REGION and turn it into GIMP_PDB_ITEM;
change all protocol aware files accordingly and bump the protocol
version number. Change script-fu to handle the new type.
2010-07-09 09:34:44 +02:00
Michael Natterer d303d8c7c1 Revert "pdb: Added a procedure to check how many processors GIMP is configured to use."
This reverts commit b22880c32f.
Adding this procedure was a misunderstanding on IRC.
2010-07-09 02:30:10 +02:00
Barak Itkin b22880c32f pdb: Added a procedure to check how many processors GIMP is configured to use.
Added the procedure get_number_of_processors to gimprc.pdb and regenerated the
other files using pdbgen.
2010-07-09 02:50:13 +03:00
Sven Neumann fb6e561f3f app: update copyright, it's 2010 for a while now ... 2010-07-09 00:16:39 +02:00
Michael Natterer 31d7061e20 app: remove "item_type" parameter from gimp_param_spec_item_id()
and from gimp_value_get_item(). The functions are used nowhere, and
the parameter is now in the way of adding item support to the PDB.
2010-07-08 22:40:48 +02:00
Michael Natterer 14b19ecce8 app: add attached-to checks to all raise and lower functions 2010-07-08 21:08:18 +02:00
Michael Natterer 4097d3c300 app: add check that items passed through the PDB belong to the right image
Add "image" parameter to gimp_pdb_item_is_attached() and if non-NULL,
make sure the item is attached to that image, and not only attached to
any image. Change wrappers to pass an image where it makes sense.
2010-07-08 21:02:58 +02:00
Alexia Death 7609e3d887 app: Fix direction in path stroking 2010-07-08 20:53:25 +03:00
Michael Natterer e23e99e2ab app: add missing translation context for undo descriptions 2010-07-08 18:10:33 +02:00
Michael Natterer 314a6ab926 app: merge the layer, channel and vectors repositioning APIs
into an API based on GimpItem.
2010-07-08 18:08:13 +02:00
Michael Natterer 70a3addcb9 app: harden precondition checks in GimpItemTree
Instead of checking if the item is attached and belon's to the tree's
image (which did miss e.g. passing a channel to the layer tree), we
now check if gimp_item_get_tree(item) returns right tree.
2010-07-08 15:06:19 +02:00
Michael Natterer edbdd4a945 app: one file in pdb/ got regenerated because of a doc fix 2010-07-07 11:46:58 +02:00
Martin Nordholts 6739f6266c Revert "app: Add alpha-to-selection shortcuts in tooltips"
This reverts commit 9378b42922. We
need a translator-friendly solution.
2010-07-06 18:12:09 +02:00
Martin Nordholts 9378b42922 app: Add alpha-to-selection shortcuts in tooltips
Add alpha-to-selection Alt-Click shortcuts in tooltips to make them
discoverable, at least in theory.
2010-07-06 17:04:29 +02:00
Martin Nordholts 01113ffeee app: Handle merge commits for git-version.h
Use

  git show-ref --hash refs/heads/master

instead of

  git log HEAD^..HEAD --pretty=format:%H

so we can handle multi-parent (merge) commits.
2010-07-06 16:02:53 +02:00
Mukund Sivaraman 597b255262 Update Desaturate tool's status text
The existing text is poor English and is confusing.
2010-07-05 19:27:44 +05:30
Martin Nordholts 81925e424b app/tests: Prepare test-core.c for other tests 2010-06-29 19:08:59 +02:00
Martin Nordholts dd059635d4 app/tests: Rename test-layers to test-core
Rename test-layers to test-core so we can put more tests there, like
color processing algorithm tests for example.
2010-06-29 18:08:34 +02:00
Michael Natterer f42870648d app: link ../gimp-debug.o into test-config 2010-06-29 00:25:32 +02:00
Michael Natterer fad6053643 Make cairo code work with newer cairo backends that actually use caching
Call cairo_surface_flush() before reading or writing a surface's
pixels directly, and use cairo_surface_mark_dirty() after writing
pixels directly, so we don't read old pixels, and our written pixels
get actually used.
2010-06-28 12:23:31 +02:00
Michael Natterer d2fd8a8dc8 app: don't call gimp_cell_renderer_viewable_pre_clicked() on a NULL cell 2010-06-28 00:13:19 +02:00
Martin Nordholts 706900c4f6 Bug 589010 - Don't make Alt-Clicked layers active
Add a "pre-clicked" signal to GimpCellRendererViewable that can
prevent a selection from happening. Move the Alt-Click code in
GimpLayerTreeView to this signal and if a layer is Alt-Clicked, don't
go ahead and make the layer active. Also add a test for this use case.
2010-06-27 21:46:53 +02:00
Martin Nordholts 4471f0ea4b Bug 622683 - file export defaults to the wrong directory / folder
We were not in sync with the spec:
http://gui.gimp.org/index.php/Save_%2B_export_specification#exporting_files
2010-06-27 14:11:13 +02:00
Martin Nordholts 66e2866a78 app/tests: Make "create_new_image_via_dialog" result more useful
Also add a layer in "create_new_image_via_dialog" so the created
image is more useful in following tests.
2010-06-27 13:37:41 +02:00
Martin Nordholts d8f8acdff3 app/tests: Add convenience macro GIMP_PAUSE() 2010-06-27 13:30:06 +02:00
Martin Nordholts 0258461c9f app: Format widgets/gimpcellrendererviewable.h
Format widgets/gimpcellrendererviewable.h and make room for
gimp_cell_renderer_viewable_pre_select().
2010-06-27 11:51:44 +02:00
Martin Nordholts 1a9eb3e923 app/tests: Use gtk_test_init() 2010-06-27 11:08:42 +02:00
Martin Nordholts 8d0fe6fc4a app/tests: Output session management test result
Output session management test result to be consistent with GLib test
framework test output.
2010-06-27 10:47:30 +02:00
Martin Nordholts bbfb4b13df app/tests: Add "gimp-single-image-window" entry to sessionrc
Add "gimp-single-image-window" entry to sessionrc. Makes the UI test
behave a bit more nicely.
2010-06-27 10:43:58 +02:00
Martin Nordholts 3f0b473680 app: Don't use actions for Alt-Click on layer
Don't use an action based implementation of Alt-Click for "Layer to
selection" since the actions will always use the active drawable,
preventing us from solving bug 589010. Use the tree model and
gimp_channel_select_alpha() instead.
2010-06-27 10:40:56 +02:00
Martin Nordholts aeed966943 app: Format widgets/gimplayertreeview.c function prototypes
Format widgets/gimplayertreeview.c function prototypes with
egtk-format-protos.
2010-06-27 10:40:56 +02:00
Martin Nordholts a5c0d74599 app/tests: Merge some tests
Remove two GIMP initializations by putting
"gimp-window-management/window_roles" into "gimp-ui" and removing
"gimp-layer-groups/add_layer" which we already have in
"gimp-layers". And we can have layer group tests there too.
2010-06-27 10:40:55 +02:00
Martin Nordholts 7670ae7e87 app/tests: Add alt_click_is_layer_to_selection
Add a regression test that makes sure its possible to Alt-Click on a
layer in the layers dockable to create a selection from it.

Change sessionrc to have only one page in the GimpDockbook to
avoid problems with gtk_test_find_widget().
2010-06-27 10:40:55 +02:00
Martin Nordholts 1c72e5e406 app/tests: Make gimp_ui_find_dock_window() more generic 2010-06-27 10:40:55 +02:00
Michael Natterer 15fd08747d Bug 595170 - brush - color from gradient works wrong in greyscale
Convert the gradient color to the drawable's type before using it.
2010-06-27 01:55:21 +02:00
Michael Natterer 2813fce0b8 Bug 613838 - Error in gimp-hue-saturation PDB call
The "hue" parameter from the PDB is in a [-180..180] range, not in
[-100..100]. Note that unlike stated in the bug, this is not an
incompatible change, because it simply got broken between 2.4 and
2.6.
2010-06-27 01:15:46 +02:00
Michael Natterer 40423b26a8 app: free ui_manager_name in finalize() 2010-06-26 23:28:17 +02:00
Michael Natterer 79dbfb2b51 app: remove the docks manually in dispose() for the reason below 2010-06-26 23:27:17 +02:00
Michael Natterer de3a5896f3 app: remove the children manually in dispose() for the reason below 2010-06-26 23:26:00 +02:00
Michael Natterer 0abe67389d app: remove the dockables manually in dispose()
using the proper API, so all stuff is properly disconnected and the
list items managing them are freed to. Also make removing robust
against dockbook->dock being NULL.
2010-06-26 23:23:50 +02:00
Michael Natterer d596695afc app: run dispose explicitely on the paint_options before unrefing them 2010-06-26 23:22:53 +02:00
Michael Natterer 324fa432b6 app: free the tag_ref_counts hash table in dispose() 2010-06-26 18:25:44 +02:00
Michael Natterer e24c2d2249 app: add a local "container" variable to make the code more readable 2010-06-26 15:49:10 +02:00
Martin Nordholts b55c545359 app: Kill UI configurer gracefully
Kill UI configurer gracefully so it's easier to find real leaks.
2010-06-24 22:59:37 +02:00
Michael Natterer 990c49b359 app: include the config objects in the instance debugging
And indeed, we fail to get rid of them upon exit...
2010-06-24 22:47:42 +02:00
Martin Nordholts ed630a1852 app: Remove unused variables and dead code 2010-06-24 22:46:20 +02:00
Michael Natterer e0d5bab077 app: remove the static variables for the "standard_foo" fallback members
Instead, call gimp_foo_get_standard() when a fallback object is
needed (keeping them around as static variables was a silly
micro-optimization).
2010-06-24 22:33:33 +02:00
Michael Natterer 991210c0f9 Bug 622608 - GIMP crashes when clicking any scroll bar from combo boxes
Don't cancel the popup in grab_notify() if the popup's grab was
shadowed by one of the widgets in the popup, like the scrollbar.
2010-06-24 21:56:41 +02:00
Michael Natterer 4d205e03ff app: actually add the new files, sorry 2010-06-24 21:33:50 +02:00
Michael Natterer b2b1cb135b app: move the instance debug facility to the new file app/gimp-debug.c
Build it unconditionally but enable it via GIMP_DEBUG=instances
2010-06-24 19:11:56 +02:00
Michael Natterer c448cc7d25 app: really really destroy the tool options widgets this time 2010-06-24 18:38:19 +02:00
Michael Natterer 44e6acbef8 app: the name of the standard paint is "gimp-paintbrush" not "GimpPaintbrush" 2010-06-24 18:38:19 +02:00
Michael Natterer 39c7405954 app: disconnect from the dialog factory in dispose() instead of finalize() 2010-06-24 18:38:18 +02:00
Michael Natterer a83b3250e4 app: set non-NULL names on the default image and the default grid 2010-06-24 18:38:18 +02:00
Michael Natterer 67590c04d1 app: unref tool options and presets in dispose() instead of finalize() 2010-06-24 18:38:18 +02:00
Michael Natterer bfbdf1cfb8 app: unref the paint options in dispose() instead of finalize() 2010-06-24 18:38:18 +02:00
Michael Natterer 5db9d31498 app: drop all object references in dispose() insatead of finalize() 2010-06-24 18:38:18 +02:00
Michael Natterer 06bf098fa9 app: run dispose on the tool infos before unrefing their container
because they contain reference cycles with the tool options
2010-06-24 18:38:18 +02:00
Michael Natterer cf98aed702 app: run dispose on the paint infos before unrefing their container
because they contain reference cycles with the paint options
2010-06-24 18:38:17 +02:00
Michael Natterer a5b6544b6e app: unref options->tool_info in dispose() instead of finalize() 2010-06-24 18:38:17 +02:00
Michael Natterer 69e7e411f8 app: unref options->paint_info in dispose() instead of finalize() 2010-06-24 18:38:17 +02:00
Michael Natterer c47edb5016 app: improve the g_warning() about undestroyed dialogs 2010-06-24 18:38:17 +02:00
Michael Natterer e7b16c8634 app: run dispose manually on the dialog factory before unrefing it
Because some of the dialogs the factory creates add a reference to
it, creating a cycle; so simply unrefing it doesn't do anything.
2010-06-24 18:38:17 +02:00
Michael Natterer 403908829a app: add comment about why we can't use GimpContainerView API in init() 2010-06-24 18:38:17 +02:00
Michael Natterer 3c565a1736 app: unref context, dialog_factory and ui_manager in GObject::dispose()
The were not unrefed at all before
2010-06-24 18:38:16 +02:00
Michael Natterer ad83462570 app: unref the filtered container in GObject::dispose()
It was simply never destroyed at all before.
2010-06-24 18:38:16 +02:00
Michael Natterer c9bde335f0 app: don't additionally ref the standard data objects
Instead, set their statically remembered pointer as a weak pointer so
it's nullified automatically if they are ever finalized. Doesn't
actually get rid of them upon exit yet, this is just a preparation.
2010-06-24 18:38:16 +02:00
Nelson A. de Oliveira c4588f1209 Bug 575911 - Add 'Rule of fifths' crop guide overlay
Implement a rule of fifths guideline for GIMP. See
http://markhancock.blogspot.com/2006/03/address-basic-composition.html
for more info.
2010-06-24 08:37:09 +02:00
Michael Natterer b43be361ff app: add a forgotten g_object_unref()
so all dockables are destroyed when a dock is destroyed.
2010-06-23 22:50:45 +02:00
Michael Natterer bbd4038e98 app: make sure all tool options widgets are properly destroyed
...and with them all references their widgets keep (which are a lot).

Take ownership of the widget after creating it, so it can be reliably
unrefed upon exit.
2010-06-23 22:48:53 +02:00
Michael Natterer e44d81bd4b app: add a debug facility that keeps track of allocated GimpObjects 2010-06-23 22:32:14 +02:00
Martin Nordholts f6781d15c4 Bug 565459 - newly opened images are put into the background
When we are going to open new image windows, unset the transient
window. We don't need it since we will use gdk_window_raise() to
keep the dialog on top. And if we don't do it, then the dialog
will pull the image window it was invoked from on top of all the
new opened image windows, and we don't want that to happen.

Patch heavily inspiried by hack from Massimo Valentini.

Also add a manual test case for the fix. (I don't think there is GTK+
API to automate it).
2010-06-23 20:17:44 +02:00
Martin Nordholts 2431740492 app: Explain gdk_window_raise() in file-open-dialog.c 2010-06-23 19:58:01 +02:00
Michael Natterer ea050b267e app: don't leak all cached GtkTreeIters in container views
This is evil: the hash table of "insert_data" is created on demand
when GimpContainerView API is used, using a value_free_func that is
set in the interface_init functions of its implementors. Therefore, no
GimpContainerView API must be called from any init() function, because
the interface_init() function of a subclass that sets the right
value_free_func might not have been called yet, leaving the
insert_data hash table without memory management.

Call GimpContainerView API from GObject::constructed() instead, which
runs after everything is set up correctly.
2010-06-23 00:20:21 +02:00
Michael Natterer a60463cd8e app: free one more list returned by gtk_container_get_children() 2010-06-23 00:19:44 +02:00
Michael Natterer 46e1410213 app: free the list returned by gtk_container_get_children() 2010-06-22 23:06:35 +02:00
Michael Natterer 865a1f4896 app: free the string returned by gimp_dock_window_get_description() 2010-06-22 23:06:35 +02:00
Michael Natterer 94e757df51 app: don't leak options->language; add finalize() to free it 2010-06-22 23:06:35 +02:00
Michael Natterer cf1cc6dc6f app: private->shells might be a list with one element upon destroy; free it 2010-06-22 23:06:35 +02:00
Michael Natterer 5df1d477b7 app: free shell->zoom_focus_pointer_queue in destroy() 2010-06-22 23:06:35 +02:00
Michael Natterer 09ebdcb06b app: don't leak each transformed brush mask 2010-06-22 23:06:35 +02:00
Michael Natterer 2a984ef51f Bug 612618 - Font selection remains visible
Connect to "grab-notify" and "grab-broken-event" and close the popup
when the grab is lost.
2010-06-22 20:09:52 +02:00
Martin Nordholts ff1da59f33 Bug 574018 - Add a manifest to executables
Patch from Jernej Simončič.
2010-06-22 19:35:16 +02:00
Martin Nordholts f0e90007f7 app/tests: Remove gimp_ui_synthesize_plus_key_event() crack
Make gimp_ui_synthesize_plus_key_event() generic and implement it with
gdk_test_simulate_key(). We can't use gtk_test_widget_send_key()
because its input window logic doesn't seem to work very well.
2010-06-21 21:19:15 +02:00
Martin Nordholts 8b344fa6ad app: Test for existance of git-version.h.tmp before comparing
Test for existance of git-version.h.tmp before comparing. Otherwise
cmp will complain when building tarballs.
2010-06-21 21:19:15 +02:00
Michael Natterer ae0ae9fcb8 app: pass all construct params to g_object_new() 2010-06-21 21:08:13 +02:00
Michael Natterer ac6ee07184 app: the tests should succeed, so should a normal gimp session
Don't divide by zero in gimp_session_info_class_apply_position_accuracy()
when klass->position_accuracy is 0, which happens on each exit in a normal
session.
2010-06-20 23:26:45 +02:00
Martin Nordholts df731fecda Make 'make distcheck' pass
Add missing CLEANFILES, make distcheck passes now.
2010-06-20 20:30:24 +02:00
Martin Nordholts ce33255588 app/tests: Also add error margin to 'gimpsessioninfo-book.c'
Also add error margin to 'gimpsessioninfo-book.c' and update reference
files. This makes 'make distcheck' pass, and it passes more reliably.
2010-06-20 20:30:24 +02:00
Michael Natterer ba3d530c9b tests: fix the directory variables in TESTS_ENVIRONMENT
Apparently, $(abs_top_srcdir) and $(abs_top_builddir) aren't set as
shell variables any longer. Instead, use @abs_top_srcdir@ and
@abs_top_builddir@ so they get substituted at configure time.
2010-06-20 12:25:32 +02:00
Martin Nordholts 49d951d49e app: Introduce error margin in sessionrc in test cases
Introduce a few pixels of error margin in sessionrc, otherwise the
tests are too fragile, widgets have a tendency to change size a bit
and window managers have a tendency to move windows a bit.

Still needs more work, should probably do the same on book positions
too...
2010-06-19 23:55:35 +02:00
Martin Nordholts 4e78fc7279 Also distribute dockrc-expected 2010-06-19 23:55:35 +02:00
Martin Nordholts d1202096e6 app: Include git commit hash in verbose version output
Note:
* Passes make distcheck
* The git commit hash is shipped with tarballs
* Build handles if git-version.h is removed from a tarball
2010-06-19 23:55:35 +02:00
Martin Nordholts ab6d5553d9 app: Don't unmaximize image window when switching tabs in swm
It is when we apply session info to the image window we unmaximize, so
don't apply session info to the image window when all we do is
switching tabs in single-window mode.
2010-06-19 11:08:17 +02:00
Martin Nordholts 1e6055060c app/tests: Also simply test-xcf.c
Simply test-xcf.c too, forgot to do that.
2010-06-19 08:26:30 +02:00
Martin Nordholts 6ad46f651a Bug 610587 - Zooming with zoom tool pans away from the cursor
Update lower and upper value of adjustments *before* we set the new
value, otherwise it will be erroneously clamped sometimes.
2010-06-19 08:09:34 +02:00
Martin Nordholts 4ca603e97d Revert "Bug 610587 - Zooming with zoom tool pans away from the cursor"
This reverts commit 1f1f20261e. It was
not proper , and correcting it reintroduces the bug :(
2010-06-18 23:00:11 +02:00
Martin Nordholts 7e3898da09 app/tests: Add keyboard zoom focus regression test
Add keyboard zoom focus regression test. We also need a new display
shell utility function
gimp_display_shell_push_zoom_focus_pointer_pos() for that.
2010-06-18 20:57:59 +02:00
Martin Nordholts 1f1f20261e Bug 610587 - Zooming with zoom tool pans away from the cursor
Connect gimp_display_shell_hscrollbar_update to "notify::" so that the
notify freeze in gimp_display_shell_scale_update_scrollbars() works.
2010-06-18 20:53:01 +02:00
Martin Nordholts 3f6a3e749c app/tests: cleanup 2010-06-18 20:31:33 +02:00
Martin Nordholts 0af34013a2 app: Add minimum gimp_display_shell_transform_xy() gkt-doc 2010-06-18 20:31:33 +02:00
Martin Nordholts b799a8bd03 app: Remove unnecessary gimp_dockbook_refresh_tab_layout_lut() calls
We don't need to call gimp_dockbook_refresh_tab_layout_lut() in
added() and removed() because we call
gimp_dockbook_update_auto_tab_style() in add() and remove().
2010-06-18 20:31:33 +02:00
Martin Nordholts 5588e15eed app: Disable snap-to-canvas by default
It's too annoying to have the Paintbrush tool snap to canvas by
default.
2010-06-18 20:07:03 +02:00
Michael Natterer 8ab8a25c99 app: some disabled cairo bling code
that draws a gradient in the background of the frame. Not meant
seriously, just something to play with for everybody interested.
2010-06-18 13:51:49 +02:00
Michael Natterer c1c715c2d1 app: don't draw any background if the overlay child is app-paintable
instead of never drawing a background. Doesn't make any difference,
but makes GimpOverlayBox a more general container. Also, the offscreen
GdkWindow doesn't need any event but GDK_EXPOSURE_MASK.
2010-06-18 13:46:39 +02:00
Michael Natterer 27ec3aa812 app: switch off double buffering on the entire offscreen widget tree
Also always return FALSE from the expose and damage event handlers.
2010-06-18 13:45:03 +02:00
Michael Natterer 6eda16d550 app: call dialogs_exit() after controllers_exit() and devices_exit()
which would have been the correct oder all the time, because these
systems are initialized in reverse order. The wrong order didn't
matter until now, but for some reason it now sometimes triggered
warnings about dialog_factories being NULL during controllers
shutdown.
2010-06-18 09:11:14 +02:00
Martin Nordholts 782ba9bcb9 app/tests: Make it easier to add tests
Minimize the effort to add a new test by removing prototypes for tests
and adding macros to register tests.
2010-06-14 18:53:38 +02:00
Michael Natterer 170f0bed00 app: use a GimpOverlayFrame for the text style editor
so it gets round corners and doesn't look so old school.
2010-06-12 23:49:55 +02:00
Michael Natterer 30de295cf4 app: make the alpha channel work on canvas overlay widgets
* app/widgets/gimpoverlaychild.c: when creating offscreen windows, try
  to set an RGBA colormap on the offscreen window's widget and use the
  RGBA colormap to create the window. This has to be done here,
  because it's not possible to get to the right screen *inside* the
  offscreen widget before it's parented, and we need that screen
  before the widget is realized, and the widget can't be parented
  before it's realized or it will get the wrong parent window.
  Everything clear now?

* app/widgets/gimpoverlayframe.c: draw the round corners only if the
  screen has an RGBA colormap.
2010-06-12 23:48:29 +02:00
Barak Itkin c37c0024af app: Fix the description of layers-merge-down
When merging down a layer, currently the selected layer will be merged with the
first visible layer below it. So, we better inform the user that the merging
operation will not necessarily be with the first layer below it, but with the
first visible layer below it.
2010-06-12 21:13:09 +03:00
Michael Natterer d3e7864b5c app: code cleanup 2010-06-12 19:37:03 +02:00
Michael Natterer fc3a89ab0e app: make GimpOverlayFrame work as standalone container
Implement size_request() and size_allocate() so it can be used to pack
an arbitrary widget without the need for being subclassed.
2010-06-12 19:23:22 +02:00
Michael Natterer cabc3aa67a app: split out the round corners code from GimpOverlayDialog
into a new GtkBin subclass called GimpOverlayFrame.
2010-06-12 19:02:51 +02:00
Michael Natterer 94dc079d44 app: forgot to save the last comment edit 2010-06-12 18:46:30 +02:00