Commit Graph

4670 Commits

Author SHA1 Message Date
ba69862a44 Bug 742159 - Empty gradient in loaded tool preset
gimp_tool_preset_deserialize_property(): initialize all object
properties (brush, pattern, gradient, ...) of the preset's
GimpToolOptions with non-NULL values from the user context,
so loading a broken preset never results in NULL objects being
used.
2015-01-25 16:13:04 +01:00
bf6e396f28 app: remove the int return value from gimp_palette_mru_add()
It's not needed any longer and was confusing anyway.
2014-11-29 13:38:12 +01:00
a94aa72d93 app: Use g_return_val_if_fail in gimp_palette_mru_add.
It's a non-void function.
2014-11-27 11:51:28 -05:00
ac90ba1dc4 app: move color history loading/saving to core/gimp-palettes.c
and remove gui/color-history.[ch] completely.
2014-11-27 01:10:46 +01:00
09628cfa4c Bug 739489 - Add palette of recently used colors
Add a generated palette which contains the color history. For now it's
only updated when the color dialog's color history gets updated, but
should be updated whenever a color is chosen in any way.
2014-11-26 23:48:19 +01:00
c1dc0893bd app: handle preview generation for generated brushes separatley 2014-11-19 23:19:42 +02:00
d27030413d app: make generated brushes draw at given hardness
Old behavior drew brushes at native * given making the new slider
inefective.
2014-11-19 23:07:21 +02:00
c9e75b1fa0 app: some cleanup in the new paint options code 2014-11-17 21:45:01 +01:00
9a953a9239 app: locking brush size to zoom 2014-11-17 00:03:10 +02:00
7f6cdf635a Revert "app: apply a cap on brush scaling"
This reverts commit 5a22fb5799.
2014-11-15 22:25:59 +02:00
5a22fb5799 app: apply a cap on brush scaling 2014-11-15 21:56:51 +02:00
c889e68d8d app: fix gimp_file_is_executable check to not return true for directories 2014-10-29 19:14:56 +01:00
9dc13116ae Bug 419256 - Optimize mask buffer size for VBR generated brushes
Change gimp_brush_generated_get_half_size() to get_size() and
calculate its exact size in float. This is really a minor change that
seems to work well.
2014-10-21 12:54:30 +02:00
950f753ede Bug 736907 - Compat mode for XCF
- add gimp_image_get,get_xcf_compat_mode()
- add a compat toggle to GimpFileDialog which is shown and sensitive
  only for a save (not export), and if the image structure allows
  to save an old version at all. The button also has a tooltip
  which explains why it is sensitive and what it does
- add "gboolean xcf_compat" to file_save_dialog_save_image()
- in file_save_dialog_save_image(), call image_set_xcf_compat_mode(TRUE)
  only around the call to file_save() and set it to FALSE after saving
- in xcf_save_invoker(), honor the image's XCF compat flag and save an
  RLE-compressed XCF if possible

The above is very convoluted and doesn't pass the "xcf_compat" boolean
directly because we can't change the parameters of gimp-xcf-save, and
because the gimp-xcf-save might be called indirectly.
2014-10-20 22:54:11 +02:00
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
cd505dbd02 app: don't leak "display_file" in gimp_image_format_display_uri() 2014-10-07 15:22:49 +02:00
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
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
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
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
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
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
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
1dc873b860 app: Fix return types 2014-09-03 09:09:00 +05:30
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
50463d8d5a app: erroneously dereferencing paint_options
fixing commit 4d6640ff79
2014-08-31 15:27:12 +02:00
b6eb88dbf9 Bug 735513 - Fuzzy select (magic wand) freeze w/select transparent areas
gimp_pickable_contiguous_region_by_seed(): don't call
find_contiguous_region() with start coords outside the buffer, or it
will run into an infinite loop.
2014-08-27 21:12:46 +02:00
a805f8426a app: Use gint64 for dirty_time 2014-08-25 19:55:29 +05:30
a0a7e713b4 Bug 706275 - "View/Snap to active path" doesn't snap to layer center...
...with the Move tool

Add the missing code to snap to the rectangle's center in
gimp_image_snap_rectangle().
2014-08-17 22:12:44 +02:00
e0e29889b0 fix bogus use of g_strlcpy
Spotted by Andrey Karpov using static code analysis:
   http://www.viva64.com/en/b/0273/
2014-08-16 00:37:14 +02:00
40c06ab685 fix some copy&paste errors
Spotted by Andrey Karpov using static code analysis:
   http://www.viva64.com/en/b/0273/
2014-08-16 00:37:13 +02:00
99abc566d4 fix some precedence errors
Spotted by Andrey Karpov using static code analysis:
   http://www.viva64.com/en/b/0273/
2014-08-16 00:37:13 +02:00
b663b8058f Bug 734705 - v2.9.1 crashes when scaling an image in indexed colors mode
Use gimp_image_get_format() instead of gimp_babl_format() in
gimp_drawable_real_estimate_memsize() because the latter can't handle
indexed formats and returns NULL.
2014-08-15 09:23:02 +02:00
980ba7f85a app: move memsize functions into their own files gimp-memsize.[ch] 2014-08-12 13:57:57 +02:00
9bb3aee163 app: add gimp_file_is_executable() to gimp-utils.[ch]
including PATHEXT magic for windows.
2014-08-04 02:38:24 +02:00
6209b1f571 libgimpbase, app: move gimp_file_has_extension() to libgimpbase
and use it in GimpModuleDB.
2014-08-03 20:47:37 +02:00
8af3fec689 app: use the new distance-transform operation in the blend tool 2014-08-03 20:12:01 +02:00
a0b9e5c702 libgimpmodule, app: port GimpModuleDB to GFileEnumerator
this implies passing the UTF-8 encoded raw module path from gimprc to
gimp_module_db_load() and gimp_module_db_refresh(), which is strictly
speaking an API break, but I seriously doubt that anyone but GIMP is
actually using libgimpmodule.
2014-08-03 18:30:02 +02:00
da26597467 app: add gimp_file_has_extension() and use it in GimpDataFactory 2014-08-02 23:29:00 +02:00
ab2afa0c1f app: don't check for a writable dir for each loaded GimpData
Instead, do the check once for each element of the data path, and pass
the result to the load functions.
2014-08-02 15:09:33 +02:00
2b1735f784 app: move gimp_file_compare() to gimp-utils.[ch]
It's a GCompareFunc to be used for finding GFiles in lists.
2014-08-02 15:07:26 +02:00
6821eb298c app: port GimpDataFactory file loading to GFileEnumerator
Also slightly change the semantics of gimp_data_set_folder_tags()
to be less complicated.
2014-08-01 20:30:45 +02:00
2567a2d1fd app: typo s/fomat/format/ 2014-08-01 18:38:25 +00:00
1155b9c7a7 app: more GFile stuff in gimp_get_temp_file() 2014-07-29 16:32:29 +02:00
9a90bfa26a app: more gimp_directory() -> gimp_directory_file() 2014-07-29 11:56:49 +02:00
3e85deefb5 app: manage the system and user gimprc paths as GFiles 2014-07-28 15:03:06 +02:00
6b6ba7b456 app: port gimptagcache.c to GIO 2014-07-28 12:22:52 +02:00
afc469446f app: port gimp_tags_user_install() to GIO 2014-07-28 12:12:21 +02:00
b03d69dd40 libgimpbase, app: add variants of gimp_$foo_directory() which return GFiles
gimp_directory_file(), gimp_data_directory_file() etc. The new
functions take a variable list of path elements to the file,
the list has to be NULL-terminated. Remove the newly added
gimp_personal_rc_gfile(). Start using the new functions in app/.
2014-07-28 02:04:01 +02:00
b328bd3087 app: don't leak a GFileInfo in gimp_data_set_file() 2014-07-26 16:52:56 +02:00