Commit Graph

55 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 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Ell 880d3bd182 app: port GimpData subclasses from ::duplicate() to ::copy()
Finish up commit 17583ff04a, which
ported GimpGradient from ::duplicate() to ::copy(), by doing the
same for the rest of the GimpData subclasses that implement
::duplicate().

We still keep GimpData's ::duplicate() virtual function around,
even though it now points to the default implementation (which uses
::copy()) for all subclasses, since ::copy() is stronger than
::duplicate(), and we might want to have certain GimpData types
that are duplicatable, but not copyable.
2017-11-04 22:00:29 -04:00
Michael Natterer 0cb3e75f79 app: use a lot of g_clear_object() and g_clear_pointer()
More than 2000 lines of code less in app/, instead of

if (instance->member)
  {
    g_object_unref/g_free/g_whatever (instance->member);
    instance->member = NULL;
  }

we now simply use

g_clear_object/pointer (&instance->member);
2017-07-15 18:42:44 +02:00
Massimo Valentini 0ecd936f57 Bug 771208: 'Y' axis name of Flow Graph Parameter...
on Paint Dynamics curve is wrong
2016-09-14 18:32:16 +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
Michael Natterer 7449316898 app: add gimp_dynamics_is_output_enabled()
and use it to further simplify stuff. Almost no place needs to use a
GimpDynamicsOutput directly now.
2015-04-19 21:58:36 +02:00
Michael Natterer 23037b5230 app: convert all stock IDs kept around by the core by icon names
Particularly GimpViewable's stock_id. Make sure old config files
containing stock IDs are still properly parsed.
2014-05-07 01:01:56 +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 a3a62b4546 app: add shortcut functions gimp_dynamics_get_foo_value()
and use them for simple use cases instead of dynamics_get_output() and
output_get_foo_value().
2012-05-02 17:51:19 +02:00
Michael Natterer e3c0a4e549 app: move all GimpDynamics members to private 2011-03-03 18:43:56 +01:00
Michael Natterer ca2fde3950 app: move default icon assignment a few lines up 2011-02-22 01:57:52 +01:00
Alexia Death 56dd924b9c app: add default dynamics icon 2011-02-20 18:47:40 +02:00
Michael Natterer f8e8952147 app: clean up dynamics duplicate implementation 2011-02-03 19:47:52 +01:00
Martin Nordholts 93f63335dc app: End core/gimpdynamics.c with newline
Fix compiler warning.
2011-02-03 08:04:26 +01:00
Alexia Death 60a77f6db2 app: Fix and enable duplicate for dynamics 2011-02-02 21:48:10 +02:00
Michael Natterer c9bde335f0 app: don't additionally ref the standard data objects
Instead, set their statically remembered pointer as a weak pointer so
it's nullified automatically if they are ever finalized. Doesn't
actually get rid of them upon exit yet, this is just a preparation.
2010-06-24 18:38:16 +02:00
Michael Natterer 4fcf34699f app: flip context and name parameters in GimpDataNewFunc 2010-04-10 19:55:42 +02:00
Alexia Death 78a4cae2d5 app: Rewire the the feature formely known as harndess back to gui as force 2010-04-09 00:44:52 +03:00
Michael Natterer 430b0e5517 app: add a GimpContext parameter to all functions which create GimpData
and pass a context whereever needed. Fix up gimp_tool_preset_new()
to actually make a copy of the context's active tool's options.
2010-04-05 13:26:31 +02:00
Alexia Death 336de7935f app: Add dynamics to airbrush Flow 2010-03-14 19:09:55 +02:00
Alexia Death f1a1114ed7 app: Order dynamics in editor a bit more sensibly 2010-03-14 18:12:24 +02:00
Michael Natterer 652c6756c4 app: cosmetic cleanups in the new dynamics stuff in core/ 2010-02-22 08:53:50 +01:00
Alexia Death 468b30b585 app: Add type for dynamics output 2010-02-22 01:00:16 +02:00
Alexia Death 60705f79e9 app: Making spacing available as dynamic parameter
Spacing is now dynamically controllable. Unlike other parameters it
made little sense to scale down from default spacing so it scales between
current and maximum spacing.
2009-12-13 22:46:09 +02:00
Michael Natterer 22767ca7b8 Seal GimpData completely and add the missing accessors 2009-10-31 18:48:38 +01:00
Michael Natterer 135090c57f Actually use the paint option's "use-fade" property again
...and remove gimp_dynamics_input_fade_enabled(). Looks cleaner
now so must be right ;)
2009-10-13 19:33:38 +02:00
Michael Natterer 8fed74777d Rename boolean properties of GimpDynamicsOutput from "foo" to "use-foo" 2009-10-12 19:06:11 +02:00
Michael Natterer 77faffe4b7 Rename the output members of GimpDynamics from foo_dynamics to foo_output 2009-10-12 14:45:12 +02:00
Michael Natterer b6dd77ab84 Whitespace fix 2009-10-12 12:23:36 +02:00
Michael Natterer c8db734932 Make sure changes dynamics are properly saved to disk
Implement GObject::dispatch_properties_changed() and call
gimp_data_dirty() if a serializable property changed.
2009-10-11 21:39:46 +02:00
Michael Natterer 8df73b9323 Switch to using GimpDynamicsOutput's properties
* app/core/gimpdynamics.c: remove all boolean properties and add the
  outputs as properties instead. Make sure changes on the outputs get
  notified on the dynamics object.

* app/widgets/gimpdynamicseditor.c: change widget creation accordingly,
  also copy around the properties correctly when copying between
  dynamics objects (fixes NULL filenames on GimpData).
2009-10-11 21:25:28 +02:00
Michael Natterer cad2218b6a Move GimpDynamicsOutput to its own class
...but use it only as struct to keep GimpDynamics' properties
for now. More refactoring later.
2009-10-11 13:53:59 +02:00
Michael Natterer 892f43fe98 Move GimpDynamicsOutput typedef to core-types.h, some cleanup 2009-10-11 13:16:31 +02:00
Alexia Death d69b4f49e3 Fixing style I think 2009-10-11 13:54:40 +03:00
Alexia Death 424294b738 Remove the special method for mixing scale thats absolete now with limist gone. 2009-10-11 11:26:44 +03:00
Alexia Death 2656875953 Remove the silly ratio limit from scale and just make sure that transformation result is at least 1px 2009-10-11 10:57:13 +03:00
Michael Natterer ba355321cf Various cleanups in the GimpDynamics object 2009-10-11 01:19:40 +02:00
Alexia Death 9b0f6ae5e2 Make saves work a bit more. 2009-10-10 22:29:04 +03:00
Alexia Death 4a5f070217 Fixing dynamics extension on save 2009-10-10 22:05:50 +03:00
Alexia Death 0ffcad4688 Several small fixes. 2009-10-10 21:43:58 +03:00
Alexia Death 7f8b347677 Several small fixes. 2009-10-10 21:43:57 +03:00
Alexia Death 72e976cca6 Make saving work. sortof. 2009-10-10 20:46:06 +03:00
Alexia Death 212ea4cc66 Start of dynamic jitter 2009-10-04 11:40:26 +03:00
Alexia Death 3a041ad252 Lots of improvements on dynamics 2009-10-03 18:53:25 +03:00
Alexia Death 6581893616 Fix color dynamic 2009-10-03 16:54:10 +03:00
Alexia Death 0a2d99ab16 Adding all other drivers to calculation and ading several other calculation methods for differently distributed values like angle and aspect ratio. 2009-10-03 15:12:03 +03:00
Alexia Death da2920b0eb Adding random as part of the calculations, renaming calc method to linear for type 2009-10-03 14:08:05 +03:00
Alexia Death cd36753f17 Fixed loading for dynamics and made them actually accessible 2009-10-03 12:59:45 +03:00
Alexia Death 4cb185a8ba Fixing up the dynamics UI. Currently does not sync with the object in the context tho. 2009-08-25 21:28:24 +03:00