Commit Graph

83 Commits

Author SHA1 Message Date
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
Niels De Graef f663d26ab5 Migrate from intltool to gettext
intltool has long been dead upstream. Let's not poke the dead corpse,
please.

This commit is quite large, but that's mostly since trying to support a
hybrid of both gettext and intltool with both Meson and Autotools was
really hard, so I stopped trying.

Due to gettext relying on quite some things being at the exactly right
place in the autotools build (like `ABOUT-NLS` and `config.rpath`) we
really needed to cleanup the `autogen.sh` to only call `aclocal` and
`autoreconf`. No more strange magic; I tried to do it without changing
too much in the file, and things just broke. If people want to do
something more custom, they can just change the script directly. This
change also uncovered some problems in our `configure.ac`, like using
deprecated macros.

The following major changes happened:

* meson: Changed `custom_target()` to `i18n.merge_file()` for all
  supported file types
* Added `.its` and `.loc`  files for the GIMP-specific XML formats, so
  that gettext understands them
* For the `.isl` (Window installer stuff) file, there's no easy way to
  do this in gettext, so instead we start from an XML file (again with
  its own ITS rules etc), translate that with gettext, and then use
  `xsltproc` with a bit of magic to output the .isl file for each
  language
* the `po*/Makefile.in.in` files are migrated to `Makevars` files,
  which gettext natively understands.

Fixes: https://gitlab.gnome.org/GNOME/gimp/-/issues/8028
2022-06-25 10:25:49 +02:00
Piotr Drąg d6913fd622 Update POTFILES.in 2020-12-06 12:54:21 +01:00
Jehan 67e2e1b5bb app, libgimp, plug-ins: move Orientation metadata handling into core.
Orientation is now handled by core code, just next to profile conversion
handling.

One of the first consequence is that we don't need to have a non-GUI
version gimp_image_metadata_load_finish_batch() in libgimp, next to a
GUI version of the gimp_image_metadata_load_finish() function in
libgimpui. This makes for simpler API.
Also a plug-in which wishes to get access to the rotation dialog
provided by GIMP without loading ligimpui/GTK+ (for whatever reason)
will still have the feature.

The main advantage is that the "Don't ask me again" feature is now
handled by a settings in `Preferences > Image Import & Export` as the
"Metadata rotation policy". Until now it was saved as a global parasite,
which made it virtually non-editable once you checked it once (no easy
way to edit parasites except by scripts). So say you refused the
rotation once while checking "Don't ask again", and GIMP will forever
discard the rotation metadata without giving you a sane way to change
your mind. Of course, I could have passed the settings to plug-ins
through the PDB, but I find it a lot better to simply handle such
settings core-side.

The dialog code is basically the same as an app/dialogs/ as it was in
libgimp, with the minor improvement that it now takes the scale ratio
into account (basically the maximum thumbnail size will be bigger on
higher density displays).

Only downside of the move to the core is that this rotation dialog is
raised only when you open an image from the core, not as a PDB call. So
a plug-in which makes say a "file-jpeg-load" PDB call, even in
INTERACTIVE run mode, won't have rotation processed. Note that this was
already the same for embedded color profile conversion. This can be
wanted or not. Anyway some additional libgimp calls might be of interest
to explicitly call the core dialogs.
2020-09-24 12:43:41 +02:00
Piotr Drąg 09475b539a Update POTFILES.in 2020-09-13 13:59:44 +02:00
Michael Natterer db6a0c6841 po-libgimp: update POTFILES.in 2019-10-23 19:08:34 +02:00
Michael Natterer 8b53d25eb9 po-libgimp: update POTFILES.in 2019-09-25 01:05:55 +02:00
Michael Natterer 81ff4941a0 libgimpmodule: clean up GimpModule and GimpModuleDB
- make all struct members private
- add accessors
- rename functions
- remove unused API
2019-09-13 13:11:23 +02:00
Michael Natterer a351ce9126 Remove the entire old plug-in interface 2019-09-04 00:03:12 +02:00
Piotr Drąg 76d1ad414d Update POTFILES.in 2019-08-12 13:35:04 +02:00
Michael Natterer 8a462e867d libgimp: add a GimpProcedure class
Mostly the same code as GimpProcedure in app/pdb/.

Move the "run" function to GimpProcedure. Add API to GimpPlugIn to
list and create procedures, and always keep a list of the plug-ins
procedures around. Still only using the old params and return_vals.
2019-07-26 02:11:35 +02:00
Piotr Drąg 2e6b8082c8 Update POTFILES.in 2018-07-22 18:55:43 +02:00
Piotr Drąg 3d6a9f3ab5 Update POTFILES.in 2018-07-17 16:35:21 +02:00
Michael Natterer 2b8b780b6a app, libgimpwidgets: all GimpColorHexEntries should have the same tooltip
Set the tooltip in GimpColorHexEntry itself and remove all other
tooltip setting. This just moves the translatable string sround in
libgimpwidgets/, and even removes it from app/.
2018-06-24 14:19:25 +02:00
Piotr Drąg cb995432d1 Update POTFILES.in 2018-05-20 21:19:46 +02:00
Michael Natterer dae87ee1c7 libgimpwidgets: remove deprecated files from the build 2018-05-20 21:06:26 +02:00
Ell 5b118a260b modules: add clip-warning display filter
The clip-warning display filter highlights pixels with at least one
componet whose value is outside the [0,1] range, or is NaN.
2017-11-02 16:12:33 -04:00
Michael Natterer 3e2429fe6f modules: remove the "lcms" and "proof" display filters 2017-05-10 12:53:51 +02:00
Michael Natterer 40981f43cf libgimp*: get rid of icons in dialog buttons (use labels not stock IDs) 2017-02-12 16:18:54 +01:00
Michael Natterer 4b18b1ac39 libgimpconfig: rename gimpcolorconfig-enums.[ch] to gimpconfigenums.[ch]
It makes no sense to do this differently than in all other of our
libraries.
2016-06-06 21:05:16 +02:00
Michael Natterer 71894bd787 libgimpwidgets: rename gimpstock.[ch] to gimpicons.[ch]
because stock is on its way out, so we better start renaming and
deprecating stuff sooner than later.
2015-12-12 20:44:46 +01:00
Michael Natterer f0814dcf33 libgimp: rename gimpmetadata.[ch] to gimpimagemetadata.[ch]
so the filenames match the contained namespace. Sort includes in
gimpui.h alphabetically.
2015-09-25 00:40:57 +02:00
Michael Natterer 0d3978df87 libgimpwidgets: improve the looks of GimpColorProfileView 2015-08-22 22:00:51 +02:00
Michael Natterer 4910c28957 libgimpcolor: rename the gimp_lcms_*() functions to gimp_color_profile_*()
because it doesn't make sense to call the typedef GimpColorProfile
but the function namespace gimp_lcms_*().
2015-06-03 09:41:23 +02:00
Michael Natterer f322be2fac libgimpcolor: add gimp_lcms_profile_open_from_file() and _from_data()
which work just like their lcms counterparts but return an optional
md5 digest of the ICC data and a GError in case opening fails.
2014-03-16 15:57:14 +01:00
Michael Natterer 9c7cd2508f app, libgimpwidgets: move GimpProfileChooserDialog to libgimpwidgets
and call it GimpColorProfileChooserDialog. Make libgimpwidgets
depend on lcms and make it query the profile directly.
2014-03-14 22:03:08 +01:00
Michael Natterer 71b189e4da modules: rename color-selector-cmyk-lcms.c to color-selector-cmyk.c
overwriting the old color-selector-cmyk.c
2013-11-03 22:06:51 +01:00
Hartmut Kuhse 21bed1e2fb Completely rewrite metadata handling using gexiv2
Based on original patches from Hartmut Kuhse and modified
by Michael Natterer. Changes include:

- remove libexif dependency and add a hard dependency on gexiv2
- typedef GExiv2Metadata to GimpMetadata to avoid having to
  include gexiv2 globally
- add basic GimpMetadata handling functions to libgimpbase
- add image and image file specific metadata functions to libgimp,
  including the exif orientation image rotate dialog
- port plug-ins to use the new APIs
- port file-tiff-save's UI to GtkBuilder
- add new plug-in "metadata" to view the image's metadata
- keep metadata around as GimpImage member in the core
- update the image's metadata on image size, resolution and precision
  changes
- obsolete the old metadata parasites
- migrate the old parasites to new GimpMetadata object on XCF load
2013-10-27 01:02:17 +02:00
Michael Natterer 5334cc13b8 po-libgimp: add libgimpwidgets/gimpwidgets-private.c to POTFILES.in 2010-06-11 10:04:15 +02:00
Martin Nordholts 841a8426e0 Sort entries.
* POTFILES.in: Sort entries.

svn path=/trunk/; revision=27714
2008-11-24 17:26:56 +00:00
Sven Neumann 2fcef8b03e Next step towards fixing bug #344818:
2008-08-16  Sven Neumann  <sven@gimp.org>

	Next step towards fixing bug #344818:

	* libgimp/gimp.[ch]: keep the last error status and error 
message
	in libgimp. Added new functon gimp_pdb_get_error() that allows 
to
	retrieve it.

	* libgimp/gimp.def: updated.

	* plug-ins/pygimp/gimpmodule.c (pygimp_vectors_import_from_file)
	(pygimp_vectors_import_from_string): use the new function to get
	a more useful error message.


svn path=/trunk/; revision=26602
2008-08-16 17:18:13 +00:00
Sven Neumann 49b30c415b follow name changes in the modules directory.
2008-08-11  Sven Neumann  <sven@gimp.org>

	* POTFILES.in: follow name changes in the modules directory.

	* de.po: updated German translation.


svn path=/trunk/; revision=26507
2008-08-11 18:49:34 +00:00
Michael Natterer 0216a7ca78 s/triangle/wheel/
2008-08-08  Michael Natterer  <mitch@gimp.org>

	* POTFILES.in: s/triangle/wheel/


svn path=/trunk/; revision=26449
2008-08-08 15:28:37 +00:00
Sven Neumann 7ac14afc0f fix intltool warning by adding gimpcpuaccel.c
2008-07-11  Sven Neumann  <sven@gimp.org>

	* POTFILES.in: fix intltool warning by adding gimpcpuaccel.c

	* de.po: updated german translation.


svn path=/trunk/; revision=26131
2008-07-11 15:23:40 +00:00
Sven Neumann a38dc58138 added libgimpwidgets/gimphelpui.c.
2008-04-01  Sven Neumann  <sven@gimp.org>

	* POTFILES.in: added libgimpwidgets/gimphelpui.c.


svn path=/trunk/; revision=25327
2008-03-31 22:08:07 +00:00
Sven Neumann af48aefef6 - added POTFILES.skip in all po directories
- added some missing files to POTFILES.in

svn path=/trunk/; revision=23270
2007-08-15 12:49:43 +00:00
Sven Neumann f3675a45ad libgimpwidgets/Makefile.am libgimpwidgets/gimpwidgets.h
2007-08-14  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/Makefile.am
	* libgimpwidgets/gimpwidgets.h
	* libgimpwidgets/gimpwidgetstypes.h
	* libgimpwidgets/gimpcolorprofilecombobox.[ch]
	* libgimpwidgets/gimpcolorprofilestore.[ch]
	* libgimpwidgets/gimpcolorprofilestore-private.h: new widget to
	select color profiles.

	* libgimpwidgets/gimpwidgets.def: updated.

	* app/widgets/gimpprofilechooserdialog.[ch]: remember the name of
	the last previewed profile.

	* app/dialogs/preferences-dialog.c: use the new color profile
	combo-box.

	* plug-ins/common/lcms.c: use the new color profile combo-box.

svn path=/trunk/; revision=23253
2007-08-14 16:01:04 +00:00
Sven Neumann 502d8f71e8 removed resolution entry symbols. 2007-05-04 Sven Neumann <sven@gimp.org>
2007-05-04  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpwidgets.def: removed resolution entry 
symbols.
2007-05-04  Sven Neumann  <sven@gimp.org>

	* POTFILES.in: removed gimpresolutionentry.c.


svn path=/trunk/; revision=22395
2007-05-03 22:17:27 +00:00
Tor Lillqvist d57d22835c Add modules/controller_dx_dinput.c.
2007-02-20  Tor Lillqvist  <tml@novell.com>

	* POTFILES.in: Add modules/controller_dx_dinput.c.


svn path=/trunk/; revision=21966
2007-02-20 21:01:37 +00:00
Michael Natterer 65d7a72639 specify encoding (bug #389201).
2007-01-04  Michael Natterer  <mitch@gimp.org>

	* POTFILES.in: specify encoding (bug #389201).


svn path=/trunk/; revision=21640
2007-01-04 10:12:37 +00:00
Sven Neumann 6f73b5cfa5 added missing files.
2007-01-03  Sven Neumann  <sven@gimp.org>

	* POTFILES.in: added missing files.

	* de.po: minor update.


svn path=/trunk/; revision=21630
2007-01-03 11:19:39 +00:00
Funda Wang 7b8a0ba26f Added missing files. 2006-01-25 06:06:04 +00:00
Michael Natterer a4cbffb6fb added libgimp/gimpprocbrowserdialog.c and libgimp/gimpprocview.c
2005-08-02  Michael Natterer  <mitch@gimp.org>

	* POTFILES.in: added libgimp/gimpprocbrowserdialog.c and
	libgimp/gimpprocview.c
2005-08-02 16:38:44 +00:00
Sven Neumann 3dcf54db08 added libgimpwidgets/gimpresolutionentry.c.
2005-07-18  Sven Neumann  <sven@gimp.org>

	* POTFILES.in: added libgimpwidgets/gimpresolutionentry.c.

	* de.po: updated.
2005-07-18 16:58:35 +00:00
Manish Singh 83d0ba039e added libgimp/gimpfontselectbutton.c
2005-06-04  Manish Singh  <yosh@gimp.org>

        * POTFILES.in: added libgimp/gimpfontselectbutton.c
2005-06-04 22:37:34 +00:00
Michael Natterer 1506480dd2 added libgimpwidgets/gimpwidgetsenums.c
2005-05-22  Michael Natterer  <mitch@gimp.org>

	* POTFILES.in: added libgimpwidgets/gimpwidgetsenums.c
2005-05-22 21:34:53 +00:00
Michael Natterer a103062545 added libgimpwidgets/gimpbrowser.c
2005-05-19  Michael Natterer  <mitch@gimp.org>

	* POTFILES.in: added libgimpwidgets/gimpbrowser.c
2005-05-18 23:50:51 +00:00
Sven Neumann 5157dba5cb Another step towards color management:
2005-02-21  Sven Neumann  <sven@gimp.org>

	Another step towards color management:

	* modules/Makefile.am
	* modules/cdisplay_lcms.c: added new color display module that
	implements color management for the image displays. Still work
	in progress...

	* modules/cdisplay_proof.c: no need to include <string.h> here.

	* libgimpconfig/gimpcolorconfig.[ch]: added new property
	"display-module" to configure the display color management module.

	* app/display/gimpdisplayshell-filter.[ch]
	* app/display/gimpdisplayshell.c: create the configured color
	management display filter for each display.
2005-02-21 00:45:17 +00:00
Sven Neumann 215cbc7022 added new files for GimpColorConfig.
2005-02-08  Sven Neumann  <sven@gimp.org>

	* POTFILES.in: added new files for GimpColorConfig.
2005-02-08 00:07:06 +00:00
Sven Neumann 38cb04bddc app/widgets/gimppropwidgets.c moved to libgimpwidgets.
2005-02-05  Sven Neumann  <sven@gimp.org>

	* POTFILES.in: app/widgets/gimppropwidgets.c moved to libgimpwidgets.
2005-02-05 10:51:58 +00:00