Commit Graph

23 Commits

Author SHA1 Message Date
Ell 3b0040c043 app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()

g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58.  Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.

This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.

Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 14:39:56 -04:00
Michael Natterer 827faa2a25 app: minor cleanup in gimpguide.c 2018-07-15 22:25:03 +02:00
Michael Natterer 2cd829eb85 app: add GimpAuxItem as base class for GimpGuide and GimpSamplePoint
and GimpAuxItemUndo for their respective undo classes.
2018-07-15 17:08:06 +02:00
Michael Natterer e76eb736d4 app: some cosmetic cleanup in the guide code 2018-07-15 15:51:40 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 1b6f414d4d app: add g_return_if_fail() to gimp_guide_get_style() and is_custom() 2016-04-03 20:33:01 +02:00
Michael Natterer e5b6806fe2 app: port tons of files to the new GIMP_CONFIG_PROP_FOO() macros
and remove lots of labels from calls to gimp_prop_foo_new(). Also
had to manually remove some unwanted labels that are now added
automatically, fixes bug #761880.
2016-02-11 23:46:24 +01:00
Jehan 7364c37158 app: update documentation comment of gimp_guide_custom_new().
Say in the doc that custom guides do not follow snapping settings.
2016-02-11 17:40:45 +01:00
Jehan e01d56969d app: move all guide styling to gimpcanvas-style. 2016-02-03 19:38:32 +01:00
Michael Natterer 3415d22e58 app: some cleanup in the new symmetry code, mostly harmless 2016-02-03 14:29:23 +01:00
Jehan b8fadf3ad7 app: add a "custom" guide concept.
With gimp_guide_custom_new(), you can create a custom guide with a different
style on canvas (other pattern/color/width). A custom guide won't be saved
and could be used, for instance, for specific GEGL op guiding.
2016-02-02 21:15:13 +01:00
Michael Natterer ad9fd33915 app: guide cleanup
- Move all GimpGuide members to a private struct
- Remove cruft checks for position < 0, we don't keep removed guides
  around in the image's guide list since a long time ago
- Add #define GIMP_GUIDE_POSITION_UNDEFINED G_MININT and use that
  instead of -1 (this is also a prerequisite for having guides
  outside of the image)
2014-07-10 00:20:57 +02:00
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
William Skaggs 40db64f48c Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage-arrange.[ch]: added, utility function for
	aligning and arranging things in an image.

	* app/core/gimpitem-align.[ch}: removed, no longer needed.

	* app/core/gimpimage-item-list.[ch] (gimp_image_item_list_align):
	removed this function, no longer used.

	* app/core/Makefile.am: changes described above.

	* app/core/gimpguide.c: remove bit of cruft left accidentally.

	* app/tools/gimpalignoptions.[ch]: remove "alignment type"
	option, not needed at this point.

	* app/tools/gimpaligntool.[ch]: numerous changes, most
	importantly ability to align guides, and use them for
	alignment.  More work coming on this tool.
2006-06-07 21:29:54 +00:00
William Skaggs 4a60cf418b Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpguide.[ch]: add "removed" signal and associated
	paraphernalia.

	* app/core/gimpimage-guides.c (gimp_image_remove_guide): call
	gimp_guide_removed() to cause signal emission.
2006-06-07 20:13:51 +00:00
Sven Neumann e1457fa5ca removed unused includes and property blurbs; fixed registration of the
2006-06-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpguide.c: removed unused includes and property
blurbs;
	fixed registration of the "id" property, it is not a GIMP_CONFIG
	property.
2006-06-07 18:41:38 +00:00
Sven Neumann f55b151430 removed unused includes and property blurbs.
2006-06-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpguide.c: removed unused includes and property
blurbs.
2006-06-07 18:32:25 +00:00
Michael Natterer 7499fc89ff added gimp_guide_get_ID().
2006-06-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpguide.[ch]: added gimp_guide_get_ID().

	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-guides.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-snap.c
	* app/core/gimpimage-undo-push.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell.c
	* app/tools/gimpmovetool.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/guides.pdb: use accessors instead of accessing
	GimpGuide's struct members directly.

	* app/pdb/guides_cmds.c: regenerated.
2006-06-07 15:49:59 +00:00
Sven Neumann 23e8715285 added a setter for "orientation".
2006-06-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpguide.[ch]: added a setter for "orientation".

	* app/core/gimpimage-resize.c (gimp_image_resize_with_layers):
	removed unused variable; use for() loops to iterate over guides
	and sample points.
2006-06-07 07:57:24 +00:00
Sven Neumann 04e1fe94f1 derive from GObject, we don't need any GimpObject functionality here.
2006-06-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpguide.[ch]: derive from GObject, we don't need any
	GimpObject functionality here.  Declare "orientation" and "id"
	properties CONSTRUCT_ONLY, added a gimp_guide_new() function and
	emit notify on position changes.

	* app/core/gimpimage-guides.c: use gimp_guide_new() to instantiate
	guides.

	* app/core/gimpimage.c (gimp_image_get_memsize): formatting.
2006-06-07 07:45:16 +00:00
William Skaggs a49cc445b8 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpguide.c
	* app/core/gimpguide.h: new files, implementing GuideGimp as a GimpObject

	* app/core/Makefile.am: add new files as sources

	* app/core/gimpimage-guides.h
	* app/core/gimpimage-guides.c: use the new object instead of defining
	GimpGuide here as a struct.

	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-snap.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpimage.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell.c
	* app/pdb/guides_cmds.c
	* app/tools/gimpmovetool.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/guides.pdb: include "core/gimpguide.h", and use
	g_object_ref/unref instead of gimp_image_guide_ref/unref.
2006-06-06 22:48:57 +00:00