Commit Graph

18 Commits

Author SHA1 Message Date
Michael Natterer 395b06ad8b added typdef GimpMemsizeFunc.
2007-03-05  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: added typdef GimpMemsizeFunc.

	* app/core/gimp-utils.[ch]: added _foreach() variants of
	GHashTable, GList and GSList functions which take GimpMemsizeFunc
	callbacks. Added gimp_parasite_get_memsize(). Added "data_size"
	parameter to gimp_g_hash_table_get_memsize().

	* app/core/gimp.c
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/pdb/gimppdb.c
	* app/plug-in/gimppluginmanager.c: use the new functions instead
	of itering manually or ignoring the containers' elements. Changed
	callers of gimp_g_hash_table_get_memsize().


svn path=/trunk/; revision=22046
2007-03-05 20:09:46 +00:00
Michael Natterer d212161c00 app/core/gimp-utils.[ch] app/core/gimp.c app/widgets/gimpcontrollerinfo.c
2007-02-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-utils.[ch]
	* app/core/gimp.c
	* app/widgets/gimpcontrollerinfo.c
	* libgimpwidgets/gimpcontroller.c: removed various boolean_handled
	signal accumulators and use g_signal_accumulator_true_handled().


svn path=/trunk/; revision=21933
2007-02-17 11:45:59 +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 d34ff5537d libgimpbase/Makefile.am libgimpbase/gimpbase.h added new files that hold
2006-08-29  Sven Neumann  <sven@gimp.org>

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase.h
	* libgimpbase/gimprectangle.[ch]: added new files that hold
	gimp_rectangle_intersect(), factored out of the core.

	* libgimpbase/gimpbase.def: updated.

	* app/core/gimp-edit.c
	* app/core/gimp-utils.c
	* app/core/gimp-utils.h
	* app/core/gimpchannel-combine.c
	* app/core/gimpdrawable-foreground-extract.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-preview.c
	* app/core/gimplayer.c
	* app/core/gimpscanconvert.c
	* app/display/gimpdisplayshell-draw.c: changed includes accordingly.

	* libgimp/gimpdrawablepreview.c: don't duplicate
	gimp_rectangle_intersect() here, use the function in libgimpbase.

	* app/base/siox.c: use gimp_rectangle_intersect() to reduce the
	working area to the region of interest. Fixes bug #340422.
2006-08-29 14:46:32 +00:00
Michael Natterer 0855c2e12b added gimp_g_type_instance_get_memsize() and
2006-04-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-utils.[ch]: added
	gimp_g_type_instance_get_memsize() and
	gimp_g_param_spec_get_memsize().
	Changed gimp_g_object_get_memsize() to use
	gimp_g_type_instance_get_memsize().
	Handle more boxed types in gimp_g_value_get_memsize().

	* app/core/gimp.c (gimp_get_memsize): add the memsize of some
	members that are new or were forgotten.

	* app/pdb/gimpprocedure.c
	* app/pdb/gimppluginprocedure.c: implement GimpObject::get_memsize().
2006-04-15 15:15:33 +00:00
Michael Natterer b2f2b7148d made plug_in_run_temp() public and changed its parameters to match the
2006-04-07  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-run.[ch]: made plug_in_run_temp() public and
	changed its parameters to match the ones of plug_in_run().

	* app/pdb/gimpprocedure.[ch]: added GimpProcedure::execute_async()
	which takes an additional display_ID parameter and returns nothing.

	* app/pdb/gimppluginprocedure.c
	* app/pdb/gimptemporaryprocedure.c: implement it, using
	plug_in_run() and plug_in_run_temp().

	* app/core/gimp-utils.[ch]: added gimp_value_array_truncate()
	which takes a GValueArray and the number of values to truncate the
	array to.

	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/pdb/gimp-pdb.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimphelp.c: use gimp_procedure_execute_async()
	instead of plug_in_run() and don't #include "plug-in-run.h".
	Truncate GValueArray passed to plug-ins again, and don't just pass
	some default values to the noninteractive args.

	Unrelated:

	* tools/pdbgen/pdb/plug_in.pdb: don't call
	gimp_menus_create_branch() here.

	* app/plug-in/plug-ins.c (plug_ins_menu_branch_add): call it here
	instead.

	* app/pdb/plug_in_cmds.c: regenerated.
2006-04-07 18:23:20 +00:00
Sven Neumann acc84675a5 added gimp_get_temp_filename().
2006-03-30  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-utils.[ch]: added gimp_get_temp_filename().

	* tools/pdbgen/pdb/fileops.pdb (temp_name): removed the
	implementation here and call gimp_get_temp_filename() instead.

	* app/pdb/fileops_cmds.c: regenerated.
2006-03-30 10:17:41 +00:00
Sven Neumann 489aebab5e app/core/gimp-gui.h app/core/gimp-utils.h app/core/gimpimage-undo.h
2005-09-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-gui.h
	* app/core/gimp-utils.h
	* app/core/gimpimage-undo.h
	* app/text/gimptextlayer.h
	* app/widgets/gimpeditor.h
	* app/widgets/gimpmenufactory.h
	* app/widgets/gimpmessagedialog.h
	* app/widgets/gimpsessioninfo.h
	* app/widgets/gimptooldialog.h
	* app/widgets/gimpviewabledialog.h: use G_GNUC_NULL_TERMINATED
	where appropriate.
2005-09-27 17:31:32 +00:00
Sven Neumann 2ebf0647c5 go back to using dpi as the default resolution unit.
2005-08-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimptemplate.c: go back to using dpi as the default
	resolution unit.

	* app/core/gimp-utils.[ch]: moved the code to determine the unit
	from the locale settings here as gimp_get_default_unit().

	* app/dialogs/print-size-dialog.c
	* app/widgets/gimpimagepropview.c: use the unit returned by the
	new function to display the print size (bug #107497).
2005-08-18 15:08:49 +00:00
Michael Natterer b93dd20b21 removed this function.
2005-02-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-utils.[ch] (gimp_check_glib_version): removed this
	function.

	* app/sanity.c (sanity_check_glib): use glib_check_version()
	instead and set required version to 2.6.0.
2005-02-02 22:35:13 +00:00
Michael Natterer fd1a0e142c Allow URI drops from apps linked against GLib < 2.4.4 to GIMP linked
2004-08-04  Michael Natterer  <mitch@gimp.org>

	Allow URI drops from apps linked against GLib < 2.4.4 to GIMP
	linked against GLib >= 2.4.5. Fixes bug #148140.

	* app/core/gimp-utils.[ch]: added gimp_check_glib_version().

	* app/widgets/gimpselectiondata.c: added runtime check for GLib
	versions that encode file:// URIs correctly (>= 2.4.5). For older
	(broken) GLibs, leave the code path as is, for newer (fixed) ones,
	perform an additional check if the dropped URI is in the (broken)
	escaped-UTF-8 format and convert it to local filename encoding.

	* app/gui/gui.c: warn the user that non-ASCII filenames can't
	be used when linked against GLib 2.4.4.
2004-08-04 17:11:39 +00:00
Sven Neumann f274dce25b added new function gimp_g_value_get_memsize() that attempts to calculate
2004-07-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-utils.[ch]: added new function
	gimp_g_value_get_memsize() that attempts to calculate the memory
	requirements for a GValue.

	* app/text/gimptextundo.c (gimp_text_undo_get_memsize): use the
	new function to obtain a better estimate for the size of the text
	undo.
2004-07-13 10:09:22 +00:00
Michael Natterer 48dfe69959 new utility functions which create and destroy GParameter arrays for
2004-07-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-utils.[ch] (gimp_parameters_append)
	(gimp_parameters_append_valist)
	(gimp_parameters_free): new utility functions which create and
	destroy GParameter arrays for g_object_newv().

	* app/gui/gui-vtable.c (gui_pdb_dialog_new): use them.
2004-07-10 22:25:02 +00:00
Michael Natterer 2a69c419f1 added gimp_boolean_handled_accum().
2004-06-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-utils.[ch]: added gimp_boolean_handled_accum().

	* app/core/gimp.c
	* app/widgets/gimpcontrollerinfo.c: use it.
2004-06-17 16:32:30 +00:00
Sven Neumann 84688d18d8 added a category parameter to make this function more flexible.
2004-04-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-utils.[ch] (gimp_get_default_language): added a
	category parameter to make this function more flexible.

	* app/text/gimptext.c: changed accordingly.

	* app/widgets/gimphelp.c (gimp_help): localize the help pages
	according to the value of LC_MESSAGES. Fixes bug #139917.
2004-04-13 15:07:30 +00:00
Sven Neumann 4e0cb33472 Changes for help i18n in the core, the rest will take place in the help
2004-03-17  Sven Neumann  <sven@gimp.org>

	Changes for help i18n in the core, the rest will take place in the
	help plug-in:

	* app/text/gimptext.[ch]: removed gimp_text_get_default_language()

	* app/core/gimp-utils.[ch]: ... and added it here as
	gimp_get_default_language().

	* app/config/gimprc-blurbs.h
	* app/config/gimpdisplayconfig.[ch]: added property "help-locales".

	* app/widgets/gimphelp.c: use the new property and pass it to the
	help plug-in.

	* app/core/gimpselection.c (gimp_selection_invalidate_boundary):
	removed unused variable.
2004-03-17 13:59:42 +00:00
Michael Natterer 80fbda0540 removed gimp_g_object_get_memsize()...
2003-11-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpobject.[ch]: removed gimp_g_object_get_memsize()...

	* app/core/gimp-utils.[ch]: ...and added it here along with
	some other memsize utilities for GHashTables and G(S)Lists.

	* app/core/gimp.c
	* app/core/gimpimage.c
	* app/core/gimpparasitelist.c
	* app/core/gimpviewable.c
	* app/vectors/gimpstroke.c (GimpObject::get_memsize): use the new
	functions.
2003-11-25 12:53:29 +00:00
Michael Natterer 149e81dab5 app/core/Makefile.am new file for utility functions. Contains
2003-05-14  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimp-utils.[ch]: new file for utility functions.
	Contains gimp_rectangle_intersect() for now.

	* app/core/gimpdrawable-transform.c: removed the function here.

	* app/core/gimpdrawable.c (gimp_drawable_resize): use it to
	determine the amount of pixels to copy between the old and new
	tile managers. Removed restriction that forced the areas to
	overlap by at least one pixel.

	* app/core/gimpitem.c (gimp_item_real_transform): removed the
	restriction here, too.

	* app/core/gimplayer.c (gimp_layer_create_mask): use the new
	function to decide how much to copy from the selection when
	creating a mask from it.
2003-05-14 15:32:07 +00:00