Commit Graph

61 Commits

Author SHA1 Message Date
Jehan b11e529316 app: fix a few warnings.
Fixes:
> warning: passing argument 1 of ‘gimp_list_get_sort_func’ from incompatible pointer type

Since commit f4c6d4bb79.
2020-05-14 17:01:13 +02:00
Ell c4cc015c43 app: add gimp_container_search()
Add a new GimpContainer::search() virtual function, and a
corresponding gimp_container_search() function, which works
similarly to gimp_container_foreach(), except that the callback
returns a boolean.  When the callback returns TRUE, the search is
stopped, and the current object is returned.

Implement GimpContainer::search() in GimpList.
2020-02-01 13:14:29 +02:00
Ell a63bf32310 app: don't merge similarly-named objects during GimpContainer deserialization ...
... if not using unique names

Add a new GimpContainer::get_unique_names() virtual function, and a
corresponding gimp_container_get_unique_names() function, which
determines if the container uses unique names for its objects.
Override get_unique_names() in GimpList, to return the corresponding
property.

In gimp_container_deserialize(), don't merge new objects with
existing objects sharing the same name if the container doesn't use
unique names.
2020-01-30 02:51:56 +02:00
Niels De Graef 1dda60154c Use "Returns:" to annotate return values
To be able to annotate return values through GObject-introspection, you
need to make sure it is tagged with `Returns:` and not something else.
2019-08-03 07:53:47 +00:00
Michael Natterer 63695b4b21 libgimbase: merge gimpparam.h into gimpparamspecs.h
which means that it's now included normally via gimpbase.h
and not any longer via gimpbasetypes.h which we only did out
of lazyness. A *lot* of files in libgimp* and app/ now need to
2019-07-31 10:16:21 +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 28e1a379e6 app: remove const qualifiers from all object parameters
They are unreliable because every type checking cast discards them,
they are useless anyway, visual clutter, added inconsistently, and
generally suck. Wanted to do this a long time ago, it was a bad idea
in the first place.
2016-05-19 23:54:14 +02:00
Michael Natterer 39909b6008 app: replace GimpList's internal GList with a GQueue
so we can easily iterate in reverse order, and access the last element
in O(1). Nothing makes use of this yet.
2016-05-01 15:22:44 +02:00
Michael Natterer 47ec9e2e1a app: handle an index of -1 generically in GimpContainer::reorder()
by turning the -1 into n_children - 1 directly in gimp_container_reorder()
instead of having all subclasses deal with the -1 separately. Remove -1
handling from gimp_list_reorder().

Also, optimize reordering to the same index away without increasing
the function's cost (it was doing a gimp_container_have() before, now
it doees gimp_container_get_child_index(), which both have the same
cost).
2013-10-11 23:09:30 +02:00
Michael Natterer 6e4599806f app: add gimp_list_get_sort_func() 2012-05-02 17:50:48 +02:00
Michael Natterer 52eaf96a6c Some of the stupidity from the previous commit was copied from here 2010-02-09 22:32:43 +01:00
Martin Nordholts 957cf2cfa9 app: Always use gimp_object_get_name()
Begin to consider GimpObject::name as private and always use
gimp_object_get_name(). Change gimp_object_get_name() to take an
untyped pointer so we don't have to do so awfully many casts. There is
a runtime check for the type inside the function anyway.
2009-08-29 12:41:29 +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
Martin Nordholts 2f25fb132f Use GimpContainer getters instead of poking into the class
instance struct.

* app/actions/context-commands.c
* app/actions/data-commands.c
* app/actions/plug-in-commands.c
* app/actions/templates-commands.c
* app/core/gimp-utils.c
* app/core/gimpdrawablestack.c
* app/core/gimpitemstack.c
* app/core/gimplist.c
* app/gui/gui-vtable.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainercombobox.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainerentry.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontainerview-utils.c
* app/widgets/gimpcontainerview.c
* app/widgets/gimpdataeditor.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c

svn path=/trunk/; revision=27693
2008-11-20 23:43:58 +00:00
Martin Nordholts 5aeb568650 s/gimp_container_children_type/gimp_container_get_children_type/
s/gimp_container_policy/gimp_container_get_policy/
s/gimp_container_num_children/gimp_container_get_n_children/

* app/actions/actions.c
* app/actions/file-actions.c
* app/actions/file-commands.c
* app/actions/tool-options-actions.c
* app/actions/tools-actions.c
* app/actions/tools-commands.c
* app/actions/vectors-actions.c
* app/core/gimpcontainer-filter.c
* app/core/gimpcontainer.c
* app/core/gimpcontainer.h
* app/core/gimpimage-convert.c
* app/core/gimpimage-flip.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-undo.c
* app/core/gimpimage.c
* app/core/gimpimagefile.c
* app/core/gimplist.c
* app/core/gimpundostack.c
* app/dialogs/palette-import-dialog.c
* app/dialogs/quit-dialog.c
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell-title.c
* app/gui/gui-vtable.c
* app/menus/tool-options-menu.c
* app/tools/gimp-tools.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimpimagepropview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c

svn path=/trunk/; revision=27692
2008-11-20 22:45:19 +00:00
Michael Natterer 26de288d8b Fix old bug in the GimpContainer implementation that wasn't visible before
2008-10-11  Michael Natterer  <mitch@gimp.org>

	Fix old bug in the GimpContainer implementation that wasn't
	visible before the drawable stack completly b0rked when removing
	the second-last item:

	* app/core/gimpcontainer.c: add default implementations of ::add()
	and ::remove() and update container->num_children there instead of
	in the gimp_container_add() and _remove() wrapper functions.
	This way not only external callbacks connected to the "add" and
	"remove" signals are called with the correct num_children, also
	implemtations of ::add() and ::remove() in subclass have the right
	number available before/after upchaining. Add paranoia code to the
	wrapper functions which check if the subclass reall chains up.

	* app/core/gimplist.c: chain up in add() and remove().


svn path=/trunk/; revision=27227
2008-10-11 10:14:21 +00:00
Michael Natterer b646fd3d17 don't crash if an object has a NULL name. Move variables to local scopes.
2008-05-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplist.c (gimp_list_uniquefy_name): don't crash if an
	object has a NULL name. Move variables to local scopes. Remove
	redundant casts.


svn path=/trunk/; revision=25723
2008-05-20 21:30:40 +00:00
Michael Natterer 71df1ab46d add boolean "append" property which makes gimp_container_add() append to
2008-05-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplist.[ch]: add boolean "append" property which
	makes gimp_container_add() append to the list instead of the
	default prepend.

	* app/core/gimp.c: create the display list with append = TRUE so
	the images menu is in a proper order.


svn path=/trunk/; revision=25627
2008-05-10 18:42:41 +00:00
Sven Neumann df8bf728a6 app/core/Makefile.am app/core/core-types.h added GimpToolPresets, derived
2006-12-10  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimptoolpresets.[ch]: added GimpToolPresets, derived
	from GimpList.

	* app/core/gimptoolinfo.[ch]: use the new type, renamed
	member "options_presets" to "presets".

	* app/actions/tool-options-actions.c
	* app/actions/tool-options-commands.c
	* app/core/gimptooloptions.[ch]
	* app/menus/tool-options-menu.c
	* app/widgets/gimptooloptionseditor.c: changed accordingly.

	* app/tools/gimp-tools.c: let the GimpToolPresets object deal
with
	loading and saving the presets from ${gimpdir}/tool-options.

	* app/core/gimpcontainer-filter.c
	* app/core/gimpdocumentlist.c
	* app/core/gimplist.c
	* app/text/gimpfontlist.c: use canonical property names.
2006-12-10 19:13:58 +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
Sven Neumann 40a519e135 for debugging purposes, set the children type as the name of the list.
2006-06-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimplist.c (gimp_list_new, gimp_list_new_weak): for
	debugging purposes, set the children type as the name of the list.
2006-06-16 09:42:13 +00:00
Sven Neumann 6ebcf700d1 removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15  Sven Neumann  <sven@gimp.org>

	* app/*/*.c:
	* lib*/*.c: removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15 09:46:31 +00:00
Sven Neumann 049872b361 app/*.[ch] converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* app/*.[ch]
	* app/*/*.[ch]: converted tabs to spaces.
2006-04-12 12:49:29 +00:00
Sven Neumann 5fc9bd4096 app/actions/tool-options-commands.c app/core/gimp.c
2006-04-07  Sven Neumann  <sven@gimp.org>

	* app/actions/tool-options-commands.c
	* app/core/gimp.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpbuffer.c
	* app/core/gimpcontext.c
	* app/core/gimpdatafactory.c
	* app/core/gimpgradient-load.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimplist.c
	* app/core/gimppalette.c
	* app/dialogs/template-options-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/paint/gimp-paint.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptemplateview.c
	* app/widgets/gimptoolbox-dnd.c: use gimp_object_set_static_name()
	and gimp_object_take_name() where appropriate.
2006-04-07 10:51:22 +00:00
Michael Natterer e1ceed5147 define GIMP_PARAM_STATIC_STRINGS which is G_PARAM_STATIC_NAME|NICK|BLURB.
2006-01-18  Michael Natterer  <mitch@gimp.org>

	* app/config/config-types.c: define GIMP_PARAM_STATIC_STRINGS
	which is G_PARAM_STATIC_NAME|NICK|BLURB. Also define
	GIMP_PARAM_READABLE, _WRITABLE and _READWRITE which include
	GIMP_PARAM_STATIC_STRINGS.

	* app/*/*.c: use them for all object properties so their
	strings are not copied.
2006-01-18 20:29:40 +00:00
Michael Natterer 0d4a10fee4 app/config/*.c app/core/*.c app/display/*.c app/text/*.c port to
2005-12-10  Michael Natterer  <mitch@gimp.org>

	* app/config/*.c
	* app/core/*.c
	* app/display/*.c
	* app/text/*.c
	* app/vectors/*.c: port to G_DEFINE_TYPE() and friends. Some related
	core reordering and cleanup.
2005-12-10 19:24:36 +00:00
Michael Natterer 1c62ddef4d Long overdue core container cleanup:
2004-05-24  Michael Natterer  <mitch@gimp.org>

	Long overdue core container cleanup:

	* app/core/gimplist.[ch]: added "unique-names" and "sort-func"
	properties and merged the resp. code from GimpDataList into
	GimpList. Removed "policy" parameters from gimp_list_new() and
	added "unique_names". Added new constructor gimp_list_new_weak().
	Made public function gimp_list_uniquefy_name() private.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpdatalist.[ch]: removed. Its functionality is
	entirely in GimpList now.

	* app/core/gimpdata.[ch]: added gimp_data_name_compare() which
	used to live in GimpDataList.

	* app/core/gimp.c
	* app/core/gimpdatafactory.c
	* app/core/gimpimage.c
	* app/core/gimptoolinfo.c
	* app/core/gimpundostack.c
	* app/paint/gimp-paint.c
	* app/tools/gimp-tools.c
	* app/widgets/gimpdevices.c
	* app/widgets/gimptemplateeditor.c
	* app/widgets/gimpundoeditor.c: changed list creation accordingly.

	Made gimp->templates, gimp->named_buffers, tool_info->presets and
	the image's lists of layers, channels and vectors automatically
	ensure unique names.

	* app/widgets/gimptemplateview.c
	* app/actions/file-commands.c
	* app/actions/templates-commands.c
	* app/actions/tool-options-commands.c: removed calls to
	gimp_list_uniquefy_name().

	* app/core/gimpitem.c: removed major insanity where the items
	themselves where ensuring their unique names. Bah!

	* app/core/gimplayer.c (gimp_layer_name_changed): chain up
	conditionally.

	* app/core/gimplayermask.c (gimp_layer_mask_name_changed): removed
	because there is no need any more to keep the parent
	implementation from being invoked.
2004-05-24 10:49:34 +00:00
Michael Natterer 198807805e removed this function. It was removing all items without freezing the
2004-03-16  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplist.c (gimp_list_dispose): removed this function.
	It was removing all items without freezing the container first,
	which caused excessive signal handler activity in GimpContext.

	Cleaned up the whole file a bit.

	* app/core/gimpcontainer.c (gimp_container_dispose): call
	gimp_container_clear() which does the right thing and e.g. speeds
	up quitting significantly when gimp->documents is huge.
	Reported by Jimmac.
2004-03-16 13:03:24 +00:00
Sven Neumann fd30d5c976 app/config/gimpbaseconfig.h use gint64 for all memsize properties.
2003-11-16  Sven Neumann  <sven@gimp.org>

	* app/config/gimpbaseconfig.h
	* app/config/gimpcoreconfig.h: use gint64 for all memsize properties.

	* app/base/tile-manager.[ch] (tile_manager_get_memsize): since
	tiles can be swapped out, a tilemanager can be larger than gsize
	(on 32bit platforms). Use a gint64 to avoid an overflow.

	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpbuffer.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdata.c
	* app/core/gimpdatafactory.c
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpimage-undo.[ch]
	* app/core/gimpimage.c
	* app/core/gimpitem.c
	* app/core/gimpitemundo.[ch]
	* app/core/gimplayer.c
	* app/core/gimplist.c
	* app/core/gimpobject.[ch]
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimpundo.[ch]
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c
	* app/text/gimptext.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpstroke.c
	* app/vectors/gimpvectors.c: use gint64 for gimp_object_get_memsize()
	and all its implementations.

	* app/display/gimpdisplayshell-title.c
	* app/gui/info-window.c: changed accordingly.
2003-11-16 17:51:36 +00:00
Sven Neumann c902248bc5 exposed gimp_object_name_free() and added documentation.
2003-11-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimpobject.[ch]: exposed gimp_object_name_free() and
	added documentation.

	* app/core/gimplist.[ch] (gimp_list_uniquefy_name): use
	gimp_object_name_free() when changing the object name silently.
	Renamed "use_set_name" parameter to "notify" and documented the
	function.
2003-11-16 13:54:14 +00:00
Sven Neumann f0f3ea36b8 added new function gimp_object_name_collate() which compares two object
2003-10-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimpobject.[ch]: added new function
	gimp_object_name_collate() which compares two object names for
	ordering using the linguistically correct rules for the current
	locale and does some caching to speed up subsequent calls.

	* app/core/gimpdatalist.c (gimp_data_list_data_compare_func): use
	gimp_object_name_collate() from here.

	* app/core/gimplist.[ch]: added convenience function
	gimp_list_sort_by_name.

	* app/text/gimpfontlist.c (gimp_font_list_restore): use
	gimp_list_sort_by_name() instead of g_utf8_collate.
2003-10-09 13:35:15 +00:00
Michael Natterer dc95e16b79 added enum GimpContainerPolicy.
2003-08-25  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]: added enum GimpContainerPolicy.

	* app/core/gimpcontainer.[ch]: removed it here.  Added new virtual
	function GimpContainer::clear() which removes all items. Cleanup.

	* app/core/gimplist.c: implement GimpContainer::clear(). Cleanup.
2003-08-25 21:25:13 +00:00
Michael Natterer 24f3da165b changed GimpObject::get_memsize() to return a second value named
2003-08-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpobject.[ch]: changed GimpObject::get_memsize() to
	return a second value named "gui_size", where the primary return
	value is the "constant" actual size (as long as no operation is
	performed on the object), and the second "gui_size" return value
	is the size of temporary stuff like preview caches or boundary
	segments (which may change asynchronously, even if the object is
	on the undo stack).

	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpbuffer.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdata.c
	* app/core/gimpdatafactory.c
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-undo.c
	* app/core/gimpimage.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimplist.c
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimpundo.c
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpstroke.c
	* app/vectors/gimpvectors.c: changed get_memsize() implementations
	accordingly.

	* app/display/gimpdisplayshell-title.c
	* app/gui/debug-commands.c
	* app/widgets/gimppreview.c: changed callers accordingly.

	* app/core/gimpimage-undo-push.c: changed layer, channel, vectors
	and layer_mask undo steps to add/subtract the size of the
	resp. objects whenever they take/drop ownership of them. Ignore
	the objects' "gui_size" to get identical sizes on
	adding/subtracting. Fixes bug #120429.
2003-08-25 10:49:33 +00:00
Michael Natterer 9827ceac0e added gimp_list_uniquefy_name() utility function.
2003-04-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplist.[ch]: added gimp_list_uniquefy_name() utility
	function.

	* app/core/gimpdatalist.c
	* app/core/gimpitem.c: use it here instead of duplicating almost
	the same code.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimptemplateview.[ch]: new widget for editing the
	template list.

	* app/gui/dialogs-constructors.c: use it.

	* app/gui/Makefile.am
	* app/gui/templates-commands.[ch]
	* app/gui/templates-menu.[ch]: new files implementing the context
	menu for the template list.

	* app/gui/menus.c: register the new menu with the menu factory.

	* app/gui/file-commands.c (file_new_template_callback): uniquefy
	the new template's name.

	* app/gui/documents-commands.c: fixed typo.
2003-04-06 11:21:56 +00:00
Sven Neumann bed3c858da added new function gimp_list_sort().
2003-03-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimplist.[ch]: added new function gimp_list_sort().

	* app/text/gimpfontlist.c (gimp_font_list_restore): sort the list
	after all fonts have been added instead of keeping the list in
	order while inserting
2003-03-27 14:11:05 +00:00
Michael Natterer c7ac6aff52 Moved generic datafile loading to LibGimpBase:
2002-10-23  Michael Natterer  <mitch@gimp.org>

	Moved generic datafile loading to LibGimpBase:

	* app/core/gimpdatafiles.[ch]: removed...

	* libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed
	API which requires no more global variables.

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase.h
	* libgimpbase/gimpbasetypes.h
	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpdatafactory.c
	* app/gui/gui.c
	* app/plug-in/plug-in.c
	* app/plug-in/plug-ins.c
	* app/tools/tools.c: changed accordingly.

	Moved module loading to LibGimpModule:

	* app/core/gimpmodules.c: removed lots of code...

	* libgimpmodule/gimpmoduledb.[ch]: ...and added it here as
	GimpModuleDB object.

	* libgimpmodule/Makefile.am
	* libgimpmodule/gimpmoduletypes.h: changed accordingly.

	* app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db.

	* libgimpmodule/gimpmodule.[ch]: added
	gimp_module_query(). Internal cleanup. Stuff...

	* app/gui/module-browser.c: changed accordingly. Unfinished...

	* app/core/gimpcontainer.c
	* app/core/gimplist.c: reverted the HACKS introduced recently.

	* app/core/gimpobject.[ch]: added gimp_g_object_get_memsize()
	utility function.

	* libgimpproxy/gimpobject.[ch]: regenerated.

	Changed display filter configuration stuff:

	* libgimpwidgets/gimpcolordisplay.[ch]: made the virtual
	configure() function return a GtkWidget instead of opening a
	dialog. Changed configure_cancel() to configure_reset(). Added
	"changed" signal.

	* app/display/gimpdisplayshell-filter-dialog.c: embed the filters'
	config GUI in the dialog. Connect to "changed" and added a "Reset"
	button which resets the filter.

	* modules/cdisplay_gamma.c
	* modules/cdisplay_highcontrast.c: changed accordingly.

	* modules/colorsel_triangle.c
	* modules/colorsel_water.c: minor fixes.

2002-10-23  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/libgimpbase-docs.sgml
	* libgimpbase/libgimpbase-sections.txt
	* libgimpbase/tmpl/gimpbasetypes.sgml
	* libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles

	* libgimpmodule/libgimpmodule-docs.sgml
	* libgimpmodule/libgimpmodule-sections.txt
	* libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB.

	* libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type

	* libgimpmodule/tmpl/gimpmodule.sgml
	* libgimpwidgets/tmpl/gimpcolordisplay.sgml
	* libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 14:55:07 +00:00
Michael Natterer d7055a3351 Ported module loading to GTypeModule, getting rid of all own module
2002-10-20  Michael Natterer  <mitch@gimp.org>

	Ported module loading to GTypeModule, getting rid of all own
	module registering/bookkeeping stuff for color selectors and
	display filters. The modules now simply register GimpColorSelector
	and GimpColorDisplay subclasses, the list of registered subclasses
	can then be obtained calling g_type_children() on the abstract
	base classes.

	This is work in progress and just the first working state after I
	started breaking everything...

	* app/gui/color-select.[ch]
	* libgimp/gimpcolordisplay.h
	* libgimp/gimpcolorselector.h: removed.

	* app/gui/Makefile.am
	* libgimp/Makefile.am: changed accordingly.

	* libgimp/gimpmodule.h: massively simplified. All voodoo is gone.

	* libgimpwidgets/gimpcolordisplay.[ch]
	* libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes
	which need to be subclassed by modules.

	* libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector
	from app/gui/color-select.* ported to be a GimpColorSelector
	subclass.

	* libgimpwidgets/Makefile.am
	* libgimpwidgets/gimpwidgets.h
	* libgimpwidgets/gimpwidgetsmarshal.list
	* libgimpwidgets/gimpwidgetstypes.h: changed accordingly.

	* app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass

	* app/core/gimpmodules.c: changed accordingly.

	* app/core/gimpcontainer.c
	* app/core/gimplist.c: HACKED around to allow GimpLists of
	GObjects (not GimpObjects). This is EEKy, so I will either make
	gimp->modules a simple GList and revert this bit of change, or
	allow GObjects all over the place in GimpContainer land...

	* app/display/gimpdisplayshell-filter.[ch]
	* app/gui/color-notebook.c: removed all module stuff and use
	g_type_children() to get the list of available color_selectors
	and display_filters.

	* app/display/gimpdisplayshell-filter-dialog.c
	* app/display/gimpdisplayshell-render.c
	* app/gui/module-browser.c: changed accordingly.

	* app/gui/gui.c: ref the built-in color selector's class before
	the modules are queried so it appears first in the list of
	GimpColorSelector's children.

	* modules/Makefile.am: build the water color selector again.

	* modules/cdisplay_gamma.c
	* modules/cdisplay_highcontrast.c
	* modules/colorsel_triangle.c
	* modules/colorsel_water.c: ported them all to the new API.

	* modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 10:14:17 +00:00
Michael Natterer f064fa4e69 added gimp_list_reverse().
2002-06-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplist.[ch]: added gimp_list_reverse().

	* app/core/gimpdocumentlist.c: call it after deserializing so we
	don't reverse the history each time.

	* app/widgets/gimpdevices.c: use it instead of manually fiddling
	with list->list.
2002-06-07 20:23:33 +00:00
Michael Natterer be87dfb5fb pass a GdkGC to gdk_draw_rgb_image(), fixed dither offsets.
2002-01-30  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpcolorarea.c: pass a GdkGC to
	gdk_draw_rgb_image(), fixed dither offsets.

	* app/core/gimpobject.[ch]: new virtual function
	gimp_object_get_memsize().

	* app/base/temp-buf.[ch]
	* app/base/tile-manager.[ch]: added *_get_memsize() methods.

	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpbuffer.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdata.c
	* app/core/gimpdatafactory.c
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage.c
	* app/core/gimplayer.c
	* app/core/gimplist.c
	* app/core/gimpmoduleinfo.c
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimppreviewcache.[ch]
	* app/core/gimpundo.[ch]
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c: added get_memsize() implementations.

	* app/widgets/gimppreview.c
	* app/core/gimpobject.[ch]: some #ifdef DEBUG_MEMSIZE code to
	test the new memsize stuff (middle click any preview to get
	it's viewable's memory footprint).
2002-01-30 16:14:26 +00:00
Michael Natterer 31f690cf24 added properties for "children_type" and "policy". Ref/unref the
2001-10-18  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontainer.[ch]: added properties for "children_type"
	and "policy". Ref/unref the "children_type" class so we can do
	signal lookups and use other introspection features without an
	existing instance of "children_type".

	The new properties are G_PARAM_CONSTRUCT_ONLY and *MUST* be passed
	to g_object_new() to ref/unref children_type's class correctly.

	* app/core/gimpdatalist.c
	* app/core/gimplist.c: pass them as construct properties.

	* app/core/gimp.c: no need to manually ref classes any more.
2001-10-18 12:43:31 +00:00
Michael Natterer e2daae315b an evil temp_hack which lets GimpContext managing the active display
2001-08-14  Michael Natterer  <mitch@gimp.org>

	* app/gdisplay.h: an evil temp_hack which lets GimpContext managing
	the active display withoug including "gdisplay.h". Will go away as
	soon ad context properties are registered dynamically.

	* app/module_db.c: cleaned up the object code in preparation of
	moving it to core/.

	* app/path.c: connect to GimpImage's

	* app/core/gimpobject.[ch]: derive it from GObject, not from
	GtkObject any more (yeah :-)

	* app/core/*.c: #include <glib-object.h> instead of <gtk/gtk.h>,
	removed some remaining GtkObject-isms.

	(left in a few #include <gtk/gtk.h> where bigger changes are needed
	to get rid of the UI dependency).

	* app/core/core-types.h: #include <gdk-pixbuf/gdk-pixbuf.h> here
	temporarily.

	* app/core/gimp.c (gimp_create_display): unref the image after
	creating it's first display.

	* app/core/gimpbrush.[ch]: disabled the parts of the code which
	depend on GimpPaintTool.

	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c: changed accordingly.

	* app/core/gimpcontext.[ch]: evil hack (see above) to manage the
	active display without including "gdisplay.h"

	* app/core/gimpimage-mask.[ch]: pass a context to
	gimage_mask_stroke() and get the current tool's PDB string from
	there.

	* app/core/gimpedit.c: changed accordingly.

	* app/core/gimpimage.c: use gimp_image_update() instead of
	gdisplays_update_full().

	* app/gui/color-area.c
	* app/gui/colormap-dialog.c
	* app/gui/dialogs-constructors.c
	* app/gui/edit-commands.c
	* app/gui/image-commands.c
	* app/gui/toolbox.c: changed accordingly (don't use Gtk methods on
	GObjects).

	* app/gui/menus.c: fix some const warnings by explicit casting.

	* app/tools/*.[ch]: ported all tools to GObject, some minor
	cleanup while i was on it.

	* app/widgets/gimpdialogfactory.[ch]: ported to GObject.

	* app/widgets/gimplayerlistview.h: added FOO_GET_CLASS() macro.

	* tools/pdbgen/app.pl: added a "widgets_eek" hack like "tools_eek"
	which inserts #include "widgets/widgets-types.h" before ordinary
	includes.

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/edit.pdb
	* app/pdb/brush_select_cmds.c
	* app/pdb/edit_cmds.c: changed according to the stuff above.
2001-08-14 14:53:55 +00:00
Michael Natterer 79faae01b4 Switched to GObject reference counting:
2001-08-12  Michael Natterer  <mitch@gimp.org>

	Switched to GObject reference counting:

	* app/core/gimpcontainer.c: only ref(), not ref()/sink() children
	of strong containers. Reordered gimp_container_remove() so we
	don't need to ref the object while removing it.

	* app/core/gimpcontext.c: misc fixes. Needs to be badly tortured...

	* app/app_procs.c
	* app/gdisplay.c
	* app/gimprc.c
	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpdatafactory.c
	* app/core/gimpdocuments.c
	* app/core/gimpgradient.c
	* app/core/gimpimage.c
	* app/core/gimplayer.c
	* app/core/gimplist.c
	* app/core/gimpobject.c
	* app/core/gimpparasite.c
	* app/core/gimppattern.c
	* app/core/gimpundostack.c
	* app/gui/dialogs.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpfuzzyselecttool.c: changed accordingly: don't
	ref()/sink() any more, unref all (??) objects after adding them to
	strong containers, misc. minor fixes.

	* app/gui/dialogs-constructors.c
	* app/widgets/gimpwidgets.c: use g_object_add_weak_pointer()
	instead of simply crashing because g_object_weak_ref() was used
	with gtk_widget_destroyed, brrr.

	* app/widgets/gimpdnd.c: removed unneeded g_return_if_fail()'s.
2001-08-12 15:39:23 +00:00
Michael Natterer 357f463d59 added a TODO entry about additional image/file info.
2001-08-11  Michael Natterer  <mitch@gimp.org>

	* TODO.xml: added a TODO entry about additional image/file info.

	* app/file-save.c: #include "core/gimpdocuments.h"

	* app/core/gimpcontainer.[ch]: made virtual functions out of some
	signals.

	* app/core/*.[ch]: more GObject stuff: ported all
	gimp_foo_get_type() functions and replaced almost all "destroy"
	implementations with either "finalize" or "dispose" functions.
2001-08-11 14:39:19 +00:00
Michael Natterer 2353c5d3e7 fix compiler warning.
2001-08-10  Michael Natterer  <mitch@convergence.de>

	* app/nav_window.c: fix compiler warning.

	* app/core/gimp.[ch]: added gimp->documents which will be an MRU
	list of GimpImagefile objects.

	* app/core/gimpcontainer.c: added some g_return_if_fail().

	* app/gui/palette-editor.c: use GtkImage instead of GtkPixmap,
	s/gtk_signal_*/g_signal_*/.

	* app/widgets/gimppreview.c: render the checkerboard only for
	channel == -1. In particular, don't render it for channel
	previews.

	* app/module_db.c
	* app/core/*.c
	* app/gui/colormap-dialog.c
	* app/tools/gimpairbrushtool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimperasertool.c
	* app/tools/gimppaintbrushtool.c
	* app/tools/gimppenciltool.c
	* app/tools/gimpsmudgetool.c
	* app/tools/tool_manager.c
	* app/widgets/*.c
	* libgimpwidgets/*.c: s/gtk_type_new/g_object_new/
2001-08-10 14:41:39 +00:00
Michael Natterer 06b16890ba Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24  Michael Natterer  <mitch@gimp.org>

	Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)

	* configure.in: require glib/gtk+ >= 1.3.7, commented out the
	gtkxmhtml stuff.

	From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
	to hack or use GIMP HEAD.

	Beware, it crashes randomly :)

	* app/core/Makefile.am
	* app/core/gimpmarshal.list: new file plus rules to generate
	gimpmarshal.[ch] from it.

	* app/core/*
	* app/tools/*
	* app/widgets/*
	* libgimpwidgets/*: started to use the glib object system. All
	core/ objects are still gtk objects however. All signals are
	created using g_signal_new(). There are many gtk+ artefacts left.
	Finally, we will _not_ use the gtk_signal_foo() wrappers and
	friends any more.

	* app/colormaps.c
	* app/devices.[ch]
	* app/disp_callbacks.c
	* app/errorconsole.c
	* app/file-save.[ch]
	* app/interface.c
	* app/module_db.c
	* app/nav_window.c
	* app/ops_buttons.c
	* app/scroll.c
	* app/user_install.c
	* app/gui/about-dialog.c
	* app/gui/brush-editor.c
	* app/gui/brushes-commands.c
	* app/gui/color-notebook.c
	* app/gui/colormap-dialog.c
	* app/gui/dialogs-commands.c
	* app/gui/dialogs-constructors.c
	* app/gui/file-commands.c
	* app/gui/file-dialog-utils.c
	* app/gui/file-new-dialog.c
	* app/gui/file-open-dialog.[ch]
	* app/gui/file-save-dialog.c
	* app/gui/gradient-editor.c
	* app/gui/gradients-commands.c
	* app/gui/image-commands.c
	* app/gui/info-dialog.[ch]
	* app/gui/layer-select.c
	* app/gui/layers-commands.c
	* app/gui/menus.c
	* app/gui/offset-dialog.c
	* app/gui/palette-editor.c
	* app/gui/palettes-commands.c
	* app/gui/patterns-commands.c
	* app/gui/preferences-dialog.c
	* app/gui/resize-dialog.[ch]
	* app/gui/splash.c
	* app/gui/tips-dialog.c
	* app/gui/tool-options-dialog.c
	* app/gui/toolbox.c
	* app/gui/tools-commands.c
	* libgimp/gimpbrushmenu.c
	* libgimp/gimpmenu.c
	* libgimp/gimppatternmenu.c
	* libgimp/gimpui.c
	* libgimpbase/gimpenv.c: tons and tons of changes like "const
	gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
	and currently disables), lots of s/gtk_signal/g_signal/,
	removal/replacement of deprecated stuff,
	s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
	while I was on it, zillions of warnings left...

	* modules/Makefile.am: disabled the water color selector
	temporarily (XInput issues).

	* plug-ins/Makefile.am
	* plug-ins/common/.cvsignore
	* plug-ins/common/Makefile.am
	* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
	which did not build (including Script-Fu). They are trivial to
	fix.
2001-07-24 21:27:11 +00:00
Michael Natterer d1022c34b6 app/Makefile.am removed.
2001-05-10  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/asupsample.[ch]: removed.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/tools/Makefile.am
	* app/tools/tools-types.h: new files.

	* app/tools/gimptoolinfo.[ch]: removed.
	* app/core/gimptoolinfo.[ch]: added here.

	* libgimp/Makefile.am
	* libgimp/gimp.h
	* libgimp/gimpadaptivesupersample.[ch]
	* libgimp/gimpbilinear.[ch]: removed here...

	* libgimpcolor/Makefile.am
	* libgimpcolor/gimpcolortypes.h
	* libgimpcolor/gimpadaptivesupersample.[ch]
	* libgimpcolor/gimpbilinear.[ch]: ..and added here.

	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/paths.pdb

	* app/*.c: changed tons of #include's
2001-05-09 22:34:59 +00:00
Michael Natterer 90e8b4d790 cleanup.
2001-04-22  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am: cleanup.

	* app/interface.c: #include "gimpui.h"

	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs.c
	* app/gui/menus.c
	* app/gui/test-commands.[ch]: changes for the image menu below.

	* app/apptypes.h
	* app/widgets/Makefile.am
	* app/widgets/gimpcontainermenu.[ch]
	* app/widgets/gimpcontainermenuimpl.[ch]: new widgets. The actual
	implemtation lives in a separate file because
	gimpcontainermenu.c's code is identical to gimpcontainerview.c's
	except for the base class. This will become an interface with Gtk 2.0.

	* app/widgets/gimpimagedock.[ch]: a dock with an image menu. The
	pages still don't follow the context correctly.

	* app/widgets/gimpmenuitem.[ch]: a menu item with a preview.

	* app/widgets/gimpdialogfactory.[ch]: pass a dock constructor to
	the constructor and provide a method to create a new dock within
	this factory's context.

	* app/widgets/gimpdock.[ch]: removed the constructor because we
	create only image docks now. Put the vbox into a main_vbox (which
	also contains the image menu).

	* app/widgets/gimpdockbook.[ch]: create new docks with the dialog
	factory.

	* app/gimpcontainer.[ch]
	* app/gimpdata.[ch]
	* app/gimpdatafactory.[ch]
	* app/gimpdatalist.[ch]
	* app/gimplist.[ch]
	* app/gimpviewable.[ch]
	* app/widgets/gimpbrushpreview.[ch]
	* app/widgets/gimpcontainergridview.[ch]
	* app/widgets/gimpcontainerlistview.[ch]
	* app/widgets/gimpcontainerview.[ch]
	* app/widgets/gimpdatafactoryview.[ch]
	* app/widgets/gimpdockable.[ch]
	* app/widgets/gimpdrawablelistitem.[ch]
	* app/widgets/gimpdrawablelistview.[ch]
	* app/widgets/gimpdrawablepreview.[ch]
	* app/widgets/gimplayerlistitem.[ch]
	* app/widgets/gimplayerlistview.[ch]
	* app/widgets/gimplistitem.[ch]
	* app/widgets/gimppalettepreview.[ch]
	* app/widgets/gimppatternpreview.[ch]
	* app/widgets/gimppreview.[ch]: ass-sign some copyrights.
2001-04-22 00:38:56 +00:00
Hans Breuer 787ffe3e93 app/makefile.msc adapted to current state of file renaming/restructuring.
2001-03-16  Hans Breuer  <hans@breuer.org>

	* app/makefile.msc
	* app/tools/makefile.msc : adapted to current state of file
	renaming/restructuring. Probably will break again soon ...

	* app/context_manager.c : needs register_tools () prototype

	* app/gimplist.c
	* app/gimppalette-import.c : #include <string.h> for memcpy, strcmp
	and friends

	* app/pdb/fileops_cmds.c : #include <process.h>	/* for _getpid() */
	(Yes I know that this is not the right place to change it, but hacking
	pdbgen.pl to get platform specific headers is out of my scope)

	* app/test_commands.c : explicit casts to (GimpSetDrawableFunc) make
	it compile even with strict checks turned on.

	* app/undo.c (undo_pop_paint) : return a value even if the function
	does nothing at the moment (makes it compile)

	* libgimp/gimp.def : updated

	* libgimp/gimpcolorselector.h : include <gmodule.h> to make
	gimp_color_selector_(un)register prototypes conform to their
	implementation

	* libgimp/gimpfeatures.h : reflect 1.3 version

	* libgimpmath/gimpmatrix.c
	* libgimpwidgets/gimpdialog.c : more <string.h> inclusion

	* libgimp/makefile.msc : moved gimpadativesupersample.c to
	libgimpcolor, which makes it reusable from the core, too.

	* libgimp/gimp.def : updated

	* libgimp/gimpproceduraledb.c : #include <string.h>

	* libgimpcolor/gimpcolor.def
	* libgimpcolor/makefile.msc : added gimpadaptivesupersample

	* libgimpmath/gimpmatrix.c : #include <string.h> for memcmp
	* libgimpwidgets/gimpdialog.c - " - for strcmp
2001-03-16 19:14:04 +00:00
Michael Natterer dbc227137c app/context_manager.c app/gimpdatafactory.c app/gimpdatalist.[ch]
2001-02-19  Michael Natterer  <mitch@gimp.org>

	* app/context_manager.c
	* app/gimpdatafactory.c
	* app/gimpdatalist.[ch]
	* app/gimplist.[ch]
	* app/module_db.c: return a GimpContainer from all container
	subclass constructors.

	* app/gimppalettepreview.c
	* app/palette.c: changed the preview a bit. Still ugly.
2001-02-19 02:17:31 +00:00
Michael Natterer 2f6f9bdd0b app/gimpcontainer.[ch] app/gimpcontainergridview.c
2001-02-17  Michael Natterer  <mitch@gimp.org>

	* app/gimpcontainer.[ch]
	* app/gimpcontainergridview.c
	* app/gimpcontainerlistview.c
	* app/gimpcontainerview.[ch]
	* app/gimplist.c
	* app/gimpmarshal.[ch]: the GimpContainer has a new virtual "reorder"
	method which is much more eficient then the current remove/add
	braindeadness when renaming data objects.
	Changed the views to connect to "reorder" and call the
	GimpContainerView's new "reorder_item" method which then does
	the right thing in the view subclasses.

	* app/gimpdatafactory.c
	* app/gimpdatafactoryview.c
	* app/gimpdatalist.[ch]: removed the data list loading and saving
	stuff from GimpDataList because that's the job of the
	GimpDataFactory.

	* app/brush_edit.[ch]
	* app/brush_select.c: cleanup.

	* app/gradient_editor.[ch]: changed it to work like the brush
	editor: return a GradientEditor pointer in the constructor
	and statically store this pointer in the gradient selection file.
	Removed the global "g_editor" variable and added tons of
	GradientEditor* variables to function calls so they know their
	context without the global variable.

	* app/gradient_select.c: changed accordingly.
2001-02-17 21:20:10 +00:00