Commit Graph

17571 Commits

Author SHA1 Message Date
Michael Henning c298485ba4 Revert "app: Refactor GimpBlendTool to not use update methods."
This reverts commit 8a2a9775b9.

Conflicts:
	app/tools/gimpblendtool.c
2014-10-18 19:05:56 -04:00
Michael Natterer f5df5bee93 app: register file-xcf-load and file-xcf-save as GIO-ported
because the reason we didn't (seek errors) is gone now.
2014-10-18 01:17:01 +02:00
Michael Natterer e47ded9420 pdb: fix gimp-file-open and gimp-file-save for GIO-ported file procedures
Pass URIs instead of filenames to the procedures if they are ported to GIO.
2014-10-18 01:14:58 +02:00
Michael Natterer 5a4d865358 Bug 738329 - xcf_seek_pos() can cause unexpected OS behavior
Change XCF saving to never seek past the end of the partially written
file. The only places where we still did this was when skipping the
offset tables for layers, channels, levels and tiles.

Now we write an all-zero offset table first, and then only seek around
in areas of the file that already exist. This also simplifies the code
a bit. Changed comments to make it clear what happens.
2014-10-17 19:12:05 +02:00
Michael Natterer 0d435f11b7 app: allocate the RLE buffer only if we save an RLE-compressed XCF 2014-10-15 23:53:59 +02:00
Michael Natterer 7b6c66159a app: use xcf_write_int32_check_error() for all XCF property writing
Some (copy/paste I guess) places used xcf_write_int32() plus manual
error checking for no reason.
2014-10-15 23:36:06 +02:00
Michael Natterer b9ff01306e app: remove xcf_seek_end(), it's unused, and should not be used any longer 2014-10-15 23:21:34 +02:00
Massimo Valentini 1368f73354 Bug 730211 - Extra zeroes appear in XCF files
Don't use xcf_seek_end() because that seems to be broken on certain
file systems / operating systems / FUSE mounts / whatever. Instead,
seek to explicitly calculated file offsets.

Ported Massimo's patch to master and added comments --Mitch

The same commit in gimp-2-8 is a57e49b1bb
2014-10-15 23:18:37 +02:00
Michael Natterer 5d8824f42e app: move all GimpBrush members to a private struct
Add and use accessors for width, height, x_axis and y_axis.
2014-10-12 01:16:32 +02:00
Michael Natterer 13a626a304 app: add gegl:oilify to Filters -> Artistic 2014-10-11 20:32:31 +02:00
Michael Natterer e4171c5bff plug-ins, PDB: remove edge-sobel and add a PDB compat procedure 2014-10-11 19:41:49 +02:00
Michael Natterer 69f6d7fc8a app: don't ref the tool options GUI in gimp_tool_options_editor_dispose()
They are kept alive by a ref owned by GimpToolOptions, refing them
here made them all being leaked on exit.
2014-10-09 00:35:57 +02:00
Michael Natterer 88e8fbce17 app: remove unclear fix from gimp_tool_options_editor_tool_changed()
It was introduced in e7ade3f8ec. The
g_return_if_fail() is IMO useless, the actual fix (which I kept) was
pulling the call to gimp_tool_options_editor_presets_update() inside
the if().
2014-10-09 00:33:33 +02:00
Michael Natterer ba065a31ec app: don't leak the GFileInfo in file_open_image() and file_save() 2014-10-07 15:23:19 +02:00
Michael Natterer cd505dbd02 app: don't leak "display_file" in gimp_image_format_display_uri() 2014-10-07 15:22:49 +02:00
Michael Natterer e6ce0dda9d app: free the default brush, pattern etc in gimp_finalize()
and print a warning if there are any contexts left in gimp->context_list.
2014-10-06 20:35:24 +02:00
Michael Natterer 2aec36a899 app: don't leak "buffer" in gimp_interpreter_db_add_binfmt_misc() 2014-10-06 20:34:56 +02:00
Michael Natterer aa6024dc93 app: don't leak all results from separate_uline_pattern() in GimpSpinScale 2014-10-06 20:34:22 +02:00
Michael Natterer 230e03ac40 app: don't leak the gimpdir GFile in app_run() 2014-10-06 20:33:47 +02:00
Michael Natterer 849481a861 Clean up code around calls to g_file_replace()
- use G_FILE_CREATE_NONE instead of 0
- don't put "Could not open <file> for writing: <error>" around the
  returned error, the returned message is already verbose
2014-10-04 02:44:54 +02:00
Thomas Manni dbfbc221a5 Bug 736232 - Strange result using transparent layer, blending modes...
...and layer opacity

Use a temporary variable to store intermediate result instead of
writting 2 times to the output buffer, because input and output
buffer might be the same.
2014-10-03 00:17:49 +02:00
Michael Natterer 7ee69c3053 Bug 737583 - Fix static placement of Chinese IME window
Call gtk_im_context_set_cursor_location() whenever we draw the text
tool cursor or start a preedit sequence.
2014-10-03 00:04:24 +02:00
Jehan 56c2e19733 Removes various easy compilation warnings. 2014-09-28 18:18:00 +02:00
Michael Natterer c5ed3e56c9 Bug 735505 - Weird Characters in Zoom Button
On windows, use a normal space instead of U+2009 THIN SPACE for
separating the scale percentage from the percent sign.
2014-09-27 23:48:39 +02:00
Michael Natterer 4fdfe10b29 app: move the XCF version logic to gimpimage.[ch]
Add gimp_image_get_xcf_version() and use it when saving XCFs. The
function also returns GIMP versions in integer (comparable) and string
form to be used by GUI logic that allows to save compatible files.
2014-09-27 20:38:43 +02:00
Michael Natterer 1671955655 app: allow to change the affected channels on a running filter
Connect GimpImageMap to the GimpImage's "component-active-changed" signal
and update the channels affected by the filter.
2014-09-25 23:40:05 +02:00
Michael Natterer fe3c0e4020 Bug 732787 - Posterize doesn't work as expected with alpha channel
GimpOperationPosterize: also posterize the alpha channel. Seems like a
no-brainer to me, and is actually useful (see bug). The old behavior
is still available by simply disabling the alpha channel in the
channels dialog.
2014-09-25 23:12:35 +02:00
Michael Natterer 90c967a39f Bug 737008 - Curve color always black
Don't hardcode "black" for the "Value" curve in GimpCurvesTool.
Instead, pass a NULL color to GimpCurveView, which is then interpreted
as the theme's text color (the curve's background is the theme's text
background color). We still hardcode pure red, green and blue for the
other curves.
2014-09-21 12:32:23 +02:00
Michael Natterer e2630ae322 app: argh, fix last fix... 2014-09-17 22:31:43 +02:00
Michael Natterer 16f6b57a5d app: link test-config against Z_LIBS 2014-09-17 12:57:55 +02:00
Michael Natterer 0cceaff828 Bug 721482 - Make language codes relocatable
Manually picked one line of ef0ef921b8
that makes parse_iso_codes() find the iso-codes package in the bundle
on OS X.
2014-09-17 12:47:21 +02:00
Michael Natterer 98dddc3866 app: OS X specific "About" menu label
Manally picked that change from commit 7a75d4df from gimp-2-8.
2014-09-17 12:22:25 +02:00
Michael Natterer 9095f8998d app: link against Z_LIBS 2014-09-17 00:21:41 +02:00
Jehan ce2bb29605 app: do not use g_error() for non-fatale errors...
and g_warning() for programming errors only.
Use g_printerr() for "normal" errors which may happen in a program
lifetime (in particular corrupted XCF file errors are not necessarily
programming errors).
2014-09-17 00:18:15 +02:00
Michael Natterer 7b69b3b60e Bug 733390 - Picking a color should also change the active color...
...in the opened Color Modify window

Connect to the toolbox' context's foreground-changed and
background-changed signals and update the color dialog.
2014-09-16 23:56:50 +02:00
Jehan 128baab2b6 Bug 735026: Enable zlib compression in XCF for GIMP 2.10
XCF file format bumped to version 8 when compressing with zlib.
2014-09-16 23:54:07 +02:00
Jehan b9a9169656 app: update action search to use glib API.
I now normalize with g_str_tokenize_and_fold() which uses standard
Unicode normalization.
I don't use g_str_match_string() directly though, because I want to
run additional checks to order the results by relevance. For instance
I still want actions whose labels starts with the search string to be
at the top, and results with same order as search token before those
with a different order. Then results with match in the tooltip. Finally
I also returns results with partial match in the label, and the rest in
the tooltip, though at the bottom of the list.
Other than that, this returns the same results as g_str_match_string()
with a similar algorithm. In particular now we only match the start of
tokens (a substring in the middle of a token won't match anymore).
I kept the small 2-character trick matching the first letters of the
first 2 words of the label, but I got rid of the fuzzy search (that none
really found ever relevant anyway).
2014-09-16 04:03:43 +02:00
Michael Natterer aec8faf56e configure.ac, docs: use the correct gimpdir in the manual pages
It's now either $XDG_CONFIG_HOME/$gimpdir/2.9 or directly $gimpdir,
depending on whether $gimpdir is a relative or absolute path. Build
the resulting string in configure and put it into the manpage_gimprc
variable so it can be used in the manpage sources.
2014-09-15 23:54:06 +02:00
Jehan d4dba427ac app: do not crash when opening a file with unimplemented compression
Our code was planning zlib and fractal compressions for eons, but would
crash against a file which would be actually using these. It means that
if we implement one of these compressions for 2.10, anyone with GIMP 2.8
(and likely earlier too) would crash when opening a legit file using the
new compressions. That's very bad.
Never use g_error() in non-fatale, expected, situations!
2014-09-15 16:17:13 +02:00
Michael Natterer 0c33499b7b Bug 736437 - Ignore unknown file extensions when loading palettes and gradients
Don't try to load palettes and gradients with unknown extension. We
introduced extensions for these files a *lot* of years ago, so we're
dropping this legacy feature now, everybody can just rename their old
files to have the right extensions (the file formats have not
changed).
2014-09-14 23:29:58 +02:00
Michael Natterer 0bf1f22b01 app: add a "Playground" perfs page and a --show-playground command line option
The page is shown by default in unstable but needs --show-playground
in stable versions. There is nothing yet on that page. Also, the icon
needs improvement...
2014-09-14 01:08:25 +02:00
Michael Henning 8a2a9775b9 app: Refactor GimpBlendTool to not use update methods.
Simply call draw_tool_pause/resume instead.
2014-09-08 17:08:36 -04:00
Michael Natterer 1db5c06f54 Bug 735902 - Drawing a gradient should never produce negative RGB channel values
Use MAX(value, 0.0) on the result of dithering.
2014-09-08 22:49:51 +02:00
Michael Natterer 77482620b4 Bug 736199 - Precision Conversion Dithering doesn't work at >16-bit precision
Don't allow to select dithering != "none" in the convert precision
dialog if the precision has more than 16 bits.
2014-09-07 23:28:48 +02:00
Michael Natterer 14978bfe5d Simplify calls to g_output_stream_write_all()
It returns TRUE only if all bytes were written, so there is no need to
get and check the bytes_written return value.
2014-09-07 20:30:14 +02:00
su-v 97d6629d66 Bug 731446 - Files opened twice via command line
Prevent Cocoa command line argument parsing for files, using
same fix as in Gedit commit 86e7dd7b72fc35c6d9b19a75bbc715aee19304b4
2014-09-06 01:06:43 +02:00
Michael Natterer 53f4dda3b4 Bug 735894 - Option to display the image ICC profile...
...on the title bar and status bar

Implement %o for the title and status format strings, which expands
to the image profile's label.
2014-09-03 22:20:36 +02:00
Mukund Sivaraman 1dc873b860 app: Fix return types 2014-09-03 09:09:00 +05:30
Michael Henning 36d719c986 app: In GimpBlendTool, don't start the draw tool too early.
Also simplify some related logic and rename related functions to
be clearer.
2014-09-02 18:57:14 -04:00
Michael Natterer bda1cd049d Bug 735516 - Crop to content fails
Return a new enum GimpAutoShrink { SHRINK, EMPTY, UNSHRINKABLE } from
gimp_pickable_auto_shrink() because a simply boolean FALSE doesn't
distinguish between "not further shrinkable" and "no content". Change
the callers accordingly add a special "already cropped" message where
we only had a "no content" message before.
2014-08-31 17:41:54 +02:00