Commit Graph

33 Commits

Author SHA1 Message Date
Jehan ba3da3d338 app, libgimp*, pdb: new GimpParamSpecObject abstract spec type.
This abstract spec type is basically a GParamSpecObject with a default
value. It will be used by various object spec with default values, such
as GimpParamSpecColor, GimpParamSpecUnit and all GimpParamSpecResource
subtypes. Also it has a duplicate() class method so that every spec type
can implement the proper way to duplicate itself.

This fixes the fact that in gimp_config_param_spec_duplicate(), all
unknown object spec types (because they are implemented in libgimp,
which is invisible to libgimpconfig) are just copied as
GParamSpecObject, hence losing default values and other parameters.

As a second enhancement, it also makes it easier to detect the object
spec types for which we have default value support in
gimp_config_reset_properties().

As a side fix, gimp_param_spec_color() now just always duplicates the
passed default color, making it hence much easier to avoid bugs when
reusing a GeglColor.
2024-09-04 22:34:49 +02:00
Jehan 2a00a9e60a Issue #434: remove broken plural support for GimpUnit.
Rather than trying to implement full i18n plural support, we just remove
this failed attempt from the past. The fact is that to get proper
support, we'd basically need to reimplement a Gettext-like plural
definition syntax within our API, then ask people to write down this
plural definition for their language, then to write every plural form…
all this for custom units which only them will ever see!

Moreover code investigation shows that the singular form was simply
never used, and the plural form was always used (whatever the actual
unit value displayed).

As for the "identifier", this was a text which was never shown anywhere
(except in the unit editor) and for all built-in units, as well as
default unitrc units, it was equivalent to the English plural value.

So we now just have a unique name which is the "long label" to be used
everywhere in the GUI, and abbreviation will be basically the "short
label". That's it. No useless (or worse, not actually usable because it
was not generic internationalization) values anymore!
2024-08-06 11:39:57 +02:00
Jehan d493f0537f Issue #8900 and #9923: reimplementing GimpUnit as a proper class.
This fixes all our GObject Introspection issues with GimpUnit which was
both an enum and an int-derived type of user-defined units *completing*
the enum values. GIR clearly didn't like this!

Now GimpUnit is a proper class and units are unique objects, allowing to
compare them with an identity test (i.e. `unit == gimp_unit_pixel ()`
tells us if unit is the pixel unit or not), which makes it easy to use,
just like with int, yet adding also methods, making for nicer
introspected API.

As an aside, this also fixes #10738, by having all the built-in units
retrievable even if libgimpbase had not been properly initialized with
gimp_base_init().
I haven't checked in details how GIR works to introspect, but it looks
like it loads the library to inspect and runs functions, hence
triggering some CRITICALS because virtual methods (supposed to be
initialized with gimp_base_init() run by libgimp) are not set. This new
code won't trigger any critical because the vtable method are now not
necessary, at least for all built-in units.

Note that GimpUnit is still in libgimpbase. It could have been moved to
libgimp in order to avoid any virtual method table (since we need to
keep core and libgimp side's units in sync, PDB is required), but too
many libgimpwidgets widgets were already using GimpUnit. And technically
most of GimpUnit logic doesn't require PDB (only the creation/sync
part). This is one of the reasons why user-created GimpUnit list is
handled and stored differently from other types of objects.

Globally this simplifies the code a lot too and we don't need separate
implementations of various utils for core and libgimp, which means less
prone to errors.
2024-08-02 10:46:38 +02:00
Michael Natterer 65a8ae2c91 libgimpbase: make the GimpParamSpecUnit struct public
like all other param specs.
2019-07-30 15:03:03 +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
Jehan 0c07ae3bbf libgimpbase: new gimp_unit_get_accurate_digits() API function. 2017-01-23 20:20:25 +01:00
Michael Natterer f473653889 libgimpbase: add gimp_unit_is_metric()
which currently returns TRUE if the unit has a factor that matches mm,
cm, dm or m. Incomplete, but at least now extendable in one place,
just need to use the new function everywhere.
2013-10-12 18:54:34 +02:00
Michael Natterer 844df2b4df libgimp*: add guards that #error out if individual files are included
This only helps to maintain proper includes in app/ and shouldn't
affect plug-ins at all, because these are supposed to only include the
main headers from libgimp/ since the beginning of time.

The gimpfootypes.h files do not have these guards, so we can continue
to maintain app/'s include policy that is very likely to error out if
wrong things are included.
2011-04-28 14:30:41 +02:00
Michael Natterer caa3b9f4bf libgimpbase: add gimp_units_to_points()
because points is used in quite some external APIs (like Pango), and
having one conversion from gimp units is better than duplicating the
code.
2011-03-18 21:34:27 +01: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
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 52041715a9 libgimpbase: add utility functions to convert between pixels and units 2010-02-21 16:45:01 +01: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 e9eab5d8e0 libgimpbase/Makefile.am removed this file again.
2005-01-23  Sven Neumann  <sven@gimp.org>

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbaseparams.[ch]: removed this file again.

	* libgimpbase/gimpmemsize.[ch]
	* libgimpbase/gimppath.[ch]
	* libgimpbase/gimpunit.[ch]: moved the paramspec definitions to
	the types they belong to.

	* libgimpbase/gimpbase.h: changed accordingly.

	* libgimpwidgets/Makefile.am (libgimpwidgetsinclude_HEADERS):
	install the new header files.
2005-01-23 02:09:41 +00:00
Sven Neumann bd427b2e4d libgimpbase/Makefile.am libgimpbase/gimpbase.h libgimpbase/gimpbase.def
2004-07-27  Sven Neumann  <sven@gimp.org>

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase.h
	* libgimpbase/gimpbase.def
	* libgimpbase/gimpmemsize.[ch]: added new files with memsize
	related functions (moved here from gimputil.c) and
	GIMP_TYPE_MEMSIZE (moved here from app/config/gimpconfig-types.[ch]).

	* libgimpbase/gimputils.[ch]: removed gimp_memsize_to_string() here.

	* libgimpbase/gimpunit.[ch]: added GIMP_TYPE_UNIT (moved here from
	app/config/gimpconfig-types.[ch]).

	* libgimpbase/gimpbase-private.c
	* libgimp/gimptile.c
	* libgimp/gimpunitcache.c
	* plug-ins/help/domain.c
	* app/xcf/xcf-read.c: need to include glib-object.h.

	* plug-ins/common/uniteditor.c: use GIMP_TYPE_UNIT.

	* app/config/gimpconfig-types.[ch]: removed code that lives in
	libgimpbase now.

	* app/config/gimpconfig-deserialize.c: changed accordingly.

	* app/config/gimpbaseconfig.c
	* app/config/gimpdisplayconfig.c
	* app/core/gimpcontext.c
	* app/gui/grid-dialog.c
	* app/tools/gimpcolortool.c
	* app/widgets/gimpaction.c
	* app/widgets/gimpunitstore.c: no need to include gimpconfig-types.h
	any longer.
2004-07-27 16:39:00 +00:00
Michael Natterer 5221d4daa6 libgimpbase/Makefile.am libgimpbase/gimpbase-private.[ch] new files
2003-11-15  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase-private.[ch]
	* libgimpbase/gimpunit.c: new files implementing GimpUnitVTable
	(formerly known as GimpWidgetsVTable). Now the unit functions
	finally live in the same library as their header declarations.

	* libgimpbase/gimpunit.h: removed comment about being a header for
	two different files.

	* libgimpwidgets/gimpwidgets-private.[ch]: removed
	GimpWidgetsVTable.

	* libgimpwidgets/gimpsizeentry.c
	* libgimpwidgets/gimpunitmenu.c
	* libgimpwidgets/gimpwidgets.c: use normal gimp_unit functions
	again.

	* libgimp/gimpui.c
	* app/gui/gui.c: removed GimpWidgetVTable stuff.

	* libgimp/Makefile.am
	* libgimp/gimpunitcache.[ch]: new files.

	* libgimp/gimpunit.c: removed (moved to gimpunitcache.c).

	* libgimp/gimp.c (gimp_main): initialize GimpUnitVTable using the
	gimp_unit_cache functions.

	* app/Makefile.am
	* app/units.[ch]: new files implementing GimpUnitVTable.

	* app/libgimp_glue.[ch]: removed.

	* app/app_procs.[ch]: made "the_gimp" a static variable. Call
	units_init().

	* app/main.c: changed accordingly.
2003-11-15 22:53:28 +00:00
Sven Neumann 35100afb7a libgimpcolor/Makefile.am use GLIB_CFLAGS instead of GTK_CFLAGS.
2001-12-31  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/Makefile.am
	* libgimpmath/Makefile.am: use GLIB_CFLAGS instead of GTK_CFLAGS.

	* app/libgimp_glue.[ch]: do not allow anyone but app/libgimp_glue.c
	to include libgimp_glue.h.

	* libgimpbase/gimpunit.h
	* libgimp/gimpunit.c: cache return values of GimpUnit PDB calls and
	return const strings from the GimpUnit accessor functions just like
	the equivalent functions in the application do.

	* plug-ins/common/uniteditor.c: don't free GimpUnit strings. Don't
	free the result of gtk_entry_get_text() neither.
2001-12-31 01:22:47 +00:00
Sven Neumann efe8f6dbdc app/config/gimpconfig-params.[ch] added support for GimpUnit type.
2001-12-16  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-params.[ch]
	* app/config/gimpconfig-types.[ch]: added support for GimpUnit type.

	* app/config/gimpbaseconfig.[ch]
	* app/config/gimpcoreconfig.[ch]
	* app/config/test-config.c: cleaned up includes. Added more properties
	to GimpCoreConfig.

	* app/libgimp_glue.h
	* libgimpbase/gimpunit.h:
	declared gimp_unit_get_number_of_built_in_units() G_GNUC_CONST.

	* app/core/gimpunit.[ch]: internal GimpUnit functions return const
	strings.

	* app/xcf/xcf-save.c: changed accordingly.
2001-12-16 16:33:18 +00:00
Sven Neumann 757017a8e2 bumped version number to 1.3.1. Require Glib/GTK+-1.3.11 and Pango-0.22.
2001-11-23  Sven Neumann  <sven@gimp.org>

	* configure.in: bumped version number to 1.3.1.
	Require Glib/GTK+-1.3.11 and Pango-0.22. Removed GDK_DISABLE_COMPAT_H
	and GTK_DISABLE_COMPAT_H from our default CFLAGS since they don't
	exist any longer.

	* RELEASE-TO-CVS.patch: removed since the glib/gtk+ API is supposed to
	be frozen now.

	* HACKING: removed reference to RELEASE-TO-CVS.patch

	* app/gui/menus.c
	* app/tools/gimptexttool.c: applied RELEASE-TO-CVS.patch to conform
	to the new GTK+/Pango API.

	* app/core/Makefile.am: generate marshallers with gimp_marshal prefix.

	* app/core/gimpmarshal.list: added all marshallers we use.

	* app/core/gimpmarshal.[ch]: regenerated.

	* app/[lots of .c files]: use gimp_marshal_* for all marshallers.

	* data/images/
	* app/app_procs.c
	* app/gui/splash.c:

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase.h
	* libgimpbase/gimputils.[ch]: removed since they are no longer needed.

	* app/gimprc.c
	* plug-ins/common/ps.c
	* plug-ins/gdyntext/gdyntext.c
	* plug-ins/gdyntext/gdyntextcompat.c
	* plug-ins/gfig/gfig.c
	* plug-ins/gflare/gflare.c
	* plug-ins/script-fu/script-fu-scripts.c: use glib functions instead
	of gimp_strescape() and gimpstrcompress().

	* cleaned up all header files: use G_BEGIN_DECLS/G_END_DECLS, declared
	all _get_type function as G_GNUC_CONST.

	* tools/pdbgen/enumcode.pl
	* tools/pdbgen/lib.pl: make them generate header files using
	G_BEGIN_DECLS/G_END_DECLS.

	* pixmaps/Makefile.am
	* pixmaps/wilber3.xpm: removed ...
	* data/images/tips_wilber.png: ... and added here as PNG

	* app/gui/tips-dialog.c: load the Wilber on demand using GdkPixbuf.

	* data/images/gimp_splash.ppm: removed ...
	* data/images/gimp_splash.png: ... and added as PNG

	* app/app_procs.c
	* app/gui/splash.[ch]: load the splash image using GdkPixbuf.

	* app/gui/about-dialog.c: sink the GtkPreview.
2001-11-22 23:46:13 +00:00
Michael Natterer 7d1375e949 Makefile.am configure.in added new directory libgimpbase/
2001-05-21  Michael Natterer  <mitch@gimp.org>

	* Makefile.am
	* configure.in
	* gimptool-1.4.in: added new directory libgimpbase/

	* app/Makefile.am: link against the new lib.

	* app/appenums.h: removed the PDB enums which are in
	libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed.

	* app/apptypes.h: #include "libgimpbase/gimpbasetypes.h"

	* app/[lots]
	* app/core/[of]
	* app/gui/[files]
	* app/tools/: changed includes and all PDB types.

	* app/pdb/*: regenerated.

	* libgimp/Makefile.am: don't build libgimpi.a uglyness any more.

	* libgimp/gimpenv.[ch]
	* libgimp/gimplimits.[hh]
	* libgimp/gimpparasite.[ch]
	* libgimp/gimpparasiteio.[ch]
	* libgimp/gimpprotocol.[ch]
	* libgimp/gimpsignal.[ch]
	* libgimp/gimpunit.h
	* libgimp/gimputils.[ch]
	* libgimp/gimpwire.[ch]: removed...

	* libgimpbase/*: ...and added here as new library.

	* libgimp/gimp.[ch]
	* libgimp/gimpdrawable.[ch]
	* libgimp/gimpenums.h
	* libgimp/gimpimage.[ch]
	* libgimp/gimptile.c
	* libgimp/gimptypes.h
	* libgimp/gimpunit.c: changed accordingly. Added the
	gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and
	gimpimage.[ch].

	* libgimpwidgets/gimppatheditor.c
	* libgimpwidgets/gimpquerybox.c
	* libgimpwidgets/gimpsizeentry.c
	* libgimpwidgets/gimpunitmenu.c
	* libgimpwidgets/gimpwidgets.c
	* libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly.

	* plug-ins/*/Makefile.am
	* plug-ins/common/mkgen.pl: link against libgimpbase.

	* tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so
	the enums are known to pdbgen...

	* tools/pdbgen/enumcode.pl: ...but don't write them out to
	libgimp/gimpenums.h

	* tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c
	files. Added GIMP_ to the type names ganerated in app/.

	* tools/pdbgen/enums.pl: regenerated.

	* tools/pdbgen/pdb.pl
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 13:58:46 +00:00
Michael Natterer 8d6c335f8f app/Makefile.am app/channel_pvt.h app/drawable_pvt.h app/gdisplayF.h
2000-12-29  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/channel_pvt.h
	* app/drawable_pvt.h
	* app/gdisplayF.h
	* app/gimpdrawableP.h
	* app/gimpimageP.h
	* app/layer_pvt.h
	* app/toolsF.h: removed these files.

	* app/apptypes.h
	* tools/pdbgen/enums.pl: added tons of opaque typedefs and enums.

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/display.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/help.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/tools.pdb
	* app/*: chainsaw #include cleanup:

	- Never (never!!) include stuff in header files except where we
	  need access to structures' contents (like derived objects).
	- Added prototypes and proper formating in many files.
	- The #include order in *all* *.c files is as follows:

	#include "config.h"

	#include <system stuff>

	#include <gtk/gtk.h>

	#include "apptypes.h"

	#include "gimp stuff"

	#include "libgimp stuff"

	#include "libgimp/gimpintl.h"

	By following this scheme we can easily see a file's dependencies
	from it's #include's and can grep for the inclusion to find out
	where a file is used.

	* tools/pdbgen/app.pl: changed to follow the include scheme above.

	* libgimp/Makefile.am
	* libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h
	and from app/apptypes.h.

	* libgimp/gimpcolorbutton.[ch]
	* libgimp/gimpdialog.[ch]
	* libgimp/gimphelpui.[ch]
	* libgimp/gimpparasite.[ch]
	* libgimp/gimppatheditor.[ch]
	* libgimp/gimpprotocol.c
	* libgimp/gimpquerybox.[ch]
	* libgimp/gimpsizeentry.[ch]
	* libgimp/gimptypes.h
	* libgimp/gimpui.h
	* libgimp/gimpunit.h
	* libgimp/gimpunitmenu.[ch]
	* libgimp/gimpwidgets.[ch]: changed accordingly.

	* plug-ins/FractalExplorer/Dialogs.c
	* plug-ins/gdyntext/message_window.c
	* plug-ins/imagemap/imap_default_dialog.c
	* plug-ins/imagemap/imap_file.c: these files used to include
	"libgimp/gimpui.h" without including "libgimp/gimp.h". This is
	no longer possible because the libgimpui headers don't inlcude
	"libgimp/gimpunit.h" any more.
2000-12-29 15:22:01 +00:00
Michael Natterer ba9ec2a2ff Sven Neumann <sven@gimp.org>
2000-05-31  Michael Natterer  <mitch@gimp.org>
	    Sven Neumann  <sven@gimp.org>

	Episode IV...

	* app/Makefile.am

	* app/message_cmds.c: new name
	* app/interface_cmds.c: removed

	* app/help_cmds.c: new name
	* app/gimphelp_cmds.c: removed

	* app/internal_procs.c
	* app/gimphelp_cmds.c
	* app/plug_in_cmds.c: moved gimp_plugin_help_register to
	plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/

	* libgimp/Makefile.am
	* libgimp/gimp_pdb.h
	* libgimp/gimpfileops_pdb.[ch]
	* libgimp/gimpguides_pdb.[ch]
	* libgimp/gimpmessage_pdb.[ch]
	* libgimp/gimpprocedural_db_pdb.[ch]
	* libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers
	moved out of libgimp/gimp.[ch]

	* libgimp/gimpchannel_pdb.c
	* libgimp/gimpdisplay_pdb.[ch]
	* libgimp/gimpdrawable_pdb.[ch]
	* libgimp/gimphelp_pdb.[ch]
	* libgimp/gimpimage_pdb.[ch]
	* libgimp/gimplayer_pdb.c
	* libgimp/gimpparasite_pdb.c
	* libgimp/gimpselection_pdb.c: various changes.

	* libgimp/gimpunit.c: new file
	* libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed
	with "_" which are called from libgimp/gimpunit.c only.

	* libgimp/gimpunit.h: minor stuff

	* libgimp/gimpcompat.h: declared the following functions obsolete:
	 gimp_query_database
	 gimp_query_images

	* libgimp/gimp.[ch]: removed all PDB wrappers.

	* tools/pdbgen/Makefile.am
	* tools/pdbgen/groups.pl: changed

	* tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and
	fixed just a few comments.

	* tools/pdbgen/pdb/interface.pdb
	* tools/pdbgen/pdb/gimphelp.pdb: removed

	* tools/pdbgen/pdb/help.pdb
	* tools/pdbgen/pdb/message.pdb: new names

	* plug-ins/script-fu/script-fu.c
	* plug-ins/perl/Gimp/Lib.xs:
	s/gimp_plugin_domain_add/gimp_plugin_domain_register/

2000-05-31  Michael Natterer  <mitch@gimp.org>

	* POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 13:24:14 +00:00
Michael Natterer 804af727f6 app/gimpunit.c all libgimp headers are included via gimp.h or gimpui.h, so
2000-05-31  Michael Natterer  <mitch@gimp.org>

	* app/gimpunit.c
	* libgimp/*: all libgimp headers are included via gimp.h or
	gimpui.h, so include <gtk/gtk.h> there and in the *.c files.
	Various cleanups.
2000-05-30 23:38:46 +00:00
Sven Neumann 2d578df303 excluded gserialize.[ch] from the build
* libgimp/Makefile.am: excluded gserialize.[ch] from the build

* libgimp/*: header cleanup


--Sven
2000-02-26 03:41:06 +00:00
Michael Natterer ef17866973 app/* libgimp/* plug-ins/* did a global s/GUnit/GimpUnit/ and
2000-02-07  Michael Natterer  <mitch@gimp.org>

	* app/*
	* libgimp/*
	* plug-ins/*
	* tools/pdbgen/*: did a global s/GUnit/GimpUnit/ and
	s/GimpSizeEntryUP/GimpSizeEntryUpdatePolicy/

	* libgimp/gimpcolorspace.c: renamed the parameter names to match
	the names in the header.

	* libgimp/gimphelpui.h
	* libgimp/gimpimage.c
	* libgimp/gimpmatrix.h
	* libgimp/gimpsizeentry.[ch]
	* libgimp/gimpsizeentry.[ch]
	* libgimp/gimpunit.[ch]
	* libgimp/gimpunitmenu.[ch]
	* libgimp/gimpwidgets.[ch]: added documentation and use g* types
	all over the place (enables cross-referencing with the glib and
	gtk+ html documentation).

	* plug-ins/common/exchange.c
	* plug-ins/common/max_rgb.c: small cleanups.

	* plug-ins/common/mapcolor.c: the color buttons were attached in
	the wrong order.
2000-02-07 20:35:13 +00:00
Manish Singh b8e03bd1c7 added spec file to EXTRA_DIST
* Makefile.am: added spec file to EXTRA_DIST

* docs/Makefile.am: added undo.txt to EXTRA_DIST

* app/interface.c: removed the DODGY warning, doesn't look dodgy to me

* libgimp/*.h: missed an s/Library/Lesser/

* tools/pdbgen/*: lots of work on the libgimp portion

-Yosh
1999-12-26 07:54:39 +00:00
Marc Lehmann df8b445be6 *** empty log message *** 1999-11-17 21:13:50 +00:00
Michael Natterer dcfb450b25 app/[all files with resolution info] libgimp/gimp.h libgimp/gimpimage.c
1999-05-22  Michael Natterer  <mitschel@cs.tu-berlin.de>

	* app/[all files with resolution info]
	* libgimp/gimp.h
	* libgimp/gimpimage.c
	* libgimp/gimpsizeentry.[ch]
	* libgimp/gimpunit.[ch]
	* plug-ins/newsprint/newsprint.c
	* plug-ins/pgn/png.c
	* plug-ins/tiff/tiff.c: double instead of float for all resolution
	and unit-factor variables.

	* app/commands.c
	* app/crop.c
	* app/interface.c
	* app/layers_dialog.c
	* app/move_tool.c
	* app/resize.c
	* app/rotate_tool.c
	* app/scale_tool.c: pass the image's unit *and* gdisp->dot_for_dot
	to all functions which create sizeentries. Never create a
	sizeentry with UNIT_PIXEL but with the image's unit and set it's
	unit to UNIT_PIXEL after creation if dot_for_dot is on.
	This way the image's unit can always be picked from the menu
	without selecting "More...".

	* app/interface.c: made the query_*_box() functions use the
	ActionArea.

	* plug-ins/gimpunitmenu.c: GTK_WIN_POS_MOUSE for the unit
	selection dialog.
1999-05-22 17:56:35 +00:00
Michael Natterer 16e7aadaf3 app/gimpunit.c libgimp/gimpunit.[ch] libgimp/gimpunitmenu.c enabled
1999-04-06  Michael Natterer  <mitschel@cs.tu-berlin.de>

	* app/gimpunit.c
	* libgimp/gimpunit.[ch]
	* libgimp/gimpunitmenu.c
	* libgimp/gimpsizeentry.[ch]: enabled "percent" pseudo-unit.
	New function gimp_size_entry_set_size() to set the values which
	will be treated as 0% and 100%.

	* app/crop.c
	* app/rotate_tool.c
	* app/scale_tool.c: enable "percent".

	* app/rect_select.c fixed size selections can be made in units and
	percent now, table layout, label adjustment.
1999-04-06 12:13:54 +00:00
Michael Natterer 5e8ee554a2 This implements the rest of the unit system (unitrc loading and saving and
1999-03-16  Michael Natterer  <mitschel@cs.tu-berlin.de>

        This implements the rest of the unit system (unitrc loading and
        saving and full PDB interface)

        * Makefile.am
        * gimp.1
        * user_install
        * user_install.bat
        * unitrc: new file (default unit database) and some documentation

        * app/Makefile.am
        * app/gimpunit.c
        * app/gimpunit_cmds.h
        * app/unitrc.h: new files enabling the unit database and PDB
        access to the unit system

        * app/app_procs.c: parse and save unitrc
        * app/gimprc.[ch]: enable unit parsing. New function
        init_parse_buffers() to enable unitrc to be loaded before gimprc

        * app/gimage_cmds.[ch]: new PDB procedures which set/return an
        image's unit

        * app/install.c: mention unitrc installation

        * app/xcf.c: new xcf property for user defined units. An image's
        unit is saved as either an integer ID (built in units) or as
        a full unit definition without any ID

        * libgimp/Makefile.am: moved gimpunit.o from libgimpi.a to
        libgimp.a

        * libgimp/gimp.h
        * libgimp/gimpimage.c: get/set an image's unit with PDB calls

        * libgimp/gimpunit.h: this file is now the header for both
        app/gimpunit.c and libgimp/gimpunit.c

        * libgimp/gimpunit.c: does the unit calls as PDB calls now

        * libgimp/gimpunitmenu.[ch]: enable user unit functionality and a
        unit selection dialog

        * libgimp/gimpsizeentry.c: disble hilighting on focus_in_event and
        minor bugfixes

        * plug-ins/tiff/tiff.c: set image unit to "mm" if tiff unit is
        "cm", save "cm" if image unit is metric
1999-03-16 20:14:07 +00:00
Sven Neumann 151c624be1 There were a few changes from Michael left, that I didn't knew of.
--Sven
1999-03-03 17:10:50 +00:00
Sven Neumann 6a6dbd25fa Hopefully synced the work on real-world-units by applying (most of)
the patches Michael Natterer has provided.
Fixed a few minor and cosmetic bugs in those patches.


--Sven
1999-03-03 12:35:12 +00:00
CST 1999 Shawn T. Amundson df051bd37f Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from
Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org>

        * app/tips_dialog.c: Add default to Cancel button, remove
          unset GTK_RECEIVES_DEFAULT from prev/next buttons (they
          are like toolbar buttons), changed abreviated prev to
          previous, prev/next button are now same size, cancel button
          is in a button box.  Added vboxes where necessary to prevent
          prev/next and check button from filling vertically.

        * app/app_procs.c: when splashscreen dialog is larger than the
          logo, (due to huge font), center logo.

        * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com>
          disallows resizing, changes vertical expanding of widgets to
          not occur

        * app/palette.c: patch from Marco Lamb <lm@geocities.com>.  Makes
          +/- buttons for zoom pixmaps (eventually, these can be replaced
          with a magnifying glass with a little +/- I think), so that they
          no longer expand as they did before.  I modified his patch so it
          did not create a misused toolbar.  I did some other stuff here too,
          moved Close button to the left, made it the window's default,
          and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons.

        * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>.
          This one changes buttons to be put in a button box which is right
          justified.  If we decide later that spread is better, we can
          change this easy enough.

        * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics.

        * libgimp/gimpunit.h
          libgimp/gimpunit.c: New files from Michael Natterer
          <mitschel@cs.tu-berlin.de>, gimp_unit_* routines.

        * app/gimage.h
          app/gimpimage.h
          app/gimpimage.c
          app/gimpimageP.h
          app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>,
          which keep a unit assocated with an image.
1999-02-21 02:08:15 +00:00