Commit Graph

129 Commits

Author SHA1 Message Date
Jehan 916d032f67 app, libgimp*, plug-ins: GimpColorButton now space-invaded.
The invasion extended to some core widgets too, in particular GimpColorPanel (a
subclass of GimpColorButton). There was quite a lot of code depending on these
widgets.
2024-02-11 23:28:03 +01:00
Anders Jonsson bdf0d88456 app, plug-ins: mark missing strings as translatable 2023-12-13 17:44:35 +00:00
Jehan 62a3889617 libgimp: rename Gimp*SelectButton widgets to Gimp*Chooser.
This name was really irking me because it's not a button (anymore? Maybe it used
to be just a button). Depending on the specific widget, it will have several
sub-widgets, including a label. And it can theoretically even be something else
than a button.

So let's just rename these widgets with the more generic "chooser" name.
2023-10-01 21:02:33 +02:00
Jehan ead5d01d27 libgimp*, plug-ins: reorganize the resource property choosers.
- Move the property widget functions for GimpResource properties into a new
  libgimp/gimppropwidgets.[ch] file. This mirrors the files
  libgimpwidgets/gimppropwidgets.[ch] which are for more generic property types.
- Rename the functions gimp_prop_chooser_*_new() to gimp_prop_*_chooser_new().
- gimp_prop_chooser_factory() doesn't need to be public.
- Add a label to GimpResourceSelectButton, make so that the
  gimp_prop_chooser_*_new() functions set the property nick to this label and
  add this label to the size group in GimpProcedureDialog.
2023-10-01 21:02:33 +02:00
Anders Jonsson 7c4ad8aed7 plug-ins: typo and spacing fixes 2023-03-26 19:20:48 +00:00
Alx Sa 3df39dee91 plug-ins: Re-add toggle behavior from GAction port
When porting IFS-Compose and GFig to GAction, I originally created
all icons as GtkToolButtons. However, the toggle buttons no longer 
appeared "pressed in" when selected.

This is fixed by creating those as GtkToggleToolButtons instead.
A lingering UIManager object was removed from IFS Compose as well.
2023-02-24 03:25:08 +00:00
Alx Sa 38c031e01d plug-ins: Port GFig to GAction/GMenuModel
Because of how many actions can change the sensitivity of "undo" options
most of the plug-in files had to be edited to pass GimpGfig to them.
2023-02-04 23:16:24 -05:00
lloyd konneker e00f2d7f50 Fix plugins to use new GimpResource. 2023-01-14 17:43:26 +01:00
lloyd konneker d59a7af38c libgimp: API refactor GUI for GimpResource
Simplifies chooser widgets (e.g. GimpBrushSelect) by eliminating attributes (e.g. opacity) of chosen resource.
See #8745, but this commit fixes that by first refactoring the code.

Refactors GUI widgets (e.g. GimpBrushSelectButton and GimpBrushSelect etc.)

Refactor by "Extract class" GimpResourceSelectButton from GimpBrushSelectButton etc.
This moves common code into an inherited class (formerly called GimpSelectButton)
but the subclasses still exist.
The subclasses mainly just do drawing now.

Refactor by "Extract module" GimpResourceSelect from GimpBrushSelect etc.
Moves common code into one file, generic at runtime on type of GimpResource,
that is, the new code dispatches on type i.e. switch statements.
In the future, when core is changed some of that can be deleted.
The files gimpbrushselect.[c,h] etc. are deleted.
The module adapts the API from core to the API of callbacks to libgimp.

Note that core is running the resource chooser (select) widgets remotely.
Core is still calling back over the wire via PDB with more attributes
than necessary.
The new design gets the attributes from the resource themselves,
instead of receiving them from core callback.
The libgimp side adapts by discarding unneeded attributes.
In the future, core (running choosers for plugins) can be simplified also.

Fix gimp_prop_chooser_brush_new same as other resources.

Finish changes, and clean style.

Annotations
2023-01-14 16:38:40 +00:00
Jehan df723aca28 plug-ins: use GimpChannelOps in gfig rather than using a custom…
… SelectionType enum which lists anyway the same.

Fixes various warnings:

> warning: implicit conversion from ‘SelectionType’ to ‘GimpChannelOps’
2021-04-06 17:27:08 +02:00
Jehan ca8bc2bc1d app, libgimp, pdb, plug-ins: more functions moved to get|set().
The gimp_drawable_type() is an issue though as gimp_drawable_get_type()
is already defined as a common GObject API.
Though I'm actually wondering if GimpImageType is well called. Rather
than Type, shouldn't we go with ColorModel?

sed -i 's/\<gimp_drawable_bpp\>/gimp_drawable_get_bpp/g' "$@"
sed -i 's/\<gimp_drawable_width\>/gimp_drawable_get_width/g' "$@"
sed -i 's/\<gimp_drawable_height\>/gimp_drawable_get_height/g' "$@"
sed -i 's/\<gimp_drawable_offsets\>/gimp_drawable_get_offsets/g' "$@"
2021-04-06 14:34:31 +02:00
Jehan d95f417719 app, libgimpwidgets, modules, plug-ins: code changes after GimpScaleEntry…
… reclassing as GimpLabelSpin subclass.
2020-11-05 18:06:52 +01:00
Jehan b3c0ba061b app, libgimpwidgets, modules, plug-ins: finishing GimpScaleEntry port.
Renaming the temporary function gimp_scale_entry_new2() into
gimp_scale_entry_new() now that the original code is entirely gone. This
is now a fully-fledged widget with a nice and proper introspectable API.
2020-11-01 02:46:20 +01:00
Jehan 7ebd19636c plug-ins, modules: more port to GimpScaleEntry. 2020-10-31 02:07:35 +01:00
Elad Shahar 0a611bd8ad Issue #5069: Gfig uses the Stroke color for filling instead of the fill color 2020-07-12 21:43:44 +02:00
Michael Natterer 1bca89163d libgimpbase: remove gimp_personal_rc_file()
and port its remaining users to gimp_directory_file().
2019-09-21 18:08:13 +02:00
Michael Natterer df8d5b02ae libgimp, plug-ins: remove the "preview" parameter from gimp_ui_init()
It's dead since a looong time.
2019-09-20 19:56:00 +02:00
Jehan 962e8b995e plug-ins: port gfig to GimpImage|Drawable. 2019-08-22 15:54:36 +02:00
Michael Natterer 91f27dfc02 plug-ins: replace stock icons in gfig by a resource 2019-07-20 16:27:32 +02:00
luz.paz 386587736f Misc. typo fixes
Found via `codespell`
2018-09-16 18:49:18 -04:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Simon Budig 7d64cf62c6 libgimpwidgets: rename the _grid()-Variants of gimp_scale_entry_*
Adjust all plugins to follow accordingly.

This concludes the GtkTable'ocide.
2018-05-20 21:06:35 +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
Simon Budig b169f464db gfig: kill GtkTable 2018-05-20 21:06:34 +02:00
Michael Natterer f133f04dcb plug-ins: s/GtkObject/GtkAdjustment/ 2018-05-20 21:06:29 +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 e16c8a2352 Move the new "default_new_layer_mode" APIs to the image...
...in both the core and libgimp.

Images now know what the default mode for new layers is:

- NORMAL for empty images
- NORMAL for images with any non-legacy layer
- NORMAL_LEGAVY for images with only legacy layers

This changes behavior when layers are created from the UI, but *also*
when created by plug-ins (yes there is a compat issue here):

- Most (all?) single-layer file importers now create NORMAL layers
- Screenshot, Webpage etc also create NORMAL layers

Scripts that create images from scratch (logos etc) should not be
affected because they usually have NORMAL_LEGACY hardcoded.

3rd party plug-ins and scripts will also behave old-style unless they
get ported to gimp_image_get_default_new_layer_mode().
2017-08-21 20:18:00 +02:00
Michael Natterer 838449254a plug-ins: use gimp_get_default_new_layer_mode() for most new layers
instead of hardcoding NORMAL_LEGACY.
2017-08-20 17:12:46 +02:00
Massimo Valentini f2306abc0a Bug 761170: Warnings building with clang
Fix some of the warnings.
2017-07-15 21:05:56 +02:00
Jehan 16c72dacad plug-ins: minor tab cleanup. 2017-07-15 13:31:47 +02:00
Michael Natterer dda54c1df8 Deprecate stock items for good and change all icon defines to GIMP_ICON_*
Try to sort all GIMP_ICON_* defines into FDO categories like in
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html

Add defines for all icons we override, rename some icons to their FDO
standard names, and mark the ones we duplicate with a comment so we
don't forget to rename those to standard names in 3.0.
2017-03-05 16:01:59 +01:00
Michael Natterer 3cf423f0cd *: rename NORMAL to NORMAL_LEGACY and NORMAL_LINEAR to NORMAL
and make NORMAL_LEGACY immutable.
2017-02-26 16:26:34 +01:00
Michael Natterer 801bd8fb3f plug-ins: get rid of icons in dialog buttons (use labels not stock IDs) 2017-02-12 16:18:54 +01:00
Michael Natterer 66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
Richard Kreckel dd9b0fc55b Bug 768044 - Fix many typos
This fixes many typos in comments and one in a user-visible string (msgid
"center abscisse" changed to "center abscissa" in affected po files. too).
2016-06-26 00:35:24 +02:00
Jehan 8a37c928eb app, plug-ins, libgimp*: clean out all remaining trailing spaces/tabs.
Rather than just discovering them by chance, a simple grep and some
search and replace are much more efficient! :-)
Cleaning only done on C and automake files.
2016-06-02 02:04:26 +02:00
Simon Budig 9a8d2f577e fix some pieces of nonsensical code
Spotted by Andrey Karpov using static code analysis:
   http://www.viva64.com/en/b/0273/
2014-08-16 00:37:13 +02:00
Michael Natterer 425748dab0 libgimpbase, *: rename GimpFillType values: GIMP_FOO_FILL -> GIMP_FILL_FOO
Change all users accordingly and add compat enum values and compat
constants to script-fu and pygimp.
2014-06-03 01:11:32 +02:00
Michael Natterer 22c222291d libgimpbase,*: clean up enum values in gimpbaseenums.h
GIMP_ADD_foo_MASK -> GIMP_ADD_MASK_foo
GIMP_foo_MODE -> GIMP_BLEND_foo
GIMP_foo_CLONE -> GIMP_CLONE_foo
GIMP_foo -> GIMP_DODGE_BURN_TYPE_foo
GIMP_foo -> GIMP_TRANSFER_foo

Add compat values for the old names and compat code to script-fu
and pygimp.
2014-04-29 20:58:30 +02:00
Téo Mazars 92e9c0dc4b gfig: Remove unneeded and deprecated drawable accessors. 2013-07-13 19:18:25 +02:00
Michael Natterer 2a30a2bb74 Bug 684698 - Preferences-Folders: only 15 folder items accepted
Raise "max_paths" from 16 to 256 in all calls to gimp_path_parse().
2012-09-26 23:29:51 +02:00
Alexis Wilhelm 34000d4ce2 Bug 672793 - GFig cannot paint closed paths outside of the layer 2012-03-25 14:51:39 +02:00
Mikael Magnusson f68acc3946 gfig: draw rectangular grid on whole pixels, set correct defaults in combo boxes. 2012-02-16 18:14:17 +01:00
Massimo Valentini 261da8a4ab Bug 642728: Use cairo to draw Gfig 2012-02-16 18:07:59 +01:00
Massimo Valentini a1d7a4dba4 gfig: select the correct layer GimpImageType
and avoid a warning in a useless (but not unreachable)
code path

and do not dereference a NULL pointer when a style name
includes a white space (ex. "default style")
2012-02-16 18:07:59 +01:00
Michael Natterer 19b9bfd189 libgimpwidgets: add gtk_scale_new() to gimp3migration.[ch]
and use it all over the place. Also change some GtkObject* variables
to GtkAdjustment*.
2011-10-02 14:36:41 +02:00
Michael Natterer dcb4c6e34a plug-ins: use gtk_box_new() 2011-09-30 12:18:24 +02:00
Massimo Valentini 35524c7c5c plug-ins/gfig: silence a warning and commit on close
Clicking on Close deleted the work done, on Cancel
showed a warning.

Tested terminating with:
<Alt>F4
Esc
<Ctrl>C
File->Close
Close button
Cancel button
2011-08-31 18:04:25 +02:00
Martin Nordholts 204d70739d plug-ins: Stop using gtk_range_set_update_policy() in gfig 2011-07-05 22:13:19 +02:00
Michael Natterer 83bbb67781 plug-ins: #undef GDK_DISABLE_DEPRECATED so we are 64 bit safe
will revert after 2.7.2 so we see the warnings again.
2011-04-14 21:16:40 +02:00