Commit Graph

1921 Commits

Author SHA1 Message Date
Ell da27632c11 pdb: change image freeze/thaw procs to "Since: 2.10.2" 2018-05-29 16:04:28 -04:00
Ell 97925de8eb libgimpbase, libgimp, app: pass icon theme dir to plug-ins through config
Pass the current icon theme directory to plug-ins through the
config message, and add a gimp_icon_theme_dir() libgimp function
for retrieving it.  Note that we already have a similar
gimp_icon_get_theme_dir() PDB function, which we keep around, since
it can be used to dynamically query for the current icon dir,
unlike the former, and since it returns a dynamically-allocated
string, while the rest of the config-related functions return
statically allocated strings.

Use the new function, instead of gimp_get_icon_theme_dir(), in
gimp_ui_init().  This allows gimp_ui_init() to run without making
any PDB calls.  Consequently, this allows us to start plug-ins that
call gimp_ui_init() without entering the main loop in the main app.
We're going to add a plug-in that displays an interactive dialog
while the main app is blocking waiting for an operation to
complete, and we need to be able to start the plug-in without
entering the main loop, to avoid the possibility of arbitrary code
being executed during the wait.

Bump the protocol version.
2018-05-29 16:04:28 -04:00
Michael Natterer 7990b1d57c libgimp: update all .def files 2018-05-25 22:13:33 +02:00
Michael Natterer 628f654615 libgimp: remove some more cruft that is not used any longer 2018-05-20 21:06:35 +02:00
Michael Natterer 2dd2f1509b Enable and fix smooth scrolling and zooming
- Fix gimp_scroll_adjustment_values() for smooth scroll events
- Set GDK_SMOOTH_SCROLL_MASK on all widgets where we set GDK_SCROLL_MASK
- Add GIMP_ZOOM_SMOOTH to enum GimpZoomType
- Add "gdouble delta" to gimp_zoom_model_step()
- Change the meaning of the "scale" parameter to "scale or delta" in
  all functions that take GimpZoomType and a scale factor.
2018-05-20 21:06:34 +02:00
Michael Natterer bdbec7941c Use the new macros from the last commit in all files
...and gone are the annoying warnings.
2018-05-20 21:06:34 +02:00
Michael Natterer 119b15d439 libgimp: move all GimpProcBrowserDialog members to private 2018-05-20 21:06:33 +02:00
Michael Natterer d87eddb1c4 libgimpwidgets: move all GimpPreview members to private
and add tons of API so subclasses can still do their thing, probably
subject to change/fix.
2018-05-20 21:06:33 +02:00
Michael Natterer 3e680b9f32 libgimpwidgets: move all GimpScrolledPreview members to private 2018-05-20 21:06:33 +02:00
Michael Natterer f4f106ad26 libimp*: add private pointers to all instance structs
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
2018-05-20 21:06:33 +02:00
Michael Natterer 1ed1d98a5a libgimp: undeprecate all GimpFooSelectButton classes 2018-05-20 21:06:32 +02:00
Michael Natterer 7549b6efe4 Bug 794132 - Make the plug-in protocol version part of the plug-in command line
Also clean GPConfig struct from deprecated members and bump the
plug-in protocol version number.
2018-05-20 21:06:30 +02:00
Michael Natterer 69f03615b0 libgimp: port GimpProcView to GtkGrid 2018-05-20 21:06:30 +02:00
Michael Natterer 1b3135ca95 Get rid of using GtkMisc API globally 2018-05-20 21:06:30 +02:00
Michael Natterer 0dd8459a1f libgimp: deprecate more cruft, everything not needed by cruft plug-ins 2018-05-20 21:06:29 +02:00
Michael Natterer f180a171cd pdb: remove all deprecated procedures 2018-05-20 21:06:29 +02:00
Michael Natterer 9525c646e1 libgimp: remove tons of deprecated cruft 2018-05-20 21:06:29 +02:00
Michael Natterer 1671da428c libgimpbase: remove almost all deprecated compat cruft
Keep infrastructure for compat enums around because we will
mose definitely need it again.
2018-05-20 21:06:29 +02:00
Michael Natterer f3d65fdb59 Implement GtkWidget::style_updated() instead of ::style_set() 2018-05-20 21:06:28 +02:00
Michael Natterer db6c2ea658 libgimpwidgets: move all GimpBrowser members to a private struct
The newly added API is ugly and will change.
2018-05-20 21:06:28 +02:00
Michael Natterer af1bb43f37 Port theme and gtkrc file loading to CSS files using GtkCssProvider 2018-05-20 21:06:28 +02:00
Michael Natterer 21e51d2c0f port gtkrc files to CSS (incompletely and stuff commented out) 2018-05-20 21:06:28 +02:00
Michael Natterer f8ad6d669b libgimp: port to GtkWidget::draw() 2018-05-20 21:06:27 +02:00
Michael Natterer e6c055a131 libgimp: remove GdkRGB and GdkColorMap calls, these APIs are gone 2018-05-20 21:06:26 +02:00
Michael Natterer 90aa8ad040 libgimp: gimpimage_pdb.c got regenerated 2018-05-13 00:18:23 +02:00
luz.paz 69b2e84924 Source and trivial typos
Found via `codespell` and `grep`
2018-05-12 23:44:47 +02:00
Michael Natterer b15f38d21f pdb: add "Since: 2.10" to the newly added freeze/thaw procedures 2018-05-07 10:16:52 +02:00
Ell 40e3406b91 pdb: add gimp-image-{freeze,thaw}-{layers,channels,vectors}
These procedures freeze/thaw the corresponding containers of the
image, allowing plug-ins that perform many changes affecting any of
these containers to suppress updates to the corresponding dialogs,
significantly improving performance.
2018-05-07 02:56:10 -04:00
Michael Natterer b0b381b6c8 libgimp*: don't say "2.9" in metadata 2018-04-26 16:06:32 +02:00
Michael Natterer 00f3c4e47b libgimp: use the right layer mode in gimp_layer_new_from_surface()
gimp_image_get_default_new_layer_mode() instead of
GIMP_LAYER_MODE_NORMAL_LEGACY.
2018-04-24 14:00:34 +02:00
Michael Natterer db227148f0 pdb: finally deprecate gimp-color-balance
Since nobody can tell me how the new gimp-drawable-color-balance can
be improved, it's going to be identical, just with a namespace.
2018-04-23 18:20:05 +02:00
Michael Natterer a9fb4f9a39 pdb: make all item-transform procedures honor the "linked" flag
and improve their documentation.
2018-04-23 17:10:46 +02:00
Michael Natterer b80036e14f pdb: deprecated gimp-layer-translate
and port all plug-ins/scripts to gimp-item-transform-translate.
2018-04-23 15:49:23 +02:00
Michael Natterer acbdc4d5b4 pdb: add gimp-item-transform-translate procedure
We were only able to translate selections and layers (bot not channels
and paths) via the PDB, this new procedure fixes that. Deprecation of
old API and some more transform consistency to follow...
2018-04-23 03:06:23 +02:00
Jehan c0eb7858a5 Bug 795057 - Insensitive text in plug-ins is unreadable with dark themes
Don't fix too early! In some cases, PixbufStyle class is not found and
the fix failed.
2018-04-21 12:10:49 +02:00
Michael Natterer 436e53d390 pdb: improve docs about which procedures are affected by context settings
Also add some double blank lines so they show up as single blank
lines in the generated docs, which improves readablility.
2018-04-17 13:19:16 +02:00
Michael Natterer 93f41b344c pdb: improve docs of gimp_context_set_diagonal_neighbors() 2018-04-17 01:16:54 +02:00
Michael Natterer 90ef8b123c libgimp: properly sort gimp.defs 2018-04-16 16:13:46 +02:00
Michael Natterer 3f4995d3d7 pdb: add procedures to set the built-in gradients
gimp-context-set-gradient-fg-bg-rgb
gimp-context-set-gradient-fg-bg-hsv-cw
gimp-context-set-gradient-fg-bg-hsv-ccw
gimp-context-set-gradient-fg-transparent
2018-04-16 11:42:46 +02:00
Michael Natterer 5ee67deea5 pdb: deprecate all non-clipboard functions in the "edit" group
Still have to port script-fu scripts...
2018-04-15 16:39:59 +02:00
Michael Natterer ef3edece9b pdb: improve docs of deprecated functions
Don't unconditionally overwrite all the proc's description, author
etc.  Instead, try to preserve them and append the "Deprecated" notes
to the help texts and generated comments.

Only affects one procedure because we killed the meta info of all
other deprecated procs so far, but now we don't have to do that any
longer.
2018-04-15 16:06:00 +02:00
Michael Natterer 50536e1c38 Bug 795230 - Rename Blend tool and provide PDB compatibility
Add new PDB group "drawable_edit" which has all procedures from the
"edit" group which are not cut/copy/paste.

The new group's procedures don't have opacity, paint_mode
etc. arguments but take them from the context instead. Unlike the old
gimp-edit-fill, gimp-drawable-edit-fill now uses the context's opacity
and paint_mode.

The new gimp-drawable-edit-gradient-fill procedure uses even more
context properties which are also newly added with this commit
(gradient_color_space, gradient_repeat_mode, gradient_reverse).

And some cleanup in context.pdb.

This is still WIP, nothing in the edit group is depcreated yet.
2018-04-15 15:28:50 +02:00
Michael Natterer bf49b47620 Bug 795207 - Add color space to blend(gradient) tool options
First WIP commit, adds:

- enum GimpGradientBlendColorSpace { RGB_PERCEPTUAL, RGB_LINEAR }
- linear blending mode for gradient segments
- tool options GUI for the blend and paint tools which use gradients
2018-04-13 22:33:16 +02:00
Jehan 4bc982b84a Bug 795123 - plug-in crash starts neverending loop.
Since commit 9c8a8ae576, we don't run gimp_quit(), which properly quits
the plug-in executable, to make sure that GIMP gets the information that
it crashed. Instead quit with `exit (EXIT_FAILURE)`.
2018-04-10 14:19:34 +02:00
Michael Natterer 53fae39aee Bug 795057 - Insensitive text in plug-ins is unreadable with dark themes
Copy the fix from app/gui/themes.c to libgimp/gimpui.c so insensitive
labels look right in plug-ins too.
2018-04-08 22:55:19 +02:00
Ell 6ebc3f1b09 Makefiles: don't use -xobjective-c when linking files on Mac
Last commit caused -xobjective-c to be passed during linking on
Mac, causing object files to be treated as source files.  Add a
-xnone flag to AM_LDFLAGS, canceling the effect of -xobjective-c.

Additinally, add a -xobjective-c++ flag to AM_CXXFLAGS, so that we
can use Objective-C in C++ files on Mac, if we ever need to.
2018-04-08 04:03:55 -04:00
Ell 06950be7f0 Makefiles: don't use -xobjective-c when compiling C++ files on Mac
On Mac, pass -xobjective-c to the compiler through AM_CFLAGS, not
AM_CPPFLAGS, so that it's only used for C sources, and not C++
sources.  In the latter case, it clashes with the -std=... flag,
spewing an error.  Thanks, Partha :)
2018-04-07 16:57:52 -04:00
Jehan fa02a2c64f libgimp: add an exception handler for Windows.
Drmingw already added its own exception handler which generates crash
traces in a text file, for plug-ins as well. This additional handler is
run after Drmingw handler and allows us to do things on our own, and in
particular we could display the content of the debug traces.

Right now it simply prints these to stderr, which actually won't be of
much use on Win32, first because the console is deactivated on stable
releases, also because after tests, it doesn't look like even running
GIMP from cmd outputs to console either.

We currently don't use the same debug dialog as the core on purpose,
because we don't want everyone to send us traces for every unmaintained
third party plug-ins out there. But we should definitely allow easier
trace possibilities at some point, first to improve/debug our own core
plug-ins, and also to help third party plug-in developers!
So this commit is not making visible changes yet but is actually a first
step towards these debugging goals.
2018-04-04 20:25:29 +02:00
Jehan 76bce77d09 libgimp: various warning fixes for Win32. 2018-04-04 06:32:33 +02:00
Jehan 9c8a8ae576 libgimp: do not end the fatal and signal handlers with gimp_quit().
When ending with gimp_quit(), GIMP was not displaying the "Plug-in
crashed" error dialog, which is not good, since we lose the crash
feedback for plug-ins. Just let the plug-in continue its normal run in
order to get the error dialog.
Also protect the tracing functions, which are not working on Win32.
2018-04-04 04:47:43 +02:00