Commit Graph

436 Commits

Author SHA1 Message Date
Alexia Death d2563a69fd app: Cleanup in preparation of merge 2010-11-04 20:27:11 +02:00
Alexia Death dfd5470a2e Merge remote branch 'origin/master' into soc-2010-cage-2 2010-11-04 20:00:36 +02:00
Alexia Death 27c77e6a5e Merge branch 'master' into soc-2010-cage-2 2010-11-04 00:41:45 +02:00
Michael Natterer cab852fb73 libgimpbase: add gimp_unit_format_string()
which is the string formatting function from GimpUnitMenu as proper
public API.
2010-10-31 22:10:31 +01:00
Patrick Horgan 69604ef12d libgimpbase: avoid aliasing error
Avoid aliasing error by using a union for id instead of casting
address to a int*.
2010-10-03 13:58:27 +02:00
Alexia Death aee148a486 Merge branch 'master' into soc-2010-cage-2 2010-08-26 21:50:55 +03:00
Michael Muré 5d483a9517 add an enum for cage mode 2010-08-08 13:24:50 +02:00
Michael Natterer 2d6f808ff8 pdb: add a new PDB group "item" and move lots of functions to it
The item groups has all the duplicated functionality from drawable
and vectors (name, visible, linked etc).

Hijack the unused GIMP_PDB_REGION and turn it into GIMP_PDB_ITEM;
change all protocol aware files accordingly and bump the protocol
version number. Change script-fu to handle the new type.
2010-07-09 09:34:44 +02:00
Martin Nordholts 9ddbc55a08 libgimpbase: Disable gimp_wire_read() warning
Disable gimp_wire_read() warning, most of the time it just gives this
confusing error message when the GIMP core crashes:

(script-fu:28495): LibGimpBase-WARNING **: script-fu: gimp_wire_read(): error
2010-07-06 15:15:29 +02:00
Michael Natterer 3411c7b63a libgimpbase: move docs from template files to inline comments
and remove all template files. Also fixed all gtk-doc warnings
and fixed/added some docs.
2010-06-29 19:16:51 +02:00
Michael Natterer 0ee393c692 libgimpbase: fix typos in docs of recently added unit functions 2010-02-24 10:53:10 +01:00
Michael Natterer 52041715a9 libgimpbase: add utility functions to convert between pixels and units 2010-02-21 16:45:01 +01:00
Martin Nordholts 5d9dde1d47 libgimpbase: Support changing GIMP2_DIRECTORY at run-time
In order to be able to change GIMP2_DIRECTORY during run-time, check
for changes to GIMP2_DIRECTORY in gimp_directory().

This is typically useful in test case where you could read from one
GIMP2_DIRECTORY at start-up and then write to a different
GIMP2_DIRECTORY at shut down.

The documentation for this function does not suggest that the value is
cached and thus the old behavior can be considered a bug. It is hard
to imagine why anyone would change GIMP2_DIRECTORY at run-time in a
script for example and *not* expect gimp_directory() to return the
updated gimp_dir.
2010-01-29 18:33:21 +01:00
Michael Natterer c6bd3e0570 Add gimp_rectangle_union() 2009-08-23 22:58:36 +02:00
Tim Harder 27d5164f3c libgimpbase: Remove trailing comma from GimpTextHintStyle 2009-08-21 23:02:24 +02:00
Martin Nordholts 4d7a6b10d1 Added .gitignore files generated with git svn create-ignore.
svn path=/trunk/; revision=27972
2009-01-31 11:37:44 +00: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 d990457022 sorted. updated.
2008-11-12  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpbase.def: sorted.
	* libgimpmodule/gimpmodule.def: updated.


svn path=/trunk/; revision=27631
2008-11-12 14:52:25 +00:00
Sven Neumann 549d6eaec1 comments
svn path=/trunk/; revision=27563
2008-11-06 09:29:32 +00:00
Sven Neumann 02817081ff use NC_() to mark enum values for translation. Use a lower-case short form
2008-11-06  Sven Neumann  <sven@gimp.org>

	* tools/gimp-mkenums: use NC_() to mark enum values for 
translation.
	Use a lower-case short form of the type name as translation 
context.

	* libgimp/libgimp-intl.h: define the NC_() macro as noop.

	* libgimpbase/gimpbasetypes.[ch]
	* libgimpbase/gimpbase.def: added new functions to set and
	get a translation context on an enum type.

	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am:
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: register the translation context
	with the enum types.

	* app/display/display-enums.h
	* libgimpbase/gimpbaseenums.h
	* libgimpconfig/gimpcolorconfig-enums.h: removed old-style 
explicit
	translation context.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27562
2008-11-06 08:28:28 +00:00
Sven Neumann fe520925b7 app/base/Makefile.am app/core/Makefile.am app/display/Makefile.am
2008-11-03  Sven Neumann  <sven@gimp.org>

	
	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am: 
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: micro-optimization in the 
generated
	enum registration code.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27538
2008-11-03 21:38:13 +00:00
Sven Neumann f0938de1bf libgimp/gimp.def libgimpbase/gimpbase.def updated with new symbols.
2008-10-29  Sven Neumann  <sven@gimp.org>

	* libgimp/gimp.def
	* libgimpbase/gimpbase.def
	* libgimpcolor/gimpcolor.def: updated with new symbols.


svn path=/trunk/; revision=27470
2008-10-29 22:31:25 +00:00
Sven Neumann 033fcf1628 added new enum GimpTextHintStyle.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpbaseenums.[ch]: added new enum 
GimpTextHintStyle.

	* libgimp/gimpenums.c.tail
	* tools/pdbgen/enums.pl: regenerated.

	* app/text/gimptext.[ch]: added new property "hint-style". 
Removed
	"autohint" property and mapped the boolean property "hinting" to
	the new enum property "hint-style".

	* app/text/gimptextlayout-render.c 
(gimp_text_layout_render_flags):
	use "hint-style".

	* app/tools/gimptextoptions.[ch]: changed tool options 
accordingly.

	* tools/pdbgen/pdb/text_layer.pdb: deprecated the "hinting" API
	and introduced getters and setters for "hint-style".

	* app/pdb/text-layer-cmds.c
	* app/pdb/internal-procs.c
	* libgimp/gimptextlayer_pdb.[ch]: regenerated.


svn path=/trunk/; revision=27432
2008-10-27 07:59:32 +00:00
Hans Breuer d94419a9fd updated include <string.h> for memcmp() include <string.h> for strcmp()
2008-10-03  Hans Breuer  <hans@breuer.org>

	* **/makefie.msc gimpdefs.msc app/gimpcore.def : updated
	* app/core/gimpcurve.c : include <string.h> for memcmp()
	* app/gegl/gimpcurvesconfig.c : include <string.h> for strcmp()

svn path=/trunk/; revision=27118
2008-10-03 19:27:54 +00:00
Michael Natterer 8fd8f8ffc0 made the error_message variable const.
2008-09-04  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimpreloc.c (set_gerror): made the error_message
	variable const.


svn path=/trunk/; revision=26856
2008-09-04 11:25:31 +00:00
Michael Natterer 0b086ecdb8 made the value_desc and value_help members const, just as the
2008-09-04  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimpbasetypes.h
	(struct GimpEnumDesc)
	(struct GimpFlagsDesc): made the value_desc and value_help members
	const, just as the corresponding GEnumValue and GFlagsValue
	members. This is technically an API change but shouldn't hurt
	since it totally reflects how they are used.


svn path=/trunk/; revision=26855
2008-09-04 11:07:12 +00:00
Sven Neumann 61d870cdd3 libgimpbase/gimpbase.def added new symbols.
2008-08-19  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpbase.def
	* libgimp/gimp.def: added new symbols.


svn path=/trunk/; revision=26658
2008-08-19 06:33:48 +00:00
Sven Neumann 369d991fd2 Complements the fix for bug #344818:
2008-08-19  Sven Neumann  <sven@gimp.org>

	Complements the fix for bug #344818:

	* libgimpbase/gimpbaseenums.[ch]: added new enum 
GimpPDBErrorHandler.

	* tools/pdbgen/enums.pl: regenerated.

	* app/plug-in/gimpplugin.[ch]: added error_handler to 
GimpPlugIn.

	* app/plug-in/gimpplugin-message.c 
(gimp_plug_in_handle_proc_run):
	only display an error message for a failed procedure call if the
	plug-in's error-handler is set to 
GIMP_PDB_ERROR_HANDLER_INTERNAL.
	
	* tools/pdbgen/pdb/plug_in.pdb: added PDB getter and setter for
	the plug-in's error-handler.

	* app/pdb/plug-in-cmds.c
	* app/pdb/internal-procs.c
	* libgimp/gimpenums.c.tail
	* libgimp/gimpplugin_pdb.[ch]: regenerated.

	* plug-ins/common/file-compressor.c
	* plug-ins/file-uri/uri.c: set the error-handler to
	GIMP_PDB_ERROR_HANDLER_PLUGIN as these plug-ins are forwarding 
the
	error with their return values.


svn path=/trunk/; revision=26656
2008-08-18 22:54:26 +00:00
Sven Neumann 81131c0bb4 Add new PDB data type PDB_COLORARRAY for using arrays of GimpRGB colors as
2008-07-14  Sven Neumann  <sven@gimp.org>

	Add new PDB data type PDB_COLORARRAY for using arrays of GimpRGB
	colors as argument or return value.

	* libgimpbase/gimpbaseenums.[ch] (enum GimpPDBArgType): replaced
	the unused GIMP_PDB_BOUNDARY with GIMP_PDB_COLORARRAY.

	* libgimpbase/gimpprotocol.h: increased GIMP_PROTOCOL_VERSION.
	(struct _GPParam): added d_colorarray entry to the union.

	* libgimpbase/gimpprotocol.c
	* libgimp/gimp.[ch]
	* app/pdb/gimp-pdb-compat.c
	* app/plug-in/plug-in-params.c
	* app/plug-in/gimpplugin-message.c
	* tools/pdbgen/pdb.pl: deal with the new data type.

	* tools/pdbgen/enums.pl: regenerated.

	* plug-ins/pygimp/pygimp-pdb.c
	* plug-ins/script-fu/scheme-wrapper.c: handle the new data type.


svn path=/trunk/; revision=26189
2008-07-14 14:09:16 +00:00
Michael Natterer 733f73e23f #undef GIMP_DISABLE_DEPRECATED so gimp_memsize_to_string() sees its own
2008-04-14  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimpmemsize.c: #undef GIMP_DISABLE_DEPRECATED so
	gimp_memsize_to_string() sees its own prototype.


svn path=/trunk/; revision=25483
2008-04-14 11:34:35 +00:00
Sven Neumann b8b305a4e9 app/text/text-enums.[ch] as a first step towards a new text PDB API, moved
2008-03-31  Sven Neumann  <sven@gimp.org>

	* app/text/text-enums.[ch]
	* libgimpbase/gimpbaseenums.[ch]: as a first step towards a new
	text PDB API, moved GimpTextDirection and GimpTextJustification
	enums to libgimpbase.

	* libgimpbase/gimpbase.def: updated.


svn path=/trunk/; revision=25325
2008-03-31 21:48:07 +00:00
Sven Neumann fc93cc19ce deprecate gimp_memsize_to_string() in favor of
2008-03-28  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpmemsize.[ch]: deprecate gimp_memsize_to_string()
	in favor of g_format_size_for_display().

	* app/actions/edit-commands.c
	* app/core/gimpimagefile.c
	* app/dialogs/image-new-dialog.c
	* app/dialogs/image-scale-dialog.c
	* app/display/gimpdisplayshell-title.c
	* app/widgets/gimpimagepropview.c
	* app/widgets/gimptemplateeditor.c
	* app/widgets/gimpthumbbox.c
	* plug-ins/uri/uri-backend-gnomevfs.c
	* plug-ins/uri/uri-backend-gvfs.c
	* plug-ins/uri/uri-backend-libcurl.c
	* plug-ins/uri/uri-backend-wget.c: use g_format_size_for_display()
	instead of gimp_memsize_to_string().

svn path=/trunk/; revision=25285
2008-03-28 16:33:24 +00:00
Sven Neumann 26d1021e77 Properly pass the focus from the core to plug-in dialogs:
2008-03-27  Sven Neumann  <sven@gimp.org>

	Properly pass the focus from the core to plug-in dialogs:

	* libgimpbase/gimpprotocol.[ch]: added a user_time member to the
	GimpConfig struct. Bumped the protocol version to 0x0012.

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: added gimp_get_user_time() to get the
	timestamp of the last user interaction.

	* app/plug-in/gimppluginmanager-call.c
	(gimp_plug_in_manager_call_run): pass the timestamp to in the
	GimpConfig message.

	* libgimp/gimp.[ch]:
	* libgimp/gimp.def: added method to access the timestamp as set
	in the config message.

	* libgimp/gimpui.c (gimp_ui_init): construct a fake startup ID and
	set the DESKTOP_STARTUP_ID environment variable.

svn path=/trunk/; revision=25263
2008-03-27 16:30:29 +00:00
William Skaggs 65e7685844 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* libgimpbase/gimpenv.c:  fix editing error in documentation.

svn path=/trunk/; revision=24591
2008-01-10 17:14:06 +00:00
Sven Neumann c30c5f60a3 libgimpbase/gimpchecks.c libgimp/gimpunitcache.c
2008-01-06  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpchecks.c
	* libgimp/gimpunitcache.c
	* libgimpwidgets/gimppageselector.c
	* libgimpwidgets/gimpcolorscales.c: removed redundant checks for
	enum values (which are unsigned) >= 0.


svn path=/trunk/; revision=24546
2008-01-06 02:14:44 +00:00
Tor Lillqvist 2159cbbc81 Use g_win32_locale_filename_from_utf8() instead of duplicating its code.
2007-12-12  Tor Lillqvist  <tml@novell.com>

	* libgimpbase/gimpenv.c (gimp_locale_directory) [Win32]: Use
	g_win32_locale_filename_from_utf8() instead of duplicating its
	code.


svn path=/trunk/; revision=24345
2007-12-12 23:35:00 +00:00
Tor Lillqvist e698ec936d Use the location of the libgimpbase DLL and not that of the main
2007-12-12  Tor Lillqvist  <tml@novell.com>

	* libgimpbase/gimpenv.c (gimp_toplevel_directory) [Win32]: Use the
	location of the libgimpbase DLL and not that of the main
	executable (which will be the Python interpreter in the case of
	python-fu) to determine the top-level GIMP installation
	folder. (#502506)

	(gimp_locale_directory) [Win32]: Guard against the possibility
	that we can't get the system codepage form of the locale
	directory, in case the installation folder contains characters not
	in the system codepage. In that case use the short name instead.


svn path=/trunk/; revision=24333
2007-12-12 09:41:13 +00:00
Sven Neumann cc44a68902 made the code more robust against errors on the wire protocol level.
2007-12-11  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpprotocol.c: made the code more robust against
	errors on the wire protocol level.

	* app/plug-in/gimpplugin-message.c: added sanity checks to message
	handlers. This doesn't keep us from crashing on invalid input, but
	we will at least get some warnings before that happens.

svn path=/trunk/; revision=24317
2007-12-11 09:40:10 +00:00
Sven Neumann a23029a05f use g_try_new() so a plug-in can't easily crash the core by sending an
2007-12-11  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpwire.c (_gimp_wire_read_string): use g_try_new()
	so a plug-in can't easily crash the core by sending an invalid
	string message.

svn path=/trunk/; revision=24316
2007-12-11 09:36:38 +00:00
Sven Neumann 18db691f0e allocate GimpWireHandler structs using GSlice.
2007-12-11  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpwire.c (gimp_wire_register): allocate
	GimpWireHandler structs using GSlice.

svn path=/trunk/; revision=24315
2007-12-11 08:39:10 +00:00
Sven Neumann 09cca4bf9a NULL-terminate all strings coming in over the wire protocol. Should help
2007-12-11  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpwire.c (_gimp_read_read_string): 
NULL-terminate
	all strings coming in over the wire protocol. Should help with 
bug
	#498207.


svn path=/trunk/; revision=24312
2007-12-11 07:16:04 +00:00
Hans Breuer 6f5bbfe0bd updated and removed -GD to let msvc9 complain less
2007-12-09  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc : updated and removed -GD to let msvc9 complain less


svn path=/trunk/; revision=24305
2007-12-09 14:11:09 +00:00
Michael Natterer 36bda892a9 libgimpbase/Makefile.am removed.
2007-10-31  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/Makefile.am
	* libgimpbase/xdg-user-dir.[ch]: removed.

	* libgimpbase/gimpbaseenums.[ch]: deprecate enum GimpUserDirectory.

	* libgimpbase/gimpenv.[ch]: deprecate gimp_user_directory() and make
	the implementation call g_get_user_special_dir().

	* libgimp/Makefile.am: #undef GIMP_DISABLE_DEPRECATED in gimpenums.c

	* app/widgets/gimpfiledialog.c: use g_get_user_special_dir() instead.

	* plug-ins/pygimp/gimpmodule.c: #undef GIMP_DISABLE_DEPRECATED.


svn path=/trunk/; revision=24018
2007-10-31 13:09:46 +00:00
Sven Neumann d118a54683 don't just crash right away if the impossible happens.
2007-10-27  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpmemsize.c (string_to_memsize): don't just 
crash
	right away if the impossible happens.


svn path=/trunk/; revision=23977
2007-10-27 20:25:37 +00:00
Tor Lillqvist d9c7e99d4b Drop the Win9x code path here, too.
2007-10-27  Tor Lillqvist  <tml@novell.com>

	* libgimpbase/gimpenv.c (gimp_toplevel_directory): Drop the Win9x
	code path here, too.

	* libgimpbase/gimpenv.c (gimp_locale_directory): On Windows return
	the pathname in system codepage and not UTF-8.


svn path=/trunk/; revision=23962
2007-10-26 22:02:13 +00:00
Sven Neumann 4d77d9a2d1 plugged memory leaks.
2007-09-28  Sven Neumann  <sven@gimp.org>

	* plug-ins/script-fu/scheme-wrapper.c: plugged memory leaks.

	* libgimpbase/gimpprotocol.c (gp_params_destroy): formatting.

svn path=/trunk/; revision=23683
2007-09-28 14:20:35 +00:00
Sven Neumann 401694cf9f simplified is_hidden()
svn path=/trunk/; revision=23548
2007-09-14 15:56:59 +00:00
Michael Natterer 8e86bc46f9 move private functions to the end of the file. Added function is_hidden()
2007-09-14  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimpdatafiles.c: move private functions to the end
	of the file. Added function is_hidden() and use it in
	gimp_datafiles_read_directories(). Moved variables to local
	scopes.


svn path=/trunk/; revision=23547
2007-09-14 15:39:28 +00:00
Michael Natterer 8f05e8a0e9 remove extraneous comma.
2007-08-30  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimpbaseenums.h: remove extraneous comma.


svn path=/trunk/; revision=23413
2007-08-30 15:03:38 +00:00
Michael Natterer 5a62582a77 skip files starting with '.' so we don't try to parse .DS_Store and other
2007-08-28  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimpdatafiles.c (gimp_datafiles_read_directories):
	skip files starting with '.' so we don't try to parse .DS_Store
	and other metadata storage files. Also moved variables to local
	scopes.


svn path=/trunk/; revision=23388
2007-08-28 12:31:29 +00:00