1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 05:22:40 +02:00

Compare commits

...

126 Commits

Author SHA1 Message Date
Aurimas Juška
d07aca210f app/core/gimpbrush.c app/core/gimpfilteredcontainer.c
2008-10-12  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimpbrush.c
	* app/core/gimpfilteredcontainer.c
	* app/core/gimptag.[ch]
	* app/core/gimptagcache.[ch]
	* app/widgets/gimpcombotagentry.c
	* app/widgets/gimptagentry.c: fixed some minor issues.


svn path=/branches/soc-2008-tagging/; revision=27250
2008-10-12 20:08:21 +00:00
Aurimas Juška
5c34ad7545 use GimpXmlParser instead of GMarkupParser.
2008-10-12  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimptagcache.c (gimp_tag_cache_load): use GimpXmlParser
	instead of GMarkupParser.


svn path=/branches/soc-2008-tagging/; revision=27248
2008-10-12 19:16:42 +00:00
Aurimas Juška
6ea3e98236 app/core/gimpfilteredcontainer.c app/core/gimppalette.c
2008-10-12  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimpfilteredcontainer.c
	* app/core/gimppalette.c
	* app/core/gimptagcache.c
	* app/widgets/gimptagentry.c
	* app/widgets/gimptagpopup.c: rewrote GList iterations using
	for instead of while.


svn path=/branches/soc-2008-tagging/; revision=27246
2008-10-12 18:27:03 +00:00
Aurimas Juška
e9ab71eab7 app/core/gimpbrush.c app/core/gimpgradient.c app/core/gimppalette.c
2008-10-12  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimpbrush.c
	* app/core/gimpgradient.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c: implementations of GimpTagged methods moved
	right after the implementations of other vtable methods. GimpTagged
	interface init functions moved right after class_init() functions.
	Improved function header formatting.


svn path=/branches/soc-2008-tagging/; revision=27245
2008-10-12 17:21:37 +00:00
Aurimas Juška
b850b40bbb Merged from trunk revisions 26631:27242.
svn path=/branches/soc-2008-tagging/; revision=27244
2008-10-12 15:38:02 +00:00
Aurimas Juška
46860b5daa Merged from trunk revisions 26352:26631.
svn path=/branches/soc-2008-tagging/; revision=26635
2008-08-17 21:10:13 +00:00
Aurimas Juška
3c309020d6 removed debugging output.
2008-08-17  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimptagcache.c (gimp_tag_cache_save):
	* app/widgets/gimptagentry.c (gimp_tag_entry_commit_tags):
	removed debugging output.


svn path=/branches/soc-2008-tagging/; revision=26630
2008-08-17 20:12:18 +00:00
Aurimas Juška
d14bb22da8 described the meaning of gimp tag entry text mask.
2008-08-17  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.h: described the meaning of gimp tag entry
	text mask.


svn path=/branches/soc-2008-tagging/; revision=26629
2008-08-17 20:06:04 +00:00
Aurimas Juška
9acf37f4ca sort autocompletion candidates so that they can be cycled in correct
2008-08-17  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_auto_complete):
	sort autocompletion candidates so that they can be cycled in correct
	order.


svn path=/branches/soc-2008-tagging/; revision=26628
2008-08-17 19:58:49 +00:00
Aurimas Juška
ca0854675d made jellybean selection with mouse work again.
2008-08-14  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_select_jellybean): made
	jellybean selection with mouse work again.


svn path=/branches/soc-2008-tagging/; revision=26542
2008-08-13 21:37:54 +00:00
Aurimas Juška
cb308d14a5 tag cache loading sequence was documented wrongly.
2008-08-14  Aurimas Juška  <auris@auris-laptop>

	* tagging.txt: tag cache loading sequence was documented wrongly.


svn path=/branches/soc-2008-tagging/; revision=26541
2008-08-13 21:15:37 +00:00
Aurimas Juška
523acb35f1 fixed identifier remapping when resource files are renamed.
2008-08-14  Aurimas Juška  <auris@auris-laptop>

	* app/core/gimptagcache.c (gimp_tag_cache_object_add): fixed
	identifier remapping when resource files are renamed.


svn path=/branches/soc-2008-tagging/; revision=26540
2008-08-13 21:13:34 +00:00
Aurimas Juška
e5c302c7fa fixed crash when creating new resource (which has NULL filename).
2008-08-14  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimpdata.c (gimp_data_get_identifier): fixed crash when
	creating new resource (which has NULL filename).


svn path=/branches/soc-2008-tagging/; revision=26539
2008-08-13 21:10:19 +00:00
Aurimas Juška
a7ff442532 app/core/gimpfilteredcontainer.[ch] app/core/gimptag.[ch]
2008-08-12  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimpfilteredcontainer.[ch]
	* app/core/gimptag.[ch]
	* app/widgets/gimptagentry.c
	* app/widgets/gimptagpopup.h: improvements and fixes for documentation
	reference comments.


svn path=/branches/soc-2008-tagging/; revision=26526
2008-08-12 20:33:29 +00:00
Aurimas Juška
08eb7d87e1 app/app-docs.sgml app/app-sections.txt added configuration for resource
2008-08-12  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/app-docs.sgml
	* app/app-sections.txt
	* app/app.types: added configuration for resource tagging reference.


svn path=/branches/soc-2008-tagging/; revision=26525
2008-08-12 20:23:43 +00:00
Aurimas Juška
e5f824cc67 added resource tagging overview for developers.
2008-08-12  Aurimas Juška  <aurisj@svn.gnome.org>

	* tagging.txt: added resource tagging overview for developers.


svn path=/branches/soc-2008-tagging/; revision=26519
2008-08-12 15:24:35 +00:00
Aurimas Juška
418d7e5af0 some fixes of directional selections.
2008-08-12  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_select_jellybean):
	some fixes of directional selections.


svn path=/branches/soc-2008-tagging/; revision=26516
2008-08-12 13:51:00 +00:00
Aurimas Juška
378cde087b reposition cursor after whitespace where possible. Also improved
2008-08-12  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: reposition cursor after whitespace where
	possible. Also improved whitespace addition as user starts typing
	tags.


svn path=/branches/soc-2008-tagging/; revision=26515
2008-08-12 13:31:59 +00:00
Aurimas Juška
02ecb0eec9 fixed case insensitive tag handling.
2008-08-11  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimptag.c: fixed case insensitive tag handling.


svn path=/branches/soc-2008-tagging/; revision=26497
2008-08-11 11:58:06 +00:00
Aurimas Juška
7e308483e5 disable single selection mode when mouse button is release outside popup
2008-08-10  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagpopup.c (gimp_tag_popup_border_event): disable
	single selection mode when mouse button is release outside popup
	window.


svn path=/branches/soc-2008-tagging/; revision=26482
2008-08-10 11:37:26 +00:00
Aurimas Juška
5f4464c244 reposition cursor after a whitespace when there are no tags before (last
2008-08-10  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c
	(gimp_tag_entry_strip_extra_whitespace): reposition cursor after a
	whitespace when there are no tags before (last position).


svn path=/branches/soc-2008-tagging/; revision=26481
2008-08-10 11:27:18 +00:00
Aurimas Juška
2884a6c3ad tab key cycles completion variants.
2008-08-10  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.[ch]: tab key cycles completion variants.


svn path=/branches/soc-2008-tagging/; revision=26469
2008-08-09 22:58:59 +00:00
Aurimas Juška
cae8f6a382 add space when insert tag in the middle of tags list.
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: add space when insert tag in the middle
	of tags list.


svn path=/branches/soc-2008-tagging/; revision=26468
2008-08-09 19:55:35 +00:00
Aurimas Juška
ad71e53f7a some auto-completion tweaks.
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: some auto-completion tweaks.


svn path=/branches/soc-2008-tagging/; revision=26467
2008-08-09 19:06:30 +00:00
Aurimas Juška
0cc7d4f71e force policy where there is one space after each tag's separator.
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: force policy where there is one space
	after each tag's separator.


svn path=/branches/soc-2008-tagging/; revision=26466
2008-08-09 17:31:50 +00:00
Aurimas Juška
fe05ebe2fd try to select closest tag on delete only when there is no selection
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_select_jellybean): try to
	select closest tag on delete only when there is no selection already.


svn path=/branches/soc-2008-tagging/; revision=26465
2008-08-09 15:00:32 +00:00
Aurimas Juška
0466686e04 app/widgets/gimpcombotagentry.c app/widgets/gimptagentry.c do not popup
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c
	* app/widgets/gimptagentry.c
	* app/widgets/gimptagentry.h: do not popup tag list when there are no
	possible selections.


svn path=/branches/soc-2008-tagging/; revision=26464
2008-08-09 14:22:51 +00:00
Aurimas Juška
3542882e5f disable add to recently used tag list when working in tag assignment mode.
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_add_to_recent):
	disable add to recently used tag list when working in tag assignment
	mode.


svn path=/branches/soc-2008-tagging/; revision=26463
2008-08-09 14:06:21 +00:00
Aurimas Juška
6561561a6b select tags with shift + left/right arrow keys.
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: select tags with shift + left/right
	arrow keys.


svn path=/branches/soc-2008-tagging/; revision=26462
2008-08-09 13:50:33 +00:00
Aurimas Juška
e42b3a279a invalid tag querying always gives empty set of results.
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: invalid tag querying always gives empty
	set of results.


svn path=/branches/soc-2008-tagging/; revision=26461
2008-08-09 12:26:04 +00:00
Aurimas Juška
6e6496a102 fixed cursor reposition when committing tags.
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: fixed cursor reposition when committing
	tags.


svn path=/branches/soc-2008-tagging/; revision=26460
2008-08-09 12:16:38 +00:00
Aurimas Juška
6d1c1a92f2 app/core/gimptag.c always normalize tag names.
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimptag.c
	* app/widgets/gimptagentry.c: always normalize tag names.


svn path=/branches/soc-2008-tagging/; revision=26459
2008-08-09 12:15:40 +00:00
Aurimas Juška
333a748084 app/widgets/gimptagentry.c smartly add spaces when necessary.
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c
	* app/widgets/gimptagpopup.c: smartly add spaces when necessary.


svn path=/branches/soc-2008-tagging/; revision=26458
2008-08-09 11:05:48 +00:00
Aurimas Juška
ebddf49e96 when deleting a tag, in which side to delete whitespace depends whether
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: when deleting a tag, in which side to
	delete whitespace depends whether Delete or Backspace keys are used.


svn path=/branches/soc-2008-tagging/; revision=26457
2008-08-08 22:49:33 +00:00
Aurimas Juška
662812658b multiple tag deletion.
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: multiple tag deletion.


svn path=/branches/soc-2008-tagging/; revision=26456
2008-08-08 22:05:02 +00:00
Aurimas Juška
d96efe1c38 when arrow is clicked indicate that event is handled.
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c (gimp_combo_tag_entry_event):
	when arrow is clicked indicate that event is handled.


svn path=/branches/soc-2008-tagging/; revision=26455
2008-08-08 21:15:09 +00:00
Aurimas Juška
bc1fe9d9b8 improved tag auto-completion handling.
2008-08-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: improved tag auto-completion handling.


svn path=/branches/soc-2008-tagging/; revision=26454
2008-08-08 21:07:33 +00:00
Aurimas Juška
e996d42f2a fixed with of combo box arrow area so that entry's cursor would not be
2008-08-08  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c (gimp_combo_tag_entry_new):
	fixed with of combo box arrow area so that entry's cursor would
	not be covered by it.


svn path=/branches/soc-2008-tagging/; revision=26453
2008-08-08 19:54:26 +00:00
Aurimas Juška
dd1abf541c reorganized and rewritten jellybean handling code.
2008-08-08  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.[ch]: reorganized and rewritten jellybean
	  handling code.


svn path=/branches/soc-2008-tagging/; revision=26452
2008-08-08 19:51:37 +00:00
Aurimas Juška
b1ef0afb4a improved handling of clicking empty area in popup makes it close.
2008-08-07  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagpopup.c (gimp_tag_popup_layout_tags): improved
	handling of clicking empty area in popup makes it close.


svn path=/branches/soc-2008-tagging/; revision=26416
2008-08-07 11:53:33 +00:00
Aurimas Juška
d0c167b6f2 added app/widgets/gimptagentry.c.
2008-08-07  Aurimas Juška  <aurisj@svn.gnome.org>

	* POTFILES.in: added app/widgets/gimptagentry.c.


svn path=/branches/soc-2008-tagging/; revision=26415
2008-08-07 11:42:21 +00:00
Aurimas Juška
b48d79ecab app/core/gimpfilteredcontainer.[ch] app/core/gimptag.[ch]
2008-08-07  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimpfilteredcontainer.[ch]
	* app/core/gimptag.[ch]
	* app/core/gimptagcache.[ch]
	* app/widgets/gimpcombotagentry.[ch]
	* app/widgets/gimptagentry.[ch]
	* app/widgets/gimptagpopup.c: code cleanup and documentation.


svn path=/branches/soc-2008-tagging/; revision=26414
2008-08-07 11:16:25 +00:00
Aurimas Juška
009d83207b removed left and right border which used to be displayed only when
2008-08-06  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagpopup.c (gimp_tag_popup_new): removed left and
	right border which used to be displayed only when scrolling was on.


svn path=/branches/soc-2008-tagging/; revision=26410
2008-08-06 21:01:47 +00:00
Aurimas Juška
ebb5320214 app/widgets/gimpcombotagentry.c fixed owner/child responsibilities.
2008-08-06  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c
	* app/widgets/gimptagpopup.c: fixed owner/child responsibilities.


svn path=/branches/soc-2008-tagging/; revision=26409
2008-08-06 20:40:04 +00:00
Aurimas Juška
cada9681fb upper scroll arrow is initialy insensitive as it is at the minimum scroll
2008-08-06  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagpopup.c (gimp_tag_popup_new): upper scroll arrow
	is initialy insensitive as it is at the minimum scroll position.


svn path=/branches/soc-2008-tagging/; revision=26407
2008-08-06 20:25:02 +00:00
Aurimas Juška
e5e57433d6 app/widgets/gimpcombotagentry.c app/widgets/gimptagentry.c implemented RTL
2008-08-06  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c
	* app/widgets/gimptagentry.c
	* app/widgets/gimptagpopup.c: implemented RTL text direction support.


svn path=/branches/soc-2008-tagging/; revision=26405
2008-08-06 19:41:08 +00:00
Aurimas Juška
6098b6abf1 app/widgets/gimpcombotagentry.[ch] app/widgets/gimpdatafactoryview.c
2008-08-06  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.[ch]
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimptagentry.[ch]
	* app/widgets/gimptagpopup.c: cleaned up and reorganized code in
	order to prepare widget code for RTL support.


svn path=/branches/soc-2008-tagging/; revision=26402
2008-08-06 18:18:08 +00:00
Aurimas Juška
410e7621eb app/widgets/gimptagentry.[ch] since tags can be changed to make them
2008-08-06  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.[ch]
	* app/widgets/gimptagpopup.c: since tags can be changed to make them
	valid, they are now reloaded after assignment and cursor is positioned
	at the previously edited tag.


svn path=/branches/soc-2008-tagging/; revision=26400
2008-08-06 14:04:06 +00:00
Aurimas Juška
62c6ed6c66 app/widgets/gimptagentry.c use any UNICODE terminal punctuation character
2008-08-06  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c
	* app/widgets/gimptagpopup.c: use any UNICODE terminal punctuation
	character as separator.


svn path=/branches/soc-2008-tagging/; revision=26399
2008-08-06 12:16:13 +00:00
Aurimas Juška
49d2ba5a85 marshal GimpTags as objects.
2008-08-05  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimptagged.c (gimp_tagged_base_init): marshal GimpTags as
	objects.


svn path=/branches/soc-2008-tagging/; revision=26394
2008-08-05 17:43:04 +00:00
Aurimas Juška
e26816b9e3 horizontal space at the end of each line can be used to close tag popup.
2008-08-05  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagpopup.[ch]: horizontal space at the end of each
	line can be used to close tag popup.


svn path=/branches/soc-2008-tagging/; revision=26393
2008-08-05 17:34:08 +00:00
Aurimas Juška
71b31eba97 when selecting with mouse at the end of tag entry, don't try to select
2008-08-05  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_try_select_jellybean):
	when selecting with mouse at the end of tag entry, don't try to select
	jellybean, but allow appending tags.


svn path=/branches/soc-2008-tagging/; revision=26389
2008-08-05 17:08:28 +00:00
Aurimas Juška
236d79a801 app/core/gimptag.[ch] app/core/gimptagcache.c (gimp_tag_cache_load_text)
2008-08-05  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimptag.[ch]
	* app/core/gimptagcache.c (gimp_tag_cache_load_text)
	* app/widgets/gimptagentry.c (gimp_tag_entry_assign_tags): added rules
	tag names.


svn path=/branches/soc-2008-tagging/; revision=26385
2008-08-05 16:09:07 +00:00
Aurimas Juška
32622b1523 app/core/gimpfilteredcontainer.[ch] make tag popup arrow insensitive when
2008-08-05  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimpfilteredcontainer.[ch]
	* app/widgets/gimpcombotagentry.[ch]: make tag popup arrow insensitive
	when tag list is empty.


svn path=/branches/soc-2008-tagging/; revision=26381
2008-08-05 14:16:21 +00:00
Aurimas Juška
c731303a76 decreased height of tag highlight.
2008-08-05  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagpopup.c (gimp_tag_popup_layout_tags),
	(gimp_tag_popup_list_expose): decreased height of tag highlight.


svn path=/branches/soc-2008-tagging/; revision=26380
2008-08-05 11:44:01 +00:00
Aurimas Juška
aec541ac6f underline highlighted tags in popup list.
2008-08-04  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c (gimp_combo_tag_entry_style_set):
	* app/widgets/gimptagpopup.c (gimp_tag_popup_list_expose):
	underline highlighted tags in popup list.


svn path=/branches/soc-2008-tagging/; revision=26364
2008-08-04 17:40:31 +00:00
Aurimas Juška
ae60f25282 support scrolling with mouse wheel.
2008-08-04  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagpopup.c (gimp_tag_popup_new),
	(gimp_tag_popup_border_event): support scrolling with mouse wheel.


svn path=/branches/soc-2008-tagging/; revision=26360
2008-08-03 23:01:07 +00:00
Aurimas Juška
7f48183e2e don't draw focus rectangle on insensitive item.
2008-08-03  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagpopup.c (gimp_tag_popup_list_expose):
	don't draw focus rectangle on insensitive item.


svn path=/branches/soc-2008-tagging/; revision=26358
2008-08-03 19:22:41 +00:00
Aurimas Juška
7b692ddbfa fixed requirements for resource to which tags are set: it only needs to be
2008-08-03  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_activate): fixed
	requirements for resource to which tags are set: it only needs to be
	visible in view.


svn path=/branches/soc-2008-tagging/; revision=26357
2008-08-03 19:17:29 +00:00
Aurimas Juška
7fa5e9a444 app/core/gimpdata.c (gimp_data_get_identifier) app/core/gimptagcache.c
2008-08-03  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimpdata.c (gimp_data_get_identifier)
	* app/core/gimptagcache.c (gimp_tag_cache_object_add),
	(tagged_to_cache_record_foreach)
	* app/core/gimptagged.c: GimpTagged identifier is now always UTF-8
	string.


svn path=/branches/soc-2008-tagging/; revision=26355
2008-08-03 15:13:11 +00:00
Aurimas Juška
963abb0c2e Merged from trunk revisions 26246:26352.
svn path=/branches/soc-2008-tagging/; revision=26353
2008-08-02 19:50:36 +00:00
Aurimas Juška
bdf1342419 fixed small memory leak.
2008-08-02  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimptagcache.c (gimp_tag_cache_load): fixed small memory
	leak.


svn path=/branches/soc-2008-tagging/; revision=26352
2008-08-02 19:20:57 +00:00
Aurimas Juška
182f8e6669 close tag popup on keyboard input.
2008-08-01  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagpopup.c: close tag popup on keyboard input.


svn path=/branches/soc-2008-tagging/; revision=26350
2008-08-01 20:24:03 +00:00
Aurimas Juška
b99859cc72 fixed usage of tab key.
2008-08-01  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_focus_in),
	(gimp_tag_entry_key_press): fixed usage of tab key.


svn path=/branches/soc-2008-tagging/; revision=26349
2008-08-01 20:05:17 +00:00
Aurimas Juška
54592cd147 hide tags on assign tag entry when selected item is not visible in the
2008-08-01  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: hide tags on assign tag entry when
	selected item is not visible in the view.


svn path=/branches/soc-2008-tagging/; revision=26348
2008-08-01 19:47:26 +00:00
Aurimas Juška
0a5fe32883 app/widgets/gimpcombotagentry.[ch] when selecting tags in the popup list,
2008-07-31  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.[ch]
	* app/widgets/gimptagpopup.[ch]: when selecting tags in the popup
	list, grayout tags which if selected would result in empty resource
	list.


svn path=/branches/soc-2008-tagging/; revision=26344
2008-07-30 21:24:39 +00:00
Aurimas Juška
e89569c5f9 don't unref tags since they are currently only referenced by tagged
2008-07-31  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_assign_tags): don't unref
	tags since they are currently only referenced by tagged objects.


svn path=/branches/soc-2008-tagging/; revision=26343
2008-07-30 21:21:14 +00:00
Aurimas Juška
ad331b29d8 free recently used tags list.
2008-07-30  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_dispose): free recently
	used tags list.


svn path=/branches/soc-2008-tagging/; revision=26341
2008-07-30 19:26:17 +00:00
Aurimas Juška
41fef90547 added support for single tag selection in tag popup. User can press mouse
2008-07-30  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagpopup.[ch]: added support for single tag
	selection in tag popup. User can press mouse button, drag to select a
	tag and release mouse button. Selected tag is toggled
	selected/deselected and popup is closed.


svn path=/branches/soc-2008-tagging/; revision=26340
2008-07-30 19:15:43 +00:00
Aurimas Juška
997088d31c Add file missing in the last commit.
svn path=/branches/soc-2008-tagging/; revision=26338
2008-07-29 20:52:28 +00:00
Aurimas Juška
aa4c434e62 added support for switching between recently used tags using up and down
2008-07-29  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: added support for switching between
	recently used tags using up and down arrow keys. (Bill Skaggs's idea).


svn path=/branches/soc-2008-tagging/; revision=26337
2008-07-29 20:25:48 +00:00
Aurimas Juška
24eb8c00b0 based on user behaviour track if tags should be considered "accepted"
2008-07-29  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.[ch]: based on user behaviour track if tags
	should be considered "accepted" (delete operates on jellybeans) or "not
	accepted" (delete operates on characters).


svn path=/branches/soc-2008-tagging/; revision=26334
2008-07-29 17:15:26 +00:00
Aurimas Juška
05894cc0c9 app/widgets/Makefile.am app/widgets/gimpcombotagentry.c
2008-07-29  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/Makefile.am
	* app/widgets/gimpcombotagentry.c
	* app/widgets/gimptagpopup.[ch]
	* app/widgets/widgets-types.h: popup part of GimpComboTagEntry has
	been moved to a separate class GimpTagPopup in order to prepare for
	upcoming feature additions.


svn path=/branches/soc-2008-tagging/; revision=26331
2008-07-28 21:25:05 +00:00
Aurimas Juška
d3b59dc845 ported GimpComboTagEntry to use menu-like scrolling. There is quite much
2008-07-27  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c: ported GimpComboTagEntry to use
	menu-like scrolling. There is quite much additional code which makes
	it necessary to move popup list code to another class later.


svn path=/branches/soc-2008-tagging/; revision=26321
2008-07-27 19:03:47 +00:00
Aurimas Juška
3213e39153 added file missing in the last commit.
svn path=/branches/soc-2008-tagging/; revision=26319
2008-07-26 18:27:20 +00:00
Aurimas Juška
acfe9a71d2 app/core/core-types.h app/core/gimpdata.c app/core/gimpfilteredcontainer.c
2008-07-26  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/core-types.h
	* app/core/gimpdata.c
	* app/core/gimpfilteredcontainer.c
	* app/core/gimptag.[ch]
	* app/core/gimptagcache.c
	* app/core/gimptagged.h
	* app/widgets/gimpcombotagentry.c
	* app/widgets/gimptagentry.c: made GimpTag an object and updated all
	places to treat it as such. This allows correctly compare various tags
	and change implementation in one place.


svn path=/branches/soc-2008-tagging/; revision=26318
2008-07-26 18:23:52 +00:00
Aurimas Juška
28dd5879fa escape identifiers and tags when saving to cache.
2008-07-26  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimptagcache.c (gimp_tag_cache_save): escape identifiers
	and tags when saving to cache.


svn path=/branches/soc-2008-tagging/; revision=26316
2008-07-26 13:36:28 +00:00
Aurimas Juška
aabcba5815 removed debugging printfs which are not needed anymore.
2008-07-26  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_select_jellybean):
	removed debugging printfs which are not needed anymore.


svn path=/branches/soc-2008-tagging/; revision=26315
2008-07-26 11:43:56 +00:00
Aurimas Juška
0123b74611 tag jellybeans are now selected in such way that after deleting tag next
2008-07-26  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_backspace),
	(gimp_tag_entry_select_jellybean): tag jellybeans are now selected in
	such way that after deleting tag next backspace or delete press would
	result in selection of another tag.


svn path=/branches/soc-2008-tagging/; revision=26314
2008-07-26 11:37:27 +00:00
Aurimas Juška
3e1d4bc19a do not autocomplete when tags are selected from tag popup list.
2008-07-26  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.[ch]: do not autocomplete when tags are
	selected from tag popup list.


svn path=/branches/soc-2008-tagging/; revision=26313
2008-07-26 10:09:05 +00:00
Aurimas Juška
01308388bb improved tag drawing in popup list.
2008-07-26  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.[ch]: improved tag drawing in popup
	list.


svn path=/branches/soc-2008-tagging/; revision=26312
2008-07-26 09:55:25 +00:00
Aurimas Juška
ffa3ca2fae app/widgets/gimpcombotagentry.c app/widgets/gimpdatafactoryview.c trigger
2008-07-22  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimptagentry.[ch]: trigger immediate tag assignment when
	toggling tags in the popup list.


svn path=/branches/soc-2008-tagging/; revision=26287
2008-07-22 19:39:15 +00:00
Aurimas Juška
cbf4d4704f fixed ill recursion which later results in segmentation fault.
2008-07-22  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_focus_in),
	(gimp_tag_entry_toggle_desc): fixed ill recursion which later results
	in segmentation fault.


svn path=/branches/soc-2008-tagging/; revision=26267
2008-07-21 22:24:25 +00:00
Aurimas Juška
ac372efe35 sort GimpData resources in correct order.
2008-07-21  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpdatafactoryview.c
	(gimp_data_factory_view_construct): sort GimpData resources in correct
	order.


svn path=/branches/soc-2008-tagging/; revision=26266
2008-07-21 20:54:03 +00:00
Aurimas Juška
5ae389e93e some fixes to finalization and memsize calculations.
2008-07-21  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimptagcache.c (gimp_tag_cache_finalize),
	(gimp_tag_cache_get_memsize): some fixes to finalization and memsize
	calculations.


svn path=/branches/soc-2008-tagging/; revision=26265
2008-07-21 20:40:39 +00:00
Aurimas Juška
db03eb7717 focus tag entry when tag popup is dropped down to give user better
2008-07-21  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c
	(gimp_combo_tag_entry_popup_list): focus tag entry when tag popup is
	dropped down to give user better feedback and get rid of description
	text.


svn path=/branches/soc-2008-tagging/; revision=26257
2008-07-21 18:24:45 +00:00
Aurimas Juška
4557710eea correctly possition popup window when it appears on top of tag entry.
2008-07-21  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c
	(gimp_combo_tag_entry_popup_list): correctly possition popup window
	when it appears on top of tag entry.


svn path=/branches/soc-2008-tagging/; revision=26256
2008-07-21 18:14:57 +00:00
Aurimas Juška
b13d7efa1d Reverted accidently committed testing code.
svn path=/branches/soc-2008-tagging/; revision=26248
2008-07-20 16:40:45 +00:00
Aurimas Juška
ca1ec7ce2e Merged from trunk revisions 26170:26246.
svn path=/branches/soc-2008-tagging/; revision=26247
2008-07-20 16:34:08 +00:00
Aurimas Juška
14b97ec792 cleaned up a bit: marked some strings for translation, free resources on
2008-07-20  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_class_init),
	(gimp_tag_entry_dispose): cleaned up a bit: marked some strings for
	translation, free resources on dispose.


svn path=/branches/soc-2008-tagging/; revision=26246
2008-07-20 13:55:53 +00:00
Aurimas Juška
c7e59832f4 properly check if there is at least one valid tag entered.
2008-07-20  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_changed),
	(gimp_tag_entry_toggle_desc): properly check if there is at least one
	valid tag entered.


svn path=/branches/soc-2008-tagging/; revision=26245
2008-07-20 13:37:11 +00:00
Aurimas Juška
0ba9c706e2 allow jellybean selection with mouse button 1 (normally left).
2008-07-20  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: allow jellybean selection with mouse
	button 1 (normally left).


svn path=/branches/soc-2008-tagging/; revision=26244
2008-07-20 13:10:48 +00:00
Aurimas Juška
51b606f21a treat tags as jellybeans (as atomic objects). When pressing backspace or
2008-07-20  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: treat tags as jellybeans (as atomic
	objects). When pressing backspace or delete, first select the whole
	tag, on the second press actually delete.


svn path=/branches/soc-2008-tagging/; revision=26243
2008-07-20 10:52:32 +00:00
Aurimas Juška
4c0cf276c2 fixed popup width to properly match tag entry width.
2008-07-20  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c
	(gimp_combo_tag_entry_popup_list): fixed popup width to properly match
	tag entry width.


svn path=/branches/soc-2008-tagging/; revision=26242
2008-07-20 09:25:35 +00:00
Aurimas Juška
cc51a00534 highlight selected tags in popup list.
2008-07-19  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.[ch]: highlight selected tags in popup
	list.


svn path=/branches/soc-2008-tagging/; revision=26235
2008-07-19 17:14:58 +00:00
Aurimas Juška
a42a2518cc added gray italic description text, which is displayed when GimpTagEntry
2008-07-19  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.[ch]: added gray italic description text,
	which is displayed when GimpTagEntry is not focused and there is no
	text typed.


svn path=/branches/soc-2008-tagging/; revision=26234
2008-07-19 15:36:20 +00:00
Aurimas Juška
f1c4d47183 display sorted assigned tag list, so that user could find needed tags
2008-07-17  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_load_selection): display
	sorted assigned tag list, so that user could find needed tags faster.

	* app/core/Makefile.am
	* app/core/gimptag.[ch]: move common tag functions to a single place.

	* app/widgets/gimpcombotagentry.c: use the common functions.


svn path=/branches/soc-2008-tagging/; revision=26224
2008-07-17 18:31:13 +00:00
Aurimas Juška
9d218c1940 app/widgets/gimpbrushfactoryview.c tag assigment entry visualy connected
2008-07-17  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpbrushfactoryview.c
	* app/widgets/gimpdatafactoryview.c: tag assigment entry visualy
	connected to data view.


svn path=/branches/soc-2008-tagging/; revision=26223
2008-07-17 17:38:26 +00:00
Aurimas Juška
d146f0c471 if scrollbar appears in popup window, re-layout tags.
2008-07-13  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c: if scrollbar appears in popup
	window, re-layout tags.


svn path=/branches/soc-2008-tagging/; revision=26181
2008-07-13 17:47:15 +00:00
Aurimas Juška
62f2431526 correctly calculate border thickness so that scrollbars would not appear
2008-07-13  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c: correctly calculate border
	thickness so that scrollbars would not appear when unneeded.


svn path=/branches/soc-2008-tagging/; revision=26180
2008-07-13 16:45:58 +00:00
Aurimas Juška
f23d974a94 Merged from trunk revisions 25970:26170
svn path=/branches/soc-2008-tagging/; revision=26174
2008-07-13 12:11:51 +00:00
Aurimas Juška
aafa684956 cache pattern, gradient and palette tags in addition to brush tags.
2008-07-13  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimp.c: cache pattern, gradient and palette tags in addition
	to brush tags.

	* app/core/gimpbrush.c (gimp_brush_get_checksum)
	* app/core/gimpgradient.c (gimp_gradient_tagged_init),
	(gimp_gradient_get_checksum)
	* app/core/gimppalette.c (gimp_palette_tagged_init),
	(gimp_palette_get_checksum)
	* app/core/gimppattern.c (gimp_pattern_tagged_init),
	(gimp_pattern_get_checksum): implemented get_checksum method for all
	tagged objects.


svn path=/branches/soc-2008-tagging/; revision=26173
2008-07-13 10:50:19 +00:00
Aurimas Juška
bea2f31d21 autocomplete only user typed text, not what was autocompleted in previous
2008-07-13  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_auto_complete):
	  autocomplete only user typed text, not what was autocompleted in
	  previous step.


svn path=/branches/soc-2008-tagging/; revision=26172
2008-07-13 09:41:42 +00:00
Aurimas Juška
38861c066a tag popup displays alphabetically sorted tags. Set maximum popup window
2008-07-13  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c: tag popup displays alphabetically
	sorted tags. Set maximum popup window height and fixed scrolling when
	mouse pointer is grabbed.


svn path=/branches/soc-2008-tagging/; revision=26171
2008-07-13 09:24:14 +00:00
Aurimas Juška
ee13a8b283 fixed use of uninitialized variable.
2008-07-13  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_query_tag): fixed use of
	  uninitialized variable.


svn path=/branches/soc-2008-tagging/; revision=26169
2008-07-13 08:00:53 +00:00
Aurimas Juška
475a3291de detect resource file renames/moves and update tag cache accordingly. If
2008-07-12  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimptagcache.[ch]: detect resource file renames/moves and
	  update tag cache accordingly. If identifier (filename) changes,
	  objects are identified using checksum.

	* app/core/gimpbrush.c (gimp_brush_tagged_init),
	(gimp_brush_get_checksum)
	* app/core/gimpdata.c (gimp_data_tagged_iface_init),
	(gimp_data_get_checksum)
	* app/core/gimptagged.c (gimp_tagged_get_checksum)
	* app/core/gimptagged.h: checksum support for tagged objects.


svn path=/branches/soc-2008-tagging/; revision=26152
2008-07-12 10:08:38 +00:00
Aurimas Juška
557167bf1d improved usability on closing tag popup window. It now can be closed by
2008-07-11  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.c: improved usability on closing tag
	popup window. It now can be closed by clicking anywhere outside the
	popup window.


svn path=/branches/soc-2008-tagging/; revision=26134
2008-07-11 17:21:00 +00:00
Aurimas Juška
c36544243b app/widgets/gimpcombotagentry.[ch] tag manipulation using
2008-07-09  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpcombotagentry.[ch]
	* app/widgets/gimptagentry.[ch]: tag manipulation using
	GimpComboTagEntry. Allows selecting or deselecting tags with mouse or
	other pointing device without using keyboard.


svn path=/branches/soc-2008-tagging/; revision=26098
2008-07-09 20:25:54 +00:00
Aurimas Juška
5c1626845f app/widgets/Makefile.am app/widgets/gimpcombotagentry.[ch]
2008-07-06  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/Makefile.am
	* app/widgets/gimpcombotagentry.[ch]
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/widgets-types.h: added GimpComboTagEntry widget which
	wraps GimpTagEntry and will provide UI similar to combo box.


svn path=/branches/soc-2008-tagging/; revision=26072
2008-07-06 08:50:43 +00:00
Aurimas Juška
e18a4c3e5f support tag autocompletion.
2008-07-04  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c: support tag autocompletion.

	* app/core/gimpfilteredcontainer.[ch]: maintain tag reference count
	of all items contained in source container.


svn path=/branches/soc-2008-tagging/; revision=26052
2008-07-03 22:20:32 +00:00
Aurimas Juška
98b6c3c90b display tags assigned to selected item.
2008-07-01  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_set_selected_items),
	(gimp_tag_entry_load_selection): display tags assigned to selected
	item.


svn path=/branches/soc-2008-tagging/; revision=26030
2008-07-01 17:43:11 +00:00
Aurimas Juška
c069a0474e cleaned up and removed unnenecessarry responsibilities.
2008-06-30  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimptagcache.[ch]: cleaned up and removed unnenecessarry
	responsibilities.


svn path=/branches/soc-2008-tagging/; revision=26027
2008-06-30 20:42:14 +00:00
Aurimas Juška
9e4d77fe10 app/widgets/gimpdatafactoryview.[ch] tag assignment GUI support.
2008-06-30  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/gimpdatafactoryview.[ch]
	* app/widgets/gimptagentry.[ch]: tag assignment GUI support.


svn path=/branches/soc-2008-tagging/; revision=26026
2008-06-30 19:57:29 +00:00
Aurimas Juška
0120cd3b3f properly save changed tags.
2008-06-30  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimptagcache.[ch]: properly save changed tags.


svn path=/branches/soc-2008-tagging/; revision=26025
2008-06-30 19:55:32 +00:00
Aurimas Juška
aafaea5669 app/core/gimpfilteredcontainer.c multiple tag querying support.
2008-06-29  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimpfilteredcontainer.c
	* app/widgets/gimptagentry.c: multiple tag querying support.


svn path=/branches/soc-2008-tagging/; revision=26017
2008-06-29 08:23:10 +00:00
Aurimas Juška
638ff721d2 app/widgets/Makefile.am app/widgets/widgets-types.h added GimpTagEntry
2008-06-28  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimptagentry.[ch]: added GimpTagEntry widget.

	* app/widgets/gimpdatafactoryview.c: use GimpTagEntry instead of GtkEntry.


svn path=/branches/soc-2008-tagging/; revision=26002
2008-06-28 12:26:06 +00:00
Aurimas Juška
1405efbcfa detect source container changes.
2008-06-28  Aurimas Juška  <aurisj@svn.gnome.org>

* app/core/gimpfilteredcontainer.c: detect source container changes.

svn path=/branches/soc-2008-tagging/; revision=26000
2008-06-28 08:01:28 +00:00
Aurimas Juška
537ddbcdf3 2008-06-27 Aurimas Juška <aurisj@svn.gnome.org> commiting rest of the files ommited by commit script.
svn path=/branches/soc-2008-tagging/; revision=25997
2008-06-27 20:43:05 +00:00
Aurimas Juška
fe5ba11ca6 app/core/Makefile.am app/core/core-types.h added GimpFilteredContainer
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpfilteredcontainer.[ch]: added GimpFilteredContainer
which can be used to filter containers based on object tags.
* app/widgets/gimpbrushfactoryview.c
* app/widgets/gimpdatafactoryview.[ch]: simple tag query from GUI.

svn path=/branches/soc-2008-tagging/; revision=25996
2008-06-27 20:36:55 +00:00
Aurimas Juška
f38df106dd save and uninitialize tag cache properly.
* app/core/gimp.c: save and uninitialize tag cache properly.

svn path=/branches/soc-2008-tagging/; revision=25976
2008-06-22 11:28:51 +00:00
Aurimas Juška
8c6bb59917 added tag cache loading from file functionality. Improved tag assignment
* app/core/gimptagcache.c: added tag cache loading from file
functionality. Improved tag assignment to objects.

svn path=/branches/soc-2008-tagging/; revision=25975
2008-06-22 09:51:23 +00:00
Aurimas Juška
249b771661 extended cache system functionality and added tag cache saving to file.
2008-06-21  Aurimas Juška  <aurisj@svn.gnome.org>

	* app/core/gimptagcache.[ch]: extended cache system
	functionality and added tag cache saving to file.

	* app/core/gimp.c: further integration of
	gimp tag cache.

	* app/core/gimptagged.[ch]: fixed repeated get
	in function name.



svn path=/branches/soc-2008-tagging/; revision=25974
2008-06-21 16:04:30 +00:00
Aurimas Juška
8fbe04e6a9 Merged from trunk revisions r25900:r25969.
2008-06-21  Aurimas Juška   <aurisj@svn.gnome.org>

	Merged from trunk revisions r25900:r25969.

svn path=/branches/soc-2008-tagging/; revision=25971
2008-06-21 05:12:58 +00:00
Aurimas Juška
ab0a63f8d4 app/core/gimpdata.[ch] app/core/gimptagcache.c (gimp_tag_cache_update)
2008-06-20  Aurimas Juška   <aurisj@svn.gnome.org>
	* app/core/gimpdata.[ch]
	* app/core/gimptagcache.c (gimp_tag_cache_update)
	* app/core/gimptagged.[ch]: extended object identification
	  capabilities. Each tagged object now provides unique
	  identification string. In case it can change between sessions,
	  objects can provide digest calculation which would help to remap
	  to new identification string.
	* app/core/gimp-gradients.c
	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpcurve.c
	* app/core/gimpgradient.c (gimp_gradient_get_standard)
	* app/core/gimppalette.c (gimp_palette_get_standard)
	* app/core/gimppattern.c (gimp_pattern_get_standard): provide
	  unique name for internal objects.

svn path=/branches/soc-2008-tagging/; revision=25970
2008-06-20 21:35:44 +00:00
Aurimas Juška
f21a96629e Commited files missing in the last commit.
2008-06-17  Aurimas Juška  <aurisj@svn.gnome.org>

        Commited files missing in the last commit.

svn path=/branches/soc-2008-tagging/; revision=25964
2008-06-17 20:52:31 +00:00
Aurimas Juška
8a7333d7b5 app/core/Makefile.am app/core/core-types.h app/core/gimp.c integrated
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimp.c
* app/core/gimp.h: integrated GimpTagCache.
* app/core/gimptagcache.c
* app/core/gimptagcache.h: added GimpTagCache which currently doesn't
have any real functionality.

svn path=/branches/soc-2008-tagging/; revision=25963
2008-06-17 20:31:51 +00:00
1463 changed files with 388368 additions and 337326 deletions

23
AUTHORS
View File

@@ -14,6 +14,7 @@ The following people have contributed code to GIMP:
Henrik Brix Andersen
Karl-Johan Andersson
Nicola Archibald
Luis Barrancos
John Beale
Zach Beane
Tom Bech
@@ -35,6 +36,7 @@ The following people have contributed code to GIMP:
Winston Chang
Stephane Chauveau
Zbigniew Chyla
Lars-Peter Clausen
Branko Collin
Ed Connel
Piers Cornwell
@@ -42,6 +44,8 @@ The following people have contributed code to GIMP:
Daniel Cotting
Jay Cox
Kevin Cozens
Michael Deal
Alexia Death
Brian Degenhardt
Karine Delvare
Andreas Dilger
@@ -49,7 +53,9 @@ The following people have contributed code to GIMP:
Scott Draves
Daniel Dunbar
Misha Dynin
Daniel Eddeland
Daniel Egger
Ulf-D. Ehlert
Morton Eriksen
Larry Ewing
Pedro Alonso Ferrer
@@ -76,6 +82,7 @@ The following people have contributed code to GIMP:
Pavel Grinfeld
Dov Grobgeld
Michael Hammel
Marcus Heese
Robert Helgesson
James Henstridge
Eric Hernes
@@ -83,7 +90,9 @@ The following people have contributed code to GIMP:
Christoph Hoegl
Wolfgang Hofer
Alan Horkan
Daniel Hornung
Jan Hubička
Barak Itkin
Ben Jackson
Tim Janik
Kristian Jantz
@@ -106,6 +115,7 @@ The following people have contributed code to GIMP:
Marco Lamberto
Jens Lautenbacher
Laramie Leavitt
Tom Lechner
Elliot Lee
Marc Lehmann
Ray Lehtiniemi
@@ -119,6 +129,7 @@ The following people have contributed code to GIMP:
Josh MacDonald
Ed Mackey
Vidar Madsen
Luidnel Maignan
Ian Main
Kjartan Maraas
John Marshall
@@ -162,6 +173,7 @@ The following people have contributed code to GIMP:
Nils Philippsen
Ari Pollak
Raphaël Quinet
Dennis Ranke
Tom Rathborne
Jens Restemeier
Maurits Rijk
@@ -218,9 +230,12 @@ The following people have contributed art to GIMP:
Lapo Calamandrei
Paul Davey
Alexia Death
Aurore Derriennic
Tuomas Kuosmanen
Karl La Rocca
Andreas Nilsson
Ville Pätsi
Mike Schaeffer
Carol Spears
Jakub Steiner
@@ -229,6 +244,8 @@ The following people have contributed art to GIMP:
The following people have helped to document GIMP:
Ignacio AntI
Žygimantas Beručka
Carey Bunks
Marco Ciampa
Dust
@@ -243,9 +260,15 @@ The following people have helped to document GIMP:
Semka Kuloviæ-Debals
Karin Kylander
Olof S Kylander
Jean-Pierre Litzler
Vitaly Lomov
Ed Mackey
Ian Main
Pierre Perrier
Alexandre Prokoudine
Manuel Quiñones
James Robinson
Nickolay V. Shmyrev
Patrycja Stawiarska
Kolbjørn Stuestøl
Axel Wernicke

10881
ChangeLog

File diff suppressed because it is too large Load Diff

16773
ChangeLog.pre-2-6 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -16,9 +16,6 @@ Beta software can be found at alpha.gnu.org.
* pkg-config 0.16.0 (or preferably a newer version)
- http://www.freedesktop.org/software/pkgconfig/
* intltoolize 0.35.5 (or preferably a newer version)
- ftp://ftp.gnome.org/pub/gnome/sources/intltool/
* gtkdocize
- http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/
@@ -41,7 +38,7 @@ by running:
Basically this does the following for you:
gimp/trunk$ aclocal-1.9; libtoolize; automake-1.9 -a;
gimp/trunk$ autoconf; glib-gettextize; intltoolize
gimp/trunk$ autoconf; intltoolize --automake
The above commands create the "configure" script. Now you can run the
configure script in gimp/trunk to create all the Makefiles.

98
INSTALL
View File

@@ -1,17 +1,19 @@
Installation instructions for GIMP 2.5
--------------------------------------
Installation instructions for GIMP 2.6
--------------------------------------
There are some basic steps to building and installing GIMP.
GIMP 2.5 replaces earlier GIMP 2.x versions. It is advised that you
uninstall them before installing GIMP 2.5. If you want to keep your
older GIMP 2.x installation in parallel to GIMP 2.5, you have to
GIMP 2.6 replaces earlier GIMP 2.x versions. It is advised that you
uninstall them before installing GIMP 2.6. If you want to keep your
older GIMP 2.x installation in parallel to GIMP 2.6, you have to
choose a separate prefix which is not in your default library search
path.
GIMP 2.x is fully backward compatible to GIMP 2.0. Plug-ins and
scripts written for GIMP 2.0 will continue to work and don't need to
be changed nor recompiled to be used with GIMP 2.x.
GIMP 2.6 is fully backward compatible to all earlier GIMP 2.x version.
Plug-ins and scripts written for GIMP 2.4, or GIMP 2.2 or even 2.0,
will continue to work and don't need to be changed nor recompiled to
be used with GIMP 2.x.
The most important part is to make sure the requirements for a build
are fulfilled. We depend on a number of tools and libraries which are
@@ -28,18 +30,22 @@ header files installed.
1. You need to have installed a recent version of pkg-config available
from http://www.freedesktop.org/software/pkgconfig/.
2. You need to have GEGL version 0.0.17 or newer and babl version
0.0.21 or newer. You can get it from http://gegl.org/ or check
2. You need intltool (at least 0.35.5, but preferably a newer version).
Intltool can be downloaded from
http://ftp.gnome.org/pub/gnome/sources/intltool/
3. You need to have GEGL version 0.0.18 or newer and babl version
0.0.22 or newer. You can get it from http://gegl.org/ or check
it out from the subversion repository:
http://svn.gnome.org/svn/babl/trunk
http://svn.gnome.org/svn/gegl/trunk
3. You need to have installed GTK+ version 2.12.1 or newer. GIMP
4. You need to have installed GTK+ version 2.12.5 or newer. GIMP
also need a recent versions of GLib (>= 2.16.1) and Pango (>= 1.18.0).
Sources for these can be grabbed from ftp://ftp.gtk.org/.
4. We require PangoFT2, a Pango backend that uses FreeType2. Make
5. We require PangoFT2, a Pango backend that uses FreeType2. Make
sure you have FreeType2 and fontconfig installed before you
compile Pango. FreeType2 can be downloaded from
http://www.freetype.org/. Fontconfig from
@@ -48,31 +54,40 @@ header files installed.
Older versions are known to have bugs that seriously affect the
stability of GIMP.
5. We use cairo, which is hosted at http://www.cairographics.org/.
6. We use cairo, which is hosted at http://www.cairographics.org/.
6. We use dbus-glib if available. Grab it from
7. We use dbus-glib if available. Grab it from
http://dbus.freedesktop.org/releases/dbus-glib/
7. You may want to install other third party libraries or programs
that are needed for some of the available plugins. We recommend
to check that the following libraries are installed: libpng,
libjpeg, libpoppler, libtiff, gtkhtml-2, libmng, librsvg, libwmf.
8. Access of remote files is implemented in the URI plug-in. There
are several possible implementations for this. The implementation
used is determined when you configure GIMP. By default the
GIO/GVfs backend is used. If you don't have GVfs support on your
target platform, you should pass the '--without-gvfs' option to
configure. The configure script will then try to detect another
method for accessing remote files.
8. The Python extension requires Python development headers to be
9. You may want to install other third party libraries or programs
that are needed for some of the available plugins. We recommend
to check that the following libraries are installed: lcms,
libpng, libjpeg, libpoppler, libtiff, webkit, libmng, librsvg
and libwmf.
10. The Python extension requires Python development headers to be
present. You will also need PyGTK and the respective development
headers.
9. Configure GIMP by running the `configure' script. You may want
11. Configure GIMP by running the `configure' script. You may want
to pass some options to it, see below.
10. Build GIMP by running `make'. The use of GNU make is recommended.
12. Build GIMP by running `make'. The use of GNU make is recommended.
If you need to tweak the build to make it work with other flavours
of make, we'd appreciate if you'd send us a patch with the changes.
11. Install GIMP by running `make install'. In order to avoid clashes
with other versions of GIMP, we install a binary called gimp-2.5.
13. Install GIMP by running `make install'. In order to avoid clashes
with other versions of GIMP, we install a binary called gimp-2.6.
By default there's also a link created so that you can type 'gimp'
to start gimp-2.5.
to start gimp-2.6.
Please make sure you don't have any old GTK+-2.x, jpeg, etc. libraries
lying around on your system, otherwise configure may fail to find the
@@ -84,8 +99,8 @@ packages are included below. Here is an illustration of commands that
might be used to build and install GIMP. The actual configuration,
compilation and installation output is not shown.
% tar xvfz gimp-2.5.x.tar.gz # unpack the sources
% cd gimp-2.5.x # change to the toplevel directory
% tar xvfz gimp-2.6.x.tar.gz # unpack the sources
% cd gimp-2.6.x # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GIMP
% make install # install GIMP
@@ -120,8 +135,8 @@ These are:
is intended primarily as a convenience for developers.
--enable-gimpdir=DIR. This option changes the default directory
GIMP uses to search for its configuration files from ~/.gimp-2.5
(the directory .gimp-2.5 in the users home directory) to DIR.
GIMP uses to search for its configuration files from ~/.gimp-2.6
(the directory .gimp-2.6 in the users home directory) to DIR.
--enable-binreloc. When compiled for Linux with this option enabled,
GIMP will be binary relocatable. Plug-ins and data files will
@@ -144,14 +159,19 @@ These are:
causing any trouble at compile-time, you can build --without-exif.
Get libexif from http://www.sourceforge.net/projects/libexif.
--without-mng, --without-aa. The MNG plug-in needs libmng and
configure checks for its presense. If for some reason you don't
want to build the MNG plug-in even though the library is installed,
use --without-mng to disable it expliticely. The same switch exists
for aalib, use --without-aa if you run into problems.
--without-aa. The AA plug-in needs libaa and configure checks for
its presense. Use --without-aa if you run into problems.
--without-gtkhtml2. If for some reason you don't want to build the
helpbrowser plug-in, you can use --without-gtkhtml2 to disable
--without-mng. The MNG plug-in needs libmng and configure checks
for its presense. If for some reason you don't want to build the
MNG plug-in even though the library is installed, use
--without-mng to disable it explicitly.
--without-wmf. The WMF plug-in needs libwmf2 and configure checks for
its presense. Use --without-aa if you run into problems.
--without-webkit. If for some reason you don't want to build the
helpbrowser plug-in, you can use --without-webkit to disable
it explicitly.
--without-svg. If for some reason you want to build GIMP without
@@ -219,13 +239,17 @@ These are:
if you call configure with --without-desktop-dir.
--disable-default-binary. Use this option if you don't want to make
gimp-2.5 the default gimp installation. Otherwise a link called
gimp pointing to the gimp-2.5 executable will be installed.
gimp-2.6 the default gimp installation. Otherwise a link called
gimp pointing to the gimp-2.6 executable will be installed.
--disable-gimp-console. Use this option if you don't want the
gimp-console binary to be built in addition to the standard binary.
gimp-console is useful for command-line batch mode or as a server.
--enable-gimp-remote. Use this option if you want the gimp-remote
binary to be built. This only works with X11 and it is obsolete if#
your platform has DBus support.
--disable-python. If for some reason you don't want to build the
Python based pygimp plug-in, you can use --disable-python.
@@ -237,7 +261,7 @@ The `make' command builds several things:
- A bunch of public libraries in the directories starting with 'libgimp'.
- The plug-in programs in the 'plug-ins' directory.
- Some modules in the 'modules' subdirectory.
- The main GIMP program 'gimp-2.5' in `app'.
- The main GIMP program 'gimp-2.6' in `app'.
The `make install' commands installs the gimp header files associated
with the libgimp libraries, the plug-ins, some data files and the GIMP

View File

@@ -55,6 +55,7 @@ EXTRA_DIST = \
ChangeLog.pre-2-0 \
ChangeLog.pre-2-2 \
ChangeLog.pre-2-4 \
ChangeLog.pre-2-6 \
HACKING \
INSTALL \
LICENSE \
@@ -62,6 +63,7 @@ EXTRA_DIST = \
NEWS.pre-2-0 \
NEWS.pre-2-2 \
NEWS.pre-2-4 \
NEWS.pre-2-6 \
README \
README.i18n \
authors.dtd \
@@ -70,20 +72,11 @@ EXTRA_DIST = \
config.h.win32 \
gimp-zip.in \
gimpdefs.msc \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
makefile.msc \
mkinstalldirs
makefile.msc
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update
gimpinstall-@GIMP_TOOL_VERSION@:
$(LN_S) $(srcdir)/install-sh $(srcdir)/gimpinstall-@GIMP_TOOL_VERSION@

127
NEWS
View File

@@ -1,125 +1,4 @@
------------------------------
GNU Image Manipulation Program
Development Branch
------------------------------
This is the unstable development branch of GIMP. Here we are working
towards the next stable release, which will be GIMP 2.6.
Changes in GIMP 2.5.1
=====================
- further improvements to the status bar
- made the center point of rectangles snap to the grid and rulers
- improved Alpha to Logo filters
- better cursor feedback in the Intelligent Scissors tool
- rotate JPEG thumbnails according to the EXIF orientation
- tweaked behavior of the new Polygon Selection tool
- improved event smoothing for paint tools
- prepared PSP plug-in to deal with newer versions of the file format
- allow plug-ins to work in parallel on different layers of the same image
- pass through GEGL command-line options
- added 22 new variations to the Flame plugin
- only show operations from relevant categories in the GEGL tool
- added new translation (Icelandic)
- bug fixes and code cleanup
Contributors:
Sven Neumann, Michael Natterer, Martin Nordholts, Øyvind Kolås,
Alexia Death, Ulf-D. Ehlert, Daniel Hornung, Michael Deal, Aurimas Juška,
Luis Barrancos
Changes in GIMP 2.5.0
=====================
Core:
- improved rectangle tool drawing for narrow mode
- ported lots (but not all) drawing code to Cairo
- optimized image rendering by using pre-multiplied alpha
- use new GLib features such as GRegex
- use new GTK+ features such as the new GtkTooltip API
- much improved GimpCurve object
- cleaner and smaller tool options
- enable brush scaling for the Smudge tool
- added debugging framework that can be enabled at run-time
- depend on GEGL and use it optionally in some color operations
- optional GEGL processing for all color tools
- add proper settings objects for all color tools
- add list of recently used settings to all color tools
- added experimental GEGL tool to use arbitrary GEGL operations
- event filtering and smoothing for better paint tool performance
- added motion constraints in the Move Tool
- some operations do not any longer automatically add an alpha channel
- some preparation for tagging resource files
- cutting a selection doesn't clear the selection any longer
- added new polygon select tool
- load brushes and other data files recursively (search through subdirs)
- started work on language selector for the text tool (unfinished)
- allow to set opacity of the transform tool preview
- merged toolbox menu into the image menu
- always keep an image window around
- improved image statusbar
- dropped 'documents' in favor of ~/.recently-used.xbel
- started to work on text box functionality in the text tool
- numerous bug fixes and cleanups
Plug-ins:
- dicom: improved handling of 16 bit image data
- help: use GIO to access the help index
- print: moved Page Setup out of the Print dialog
- psd-load: rewritten, cleaner and more features
- randomize: added previews
- ripple: added a Phase Shift control
- screenshot: optionally add the mouse cursor image on an extra layer
- uri: use GIO/GVfs where available
- whirlpinch: allow a larger range for the whirl angle
Python binding:
- allow to specify colors using CSS color names
- added new method Image.new_layer()
Script-Fu:
- enforce R5RS syntax for 'let'
- improved Frosty Logo script
PDB:
- added new text layer API
- added gimp-vectors-export-to-file and gimp-vectors-export-to-string
- added procedure to test for existance of a procedure in the PDB
- improved error handling for procedures
Libraries:
- added some Cairo utilities
- allow to use markup in tooltips
- libgimpthumb doesn't any longer depend on other GIMP libraries
Miscellaneous:
- use the gimptool program on Unix, too, instead of the gimptool script
- create the list of supported MIME types at compile-time
- gimp shows library versions when called with '--version --verbose'
Contributors:
Sven Neumann, Michael Natterer, Martin Nordholts, Bill Skaggs,
Øyvind Kolås, Manish Singh, Kevin Cozens, Alexia Death, Tor Lillqvist,
Marcus Heese, John Marshall, Joao S. O. Bueno, Jakub Steiner,
Simon Budig, Tom Lechner, Hans Breuer, ...
GNU Image Manipulation Program
Development Branch
------------------------------

254
NEWS.pre-2-6 Normal file
View File

@@ -0,0 +1,254 @@
------------------------------
GNU Image Manipulation Program
Development Branch
------------------------------
This is the unstable development branch of GIMP. Here we are working
towards the next stable release, which will be GIMP 2.6.
Changes in GIMP 2.6.0
=====================
- further improved error reporting and parameter checks for some procedures
- fixed printing of indexed images (bug #552609)
- further code cleanup in Script-Fu extension
- improved Brightness->Contrast -> Levels -> Curves parameter conversion
- made the font size in the docks configurable in the gtkrc file
- renamed File->New submenu to File->Create
- moved the "Use GEGL" check-box to the Colors menu
- added new scale procedures allowing to specify the interpolation
explicitly (bug #486977)
- lots of bug fixes
Contributors:
Sven Neumann, Michael Natterer, Martin Nordholts, Simon Budig,
Tor Lillqvist, Barak Itkin
Changes in GIMP 2.5.4
=====================
- improved look and feel of the Navigation dialog and navigation popups
- improved positioning of the image in the image window
- by default turned off use of GEGL for color operations
- moved the "Use GEGL" checkbox to the Debug menu
- optimized the new scaling code
- various fixes to the Python bindings
- added Python bindings for most GIMP widgets to the gimpui module
- merged GimpHRuler and GimpVRuler classes into GimpRuler
- added Search entry to the Keyboard Shortcuts and Input Controller
configuration dialogs
- allow to drop images (in addition to URIs) on the empty image window
- improved error handling in Script-Fu
- merged upstream TinyScheme changes into Script-Fu interpreter
- bug fixes and code cleanup
Contributors:
Sven Neumann, Michael Natterer, Martin Nordholts, Tor Lillqvist,
Lars-Peter Clausen, Michael Schumacher, Kevin Cozens, Barak Itkin,
David Gowers, Dennis Ranke
Changes in GIMP 2.5.3
=====================
- some fixes for the 64-bit Windows platform
- optionally emulate brush dynamics when stroking a path or selection
- further work on the scroll-beyond-image-borders feature, improving the
behavior of the image display when zooming or when the image size changes
- added links to the user manual to the Tips dialog
- largely rewritten scaling code improves scaling quality, in particular
when scaling down
- allow to copy-on-write from the image projection
- added "Paste as new layer" to Edit menu
- added "New from visible" to the Layer menu allowing to create a new
layer from the image projection
- added new procedure 'gimp-layer-new-from-visible'.
- renamed all file plug-in executables to a have a file prefix
- changed the HSV color selector to use the GtkHSV widget
- changed the default for the 'trust-dirty-flag' gimprc property
- dropped the "Starburst" logo script
- improved the behavior of the zoom button in the upper right corner of
the image window
- allow PDB procedures to pass an error message with their return values
- changed all file plug-ins to pass their error messages with the
return values instead of raising an error dialog
- adapt the display of the pointer position in the statusbar to the
pointer precision of the active tool
- bug fixes and code cleanup
Contributors:
Sven Neumann, Michael Natterer, Martin Nordholts, Alexia Death,
Tor Lillqvist, Geert Jordaens, Daniel Eddeland, Aurimas Juška,
Róman Joost, Luidnel Maignan, Barak Itkin, Aurore Derriennic
Changes in GIMP 2.5.2
=====================
- final touches on the combined Freehand/Polygon Select tool
- added a dialog for managing Color tool settings
- prepared the code for changes in the upcoming GTK+ release
- improved popup scale button
- mark the center of rectangles/bounding rectangles during moves
- added dialog to query for using the online user manual
- allow to map dynamics to hardness for the Eraser tool
- provide gimp-remote functionality on Windows
- disable the build and install of the gimp-remote tool by default
- allow to scroll beyond the image borders
- added new PDB data type for transferring color arrays
- added new PDB function gimp-palette-get-colors
- added text search to the Help Browser plug-in
- bug fixes and code cleanup
Contributors:
Sven Neumann, Michael Natterer, Martin Nordholts, Manish Singh,
Lars-Peter Clausen, Alexia Death, Tor Lillqvist, Róman Joost,
Jakub Steiner
Changes in GIMP 2.5.1
=====================
- further improvements to the status bar
- made the center point of rectangles snap to the grid and rulers
- improved Alpha to Logo filters
- better cursor feedback in the Intelligent Scissors tool
- rotate JPEG thumbnails according to the EXIF orientation
- improved event smoothing for paint tools
- prepared PSP plug-in to deal with newer versions of the file format
- allow plug-ins to work in parallel on different layers of the same image
- pass through GEGL command-line options
- added 22 new variations to the Flame plugin
- only show operations from relevant categories in the GEGL tool
- allow to enter the zoom ratio in the status bar
- don't keep the file-chooser dialogs around
- ported scan-convert code to Cairo, removing libart dependency
- allow the paint velocity to affect brush size, opacity and the like
- allow for random variations of the brush size, opacity and the like
- renamed Dialogs menu to Windows
- keep a list of recently closed docks in the Windows menu
- allow to go from Brightness-Contrast to Levels to Curves
- improved the handling of color tool settings
- merged the new Polygon Selection tool with the Freehand Select tool
- allow to lock dockables
- made Desaturate into a tool with preview in the image window
- ported translation contexts to msgctxt
- added GimpRuler widgets, an improved version of GtkRuler
- moving the selection mask now commits a pending rectangle selection
- added keyboard shortcut for resetting the brush scale (Backslash)
- ported the Help Browser plug-in to WebKit
- allow to use the online user manual
- added new translation (Icelandic)
- bug fixes and code cleanup
Contributors:
Sven Neumann, Michael Natterer, Martin Nordholts, Øyvind Kolås,
Alexia Death, Ulf-D. Ehlert, Daniel Hornung, Michael Deal, Aurimas Juška,
Luis Barrancos
Changes in GIMP 2.5.0
=====================
Core:
- improved rectangle tool drawing for narrow mode
- ported lots (but not all) drawing code to Cairo
- optimized image rendering by using pre-multiplied alpha
- use new GLib features such as GRegex
- use new GTK+ features such as the new GtkTooltip API
- much improved GimpCurve object
- cleaner and smaller tool options
- enable brush scaling for the Smudge tool
- added debugging framework that can be enabled at run-time
- depend on GEGL and use it optionally in some color operations
- optional GEGL processing for all color tools
- add proper settings objects for all color tools
- add list of recently used settings to all color tools
- added experimental GEGL tool to use arbitrary GEGL operations
- event filtering and smoothing for better paint tool performance
- added motion constraints in the Move Tool
- some operations do not any longer automatically add an alpha channel
- some preparation for tagging resource files
- cutting a selection doesn't clear the selection any longer
- added new polygon select tool
- load brushes and other data files recursively (search through subdirs)
- started work on language selector for the text tool (unfinished)
- allow to set opacity of the transform tool preview
- merged toolbox menu into the image menu
- always keep an image window around
- improved image statusbar
- dropped 'documents' in favor of ~/.recently-used.xbel
- started to work on text box functionality in the text tool
- numerous bug fixes and cleanups
Plug-ins:
- dicom: improved handling of 16 bit image data
- help: use GIO to access the help index
- print: moved Page Setup out of the Print dialog
- psd-load: rewritten, cleaner and more features
- randomize: added previews
- ripple: added a Phase Shift control
- screenshot: optionally add the mouse cursor image on an extra layer
- uri: use GIO/GVfs where available
- whirlpinch: allow a larger range for the whirl angle
Python binding:
- allow to specify colors using CSS color names
- added new method Image.new_layer()
Script-Fu:
- enforce R5RS syntax for 'let'
- improved Frosty Logo script
PDB:
- added new text layer API
- added gimp-vectors-export-to-file and gimp-vectors-export-to-string
- added procedure to test for existance of a procedure in the PDB
- improved error handling for procedures
Libraries:
- added some Cairo utilities
- allow to use markup in tooltips
- libgimpthumb doesn't any longer depend on other GIMP libraries
Miscellaneous:
- use the gimptool program on Unix, too, instead of the gimptool script
- create the list of supported MIME types at compile-time
- gimp shows library versions when called with '--version --verbose'
Contributors:
Sven Neumann, Michael Natterer, Martin Nordholts, Bill Skaggs,
Øyvind Kolås, Manish Singh, Kevin Cozens, Alexia Death, Tor Lillqvist,
Marcus Heese, John Marshall, Joao S. O. Bueno, Jakub Steiner,
Simon Budig, Tom Lechner, Hans Breuer, ...

17
README
View File

@@ -3,13 +3,9 @@
Development Branch
------------------------------
This is the unstable development branch of GIMP. It is intended to
developers only. If you are a user, please use the stable gimp-2-4
branch or a tarball release from the 2.4 series.
GIMP 2.5 replaces earlier GIMP 2.x versions. It is advised that you
uninstall them before installing GIMP 2.5. If you want to keep your
older GIMP 2.x installation in parallel to GIMP 2.5, you have to
GIMP 2.7 replaces earlier GIMP 2.x versions. It is advised that you
uninstall them before installing GIMP 2.7. If you want to keep your
older GIMP 2.x installation in parallel to GIMP 2.7, you have to
choose a separate prefix which is not in your default library search
path. Otherwise your GIMP 2.4 or GIMP 2.2 installation will start to
use the new libraries. You have been warned.
@@ -93,13 +89,13 @@ servers are:
The look of GIMP's interface can be customized like any other GTK app
by editing the ~/.gtkrc-2.0 file or by using "themes" (ready-made
customizations). For downloadable themes and further details, see
http://gtk.themes.org. Additionally, GIMP reads ~/.gimp-2.4/gtkrc so
http://gtk.themes.org. Additionally, GIMP reads ~/.gimp-2.7/gtkrc so
you can have settings that only apply to GIMP.
Included is a set of keybindings similar to those in Adobe Photoshop.
You can find them in the ps-menurc file. To use them, copy this file
to ~/.gimp-2.5/menurc. You can also manually change the keybindings to
any of your choice by editing ~/.gimp-2.5/menurc.
to ~/.gimp-2.7/menurc. You can also manually change the keybindings to
any of your choice by editing ~/.gimp-2.7/menurc.
Have fun,
@@ -111,3 +107,4 @@ Have fun,
Sven Neumann
Michael Natterer
Dave Neary
Martin Nordholts

View File

@@ -1,170 +1,28 @@
This document exists to document the important things to care
for because of locale support. It is aimed at developers and
translators. If you are a translator, you can skip the first
sections, but you definitely want to read sections 5 - 9.
Table of Contents
1. Why localisation?
2. How
3. Deep inside ...
4. Some magic ...
5. Tools and how to use them
6. Gimp is different
7. Adding additional textdomains
8. Tip of the Day messages
9. How to contribute
10. And more ?
This file contains some important hints for translators.
1. Why localisation?
The current status of the GIMP translation can be checked at
Many persons from many countries start to get used to Linux.
Unfortunately not everyone is able to understand English. But
even those people sometimes like to use good and free software
without using a dictionary to get the unknown words.
So why not simply localise the software to make it available to
the mass which isn't wholly English native? Of course this also
eases the migration from PhotoX to GIMP. :))
2. How?
GNU provides a very nice package called gettext. This one offers
the possibility to translate chosen messages from the native language
of the program into that one of the users if a necessary catalog is
provided. Gettext therefore provides some easy tools to create and
maintain such catalogs and a few functions which can be called by the
program to enable automatic translation at runtime. The program gets
linked to the gettext library or glibc2 which already provides that
functionality and everything is fine.
3. Deep inside...
GIMP provides header files called gimpintl.h and stdplugins-intl.h in
the libgimp directory which check whether gettext is available on the
system which GIMP is compiled on and will deactivate language support
if it's not.
If the gettext system is there it will declare 3 functions which will be
described below.
3.1 _() [more correctly: char * _( char * )]
This one is a macro for the function gettext(). You can wrap any text
with it that is allowed to be a return value of a function. If you
use it then libintl will try to translate it into the native language
of the user according to his/her environmental settings.
The gettext() function will do a lookup in the hashed catalog which
contains all the translated texts.
- If it is found a pointer to the string will be returned to the caller.
- If not, the caller will receive a pointer to the original string.
This way it is ensured that there isn't any harm caused to the program
if no useful catalog is installed.
Please note that it is important to use _() directly (and not gettext())
for simple messages because of reasons that will be mentioned below.
NOTE: I know some of the developer like short functions like _() but
for a better source understanding I suggest to use it consistently only
for text (like _("That's text!")) and not for variables (like _(text)).
Use gettext(text) instead.
http://l10n.gnome.org/module/gimp
3.2 N_() [more correctly: const char * ( const char * ) ]
Translation of the GNU Image Manipulation Program is handled by the
GNOME Translation Project (see http://l10n.gnome.org/). If you want to
help, we suggest that you get in touch with the translation team of
your language (see http://l10n.gnome.org/teams/).
This one is a macro for the function gettext_noop(). As you can see
and guess it doesn't really do anything in the programm i.e. it is a
dummy macro but nevertheless important. As it isn't possible to call
functions in a structure as seen here:
struct blurb
{
_("This won't work\n");
}
GIMP is different
you have to do it in some other way. In GIMP such structures are
often used to create menus or similar things very simply. Here you
have to use the dummy to allow the generation of the template catalog
which will be described below. This one doesn't do anything but it
marks the text as important to the xgettext extractor.
The text has to be translated manually with the next function.
3.3 gettext()
This function is the same as that macro in 3.1. But there is one big
difference: The _()'s and N_()'s are the only expressions which get
parsed by the template generator.
If you have strings that should be translated but are unfortunately
in a structure you have to do that on your own which means that you
have to parse the fields with the messages in a loop and translate
the texts with this gettext() function.
Please note that it may be necessary to free or allocate memory in
this case!
4. Some magic...
As you have seen we only did the programming part until now but this
isn't all by far. To use catalogs we'll have to create them. Now
there are 3 different files which are importart:
gimp.pot:
This one is the so called template. It contains the messages which
are extracted from the sources and empty fields which have to get
filled by the author. It is used to start a new catalog or to update
the an already available one.
The Makefile will automatically call the program gettext which will
extract all messages that are wrapped by a _() or a N_() (but NOT
gettext()) and concat them to this template.
[language].po:
This file has to be an edited gimp.pot and contains the original
messages plus the translated ones. This file will be delivered
together with GIMP and is the base for the final catalog.
[language].mo:
This file is a compiled version of [language.po] which will be
automatically compiled by the Makefile system and installed in the
locale directory of the system. It contains everything that the .po
file contains except not translated messages, comments and other
overhead. For maximum speed it is also hashed to allow gettext a
faster search.
5. Tools and how to use them
As mentioned the to be translated strings are extracted directly from
the source and written to the template.
I guess many of you will now ask if it is necessary to add new
strings directly to the template or if there's a tool to achieve
that. I think I can calm down those of you who fear lots of had work
just to update the language files. There's a program called msgmerge
which will add all strings that are in the template but not in the
uncompiled catalog to it. Msgmerge does this job very nicely and also
tries to use some kind of fuzzy logic method for already translated
strings for possible reduction of translators work: If an original
string seems similar to a new one and it already has a translation,
it will be taken over to the new catalog together with a remark that
this one may not necessarily fit.
6. Gimp is different
Gimp is a complex application which has a bunch of scripts and
GIMP is a complex application which has a bunch of scripts and
plug-ins that all want to be internationalized. Therefore there is
not one catalog but many. For a full translation of GIMP's UI,
you will have to add translations for the following catalogs:
not one catalog but many. For a full translation of GIMP's UI, you
will have to add translations for the following catalogs:
po/gimp20.po -- the core
po-libgimp/gimp20-libgimp.pot -- the libgimp library
po-python/gimp20-python.pot -- the pygimp plug-ins
po-plugins/gimp20-std-plugins.pot -- the C plug-ins
po-python/gimp20-python.pot -- the pygimp plug-ins
po-script-fu/gimp20-script-fu.pot -- the script-fu scripts
po-tips/gimp20-tips.pot -- the startup tips
@@ -172,32 +30,12 @@ this one may not necessarily fit.
gimp-perl has been moved into it's own Subversion module called
gimp-perl.
The version of GIMP you are holding in your hand uses GTK+-2.0.
GTK+-2.0 requires that all strings are UTF-8 encoded. Therefore to
make internationalisation work, po files need to be UTF-8 encoded. If
your editor doesn't support UTF-8, you need to convert it to an
encoding your editor can handle and convert it back to UTF-8 before
commiting your changes back. The gnome-i18n module in Subversion has
some scripts that help with this task, but it can also easily done
using iconv.
7. Adding additional textdomains
GIMP Tips dialog
Third-party plug-ins (plug-ins that are not distributed with The
GIMP) can't have their messages in the gimp-std-plugins textdomain.
We have therefore provided a mechanism that allows plug-ins to
install their own message catalogs and tell GIMP to bind to that
textdomain. This is necessary so that GIMP can correctly translate
the menu paths the plug-in registers. Basically the plug-in has to
call gimp_plugin_domain_add() or gimp_domain_plugin_add_with_path()
before it registers any functions. Have a look at the script-fu
plug-in to see how this is done in detail.
8. Tip of the Day messages
In addition to message catalogs Gimp provides a file with tips that
are displayed in a Tip of The Day window. This file is in XML format
and can be found in the tips directory. The english tips messages are
In addition to message catalogs GIMP provides a file with tips that
are displayed in the Tips dialog. This file is in XML format and can
be found in the tips directory. The english tips messages are
extracted from gimp-tips.xml.in so translators can use the usual
tools to create a <lang>.po file that holds the translations. All
translations are then merged into gimp-tips.xml with language
@@ -208,27 +46,19 @@ this one may not necessarily fit.
message catalog that needs to be translated correctly. For a german
translation of the tips this would look like this:
#: app/gui/tips-parser.c:158
#: ../app/dialogs/tips-parser.c:188
msgid "tips-locale:C"
msgstr "tips-locale:de"
9. How to contribute
Any help with translations is appreciated. If you want to help,
please get in contact with the people from the GNOME Translation
Project who coordinate all translation efforts in the GNOME
Subversion tree. They have a nice web-page at
http://developer.gnome.org/projects/gtp/.
10. And more?
We hope we mentioned everything that is worth it and hope that this
document will clarify some things. If it doesn't please write us a
mail. This text of course contains errors, so if you find one tell
us...
Happy Gimping.
Daniel Egger
Sven Neumann
Localization of third-party plug-ins
Third-party plug-ins (plug-ins that are not distributed with GIMP)
can't have their messages in the gimp-std-plugins textdomain. We
have therefore provided a mechanism that allows plug-ins to install
their own message catalogs and tell GIMP to bind to that
textdomain. This is necessary so that GIMP can correctly translate
the menu paths the plug-in registers. Basically the plug-in has to
call gimp_plugin_domain_add() or gimp_domain_plugin_add_with_path()
before it registers any functions. Have a look at the script-fu
plug-in to see how this is done in detail.

View File

@@ -33,9 +33,9 @@ SUBDIRS = \
if ENABLE_GIMP_CONSOLE
bin_PROGRAMS = gimp-2.5 gimp-console-2.5
bin_PROGRAMS = gimp-2.7 gimp-console-2.7
else
bin_PROGRAMS = gimp-2.5
bin_PROGRAMS = gimp-2.7
endif
app_sources = \
@@ -49,6 +49,8 @@ app_sources = \
main.c \
sanity.c \
sanity.h \
unique.c \
unique.h \
units.c \
units.h \
version.c \
@@ -57,7 +59,7 @@ app_sources = \
gimp-log.h \
gimp-intl.h
gimp_2_5_SOURCES = $(app_sources)
gimp_2_7_SOURCES = $(app_sources)
EXTRA_DIST = \
@@ -67,7 +69,7 @@ EXTRA_DIST = \
wilber.ico
if OS_WIN32
mwindows = -mwindows
win32_ldflags = -mwindows $(WIN32_LARGE_ADDRESS_AWARE)
endif
if USE_BINRELOC
@@ -100,9 +102,9 @@ AM_LDFLAGS = \
-u $(SYMPREFIX)gimp_image_map_config_get_type \
-u $(SYMPREFIX)gimp_plug_in_manager_restore
gimp_2_5_LDFLAGS = $(AM_LDFLAGS) $(mwindows)
gimp_2_7_LDFLAGS = $(AM_LDFLAGS) $(win32_ldflags)
gimp_2_5_LDADD = \
gimp_2_7_LDADD = \
gui/libappgui.a \
actions/libappactions.a \
dialogs/libappdialogs.a \
@@ -131,7 +133,6 @@ gimp_2_5_LDADD = \
$(libgimpmath) \
$(libgimpconfig) \
$(libgimpbase) \
$(REGEXREPL) \
$(GTK_LIBS) \
$(PANGOFT2_LIBS) \
$(FONTCONFIG_LIBS) \
@@ -145,13 +146,13 @@ gimp_2_5_LDADD = \
if ENABLE_GIMP_CONSOLE
gimp_console_2_5_SOURCES = $(app_sources)
gimp_console_2_7_SOURCES = $(app_sources)
gimp_console_2_5_CPPFLAGS = \
gimp_console_2_7_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DGIMP_CONSOLE_COMPILATION
gimp_console_2_5_LDADD = \
gimp_console_2_7_LDADD = \
widgets/widgets-enums.o \
display/display-enums.o \
display/gimpdisplayoptions.o \
@@ -175,7 +176,6 @@ gimp_console_2_5_LDADD = \
$(libgimpmath) \
$(libgimpconfig) \
$(libgimpbase) \
$(REGEXREPL) \
$(GDK_PIXBUF_LIBS) \
$(CAIRO_LIBS) \
$(PANGOFT2_LIBS) \

View File

@@ -1,5 +1,17 @@
## Process this file with automake to produce Makefile.in
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gimp-Actions\"
INCLUDES = \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_builddir)/app \
-I$(top_srcdir)/app \
$(GEGL_CFLAGS) \
$(GTK_CFLAGS) \
-I$(includedir)
noinst_LIBRARIES = libappactions.a
libappactions_a_SOURCES = \
@@ -23,6 +35,10 @@ libappactions_a_SOURCES = \
colormap-actions.h \
colormap-commands.c \
colormap-commands.h \
config-actions.c \
config-actions.h \
config-commands.c \
config-commands.h \
context-actions.c \
context-actions.h \
context-commands.c \
@@ -158,18 +174,4 @@ libappactions_a_SOURCES = \
windows-commands.c \
windows-commands.h
EXTRA_DIST = \
makefile.msc
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gimp-Actions\"
INCLUDES = \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_builddir)/app \
-I$(top_srcdir)/app \
$(GTK_CFLAGS) \
$(GEGL_CFLAGS) \
-I$(includedir)
EXTRA_DIST = makefile.msc

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
@@ -52,6 +53,7 @@
#include "buffers-actions.h"
#include "channels-actions.h"
#include "colormap-actions.h"
#include "config-actions.h"
#include "context-actions.h"
#include "cursor-info-actions.h"
#include "debug-actions.h"
@@ -112,7 +114,10 @@ static GimpActionFactoryEntry action_groups[] =
{ "colormap", N_("Colormap"), GIMP_STOCK_COLORMAP,
colormap_actions_setup,
colormap_actions_update },
{ "context", N_("Context"), NULL,
{ "config", N_("Configuration"), GTK_STOCK_PREFERENCES,
config_actions_setup,
config_actions_update },
{ "context", N_("Context"), GIMP_STOCK_TOOL_OPTIONS /* well... */,
context_actions_setup,
context_actions_update },
{ "cursor-info", N_("Pointer Information"), NULL,

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "actions-types.h"

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"

View File

@@ -20,6 +20,7 @@
#include <string.h>
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
@@ -166,7 +167,7 @@ channels_new_last_vals_cmd_callback (GtkAction *action,
action_data_get_context (data),
GIMP_TRANSPARENT_FILL);
gimp_image_add_channel (image, new_channel, -1);
gimp_image_add_channel (image, new_channel, -1, TRUE);
gimp_image_undo_group_end (image);
@@ -181,7 +182,7 @@ channels_raise_cmd_callback (GtkAction *action,
GimpChannel *channel;
return_if_no_channel (image, channel, data);
gimp_image_raise_channel (image, channel);
gimp_image_raise_channel (image, channel, NULL);
gimp_image_flush (image);
}
@@ -205,7 +206,7 @@ channels_lower_cmd_callback (GtkAction *action,
GimpChannel *channel;
return_if_no_channel (image, channel, data);
gimp_image_lower_channel (image, channel);
gimp_image_lower_channel (image, channel, NULL);
gimp_image_flush (image);
}
@@ -262,7 +263,7 @@ channels_duplicate_cmd_callback (GtkAction *action,
G_TYPE_FROM_INSTANCE (channel)));
}
gimp_image_add_channel (image, new_channel, -1);
gimp_image_add_channel (image, new_channel, -1, TRUE);
gimp_image_flush (image);
}
@@ -274,7 +275,7 @@ channels_delete_cmd_callback (GtkAction *action,
GimpChannel *channel;
return_if_no_channel (image, channel, data);
gimp_image_remove_channel (image, channel);
gimp_image_remove_channel (image, channel, TRUE, NULL);
gimp_image_flush (image);
}
@@ -356,7 +357,7 @@ channels_new_channel_response (GtkWidget *widget,
GIMP_TRANSPARENT_FILL);
}
gimp_image_add_channel (options->image, new_channel, -1);
gimp_image_add_channel (options->image, new_channel, -1, TRUE);
gimp_image_flush (options->image);
}

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"

View File

@@ -0,0 +1,80 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "actions-types.h"
#include "core/gimp.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "config-actions.h"
#include "config-commands.h"
#include "gimp-intl.h"
static const GimpToggleActionEntry config_toggle_actions[] =
{
{ "config-use-gegl", NULL,
N_("Use _GEGL"), NULL,
N_("If possible, use GEGL for image processing"),
G_CALLBACK (config_use_gegl_cmd_callback),
FALSE,
GIMP_HELP_CONFIG_USE_GEGL }
};
static void
config_actions_use_gegl_notify (GObject *config,
GParamSpec *pspec,
GimpActionGroup *group)
{
gboolean active;
g_object_get (config,
"use-gegl", &active,
NULL);
gimp_action_group_set_action_active (group, "config-use-gegl", active);
}
void
config_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_toggle_actions (group,
config_toggle_actions,
G_N_ELEMENTS (config_toggle_actions));
config_actions_use_gegl_notify (G_OBJECT (group->gimp->config), NULL, group);
g_signal_connect_object (group->gimp->config,
"notify::use-gegl",
G_CALLBACK (config_actions_use_gegl_notify),
group, 0);
}
void
config_actions_update (GimpActionGroup *group,
gpointer data)
{
}

View File

@@ -16,15 +16,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
gint32 load_image (const gchar *filename,
GimpRunMode runmode,
gboolean preview);
#ifndef __CONFIG_ACTIONS_H__
#define __CONFIG_ACTIONS_H__
#ifdef HAVE_EXIF
void config_actions_setup (GimpActionGroup *group);
void config_actions_update (GimpActionGroup *group,
gpointer data);
gint32 load_thumbnail_image (const gchar *filename,
gint *width,
gint *height);
#endif /* HAVE_EXIF */
#endif /* __CONFIG_ACTIONS_H__ */

View File

@@ -0,0 +1,43 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "actions-types.h"
#include "core/gimp.h"
#include "actions.h"
#include "config-commands.h"
/* public functions */
void
config_use_gegl_cmd_callback (GtkAction *action,
gpointer data)
{
GtkToggleAction *toggle_action = GTK_TOGGLE_ACTION (action);
Gimp *gimp = action_data_get_gimp (data);
g_object_set (gimp->config,
"use-gegl", gtk_toggle_action_get_active (toggle_action),
NULL);
}

View File

@@ -0,0 +1,27 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __CONFIG_COMMANDS_H__
#define __CONFIG_COMMANDS_H__
void config_use_gegl_cmd_callback (GtkAction *action,
gpointer data);
#endif /* __CONFIG_COMMANDS_H__ */

View File

@@ -77,31 +77,31 @@ static const GimpActionEntry context_actions[] =
static GimpEnumActionEntry context_palette_foreground_actions[] =
{
{ "context-palette-foreground-set", GIMP_STOCK_PALETTE,
"Foreground Palette color Set", NULL, NULL,
"Foreground Palette Color Set", NULL, NULL,
GIMP_ACTION_SELECT_SET, FALSE,
NULL },
{ "context-palette-foreground-first", GIMP_STOCK_PALETTE,
"Foreground Palette color First", NULL, NULL,
"Foreground Palette Color First", NULL, NULL,
GIMP_ACTION_SELECT_FIRST, FALSE,
NULL },
{ "context-palette-foreground-last", GIMP_STOCK_PALETTE,
"Foreground Palette color Last", NULL, NULL,
"Foreground Palette Color Last", NULL, NULL,
GIMP_ACTION_SELECT_LAST, FALSE,
NULL },
{ "context-palette-foreground-previous", GIMP_STOCK_PALETTE,
"Foreground Palette color Previous", NULL, NULL,
"Foreground Palette Color Previous", NULL, NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL },
{ "context-palette-foreground-next", GIMP_STOCK_PALETTE,
"Foreground Palette color Next", NULL, NULL,
"Foreground Palette Color Next", NULL, NULL,
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "context-palette-foreground-previous-skip", GIMP_STOCK_PALETTE,
"Foreground Palette color Skip Back", NULL, NULL,
"Foreground Palette Color Skip Back", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "context-palette-foreground-next-skip", GIMP_STOCK_PALETTE,
"Foreground Palette color Skip Forward", NULL, NULL,
"Foreground Palette Color Skip Forward", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL }
};
@@ -109,31 +109,31 @@ static GimpEnumActionEntry context_palette_foreground_actions[] =
static GimpEnumActionEntry context_palette_background_actions[] =
{
{ "context-palette-background-set", GIMP_STOCK_PALETTE,
"Background Palette color Set", NULL, NULL,
"Background Palette Color Set", NULL, NULL,
GIMP_ACTION_SELECT_SET, FALSE,
NULL },
{ "context-palette-background-first", GIMP_STOCK_PALETTE,
"Background Palette color First", NULL, NULL,
"Background Palette Color First", NULL, NULL,
GIMP_ACTION_SELECT_FIRST, FALSE,
NULL },
{ "context-palette-background-last", GIMP_STOCK_PALETTE,
"Background Palette color Last", NULL, NULL,
"Background Palette Color Last", NULL, NULL,
GIMP_ACTION_SELECT_LAST, FALSE,
NULL },
{ "context-palette-background-previous", GIMP_STOCK_PALETTE,
"Background Palette color Previous", NULL, NULL,
"Background Palette Color Previous", NULL, NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL },
{ "context-palette-background-next", GIMP_STOCK_PALETTE,
"Background Palette color Next", NULL, NULL,
"Background Palette Color Next", NULL, NULL,
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "context-palette-background-previous-skip", GIMP_STOCK_PALETTE,
"Background Palette color Skip Back", NULL, NULL,
"Background Palette Color Skip Back", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "context-palette-background-next-skip", GIMP_STOCK_PALETTE,
"Background Palette color Skip ahead", NULL, NULL,
"Background Palette Color Skip Forward", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL }
};
@@ -141,31 +141,31 @@ static GimpEnumActionEntry context_palette_background_actions[] =
static GimpEnumActionEntry context_colormap_foreground_actions[] =
{
{ "context-colormap-foreground-set", GIMP_STOCK_COLORMAP,
"Foreground Colormap color Set", NULL, NULL,
"Foreground Colormap Color Set", NULL, NULL,
GIMP_ACTION_SELECT_SET, FALSE,
NULL },
{ "context-colormap-foreground-first", GIMP_STOCK_COLORMAP,
"Foreground Colormap color First", NULL, NULL,
"Foreground Colormap Color First", NULL, NULL,
GIMP_ACTION_SELECT_FIRST, FALSE,
NULL },
{ "context-colormap-foreground-last", GIMP_STOCK_COLORMAP,
"Foreground Colormap color Last", NULL, NULL,
"Foreground Colormap Color Last", NULL, NULL,
GIMP_ACTION_SELECT_LAST, FALSE,
NULL },
{ "context-colormap-foreground-previous", GIMP_STOCK_COLORMAP,
"Foreground Colormap color Previous", NULL, NULL,
"Foreground Colormap Color Previous", NULL, NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL },
{ "context-colormap-foreground-next", GIMP_STOCK_COLORMAP,
"Foreground Colormap color Next", NULL, NULL,
"Foreground Colormap Color Next", NULL, NULL,
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "context-colormap-foreground-previous-skip", GIMP_STOCK_COLORMAP,
"Foreground Colormap color Skip Back", NULL, NULL,
"Foreground Colormap Color Skip Back", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "context-colormap-foreground-next-skip", GIMP_STOCK_COLORMAP,
"Foreground Colormap color Skip Forward", NULL, NULL,
"Foreground Colormap Color Skip Forward", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL }
};
@@ -173,31 +173,31 @@ static GimpEnumActionEntry context_colormap_foreground_actions[] =
static GimpEnumActionEntry context_colormap_background_actions[] =
{
{ "context-colormap-background-set", GIMP_STOCK_COLORMAP,
"Background Colormap color Set", NULL, NULL,
"Background Colormap Color Set", NULL, NULL,
GIMP_ACTION_SELECT_SET, FALSE,
NULL },
{ "context-colormap-background-first", GIMP_STOCK_COLORMAP,
"Background Colormap color First", NULL, NULL,
"Background Colormap Color First", NULL, NULL,
GIMP_ACTION_SELECT_FIRST, FALSE,
NULL },
{ "context-colormap-background-last", GIMP_STOCK_COLORMAP,
"Background Colormap color Last", NULL, NULL,
"Background Colormap Color Last", NULL, NULL,
GIMP_ACTION_SELECT_LAST, FALSE,
NULL },
{ "context-colormap-background-previous", GIMP_STOCK_COLORMAP,
"Background Colormap color Previous", NULL, NULL,
"Background Colormap Color Previous", NULL, NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL },
{ "context-colormap-background-next", GIMP_STOCK_COLORMAP,
"Background Colormap color Next", NULL, NULL,
"Background Colormap Color Next", NULL, NULL,
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "context-colormap-background-previous-skip", GIMP_STOCK_COLORMAP,
"Background Colormap color Skip Back", NULL, NULL,
"Background Colormap Color Skip Back", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "context-colormap-background-next-skip", GIMP_STOCK_COLORMAP,
"Background Colormap color Skip ahead", NULL, NULL,
"Background Colormap Color Skip Forward", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL }
};
@@ -205,31 +205,31 @@ static GimpEnumActionEntry context_colormap_background_actions[] =
static GimpEnumActionEntry context_swatch_foreground_actions[] =
{
{ "context-swatch-foreground-set", GIMP_STOCK_PALETTE,
"Foreground Swatch color Set", NULL, NULL,
"Foreground Swatch Color Set", NULL, NULL,
GIMP_ACTION_SELECT_SET, FALSE,
NULL },
{ "context-swatch-foreground-first", GIMP_STOCK_PALETTE,
"Foreground Swatch color First", NULL, NULL,
"Foreground Swatch Color First", NULL, NULL,
GIMP_ACTION_SELECT_FIRST, FALSE,
NULL },
{ "context-swatch-foreground-last", GIMP_STOCK_PALETTE,
"Foreground Swatch color Last", NULL, NULL,
"Foreground Swatch Color Last", NULL, NULL,
GIMP_ACTION_SELECT_LAST, FALSE,
NULL },
{ "context-swatch-foreground-previous", GIMP_STOCK_PALETTE,
"Foreground Swatch color Previous", "9", NULL,
"Foreground Swatch Color Previous", "9", NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL },
{ "context-swatch-foreground-next", GIMP_STOCK_PALETTE,
"Foreground Swatch color Next", "0", NULL,
"Foreground Swatch Color Next", "0", NULL,
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "context-swatch-foreground-previous-skip", GIMP_STOCK_PALETTE,
"Foreground Swatch color Skip Back", NULL, NULL,
"Foreground Swatch Color Skip Back", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "context-swatch-foreground-next-skip", GIMP_STOCK_PALETTE,
"Foreground Swatch color Skip Forward", NULL, NULL,
"Foreground Swatch Color Skip Forward", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL }
};
@@ -237,31 +237,31 @@ static GimpEnumActionEntry context_swatch_foreground_actions[] =
static GimpEnumActionEntry context_swatch_background_actions[] =
{
{ "context-swatch-background-set", GIMP_STOCK_PALETTE,
"Background Swatch color Set", NULL, NULL,
"Background Swatch Color Set", NULL, NULL,
GIMP_ACTION_SELECT_SET, FALSE,
NULL },
{ "context-swatch-background-first", GIMP_STOCK_PALETTE,
"Background Swatch color First", NULL, NULL,
"Background Swatch Color First", NULL, NULL,
GIMP_ACTION_SELECT_FIRST, FALSE,
NULL },
{ "context-swatch-background-last", GIMP_STOCK_PALETTE,
"Background Swatch color Last", NULL, NULL,
"Background Swatch Color Last", NULL, NULL,
GIMP_ACTION_SELECT_LAST, FALSE,
NULL },
{ "context-swatch-background-previous", GIMP_STOCK_PALETTE,
"Background Swatch color Previous", NULL, NULL,
"Background Swatch Color Previous", NULL, NULL,
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
NULL },
{ "context-swatch-background-next", GIMP_STOCK_PALETTE,
"Background Swatch color Next", NULL, NULL,
"Background Swatch Color Next", NULL, NULL,
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "context-swatch-background-previous-skip", GIMP_STOCK_PALETTE,
"Background Swatch color Skip Back", NULL, NULL,
"Background Swatch Color Skip Back", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "context-swatch-background-next-skip", GIMP_STOCK_PALETTE,
"Background Swatch color Skip ahead", NULL, NULL,
"Background Swatch Color Skip Forward", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL }
};
@@ -1061,11 +1061,11 @@ static const GimpEnumActionEntry context_brush_angle_actions[] =
GIMP_ACTION_SELECT_NEXT, FALSE,
NULL },
{ "context-brush-angle-decrease-skip", GIMP_STOCK_BRUSH,
"Rotate Right 15 degrees", NULL, NULL,
"Rotate Right 15°", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
NULL },
{ "context-brush-angle-increase-skip", GIMP_STOCK_BRUSH,
"Rotate Left 15 degrees", NULL, NULL,
"Rotate Left 15°", NULL, NULL,
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
NULL }
};

View File

@@ -118,7 +118,7 @@ context_colors_swap_cmd_callback (GtkAction *action,
gimp_context_swap_colors (context);
}
#define SELECT_COLOR_CMD_CALLBACK(name, fgbg, usec, usep) \
#define SELECT_COLOR_CMD_CALLBACK(name, fgbg, use_colormap, use_palette) \
void \
context_##name##_##fgbg##ground_cmd_callback (GtkAction *action, \
gint value, \
@@ -129,7 +129,8 @@ context_##name##_##fgbg##ground_cmd_callback (GtkAction *action, \
return_if_no_context (context, data); \
\
gimp_context_get_##fgbg##ground (context, &color); \
context_select_color ((GimpActionSelectType) value, &color, usec, usep); \
context_select_color ((GimpActionSelectType) value, &color, \
use_colormap, use_palette); \
gimp_context_set_##fgbg##ground (context, &color); \
}

View File

@@ -24,6 +24,8 @@
#include "actions-types.h"
#include "core/gimp.h"
#include "widgets/gimpactiongroup.h"
#include "debug-actions.h"

View File

@@ -119,7 +119,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
"gimp-brush-grid|gimp-brush-list",
GIMP_HELP_BRUSH_DIALOG },
{ "dialogs-brush-editor", NULL,
{ "dialogs-brush-editor", GIMP_STOCK_BRUSH,
N_("Brush Editor"), NULL,
N_("Open the brush editor"),
"gimp-brush-editor",
@@ -137,7 +137,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
"gimp-gradient-list|gimp-gradient-grid",
GIMP_HELP_GRADIENT_DIALOG },
{ "dialogs-gradient-editor", NULL,
{ "dialogs-gradient-editor", GIMP_STOCK_GRADIENT,
N_("Gradient Editor"), NULL,
N_("Open the gradient editor"),
"gimp-gradient-editor",
@@ -149,7 +149,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
"gimp-palette-list|gimp-palette-grid",
GIMP_HELP_PALETTE_DIALOG },
{ "dialogs-palette-editor", NULL,
{ "dialogs-palette-editor", GIMP_STOCK_PALETTE,
N_("Palette Editor"), NULL,
N_("Open the palette editor"),
"gimp-palette-editor",
@@ -173,7 +173,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
"gimp-image-list|gimp-image-grid",
GIMP_HELP_IMAGE_DIALOG },
{ "dialogs-document-history", GTK_STOCK_OPEN,
{ "dialogs-document-history", "document-open-recent",
N_("Document Histor_y"), "",
N_("Open the document history dialog"),
"gimp-document-list|gimp-document-grid",
@@ -222,7 +222,7 @@ static const GimpStringActionEntry dialogs_toplevel_actions[] =
{ "dialogs-tips", GIMP_STOCK_INFO,
N_("_Tip of the Day"), NULL,
N_("Show the tip of the day"),
N_("Show some helpful tips on using GIMP"),
"gimp-tips-dialog",
GIMP_HELP_TIPS_DIALOG },

View File

@@ -38,7 +38,7 @@
static const GimpActionEntry documents_actions[] =
{
{ "documents-popup", GTK_STOCK_OPEN,
{ "documents-popup", "document-open-recent",
N_("Documents Menu"), NULL, NULL, NULL,
GIMP_HELP_DOCUMENT_DIALOG },
@@ -48,13 +48,13 @@ static const GimpActionEntry documents_actions[] =
G_CALLBACK (documents_open_cmd_callback),
GIMP_HELP_DOCUMENT_OPEN },
{ "documents-raise-or-open", GTK_STOCK_OPEN,
{ "documents-raise-or-open", NULL,
N_("_Raise or Open Image"), "",
N_("Raise window if already open"),
G_CALLBACK (documents_raise_or_open_cmd_callback),
GIMP_HELP_DOCUMENT_OPEN },
{ "documents-file-open-dialog", GTK_STOCK_OPEN,
{ "documents-file-open-dialog", NULL,
N_("File Open _Dialog"), "",
N_("Open image dialog"),
G_CALLBACK (documents_file_open_dialog_cmd_callback),
@@ -84,13 +84,13 @@ static const GimpActionEntry documents_actions[] =
G_CALLBACK (documents_recreate_preview_cmd_callback),
GIMP_HELP_DOCUMENT_REFRESH },
{ "documents-reload-previews", GTK_STOCK_REFRESH,
{ "documents-reload-previews", NULL,
N_("Reload _all Previews"), "",
N_("Reload all previews"),
G_CALLBACK (documents_reload_previews_cmd_callback),
GIMP_HELP_DOCUMENT_REFRESH },
{ "documents-remove-dangling", GTK_STOCK_REFRESH,
{ "documents-remove-dangling", NULL,
N_("Remove Dangling E_ntries"), "",
N_("Remove dangling entries"),
G_CALLBACK (documents_remove_dangling_cmd_callback),

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
@@ -118,7 +119,7 @@ static const GimpActionEntry edit_actions[] =
{ "edit-copy-visible", NULL, /* GIMP_STOCK_COPY_VISIBLE, */
N_("Copy _Visible"), "<control><shift>C",
N_("Copy the selected region to the clipboard"),
N_("Copy what is visible in the selected region"),
G_CALLBACK (edit_copy_visible_cmd_callback),
GIMP_HELP_EDIT_COPY_VISIBLE },
@@ -146,6 +147,12 @@ static const GimpActionEntry edit_actions[] =
G_CALLBACK (edit_paste_as_new_cmd_callback),
GIMP_HELP_EDIT_PASTE_AS_NEW },
{ "edit-paste-as-new-layer", NULL,
N_("New _Layer"), NULL,
N_("Create a new layer from the content of the clipboard"),
G_CALLBACK (edit_paste_as_new_layer_cmd_callback),
GIMP_HELP_EDIT_PASTE_AS_NEW_LAYER },
{ "edit-named-cut", GTK_STOCK_CUT,
N_("Cu_t Named..."), "",
N_("Move the selected pixels to a named buffer"),
@@ -248,7 +255,7 @@ void
edit_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *image = action_data_get_image (data);
GimpImage *image = action_data_get_image (data);
GimpDrawable *drawable = NULL;
gchar *undo_name = NULL;
gchar *redo_name = NULL;
@@ -258,38 +265,43 @@ edit_actions_update (GimpActionGroup *group,
if (image)
{
GimpUndo *undo;
GimpUndo *redo;
drawable = gimp_image_get_active_drawable (image);
undo_enabled = gimp_image_undo_is_enabled (image);
if (undo_enabled)
{
undo = gimp_undo_stack_peek (image->undo_stack);
redo = gimp_undo_stack_peek (image->redo_stack);
GimpUndo *undo = gimp_undo_stack_peek (image->undo_stack);
GimpUndo *redo = gimp_undo_stack_peek (image->redo_stack);
if (undo)
undo_name =
g_strdup_printf (_("_Undo %s"),
gimp_object_get_name (GIMP_OBJECT (undo)));
{
undo_name =
g_strdup_printf (_("_Undo %s"),
gimp_object_get_name (GIMP_OBJECT (undo)));
}
if (redo)
redo_name =
g_strdup_printf (_("_Redo %s"),
gimp_object_get_name (GIMP_OBJECT (redo)));
{
redo_name =
g_strdup_printf (_("_Redo %s"),
gimp_object_get_name (GIMP_OBJECT (redo)));
}
undo = gimp_image_undo_get_fadeable (image);
if (GIMP_IS_DRAWABLE_UNDO (undo) &&
GIMP_DRAWABLE_UNDO (undo)->src2_tiles)
fade_enabled = TRUE;
{
fade_enabled = TRUE;
}
if (fade_enabled)
fade_name =
g_strdup_printf (_("_Fade %s..."),
gimp_object_get_name (GIMP_OBJECT (undo)));
{
fade_name =
g_strdup_printf (_("_Fade %s..."),
gimp_object_get_name (GIMP_OBJECT (undo)));
}
}
}
@@ -314,21 +326,22 @@ edit_actions_update (GimpActionGroup *group,
g_free (redo_name);
g_free (fade_name);
SET_SENSITIVE ("edit-cut", drawable);
SET_SENSITIVE ("edit-copy", drawable);
SET_SENSITIVE ("edit-copy-visible", image);
SET_SENSITIVE ("edit-cut", drawable);
SET_SENSITIVE ("edit-copy", drawable);
SET_SENSITIVE ("edit-copy-visible", image);
/* "edit-paste" is always enabled */
SET_SENSITIVE ("edit-paste-into", image);
SET_SENSITIVE ("edit-paste-as-new-layer", image);
SET_SENSITIVE ("edit-paste-into", image);
SET_SENSITIVE ("edit-named-cut", drawable);
SET_SENSITIVE ("edit-named-copy", drawable);
SET_SENSITIVE ("edit-named-copy-visible", drawable);
SET_SENSITIVE ("edit-named-paste", image);
SET_SENSITIVE ("edit-clear", drawable);
SET_SENSITIVE ("edit-fill-fg", drawable);
SET_SENSITIVE ("edit-fill-bg", drawable);
SET_SENSITIVE ("edit-fill-pattern", drawable);
SET_SENSITIVE ("edit-clear", drawable);
SET_SENSITIVE ("edit-fill-fg", drawable);
SET_SENSITIVE ("edit-fill-bg", drawable);
SET_SENSITIVE ("edit-fill-pattern", drawable);
#undef SET_LABEL
#undef SET_SENSITIVE

View File

@@ -20,6 +20,7 @@
#include <string.h>
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
@@ -32,6 +33,7 @@
#include "core/gimpbuffer.h"
#include "core/gimpcontainer.h"
#include "core/gimpdrawable.h"
#include "core/gimplayer.h"
#include "core/gimpimage.h"
#include "core/gimpimage-undo.h"
@@ -300,14 +302,47 @@ edit_paste_as_new_cmd_callback (GtkAction *action,
image = gimp_edit_paste_as_new (gimp, action_data_get_image (data),
buffer);
g_object_unref (buffer);
if (image)
{
gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0);
g_object_unref (image);
}
}
else
{
gimp_message (gimp, NULL, GIMP_MESSAGE_WARNING,
_("There is no image data in the clipboard to paste."));
}
}
void
edit_paste_as_new_layer_cmd_callback (GtkAction *action,
gpointer data)
{
Gimp *gimp;
GimpImage *image;
GimpBuffer *buffer;
return_if_no_gimp (gimp, data);
return_if_no_image (image, data);
buffer = gimp_clipboard_get_buffer (gimp);
if (buffer)
{
GimpLayer *layer;
layer = gimp_layer_new_from_tiles (gimp_buffer_get_tiles (buffer),
image,
gimp_image_base_type_with_alpha (image),
_("Clipboard"),
GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
g_object_unref (buffer);
gimp_image_add_layer (image, layer, -1, TRUE);
gimp_image_flush (image);
}
else
{

View File

@@ -44,6 +44,8 @@ void edit_paste_into_cmd_callback (GtkAction *action,
gpointer data);
void edit_paste_as_new_cmd_callback (GtkAction *action,
gpointer data);
void edit_paste_as_new_layer_cmd_callback (GtkAction *action,
gpointer data);
void edit_named_cut_cmd_callback (GtkAction *action,
gpointer data);
void edit_named_copy_cmd_callback (GtkAction *action,

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
@@ -64,7 +65,7 @@ static void file_actions_close_all_update (GimpContainer *images,
static const GimpActionEntry file_actions[] =
{
{ "file-menu", NULL, N_("_File") },
{ "file-new-menu", NULL, N_("Ne_w") },
{ "file-create-menu", NULL, N_("Create") },
{ "file-open-recent-menu", NULL, N_("Open _Recent") },
{ "file-open", GTK_STOCK_OPEN,
@@ -235,7 +236,6 @@ file_actions_update (GimpActionGroup *group,
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
SET_SENSITIVE ("file-open-as-layers", image);
SET_SENSITIVE ("file-save", image && drawable);
SET_SENSITIVE ("file-save-as", image && drawable);
SET_SENSITIVE ("file-save-a-copy", image && drawable);

View File

@@ -20,6 +20,7 @@
#include <string.h>
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
@@ -64,7 +65,9 @@
/* local function prototypes */
static void file_open_dialog_show (GtkWidget *parent,
static void file_open_dialog_show (Gimp *gimp,
GtkWidget *parent,
const gchar *title,
GimpImage *image,
const gchar *uri,
gboolean open_as_layers);
@@ -90,34 +93,38 @@ void
file_open_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
Gimp *gimp;
GtkWidget *widget;
const gchar *uri = NULL;
GimpImage *image;
return_if_no_gimp (gimp, data);
return_if_no_widget (widget, data);
image = action_data_get_image (data);
if (image)
uri = gimp_object_get_name (GIMP_OBJECT (image));
file_open_dialog_show (widget, NULL, uri, FALSE);
file_open_dialog_show (gimp, widget,
_("Open Image"),
image, NULL, FALSE);
}
void
file_open_as_layers_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplay *display;
Gimp *gimp;
GtkWidget *widget;
GimpImage *image;
const gchar *uri;
return_if_no_display (display, data);
GimpDisplay *display;
GimpImage *image = NULL;
return_if_no_gimp (gimp, data);
return_if_no_widget (widget, data);
image = display->image;
uri = gimp_object_get_name (GIMP_OBJECT (image));
display = action_data_get_display (data);
file_open_dialog_show (widget, image, uri, TRUE);
if (display)
image = display->image;
file_open_dialog_show (gimp, widget,
_("Open Image as Layers"),
image, NULL, TRUE);
}
void
@@ -190,6 +197,7 @@ file_save_cmd_callback (GtkAction *action,
GimpImage *image;
GtkWidget *widget;
GimpSaveMode save_mode;
const gchar *uri;
gboolean saved = FALSE;
return_if_no_display (display, data);
return_if_no_widget (widget, data);
@@ -201,24 +209,25 @@ file_save_cmd_callback (GtkAction *action,
if (! gimp_image_get_active_drawable (image))
return;
uri = gimp_object_get_name (GIMP_OBJECT (image));
switch (save_mode)
{
case GIMP_SAVE_MODE_SAVE:
case GIMP_SAVE_MODE_SAVE_AND_CLOSE:
/* Only save if the image has been modified */
if (image->dirty ||
! GIMP_GUI_CONFIG (image->gimp->config)->trust_dirty_flag)
/* Only save if the image has been modified, or if it is new. */
if ((image->dirty ||
! GIMP_GUI_CONFIG (image->gimp->config)->trust_dirty_flag) ||
uri == NULL)
{
const gchar *uri;
GimpPlugInProcedure *save_proc = NULL;
uri = gimp_object_get_name (GIMP_OBJECT (image));
save_proc = gimp_image_get_save_proc (image);
GimpPlugInProcedure *save_proc = gimp_image_get_save_proc (image);
if (uri && ! save_proc)
save_proc =
file_procedure_find (image->gimp->plug_in_manager->save_procs,
uri, NULL);
{
save_proc =
file_procedure_find (image->gimp->plug_in_manager->save_procs,
uri, NULL);
}
if (uri && save_proc)
{
@@ -282,6 +291,8 @@ file_save_cmd_callback (GtkAction *action,
}
else
{
gimp_message (image->gimp, G_OBJECT (display),
GIMP_MESSAGE_INFO, _("No changes need to be saved"));
saved = TRUE;
break;
}
@@ -436,14 +447,18 @@ file_file_open_dialog (Gimp *gimp,
const gchar *uri,
GtkWidget *parent)
{
file_open_dialog_show (parent, NULL, uri, FALSE);
file_open_dialog_show (gimp, parent,
_("Open Image"),
NULL, uri, FALSE);
}
/* private functions */
static void
file_open_dialog_show (GtkWidget *parent,
file_open_dialog_show (Gimp *gimp,
GtkWidget *parent,
const gchar *title,
GimpImage *image,
const gchar *uri,
gboolean open_as_layers)
@@ -456,24 +471,23 @@ file_open_dialog_show (GtkWidget *parent,
if (dialog)
{
if (! uri && image)
uri = gimp_object_get_name (GIMP_OBJECT (image));
if (! uri)
uri = g_object_get_data (G_OBJECT (gimp), "gimp-file-open-last-uri");
if (uri)
gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (dialog), uri);
if (open_as_layers)
{
gtk_window_set_title (GTK_WINDOW (dialog), _("Open Image as Layers"));
GIMP_FILE_DIALOG (dialog)->image = image;
}
else
{
gtk_window_set_title (GTK_WINDOW (dialog), _("Open Image"));
GIMP_FILE_DIALOG (dialog)->image = NULL;
}
gimp_file_dialog_set_open_image (GIMP_FILE_DIALOG (dialog),
image, open_as_layers);
parent = gtk_widget_get_toplevel (parent);
if (GTK_IS_WINDOW (parent))
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (parent));
gtk_window_present (GTK_WINDOW (dialog));
}
@@ -515,8 +529,8 @@ file_save_dialog_show (GimpImage *image,
{
gtk_window_set_title (GTK_WINDOW (dialog), title);
gimp_file_dialog_set_image (GIMP_FILE_DIALOG (dialog),
image, save_a_copy, close_after_saving);
gimp_file_dialog_set_save_image (GIMP_FILE_DIALOG (dialog),
image, save_a_copy, close_after_saving);
gtk_window_present (GTK_WINDOW (dialog));
}

View File

@@ -24,6 +24,10 @@
#include "actions-types.h"
#include "core/gimpprogress.h"
#include "widgets/gimphelp.h"
#include "actions.h"
#include "help-commands.h"
@@ -32,7 +36,12 @@ void
help_help_cmd_callback (GtkAction *action,
gpointer data)
{
gimp_standard_help_func (NULL, NULL);
Gimp *gimp;
GimpDisplay *display;
return_if_no_gimp (gimp, data);
return_if_no_display (display, data);
gimp_help_show (gimp, GIMP_PROGRESS (display), NULL, NULL);
}
void

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "actions-types.h"

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
@@ -82,6 +83,12 @@ static const GimpActionEntry layers_actions[] =
G_CALLBACK (layers_new_last_vals_cmd_callback),
GIMP_HELP_LAYER_NEW },
{ "layers-new-from-visible", NULL,
N_("New from _Visible"), NULL,
N_("Create a new layer from what is visible in this image"),
G_CALLBACK (layers_new_from_visible_cmd_callback),
GIMP_HELP_LAYER_NEW_FROM_VISIBLE },
{ "layers-duplicate", GIMP_STOCK_DUPLICATE,
N_("D_uplicate Layer"), "<control><shift>D",
N_("Create a duplicate of the layer and add it to the image"),
@@ -510,28 +517,29 @@ layers_actions_update (GimpActionGroup *group,
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
SET_VISIBLE ("layers-text-tool", text_layer && !ac);
SET_SENSITIVE ("layers-edit-attributes", layer && !fs && !ac);
SET_VISIBLE ("layers-text-tool", text_layer && !ac);
SET_SENSITIVE ("layers-edit-attributes", layer && !fs && !ac);
SET_SENSITIVE ("layers-new", image);
SET_SENSITIVE ("layers-new-last-values", image);
SET_SENSITIVE ("layers-duplicate", layer && !fs && !ac);
SET_SENSITIVE ("layers-delete", layer && !ac);
SET_SENSITIVE ("layers-new", image);
SET_SENSITIVE ("layers-new-last-values", image);
SET_SENSITIVE ("layers-new-from-visible", image);
SET_SENSITIVE ("layers-duplicate", layer && !fs && !ac);
SET_SENSITIVE ("layers-delete", layer && !ac);
SET_SENSITIVE ("layers-select-top", layer && !fs && !ac && prev);
SET_SENSITIVE ("layers-select-bottom", layer && !fs && !ac && next);
SET_SENSITIVE ("layers-select-previous", layer && !fs && !ac && prev);
SET_SENSITIVE ("layers-select-next", layer && !fs && !ac && next);
SET_SENSITIVE ("layers-select-top", layer && !fs && !ac && prev);
SET_SENSITIVE ("layers-select-bottom", layer && !fs && !ac && next);
SET_SENSITIVE ("layers-select-previous", layer && !fs && !ac && prev);
SET_SENSITIVE ("layers-select-next", layer && !fs && !ac && next);
SET_SENSITIVE ("layers-raise", layer && !fs && !ac && prev);
SET_SENSITIVE ("layers-raise-to-top", layer && !fs && !ac && prev);
SET_SENSITIVE ("layers-lower", layer && !fs && !ac && next);
SET_SENSITIVE ("layers-lower-to-bottom", layer && !fs && !ac && next);
SET_SENSITIVE ("layers-raise", layer && !fs && !ac && prev);
SET_SENSITIVE ("layers-raise-to-top", layer && !fs && !ac && prev);
SET_SENSITIVE ("layers-lower", layer && !fs && !ac && next);
SET_SENSITIVE ("layers-lower-to-bottom", layer && !fs && !ac && next);
SET_SENSITIVE ("layers-anchor", layer && fs && !ac);
SET_SENSITIVE ("layers-merge-down", layer && !fs && !ac && next);
SET_SENSITIVE ("layers-merge-layers", layer && !fs && !ac);
SET_SENSITIVE ("layers-flatten-image", layer && !fs && !ac);
SET_SENSITIVE ("layers-anchor", layer && fs && !ac);
SET_SENSITIVE ("layers-merge-down", layer && !fs && !ac && next);
SET_SENSITIVE ("layers-merge-layers", layer && !fs && !ac);
SET_SENSITIVE ("layers-flatten-image", layer && !fs && !ac);
SET_VISIBLE ("layers-text-discard", text_layer && !ac);
SET_VISIBLE ("layers-text-to-vectors", text_layer && !ac);

View File

@@ -20,6 +20,7 @@
#include <string.h>
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
@@ -41,6 +42,7 @@
#include "core/gimplayer.h"
#include "core/gimplayer-floating-sel.h"
#include "core/gimplayermask.h"
#include "core/gimpprojection.h"
#include "core/gimptoolinfo.h"
#include "core/gimpundostack.h"
#include "core/gimpprogress.h"
@@ -327,13 +329,34 @@ layers_new_last_vals_cmd_callback (GtkAction *action,
layer_fill_type);
gimp_item_translate (GIMP_ITEM (new_layer), off_x, off_y, FALSE);
gimp_image_add_layer (image, new_layer, -1);
gimp_image_add_layer (image, new_layer, -1, TRUE);
gimp_image_undo_group_end (image);
gimp_image_flush (image);
}
void
layers_new_from_visible_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpLayer *layer;
GimpProjection *projection;
return_if_no_image (image, data);
projection = gimp_image_get_projection (image);
layer = gimp_layer_new_from_tiles (gimp_projection_get_tiles (projection),
image,
gimp_image_base_type_with_alpha (image),
_("Visible"),
GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
gimp_image_add_layer (image, layer, -1, TRUE);
gimp_image_flush (image);
}
void
layers_select_cmd_callback (GtkAction *action,
gint value,
@@ -365,7 +388,7 @@ layers_raise_cmd_callback (GtkAction *action,
GimpLayer *layer;
return_if_no_layer (image, layer, data);
gimp_image_raise_layer (image, layer);
gimp_image_raise_layer (image, layer, NULL);
gimp_image_flush (image);
}
@@ -389,7 +412,7 @@ layers_lower_cmd_callback (GtkAction *action,
GimpLayer *layer;
return_if_no_layer (image, layer, data);
gimp_image_lower_layer (image, layer);
gimp_image_lower_layer (image, layer, NULL);
gimp_image_flush (image);
}
@@ -416,7 +439,7 @@ layers_duplicate_cmd_callback (GtkAction *action,
new_layer = GIMP_LAYER (gimp_item_duplicate (GIMP_ITEM (layer),
G_TYPE_FROM_INSTANCE (layer)));
gimp_image_add_layer (image, new_layer, -1);
gimp_image_add_layer (image, new_layer, -1, TRUE);
gimp_image_flush (image);
}
@@ -460,7 +483,7 @@ layers_delete_cmd_callback (GtkAction *action,
if (gimp_layer_is_floating_sel (layer))
floating_sel_remove (layer);
else
gimp_image_remove_layer (image, layer);
gimp_image_remove_layer (image, layer, TRUE, NULL);
gimp_image_flush (image);
}
@@ -495,7 +518,7 @@ layers_text_to_vectors_cmd_callback (GtkAction *action,
gimp_item_offsets (GIMP_ITEM (layer), &x, &y);
gimp_item_translate (GIMP_ITEM (vectors), x, y, FALSE);
gimp_image_add_vectors (image, vectors, -1);
gimp_image_add_vectors (image, vectors, -1, TRUE);
gimp_image_set_active_vectors (image, vectors);
gimp_image_flush (image);
@@ -523,7 +546,7 @@ layers_text_along_vectors_cmd_callback (GtkAction *action,
gimp_item_set_visible (GIMP_ITEM (new_vectors), TRUE, FALSE);
gimp_image_add_vectors (image, new_vectors, -1);
gimp_image_add_vectors (image, new_vectors, -1, TRUE);
gimp_image_set_active_vectors (image, new_vectors);
gimp_image_flush (image);
@@ -939,7 +962,7 @@ layers_new_layer_response (GtkWidget *widget,
gimp_drawable_fill_by_type (GIMP_DRAWABLE (layer),
dialog->context,
layer_fill_type);
gimp_image_add_layer (dialog->image, layer, -1);
gimp_image_add_layer (dialog->image, layer, -1, TRUE);
gimp_image_flush (dialog->image);
}
@@ -988,7 +1011,7 @@ layers_edit_layer_response (GtkWidget *widget,
{
g_object_set (layer,
"auto-rename",
GTK_TOGGLE_BUTTON (dialog->rename_toggle)->active,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->rename_toggle)),
NULL);
}
}
@@ -1027,7 +1050,7 @@ layers_add_mask_response (GtkWidget *widget,
if (layer_mask_invert)
gimp_channel_invert (GIMP_CHANNEL (mask), FALSE);
gimp_layer_add_mask (layer, mask, TRUE);
gimp_layer_add_mask (layer, mask, TRUE, NULL);
gimp_image_undo_group_end (image);

View File

@@ -24,10 +24,13 @@ void layers_text_tool_cmd_callback (GtkAction *action,
gpointer data);
void layers_edit_attributes_cmd_callback (GtkAction *action,
gpointer data);
void layers_new_cmd_callback (GtkAction *action,
gpointer data);
void layers_new_last_vals_cmd_callback (GtkAction *action,
gpointer data);
void layers_new_from_visible_cmd_callback (GtkAction *action,
gpointer data);
void layers_select_cmd_callback (GtkAction *action,
gint value,

View File

@@ -11,6 +11,7 @@ INCLUDES = \
-I$(PRJ_TOP) \
-I$(PRJ_TOP)/app \
$(GTK2_CFLAGS) \
$(GEGL_CFLAGS)
DEFINES = \
-DGIMP_COMPILATION \
@@ -35,6 +36,8 @@ OBJECTS = \
context-commands.obj \
colormap-actions.obj \
colormap-commands.obj \
config-actions.obj \
config-commands.obj \
cursor-info-actions.obj \
cursor-info-commands.obj \
data-commands.obj \
@@ -98,6 +101,8 @@ OBJECTS = \
view-commands.obj \
window-actions.obj \
window-commands.obj \
windows-actions.obj \
windows-commands.obj \
$(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32

View File

@@ -20,6 +20,7 @@
#include <string.h>
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
@@ -488,6 +489,8 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
gchar *reshow;
gboolean sensitive = FALSE;
label = gimp_plug_in_procedure_get_label (proc);
/* copy the sensitivity of the plug-in procedure's actual action
* instead of calling plug_in_actions_update() because doing the
* latter would set the sensitivity of this image's action on
@@ -498,8 +501,6 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
label = gimp_plug_in_procedure_get_label (proc);
repeat = g_strdup_printf (_("Re_peat \"%s\""), label);
reshow = g_strdup_printf (_("R_e-Show \"%s\""), label);
@@ -527,16 +528,28 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
for (i = 0; i < gimp_plug_in_manager_history_length (manager); i++)
{
GtkAction *action;
GtkAction *actual_action;
gchar *name = g_strdup_printf ("plug-in-recent-%02d", i + 1);
gboolean sensitive = FALSE;
GtkAction *action;
GtkAction *actual_action;
const gchar *label;
gchar *name;
gboolean sensitive = FALSE;
name = g_strdup_printf ("plug-in-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
g_free (name);
proc = gimp_plug_in_manager_history_nth (manager, i);
if (proc->menu_label)
{
label = dgettext (gimp_plug_in_procedure_get_locale_domain (proc),
proc->menu_label);
}
else
{
label = gimp_plug_in_procedure_get_label (proc);
}
/* see comment above */
actual_action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
GIMP_OBJECT (proc)->name);
@@ -547,7 +560,7 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
"visible", TRUE,
"sensitive", sensitive,
"procedure", proc,
"label", gimp_plug_in_procedure_get_label (proc),
"label", label,
"stock-id", gimp_plug_in_procedure_get_stock_id (proc),
"tooltip", gimp_plug_in_procedure_get_blurb (proc),
NULL);

View File

@@ -20,6 +20,7 @@
#include <string.h>
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"

View File

@@ -555,12 +555,7 @@ tools_activate_enum_action (const gchar *action_desc,
if (GIMP_IS_ENUM_ACTION (action) &&
GIMP_ENUM_ACTION (action)->value_variable)
{
gint old_value;
old_value = GIMP_ENUM_ACTION (action)->value;
GIMP_ENUM_ACTION (action)->value = value;
gtk_action_activate (action);
GIMP_ENUM_ACTION (action)->value = old_value;
gimp_enum_action_selected (GIMP_ENUM_ACTION (action), value);
}
}

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"

View File

@@ -20,6 +20,7 @@
#include <string.h>
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
@@ -187,7 +188,7 @@ vectors_new_last_vals_cmd_callback (GtkAction *action,
new_vectors = gimp_vectors_new (image,
vectors_name ? vectors_name : _("New Path"));
gimp_image_add_vectors (image, new_vectors, -1);
gimp_image_add_vectors (image, new_vectors, -1, TRUE);
gimp_image_flush (image);
}
@@ -200,7 +201,7 @@ vectors_raise_cmd_callback (GtkAction *action,
GimpVectors *vectors;
return_if_no_vectors (image, vectors, data);
gimp_image_raise_vectors (image, vectors);
gimp_image_raise_vectors (image, vectors, NULL);
gimp_image_flush (image);
}
@@ -224,7 +225,7 @@ vectors_lower_cmd_callback (GtkAction *action,
GimpVectors *vectors;
return_if_no_vectors (image, vectors, data);
gimp_image_lower_vectors (image, vectors);
gimp_image_lower_vectors (image, vectors, NULL);
gimp_image_flush (image);
}
@@ -251,7 +252,7 @@ vectors_duplicate_cmd_callback (GtkAction *action,
new_vectors = GIMP_VECTORS (gimp_item_duplicate (GIMP_ITEM (vectors),
G_TYPE_FROM_INSTANCE (vectors)));
gimp_image_add_vectors (image, new_vectors, -1);
gimp_image_add_vectors (image, new_vectors, -1, TRUE);
gimp_image_flush (image);
}
@@ -263,7 +264,7 @@ vectors_delete_cmd_callback (GtkAction *action,
GimpVectors *vectors;
return_if_no_vectors (image, vectors, data);
gimp_image_remove_vectors (image, vectors);
gimp_image_remove_vectors (image, vectors, TRUE, NULL);
gimp_image_flush (image);
}
@@ -603,7 +604,7 @@ vectors_new_vectors_response (GtkWidget *widget,
new_vectors = gimp_vectors_new (options->image, vectors_name);
gimp_image_add_vectors (options->image, new_vectors, -1);
gimp_image_add_vectors (options->image, new_vectors, -1, TRUE);
gimp_image_flush (options->image);
}

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
@@ -31,6 +32,7 @@
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpprojection.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimprender.h"
@@ -231,7 +233,14 @@ static const GimpToggleActionEntry view_toggle_actions[] =
N_("Toggle fullscreen view"),
G_CALLBACK (view_fullscreen_cmd_callback),
FALSE,
GIMP_HELP_VIEW_FULLSCREEN }
GIMP_HELP_VIEW_FULLSCREEN },
{ "view-use-gegl", GIMP_STOCK_GEGL,
"Use GEGL", NULL,
"Use GEGL to create this window's projection",
G_CALLBACK (view_use_gegl_cmd_callback),
FALSE,
NULL }
};
static const GimpEnumActionEntry view_zoom_actions[] =
@@ -633,11 +642,11 @@ view_actions_update (GimpActionGroup *group,
if (shell->canvas)
{
GimpRGB color;
GtkStyle *style = gtk_widget_get_style (shell->canvas);
GimpRGB color;
gtk_widget_ensure_style (shell->canvas);
gimp_rgb_set_gdk_color (&color,
shell->canvas->style->bg + GTK_STATE_NORMAL);
gimp_rgb_set_gdk_color (&color, style->bg + GTK_STATE_NORMAL);
gimp_rgb_set_alpha (&color, GIMP_OPACITY_OPAQUE);
SET_COLOR ("view-padding-color-theme", &color);
@@ -656,6 +665,7 @@ view_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("view-shrink-wrap", image);
SET_SENSITIVE ("view-fullscreen", image);
SET_ACTIVE ("view-fullscreen", display && fullscreen);
SET_ACTIVE ("view-use-gegl", image && display->image->projection->use_gegl);
if (GIMP_IS_DISPLAY (group->user_data) ||
GIMP_IS_GIMP (group->user_data))

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
@@ -30,6 +31,7 @@
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpprojection.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplay-foreach.h"
@@ -38,6 +40,8 @@
#include "display/gimpdisplayshell-appearance.h"
#include "display/gimpdisplayshell-filter-dialog.h"
#include "display/gimpdisplayshell-scale.h"
#include "display/gimpdisplayshell-scale-dialog.h"
#include "display/gimpdisplayshell-scroll.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpcolordialog.h"
@@ -132,27 +136,45 @@ view_zoom_cmd_callback (GtkAction *action,
switch ((GimpActionSelectType) value)
{
case GIMP_ACTION_SELECT_FIRST:
gimp_display_shell_scale (shell, GIMP_ZOOM_OUT_MAX, 0.0);
gimp_display_shell_scale (shell,
GIMP_ZOOM_OUT_MAX,
0.0,
GIMP_ZOOM_FOCUS_BEST_GUESS);
break;
case GIMP_ACTION_SELECT_LAST:
gimp_display_shell_scale (shell, GIMP_ZOOM_IN_MAX, 0.0);
gimp_display_shell_scale (shell,
GIMP_ZOOM_IN_MAX,
0.0,
GIMP_ZOOM_FOCUS_BEST_GUESS);
break;
case GIMP_ACTION_SELECT_PREVIOUS:
gimp_display_shell_scale (shell, GIMP_ZOOM_OUT, 0.0);
gimp_display_shell_scale (shell,
GIMP_ZOOM_OUT,
0.0,
GIMP_ZOOM_FOCUS_BEST_GUESS);
break;
case GIMP_ACTION_SELECT_NEXT:
gimp_display_shell_scale (shell, GIMP_ZOOM_IN, 0.0);
gimp_display_shell_scale (shell,
GIMP_ZOOM_IN,
0.0,
GIMP_ZOOM_FOCUS_BEST_GUESS);
break;
case GIMP_ACTION_SELECT_SKIP_PREVIOUS:
gimp_display_shell_scale (shell, GIMP_ZOOM_OUT_MORE, 0.0);
gimp_display_shell_scale (shell,
GIMP_ZOOM_OUT_MORE,
0.0,
GIMP_ZOOM_FOCUS_BEST_GUESS);
break;
case GIMP_ACTION_SELECT_SKIP_NEXT:
gimp_display_shell_scale (shell, GIMP_ZOOM_IN_MORE, 0.0);
gimp_display_shell_scale (shell,
GIMP_ZOOM_IN_MORE,
0.0,
GIMP_ZOOM_FOCUS_BEST_GUESS);
break;
default:
@@ -169,7 +191,10 @@ view_zoom_cmd_callback (GtkAction *action,
/* scale = min * (max / min)**(i/n), i = 0..n */
scale = pow (65536.0, scale / 512.0) / 256.0;
gimp_display_shell_scale (shell, GIMP_ZOOM_TO, scale);
gimp_display_shell_scale (shell,
GIMP_ZOOM_TO,
scale,
GIMP_ZOOM_FOCUS_BEST_GUESS);
break;
}
}
@@ -192,7 +217,10 @@ view_zoom_explicit_cmd_callback (GtkAction *action,
if (value != 0 /* not Other... */)
{
if (fabs (value - gimp_zoom_model_get_factor (shell->zoom)) > 0.0001)
gimp_display_shell_scale (shell, GIMP_ZOOM_TO, (gdouble) value / 10000);
gimp_display_shell_scale (shell,
GIMP_ZOOM_TO,
(gdouble) value / 10000,
GIMP_ZOOM_FOCUS_IMAGE_CENTER);
}
}
@@ -631,9 +659,12 @@ view_shrink_wrap_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplay *display;
GimpDisplayShell *shell;
return_if_no_display (display, data);
gimp_display_shell_scale_shrink_wrap (GIMP_DISPLAY_SHELL (display->shell),
shell = GIMP_DISPLAY_SHELL (display->shell);
gimp_display_shell_scale_shrink_wrap (shell,
FALSE);
}
@@ -653,6 +684,25 @@ view_fullscreen_cmd_callback (GtkAction *action,
gimp_display_shell_set_fullscreen (shell, active);
}
void
view_use_gegl_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
GimpDisplay *display;
GimpDisplayShell *shell;
gboolean active;
return_if_no_image (image, data);
return_if_no_display (display, data);
shell = GIMP_DISPLAY_SHELL (display->shell);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
image->projection->use_gegl = active;
gimp_display_shell_expose_full (shell);
}
/* private functions */

View File

@@ -87,5 +87,8 @@ void view_shrink_wrap_cmd_callback (GtkAction *action,
void view_fullscreen_cmd_callback (GtkAction *action,
gpointer data);
void view_use_gegl_cmd_callback (GtkAction *action,
gpointer data);
#endif /* __VIEW_COMMANDS_H__ */

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"

View File

@@ -18,6 +18,7 @@
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
@@ -212,7 +213,7 @@ windows_actions_image_notify (GimpDisplay *display,
entry.accelerator = NULL;
entry.tooltip = NULL;
entry.callback = G_CALLBACK (windows_show_display_cmd_callback);
entry.help_id = GIMP_HELP_WINDOWS_SHOW_IMAGE_WINDOW;
entry.help_id = NULL;
gimp_action_group_add_actions (group, &entry, 1);
@@ -268,7 +269,8 @@ windows_actions_dock_added (GimpDialogFactory *factory,
{
GtkAction *action;
GimpActionEntry entry;
gchar *action_name = g_strdup_printf ("windows-dock-%04d", dock->ID);
gchar *action_name = g_strdup_printf ("windows-dock-%04d",
dock->ID);
entry.name = action_name;
entry.stock_id = NULL;
@@ -321,9 +323,11 @@ windows_actions_dock_notify (GimpDock *dock,
GimpActionGroup *group)
{
GtkAction *action;
gchar *action_name = g_strdup_printf ("windows-dock-%04d", dock->ID);
gchar *action_name;
action_name = g_strdup_printf ("windows-dock-%04d", dock->ID);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), action_name);
g_free (action_name);
if (action)
g_object_set (action,

View File

@@ -32,8 +32,6 @@
#include <gegl.h>
#include <gegl.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpconfig/gimpconfig.h"
@@ -64,6 +62,7 @@
#include "gimp-intl.h"
/* local prototypes */
static void app_init_update_none (const gchar *text1,

View File

@@ -1,5 +1,16 @@
## Process this file with automake to produce Makefile.in
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gimp-Base\"
INCLUDES = \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_builddir)/app \
-I$(top_srcdir)/app \
$(GLIB_CFLAGS) \
-I$(includedir)
noinst_LIBRARIES = libappbase.a
libappbase_a_SOURCES = \
@@ -63,21 +74,8 @@ libappbase_a_SOURCES = \
tile-swap.c \
tile-swap.h
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gimp-Base\"
INCLUDES = \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_builddir)/app \
-I$(top_srcdir)/app \
$(GLIB_CFLAGS) \
-I$(includedir)
EXTRA_DIST = makefile.msc
#
# rules to generate built sources
#

View File

@@ -38,10 +38,10 @@
/* public functions */
GPid
gint
get_pid (void)
{
return getpid ();
return (gint) getpid ();
}
gint

View File

@@ -20,7 +20,7 @@
#define __BASE_H__
GPid get_pid (void);
gint get_pid (void);
gint get_number_of_processors (void);
guint64 get_physical_memory_size (void);

View File

@@ -85,53 +85,78 @@ color_balance_create_lookup_tables (ColorBalance *cb)
transfer_initialized = TRUE;
}
/* Set the transfer arrays (for speed) */
/* Prepare the transfer arrays (for speed) */
cyan_red_transfer[GIMP_SHADOWS] =
(cb->cyan_red[GIMP_SHADOWS] > 0) ? shadows_add : shadows_sub;
cyan_red_transfer[GIMP_MIDTONES] =
(cb->cyan_red[GIMP_MIDTONES] > 0) ? midtones_add : midtones_sub;
cyan_red_transfer[GIMP_HIGHLIGHTS] =
(cb->cyan_red[GIMP_HIGHLIGHTS] > 0) ? highlights_add : highlights_sub;
magenta_green_transfer[GIMP_SHADOWS] =
(cb->magenta_green[GIMP_SHADOWS] > 0) ? shadows_add : shadows_sub;
magenta_green_transfer[GIMP_MIDTONES] =
(cb->magenta_green[GIMP_MIDTONES] > 0) ? midtones_add : midtones_sub;
magenta_green_transfer[GIMP_HIGHLIGHTS] =
(cb->magenta_green[GIMP_HIGHLIGHTS] > 0) ? highlights_add : highlights_sub;
yellow_blue_transfer[GIMP_SHADOWS] =
(cb->yellow_blue[GIMP_SHADOWS] > 0) ? shadows_add : shadows_sub;
yellow_blue_transfer[GIMP_MIDTONES] =
(cb->yellow_blue[GIMP_MIDTONES] > 0) ? midtones_add : midtones_sub;
yellow_blue_transfer[GIMP_HIGHLIGHTS] =
(cb->yellow_blue[GIMP_HIGHLIGHTS] > 0) ? highlights_add : highlights_sub;
for (i = 0; i < 256; i++)
{
r_n = i;
g_n = i;
b_n = i;
r_n += cb->cyan_red[GIMP_SHADOWS] * cyan_red_transfer[GIMP_SHADOWS][r_n];
r_n = CLAMP0255 (r_n);
r_n += cb->cyan_red[GIMP_MIDTONES] * cyan_red_transfer[GIMP_MIDTONES][r_n];
r_n = CLAMP0255 (r_n);
r_n += cb->cyan_red[GIMP_HIGHLIGHTS] * cyan_red_transfer[GIMP_HIGHLIGHTS][r_n];
r_n += (cb->cyan_red[GIMP_SHADOWS] *
cyan_red_transfer[GIMP_SHADOWS][r_n]);
r_n = CLAMP0255 (r_n);
g_n += cb->magenta_green[GIMP_SHADOWS] * magenta_green_transfer[GIMP_SHADOWS][g_n];
g_n = CLAMP0255 (g_n);
g_n += cb->magenta_green[GIMP_MIDTONES] * magenta_green_transfer[GIMP_MIDTONES][g_n];
g_n = CLAMP0255 (g_n);
g_n += cb->magenta_green[GIMP_HIGHLIGHTS] * magenta_green_transfer[GIMP_HIGHLIGHTS][g_n];
r_n += (cb->cyan_red[GIMP_MIDTONES] *
cyan_red_transfer[GIMP_MIDTONES][r_n]);
r_n = CLAMP0255 (r_n);
r_n += (cb->cyan_red[GIMP_HIGHLIGHTS] *
cyan_red_transfer[GIMP_HIGHLIGHTS][r_n]);
r_n = CLAMP0255 (r_n);
g_n += (cb->magenta_green[GIMP_SHADOWS] *
magenta_green_transfer[GIMP_SHADOWS][g_n]);
g_n = CLAMP0255 (g_n);
b_n += cb->yellow_blue[GIMP_SHADOWS] * yellow_blue_transfer[GIMP_SHADOWS][b_n];
g_n += (cb->magenta_green[GIMP_MIDTONES] *
magenta_green_transfer[GIMP_MIDTONES][g_n]);
g_n = CLAMP0255 (g_n);
g_n += (cb->magenta_green[GIMP_HIGHLIGHTS] *
magenta_green_transfer[GIMP_HIGHLIGHTS][g_n]);
g_n = CLAMP0255 (g_n);
b_n += (cb->yellow_blue[GIMP_SHADOWS] *
yellow_blue_transfer[GIMP_SHADOWS][b_n]);
b_n = CLAMP0255 (b_n);
b_n += cb->yellow_blue[GIMP_MIDTONES] * yellow_blue_transfer[GIMP_MIDTONES][b_n];
b_n += (cb->yellow_blue[GIMP_MIDTONES] *
yellow_blue_transfer[GIMP_MIDTONES][b_n]);
b_n = CLAMP0255 (b_n);
b_n += cb->yellow_blue[GIMP_HIGHLIGHTS] * yellow_blue_transfer[GIMP_HIGHLIGHTS][b_n];
b_n += (cb->yellow_blue[GIMP_HIGHLIGHTS] *
yellow_blue_transfer[GIMP_HIGHLIGHTS][b_n]);
b_n = CLAMP0255 (b_n);
cb->r_lookup[i] = r_n;

View File

@@ -67,9 +67,13 @@ colorize_calculate (Colorize *colorize)
gimp_hsl_to_rgb (&hsl, &rgb);
colorize->final_red_lookup[i] = i * rgb.r;
colorize->final_green_lookup[i] = i * rgb.g;
colorize->final_blue_lookup[i] = i * rgb.b;
/* this used to read i * rgb.r,g,b in GIMP 2.4, but this produced
* darkened results, multiplying with 255 is correct and preserves
* the lightness unless modified with the slider.
*/
colorize->final_red_lookup[i] = 255.0 * rgb.r;
colorize->final_green_lookup[i] = 255.0 * rgb.g;
colorize->final_blue_lookup[i] = 255.0 * rgb.b;
}
}

View File

@@ -102,6 +102,39 @@ gimp_histogram_unref (GimpHistogram *histogram)
}
}
/**
* gimp_histogram_duplicate:
* @histogram: a %GimpHistogram
*
* Creates a duplicate of @histogram. The duplicate has a reference
* count of 1 and contains the values from @histogram.
*
* Return value: a newly allocated %GimpHistogram
**/
GimpHistogram *
gimp_histogram_duplicate (GimpHistogram *histogram)
{
GimpHistogram *dup;
g_return_val_if_fail (histogram != NULL, NULL);
dup = gimp_histogram_new ();
#ifdef ENABLE_MP
g_static_mutex_lock (&histogram->mutex);
#endif
dup->n_channels = histogram->n_channels;
dup->values[0] = g_memdup (histogram->values[0],
sizeof (gdouble) * dup->n_channels * 256);
#ifdef ENABLE_MP
g_static_mutex_unlock (&histogram->mutex);
#endif
return dup;
}
void
gimp_histogram_calculate (GimpHistogram *histogram,
PixelRegion *region,

View File

@@ -23,9 +23,12 @@
GimpHistogram * gimp_histogram_new (void);
GimpHistogram * gimp_histogram_ref (GimpHistogram *histogram);
void gimp_histogram_unref (GimpHistogram *histogram);
GimpHistogram * gimp_histogram_duplicate (GimpHistogram *histogram);
void gimp_histogram_calculate (GimpHistogram *histogram,
PixelRegion *region,
PixelRegion *mask);

View File

@@ -25,6 +25,7 @@ OBJECTS = \
colorize.obj \
cpercep.obj \
curves.obj \
desaturate.obj \
gimphistogram.obj \
gimplut.obj \
hue-saturation.obj \

View File

@@ -33,6 +33,8 @@
struct _PixelSurround
{
TileManager *mgr; /* tile manager to access tiles from */
gint xmax; /* largest x coordinate in tile manager */
gint ymax; /* largest y coordinate in tile manager */
gint bpp; /* bytes per pixel in tile manager */
gint w; /* width of pixel surround area */
gint h; /* height of pixel surround area */
@@ -44,106 +46,73 @@ struct _PixelSurround
gint rowstride; /* rowstride of buffers */
guchar *bg; /* buffer filled with background color */
guchar *buf; /* buffer used for combining tile data */
PixelSurroundMode mode;
};
static const guchar * pixel_surround_get_data (PixelSurround *surround,
gint x,
gint y,
gint *w,
gint *h,
gint *rowstride);
/* inlining this function gives a few percent speedup */
static inline const guchar *
pixel_surround_get_data (PixelSurround *surround,
gint x,
gint y,
gint *w,
gint *h,
gint *rowstride)
{
/* do we still have a tile lock that we can use? */
if (surround->tile)
{
if (x < surround->tile_x || x >= surround->tile_x + surround->tile_w ||
y < surround->tile_y || y >= surround->tile_y + surround->tile_h)
{
tile_release (surround->tile, FALSE);
surround->tile = NULL;
}
}
/* if not, try to get one for the target pixel */
if (! surround->tile)
{
surround->tile = tile_manager_get_tile (surround->mgr, x, y, TRUE, FALSE);
if (surround->tile)
{
/* store offset and size of the locked tile */
surround->tile_x = x & ~(TILE_WIDTH - 1);
surround->tile_y = y & ~(TILE_HEIGHT - 1);
surround->tile_w = tile_ewidth (surround->tile);
surround->tile_h = tile_eheight (surround->tile);
}
}
if (surround->tile)
{
*w = surround->tile_x + surround->tile_w - x;
*h = surround->tile_y + surround->tile_h - y;
*rowstride = surround->tile_w * surround->bpp;
return tile_data_pointer (surround->tile,
x % TILE_WIDTH, y % TILE_HEIGHT);
}
else
{
/* return a pointer to a virtual background tile */
if (x < 0)
*w = MIN (- x, surround->w);
else
*w = surround->w;
if (y < 0)
*h = MIN (- y, surround->h);
else
*h = surround->h;
*rowstride = surround->rowstride;
return surround->bg;
}
}
/**
* pixel_surround_new:
* @tiles: tile manager
* @width: width of surround region
* @height: height of surround region
* @bg: color to use for pixels that are not covered by the tile manager
* @mode: how to deal with pixels that are not covered by the tile manager
*
* PixelSurround provides you a contiguous read-only view of the area
* surrounding a pixel. It is an efficient pixel access strategy for
* interpolation algorithms.
*
* Return value: a new #PixelSurround.
*/
PixelSurround *
pixel_surround_new (TileManager *tiles,
gint width,
gint height,
const guchar bg[MAX_CHANNELS])
pixel_surround_new (TileManager *tiles,
gint width,
gint height,
PixelSurroundMode mode)
{
PixelSurround *surround;
guchar *dest;
gint pixels;
g_return_val_if_fail (tiles != NULL, NULL);
g_return_val_if_fail (width < TILE_WIDTH, NULL);
g_return_val_if_fail (height < TILE_WIDTH, NULL);
surround = g_slice_new0 (PixelSurround);
surround->mgr = tiles;
surround->xmax = tile_manager_width (surround->mgr) - 1;
surround->ymax = tile_manager_height (surround->mgr) - 1;
surround->bpp = tile_manager_bpp (tiles);
surround->w = width;
surround->h = height;
surround->rowstride = width * surround->bpp;
surround->bg = g_new (guchar, surround->rowstride * height);
surround->bg = g_new0 (guchar, surround->rowstride * height);
surround->buf = g_new (guchar, surround->rowstride * height);
surround->mode = mode;
dest = surround->bg;
pixels = width * height;
return surround;
}
/**
* pixel_surround_set_bg:
* @surround: a #PixelSurround
* @bg: background color
*
* This sets the color that the #PixelSurround uses when in
* %PIXEL_SURROUND_BACKGROUND mode for pixels that are not covered by
* the tile manager.
*/
void
pixel_surround_set_bg (PixelSurround *surround,
const guchar *bg)
{
guchar *dest = surround->bg;
gint pixels = surround->w * surround->h;
while (pixels--)
{
@@ -152,8 +121,6 @@ pixel_surround_new (TileManager *tiles,
for (i = 0; i < surround->bpp; i++)
*dest++ = bg[i];
}
return surround;
}
/**
@@ -281,3 +248,173 @@ pixel_surround_destroy (PixelSurround *surround)
g_slice_free (PixelSurround, surround);
}
enum
{
LEFT = 1 << 0,
RIGHT = 1 << 1,
TOP = 1 << 2,
BOTTOM = 1 << 3
};
static void
pixel_surround_fill_row (PixelSurround *surround,
const guchar *src,
gint w)
{
guchar *dest = surround->bg;
gint bytes = MIN (w, surround->w) * surround->bpp;
gint rows = surround->h;
while (rows--)
{
memcpy (dest, src, bytes);
dest += surround->rowstride;
}
}
static void
pixel_surround_fill_col (PixelSurround *surround,
const guchar *src,
gint rowstride,
gint h)
{
guchar *dest = surround->bg;
gint cols = surround->w;
gint rows = MIN (h, surround->h);
while (cols--)
{
const guchar *s = src;
guchar *d = dest;
gint r = rows;
while (r--)
{
memcpy (d, s, surround->bpp);
s += rowstride;
d += surround->rowstride;
}
dest += surround->bpp;
}
}
static const guchar *
pixel_surround_get_data (PixelSurround *surround,
gint x,
gint y,
gint *w,
gint *h,
gint *rowstride)
{
/* do we still have a tile lock that we can use? */
if (surround->tile)
{
if (x < surround->tile_x || x >= surround->tile_x + surround->tile_w ||
y < surround->tile_y || y >= surround->tile_y + surround->tile_h)
{
tile_release (surround->tile, FALSE);
surround->tile = NULL;
}
}
/* if not, try to get one for the target pixel */
if (! surround->tile)
{
surround->tile = tile_manager_get_tile (surround->mgr, x, y, TRUE, FALSE);
if (surround->tile)
{
/* store offset and size of the locked tile */
surround->tile_x = x & ~(TILE_WIDTH - 1);
surround->tile_y = y & ~(TILE_HEIGHT - 1);
surround->tile_w = tile_ewidth (surround->tile);
surround->tile_h = tile_eheight (surround->tile);
}
}
if (surround->tile)
{
*w = surround->tile_x + surround->tile_w - x;
*h = surround->tile_y + surround->tile_h - y;
*rowstride = surround->tile_w * surround->bpp;
return tile_data_pointer (surround->tile, x, y);
}
if (surround->mode == PIXEL_SURROUND_SMEAR)
{
const guchar *edata;
gint ex = x;
gint ey = y;
gint ew, eh;
gint estride;
gint ecode = 0;
if (ex < 0)
{
ex = 0;
ecode |= LEFT;
}
else if (ex > surround->xmax)
{
ex = surround->xmax;
ecode |= RIGHT;
}
if (ey < 0)
{
ey = 0;
ecode |= TOP;
}
else if (ey > surround->ymax)
{
ey = surround->ymax;
ecode |= BOTTOM;
}
/* call ourselves with corrected coordinates */
edata = pixel_surround_get_data (surround, ex, ey, &ew, &eh, &estride);
/* fill the virtual background tile */
switch (ecode)
{
case (TOP | LEFT):
case (TOP | RIGHT):
case (BOTTOM | LEFT):
case (BOTTOM | RIGHT):
pixel_surround_set_bg (surround, edata);
break;
case (TOP):
case (BOTTOM):
pixel_surround_fill_row (surround, edata, ew);
break;
case (LEFT):
case (RIGHT):
pixel_surround_fill_col (surround, edata, estride, eh);
break;
}
}
/* return a pointer to the virtual background tile */
if (x < 0)
*w = MIN (- x, surround->w);
else
*w = surround->w;
if (y < 0)
*h = MIN (- y, surround->h);
else
*h = surround->h;
*rowstride = surround->rowstride;
return surround->bg;
}

View File

@@ -24,24 +24,31 @@
* region around a pixel in a tile manager
*/
typedef enum
{
PIXEL_SURROUND_SMEAR,
PIXEL_SURROUND_BACKGROUND
} PixelSurroundMode;
PixelSurround * pixel_surround_new (TileManager *tiles,
gint width,
gint height,
const guchar bg[MAX_CHANNELS]);
PixelSurround * pixel_surround_new (TileManager *tiles,
gint width,
gint height,
PixelSurroundMode mode);
void pixel_surround_set_bg (PixelSurround *surround,
const guchar *bg);
/* return a pointer to a buffer which contains all the surrounding pixels
* strategy: if we are in the middle of a tile, use the tile storage
* otherwise just copy into our own malloced buffer and return that
*/
const guchar * pixel_surround_lock (PixelSurround *surround,
gint x,
gint y,
gint *rowstride);
const guchar * pixel_surround_lock (PixelSurround *surround,
gint x,
gint y,
gint *rowstride);
void pixel_surround_release (PixelSurround *surround);
void pixel_surround_destroy (PixelSurround *surround);
void pixel_surround_release (PixelSurround *surround);
void pixel_surround_destroy (PixelSurround *surround);
#endif /* __PIXEL_SURROUND_H__ */

View File

@@ -38,34 +38,32 @@ static void tile_cache_flush_internal (Tile *tile);
static gboolean tile_idle_preswap (gpointer data);
static gboolean initialize = TRUE;
typedef struct _TileList
{
Tile *first;
Tile *last;
} TileList;
static const gulong max_tile_size = TILE_WIDTH * TILE_HEIGHT * 4;
static gulong cur_cache_size = 0;
static gulong max_cache_size = 0;
static gulong cur_cache_dirty = 0;
static TileList clean_list = { NULL, NULL };
static TileList dirty_list = { NULL, NULL };
static guint idle_swapper = 0;
static const gulong max_tile_size = TILE_WIDTH * TILE_HEIGHT * 4;
static gulong cur_cache_size = 0;
static gulong max_cache_size = 0;
static gulong cur_cache_dirty = 0;
static TileList clean_list = { NULL, NULL };
static TileList dirty_list = { NULL, NULL };
static guint idle_swapper = 0;
#ifdef ENABLE_MP
static GStaticMutex tile_cache_mutex = G_STATIC_MUTEX_INIT;
static GMutex *tile_cache_mutex = NULL;
#define CACHE_LOCK g_static_mutex_lock (&tile_cache_mutex)
#define CACHE_UNLOCK g_static_mutex_unlock (&tile_cache_mutex)
#define TILE_CACHE_LOCK g_mutex_lock (tile_cache_mutex)
#define TILE_CACHE_UNLOCK g_mutex_unlock (tile_cache_mutex)
#else
#define CACHE_LOCK /* nothing */
#define CACHE_UNLOCK /* nothing */
#define TILE_CACHE_LOCK /* nothing */
#define TILE_CACHE_UNLOCK /* nothing */
#endif
@@ -73,15 +71,16 @@ static GStaticMutex tile_cache_mutex = G_STATIC_MUTEX_INIT;
void
tile_cache_init (gulong tile_cache_size)
{
if (initialize)
{
initialize = FALSE;
#ifdef ENABLE_MP
g_return_if_fail (tile_cache_mutex == NULL);
clean_list.first = clean_list.last = NULL;
dirty_list.first = dirty_list.last = NULL;
tile_cache_mutex = g_mutex_new ();
#endif
max_cache_size = tile_cache_size;
}
clean_list.first = clean_list.last = NULL;
dirty_list.first = dirty_list.last = NULL;
max_cache_size = tile_cache_size;
}
void
@@ -97,6 +96,11 @@ tile_cache_exit (void)
g_warning ("tile cache not empty (%ld bytes left)", cur_cache_size);
tile_cache_set_size (0);
#ifdef ENABLE_MP
g_mutex_free (tile_cache_mutex);
tile_cache_mutex = NULL;
#endif
}
void
@@ -105,7 +109,7 @@ tile_cache_insert (Tile *tile)
TileList *list;
TileList *newlist;
CACHE_LOCK;
TILE_CACHE_LOCK;
if (! tile->data)
goto out;
@@ -191,23 +195,23 @@ tile_cache_insert (Tile *tile)
}
out:
CACHE_UNLOCK;
TILE_CACHE_UNLOCK;
}
void
tile_cache_flush (Tile *tile)
{
CACHE_LOCK;
TILE_CACHE_LOCK;
tile_cache_flush_internal (tile);
CACHE_UNLOCK;
TILE_CACHE_UNLOCK;
}
void
tile_cache_set_size (gulong cache_size)
{
CACHE_LOCK;
TILE_CACHE_LOCK;
max_cache_size = cache_size;
@@ -217,7 +221,7 @@ tile_cache_set_size (gulong cache_size)
break;
}
CACHE_UNLOCK;
TILE_CACHE_UNLOCK;
}
static void
@@ -291,7 +295,7 @@ tile_idle_preswap (gpointer data)
return FALSE;
}
CACHE_LOCK;
TILE_CACHE_LOCK;
if ((tile = dirty_list.first))
{
@@ -317,7 +321,7 @@ tile_idle_preswap (gpointer data)
cur_cache_dirty -= tile->size;
}
CACHE_UNLOCK;
TILE_CACHE_UNLOCK;
return TRUE;
}

View File

@@ -35,14 +35,13 @@ TileManager *
tile_manager_crop (TileManager *tiles,
gint border)
{
PixelRegion PR;
TileManager *new_tiles;
gint bytes, alpha;
gint x1, y1, x2, y2;
gboolean found;
gboolean empty;
gpointer pr;
const guchar black[MAX_CHANNELS] = { 0, 0, 0, 0 };
PixelRegion region;
TileManager *new_tiles;
gint bytes, alpha;
gint x1, y1, x2, y2;
gboolean found;
gboolean empty;
gpointer pr;
g_return_val_if_fail (tiles != NULL, NULL);
@@ -55,22 +54,22 @@ tile_manager_crop (TileManager *tiles,
x2 = 0;
y2 = 0;
pixel_region_init (&PR, tiles, 0, 0, x1, y1, FALSE);
pixel_region_init (&region, tiles, 0, 0, x1, y1, FALSE);
for (pr = pixel_regions_register (1, &PR);
for (pr = pixel_regions_register (1, &region);
pr != NULL;
pr = pixel_regions_process (pr))
{
const guchar *data = PR.data + alpha;
gint ex = PR.x + PR.w;
gint ey = PR.y + PR.h;
const guchar *data = region.data + alpha;
gint ex = region.x + region.w;
gint ey = region.y + region.h;
gint x, y;
for (y = PR.y; y < ey; y++)
for (y = region.y; y < ey; y++)
{
found = FALSE;
for (x = PR.x; x < ex; x++, data += bytes)
for (x = region.x; x < ex; x++, data += bytes)
if (*data)
{
if (x < x1)
@@ -129,22 +128,22 @@ tile_manager_crop (TileManager *tiles,
pixel_region_init (&destPR, new_tiles,
0, 0, new_width, border,
TRUE);
color_region (&destPR, black);
clear_region (&destPR);
pixel_region_init (&destPR, new_tiles,
0, border, border, (y2 - y1),
TRUE);
color_region (&destPR, black);
clear_region (&destPR);
pixel_region_init (&destPR, new_tiles,
new_width - border, border, border, (y2 - y1),
TRUE);
color_region (&destPR, black);
clear_region (&destPR);
pixel_region_init (&destPR, new_tiles,
0, new_height - border, new_width, border,
TRUE);
color_region (&destPR, black);
clear_region (&destPR);
}
pixel_region_init (&srcPR, tiles,

View File

@@ -33,6 +33,9 @@
#include "tile-private.h"
static void tile_manager_allocate_tiles (TileManager *tm);
GType
gimp_tile_manager_get_type (void)
{
@@ -151,13 +154,8 @@ tile_manager_get (TileManager *tm,
gboolean wantread,
gboolean wantwrite)
{
Tile **tiles;
Tile **tile_ptr;
gint ntiles;
gint nrows, ncols;
gint right_tile;
gint bottom_tile;
gint i, j, k;
Tile *tile;
gint ntiles;
g_return_val_if_fail (tm != NULL, NULL);
@@ -167,46 +165,16 @@ tile_manager_get (TileManager *tm,
return NULL;
if (! tm->tiles)
{
tm->tiles = g_new (Tile *, ntiles);
tiles = tm->tiles;
tile_manager_allocate_tiles (tm);
nrows = tm->ntile_rows;
ncols = tm->ntile_cols;
right_tile = tm->width - ((ncols - 1) * TILE_WIDTH);
bottom_tile = tm->height - ((nrows - 1) * TILE_HEIGHT);
for (i = 0, k = 0; i < nrows; i++)
{
for (j = 0; j < ncols; j++, k++)
{
Tile *new = tile_new (tm->bpp);
tile_attach (new, tm, k);
if (j == (ncols - 1))
new->ewidth = right_tile;
if (i == (nrows - 1))
new->eheight = bottom_tile;
new->size = new->ewidth * new->eheight * new->bpp;
tiles[k] = new;
}
}
}
tile_ptr = &tm->tiles[tile_num];
tile = tm->tiles[tile_num];
if (G_UNLIKELY (wantwrite && ! wantread))
g_warning ("WRITE-ONLY TILE... UNTESTED!");
#ifdef DEBUG_TILE_MANAGER
if (G_UNLIKELY ((*tile_ptr)->share_count && (*tile_ptr)->write_count))
g_printerr (">> MEEPITY %d,%d <<\n",
(*tile_ptr)->share_count, (*tile_ptr)->write_count);
if (G_UNLIKELY (tile->share_count && tile->write_count))
g_printerr (">> MEEPITY %d,%d <<\n", tile->share_count, tile->write_count);
#endif
if (wantread)
@@ -221,59 +189,59 @@ tile_manager_get (TileManager *tm,
tm->cached_num = -1;
}
if ((*tile_ptr)->share_count > 1)
if (tile->share_count > 1)
{
/* Copy-on-write required */
Tile *new = tile_new ((*tile_ptr)->bpp);
Tile *new = tile_new (tile->bpp);
new->ewidth = (*tile_ptr)->ewidth;
new->eheight = (*tile_ptr)->eheight;
new->valid = (*tile_ptr)->valid;
new->ewidth = tile->ewidth;
new->eheight = tile->eheight;
new->valid = tile->valid;
new->size = new->ewidth * new->eheight * new->bpp;
new->data = g_new (guchar, new->size);
if ((*tile_ptr)->rowhint)
if (tile->rowhint)
{
tile_allocate_rowhints (new);
memcpy (new->rowhint, (*tile_ptr)->rowhint,
memcpy (new->rowhint, tile->rowhint,
new->eheight * sizeof (TileRowHint));
}
if ((*tile_ptr)->data)
if (tile->data)
{
memcpy (new->data, (*tile_ptr)->data, new->size);
memcpy (new->data, tile->data, new->size);
}
else
{
tile_lock (*tile_ptr);
memcpy (new->data, (*tile_ptr)->data, new->size);
tile_release (*tile_ptr, FALSE);
tile_lock (tile);
memcpy (new->data, tile->data, new->size);
tile_release (tile, FALSE);
}
tile_detach (*tile_ptr, tm, tile_num);
tile_detach (tile, tm, tile_num);
tile_attach (new, tm, tile_num);
*tile_ptr = new;
tile = new;
tm->tiles[tile_num] = tile;
}
(*tile_ptr)->write_count++;
(*tile_ptr)->dirty = TRUE;
tile->write_count++;
tile->dirty = TRUE;
}
#ifdef DEBUG_TILE_MANAGER
else
{
if (G_UNLIKELY ((*tile_ptr)->write_count))
g_printerr ("STINK! r/o on r/w tile (%d)\n",
(*tile_ptr)->write_count);
if (G_UNLIKELY (tile->write_count))
g_printerr ("STINK! r/o on r/w tile (%d)\n", tile->write_count);
}
#endif
tile_lock (*tile_ptr);
tile_lock (tile);
}
return *tile_ptr;
return tile;
}
Tile *
@@ -318,6 +286,43 @@ tile_manager_validate_tile (TileManager *tm,
#endif
}
static void
tile_manager_allocate_tiles (TileManager *tm)
{
Tile **tiles;
const gint nrows = tm->ntile_rows;
const gint ncols = tm->ntile_cols;
const gint right_tile = tm->width - ((ncols - 1) * TILE_WIDTH);
const gint bottom_tile = tm->height - ((nrows - 1) * TILE_HEIGHT);
gint i, j, k;
g_assert (tm->tiles == NULL);
tiles = g_new (Tile *, nrows * ncols);
for (i = 0, k = 0; i < nrows; i++)
{
for (j = 0; j < ncols; j++, k++)
{
Tile *new = tile_new (tm->bpp);
tile_attach (new, tm, k);
if (j == (ncols - 1))
new->ewidth = right_tile;
if (i == (nrows - 1))
new->eheight = bottom_tile;
new->size = new->ewidth * new->eheight * new->bpp;
tiles[k] = new;
}
}
tm->tiles = tiles;
}
static void
tile_manager_invalidate_tile (TileManager *tm,
gint tile_num)
@@ -335,25 +340,24 @@ tile_manager_invalidate_tile (TileManager *tm,
tm->cached_num = -1;
}
if (tile->listhead)
tile_cache_flush (tile);
if (G_UNLIKELY (tile->share_count > 1))
{
/* This tile is shared. Replace it with a new, invalid tile. */
/* This tile is shared. Replace it with a new invalid tile. */
Tile *new = tile_new (tile->bpp);
g_print ("invalidating shared tile (executing buggy code!!!)\n");
new->ewidth = tile->ewidth;
new->eheight = tile->eheight;
new->size = tile->size;
tile_detach (tile, tm, tile_num);
tile_attach (new, tm, tile_num);
tile = new;
}
if (tile->listhead)
tile_cache_flush (tile);
tile = new;
tm->tiles[tile_num] = tile;
}
tile->valid = FALSE;
@@ -391,20 +395,12 @@ tile_manager_map_tile (TileManager *tm,
gint ypixel,
Tile *srctile)
{
gint num;
g_return_if_fail (tm != NULL);
g_return_if_fail (srctile != NULL);
num = tile_manager_get_tile_num (tm, xpixel, ypixel);
if (G_UNLIKELY (num < 0))
{
g_warning ("%s: tile coordinates out of range.", G_STRLOC);
return;
}
tile_manager_map (tm, num, srctile);
tile_manager_map (tm,
tile_manager_get_tile_num (tm, xpixel, ypixel),
srctile);
}
void
@@ -412,63 +408,21 @@ tile_manager_map (TileManager *tm,
gint tile_num,
Tile *srctile)
{
Tile **tiles;
Tile **tile_ptr;
gint ntiles;
gint nrows, ncols;
gint right_tile;
gint bottom_tile;
gint i, j, k;
Tile *tile;
g_return_if_fail (tm != NULL);
g_return_if_fail (srctile != NULL);
ntiles = tm->ntile_rows * tm->ntile_cols;
if (G_UNLIKELY ((tile_num < 0) || (tile_num >= ntiles)))
{
g_warning ("%s: tile out of range", G_STRLOC);
return;
}
g_return_if_fail (tile_num >= 0);
g_return_if_fail (tile_num < tm->ntile_rows * tm->ntile_cols);
if (G_UNLIKELY (! tm->tiles))
{
g_warning ("%s: empty tile level - initializing", G_STRLOC);
tm->tiles = g_new (Tile *, ntiles);
tiles = tm->tiles;
nrows = tm->ntile_rows;
ncols = tm->ntile_cols;
right_tile = tm->width - ((ncols - 1) * TILE_WIDTH);
bottom_tile = tm->height - ((nrows - 1) * TILE_HEIGHT);
for (i = 0, k = 0; i < nrows; i++)
{
for (j = 0; j < ncols; j++, k++)
{
Tile *new = tile_new (tm->bpp);
#ifdef DEBUG_TILE_MANAGER
g_printerr (",");
#endif
tile_attach (new, tm, k);
if (j == (ncols - 1))
new->ewidth = right_tile;
if (i == (nrows - 1))
new->eheight = bottom_tile;
new->size = new->ewidth * new->eheight * new->bpp;
tiles[k] = new;
}
}
tile_manager_allocate_tiles (tm);
}
tile_ptr = &tm->tiles[tile_num];
tile = tm->tiles[tile_num];
#ifdef DEBUG_TILE_MANAGER
g_printerr (")");
@@ -477,15 +431,15 @@ tile_manager_map (TileManager *tm,
if (G_UNLIKELY (! srctile->valid))
g_warning("%s: srctile not validated yet! please report", G_STRLOC);
if (G_UNLIKELY ((*tile_ptr)->ewidth != srctile->ewidth ||
(*tile_ptr)->eheight != srctile->eheight ||
(*tile_ptr)->bpp != srctile->bpp))
if (G_UNLIKELY (tile->ewidth != srctile->ewidth ||
tile->eheight != srctile->eheight ||
tile->bpp != srctile->bpp))
{
g_warning ("%s: nonconformant map (%p -> %p)",
G_STRLOC, srctile, *tile_ptr);
G_STRLOC, srctile, tile);
}
tile_detach (*tile_ptr, tm, tile_num);
tile_detach (tile, tm, tile_num);
#ifdef DEBUG_TILE_MANAGER
g_printerr (">");
@@ -496,7 +450,8 @@ tile_manager_map (TileManager *tm,
#endif
tile_attach (srctile, tm, tile_num);
*tile_ptr = srctile;
tm->tiles[tile_num] = srctile;
#ifdef DEBUG_TILE_MANAGER
g_printerr ("}\n");
@@ -626,17 +581,12 @@ tile_manager_get_memsize (const TileManager *tm,
return memsize;
}
void
tile_manager_get_tile_coordinates (TileManager *tm,
Tile *tile,
gint *x,
gint *y)
static inline gint
tile_manager_locate_tile (TileManager *tm,
Tile *tile)
{
TileLink *tl;
g_return_if_fail (tm != NULL);
g_return_if_fail (x != NULL && y != NULL);
for (tl = tile->tlink; tl; tl = tl->next)
{
if (tl->tm == tm)
@@ -646,11 +596,10 @@ tile_manager_get_tile_coordinates (TileManager *tm,
if (G_UNLIKELY (tl == NULL))
{
g_warning ("%s: tile not attached to manager", G_STRLOC);
return;
return 0;
}
*x = TILE_WIDTH * (tl->tile_num % tm->ntile_cols);
*y = TILE_HEIGHT * (tl->tile_num / tm->ntile_cols);
return tl->tile_num;
}
void
@@ -659,15 +608,35 @@ tile_manager_get_tile_col_row (TileManager *tm,
gint *tile_col,
gint *tile_row)
{
gint tile_x;
gint tile_y;
gint tile_num;
g_return_if_fail (tm && tile && tile_col && tile_row);
g_return_if_fail (tm != NULL);
g_return_if_fail (tile != NULL);
g_return_if_fail (tile_col != NULL && tile_row != NULL);
tile_manager_get_tile_coordinates (tm, tile, &tile_x, &tile_y);
tile_num = tile_manager_locate_tile (tm, tile);
*tile_col = tile_x / TILE_WIDTH;
*tile_row = tile_y / TILE_HEIGHT;
*tile_col = tile_num % tm->ntile_cols;
*tile_row = tile_num / tm->ntile_cols;
}
void
tile_manager_get_tile_coordinates (TileManager *tm,
Tile *tile,
gint *x,
gint *y)
{
gint tile_col;
gint tile_row;
g_return_if_fail (tm != NULL);
g_return_if_fail (tile != NULL);
g_return_if_fail (x != NULL && y != NULL);
tile_manager_get_tile_col_row (tm, tile, &tile_col, &tile_row);
*x = TILE_WIDTH * tile_col;
*y = TILE_HEIGHT * tile_row;
}
void
@@ -710,21 +679,21 @@ read_pixel_data (TileManager *tm,
for (y = y1; y <= y2; y += TILE_HEIGHT - (y % TILE_HEIGHT))
for (x = x1; x <= x2; x += TILE_WIDTH - (x % TILE_WIDTH))
{
Tile *t = tile_manager_get_tile (tm, x, y, TRUE, FALSE);
const guchar *s = tile_data_pointer (t, x, y);
guchar *d = buffer + stride * (y - y1) + tm->bpp * (x - x1);
Tile *tile = tile_manager_get_tile (tm, x, y, TRUE, FALSE);
const guchar *s = TILE_DATA_POINTER (tile, x, y);
guchar *d = buffer + stride * (y - y1) + tm->bpp * (x - x1);
guint rows, cols;
guint srcstride;
rows = tile_eheight (t) - y % TILE_HEIGHT;
rows = tile->eheight - y % TILE_HEIGHT;
if (rows > (y2 - y + 1))
rows = y2 - y + 1;
cols = tile_ewidth (t) - x % TILE_WIDTH;
cols = tile->ewidth - x % TILE_WIDTH;
if (cols > (x2 - x + 1))
cols = x2 - x + 1;
srcstride = tile_ewidth (t) * tile_bpp (t);
srcstride = tile->ewidth * tile->bpp;
while (rows--)
{
@@ -734,7 +703,7 @@ read_pixel_data (TileManager *tm,
d += stride;
}
tile_release (t, FALSE);
tile_release (tile, FALSE);
}
}
@@ -752,21 +721,21 @@ write_pixel_data (TileManager *tm,
for (y = y1; y <= y2; y += TILE_HEIGHT - (y % TILE_HEIGHT))
for (x = x1; x <= x2; x += TILE_WIDTH - (x % TILE_WIDTH))
{
Tile *t = tile_manager_get_tile (tm, x, y, TRUE, TRUE);
const guchar *s = buffer + stride * (y - y1) + tm->bpp * (x - x1);
guchar *d = tile_data_pointer (t, x, y);
Tile *tile = tile_manager_get_tile (tm, x, y, TRUE, TRUE);
const guchar *s = buffer + stride * (y - y1) + tm->bpp * (x - x1);
guchar *d = TILE_DATA_POINTER (tile, x, y);
guint rows, cols;
guint dststride;
rows = tile_eheight (t) - y % TILE_HEIGHT;
rows = tile->eheight - y % TILE_HEIGHT;
if (rows > (y2 - y + 1))
rows = y2 - y + 1;
cols = tile_ewidth (t) - x % TILE_WIDTH;
cols = tile->ewidth - x % TILE_WIDTH;
if (cols > (x2 - x + 1))
cols = x2 - x + 1;
dststride = tile_ewidth (t) * tile_bpp (t);
dststride = tile->ewidth * tile->bpp;
while (rows--)
{
@@ -776,7 +745,7 @@ write_pixel_data (TileManager *tm,
d += dststride;
}
tile_release (t, TRUE);
tile_release (tile, TRUE);
}
}
@@ -786,50 +755,49 @@ read_pixel_data_1 (TileManager *tm,
gint y,
guchar *buffer)
{
if (x >= 0 && y >= 0 && x < tm->width && y < tm->height)
const gint num = tile_manager_get_tile_num (tm, x, y);
if (num < 0)
return;
if (num != tm->cached_num) /* must fetch a new tile */
{
gint num = tile_manager_get_tile_num (tm, x, y);
if (num != tm->cached_num) /* must fetch a new tile */
{
Tile *tile;
if (tm->cached_tile)
tile_release (tm->cached_tile, FALSE);
tm->cached_num = -1;
tm->cached_tile = NULL;
/* use a temporary variable instead of assigning to
* tm->cached_tile directly to make sure tm->cached_num
* and tm->cached_tile are always in a consistent state.
* (the requested tile might be invalid and needs to be
* validated, which would call tile_manager_get() recursively,
* which in turn would clear the cached tile) See bug #472770.
*/
tile = tile_manager_get (tm, num, TRUE, FALSE);
tm->cached_num = num;
tm->cached_tile = tile;
}
Tile *tile;
if (tm->cached_tile)
{
const guchar *src = tile_data_pointer (tm->cached_tile, x, y);
tile_release (tm->cached_tile, FALSE);
switch (tm->bpp)
{
case 4:
*buffer++ = *src++;
case 3:
*buffer++ = *src++;
case 2:
*buffer++ = *src++;
case 1:
*buffer++ = *src++;
}
}
tm->cached_num = -1;
tm->cached_tile = NULL;
/* use a temporary variable instead of assigning to
* tm->cached_tile directly to make sure tm->cached_num
* and tm->cached_tile are always in a consistent state.
* (the requested tile might be invalid and needs to be
* validated, which would call tile_manager_get() recursively,
* which in turn would clear the cached tile) See bug #472770.
*/
tile = tile_manager_get (tm, num, TRUE, FALSE);
tm->cached_num = num;
tm->cached_tile = tile;
}
{
const guchar *src = TILE_DATA_POINTER (tm->cached_tile, x, y);
switch (tm->bpp)
{
case 4:
*buffer++ = *src++;
case 3:
*buffer++ = *src++;
case 2:
*buffer++ = *src++;
case 1:
*buffer++ = *src++;
}
}
}
void
@@ -839,7 +807,7 @@ write_pixel_data_1 (TileManager *tm,
const guchar *buffer)
{
Tile *tile = tile_manager_get_tile (tm, x, y, TRUE, TRUE);
guchar *dest = tile_data_pointer (tile, x, y);
guchar *dest = TILE_DATA_POINTER (tile, x, y);
switch (tm->bpp)
{

View File

@@ -26,15 +26,7 @@
GType gimp_tile_manager_get_type (void) G_GNUC_CONST;
/* Creates a new tile manager with the specified width for the
* toplevel. The toplevel size is used to compute the number of
* levels and their size. Each level is 1/2 the width and height of
* the level above it.
*
* The toplevel is level 0. The smallest level in the hierarchy
* is "nlevels - 1". That level will be smaller than TILE_WIDTH x
* TILE_HEIGHT
*/
/* Creates a new tile manager with the specified size */
TileManager * tile_manager_new (gint width,
gint height,
gint bpp);

View File

@@ -71,10 +71,17 @@ struct _Tile
TileLink *tlink;
Tile *next;
Tile *prev; /* List pointers for the tile cache lists */
Tile *next; /* List pointers for the tile cache lists */
Tile *prev;
gpointer listhead; /* Pointer to the head of the list this tile is on */
};
/* tile_data_pointer() as a macro so that it can be inlined */
#define TILE_DATA_POINTER(tile,x,y) \
((tile)->data + \
(((y) % TILE_HEIGHT) * (tile)->ewidth + ((x) % TILE_WIDTH)) * (tile)->bpp)
#endif /* __TILE_PRIVATE_H__ */

View File

@@ -315,7 +315,7 @@ tile_pyramid_get_bpp (const TilePyramid *pyramid)
/**
* tile_pyramid_get_memsize:
* @pyramid: a #TilePyramid
* @pyramid: a #TilePyramid
*
* Return value: size of memory allocated for the @pyramid
**/
@@ -333,7 +333,6 @@ tile_pyramid_get_memsize (const TilePyramid *pyramid)
return memsize;
}
/* private functions */
/* This function make sure that levels are allocated up to the level
* it returns. The return value may be smaller than the level that
@@ -382,9 +381,9 @@ tile_pyramid_alloc_levels (TilePyramid *pyramid,
return pyramid->top_level;
}
/* This method is used to validate a pyramid tile from the base level.
* It needs to pre-multiply the alpha channel because upper levels are
* pre-multiplied.
/* This method is used to validate a pyramid tile from four tiles on
* the base level. It needs to pre-multiply the alpha channel because
* upper levels are pre-multiplied.
*/
static void
tile_pyramid_validate_tile (TileManager *tm,
@@ -441,9 +440,9 @@ tile_pyramid_validate_upper_tile (TileManager *tm,
}
}
/* Average the src tile to one quarter of the destination tile.
* The source tile doesn't have pre-multiplied alpha, but the
* destination tile does.
/* Average the src tile to one quarter of the destination tile. The
* source tile doesn't have pre-multiplied alpha, but the destination
* tile does.
*/
static void
tile_pyramid_write_quarter (Tile *dest,

View File

@@ -20,6 +20,15 @@
#define __TILE_PYRAMID_H__
/* Creates a new tile pyramid with the specified size for the
* toplevel. The toplevel size is used to compute the number of
* levels and their size. Each level is 1/2 the width and height of
* the level above it.
*
* The toplevel is level 0. The smallest level in the hierarchy
* is "nlevels - 1". That level will be smaller than TILE_WIDTH x
* TILE_HEIGHT
*/
TilePyramid * tile_pyramid_new (GimpImageType type,
gint width,
gint height);

View File

@@ -53,7 +53,7 @@ static gint tile_exist_count = 0;
#endif
static void tile_destroy (Tile *tile);
static void tile_destroy (Tile *tile);
Tile *
@@ -257,7 +257,7 @@ tile_attach (Tile *tile,
void *tm,
gint tile_num)
{
TileLink *tmp;
TileLink *new;
if ((tile->share_count > 0) && (! tile->valid))
{
@@ -277,13 +277,13 @@ tile_attach (Tile *tile,
#endif
/* link this tile into the tile's tilelink chain */
tmp = g_slice_new (TileLink);
new = g_slice_new (TileLink);
tmp->tm = tm;
tmp->tile_num = tile_num;
tmp->next = tile->tlink;
new->tm = tm;
new->tile_num = tile_num;
new->next = tile->tlink;
tile->tlink = tmp;
tile->tlink = new;
}
void
@@ -333,9 +333,7 @@ tile_data_pointer (Tile *tile,
gint xoff,
gint yoff)
{
gsize offset = (yoff % TILE_HEIGHT) * tile->ewidth + (xoff % TILE_WIDTH);
return (gpointer) (tile->data + offset * tile->bpp);
return TILE_DATA_POINTER (tile, xoff, yoff);
}
gint

View File

@@ -13,7 +13,7 @@
#include "gimp-composite-generic.h"
#include "gimp-composite-3dnow.h"
int
static int
gimp_composite_3dnow_test (int iterations, int n_pixels)
{
#if defined(COMPILE_3DNOW_IS_OKAY)

View File

@@ -13,7 +13,7 @@
#include "gimp-composite-generic.h"
#include "gimp-composite-altivec.h"
int
static int
gimp_composite_altivec_test (int iterations, int n_pixels)
{
#if defined(COMPILE_ALTIVEC_IS_OKAY)

View File

@@ -13,7 +13,7 @@
#include "gimp-composite-generic.h"
#include "gimp-composite-mmx.h"
int
static int
gimp_composite_mmx_test (int iterations, int n_pixels)
{
#if defined(COMPILE_MMX_IS_OKAY)

View File

@@ -13,7 +13,7 @@
#include "gimp-composite-generic.h"
#include "gimp-composite-sse.h"
int
static int
gimp_composite_sse_test (int iterations, int n_pixels)
{
#if defined(COMPILE_SSE_IS_OKAY)

View File

@@ -13,7 +13,7 @@
#include "gimp-composite-generic.h"
#include "gimp-composite-sse2.h"
int
static int
gimp_composite_sse2_test (int iterations, int n_pixels)
{
#if defined(COMPILE_SSE2_IS_OKAY)

View File

@@ -12,7 +12,7 @@
#include "gimp-composite-util.h"
#include "gimp-composite-generic.h"
int
static int
gimp_composite_regression(int iterations, int n_pixels)
{
GimpCompositeContext generic_ctx;

View File

@@ -13,7 +13,7 @@
#include "gimp-composite-generic.h"
#include "gimp-composite-vis.h"
int
static int
gimp_composite_vis_test (int iterations, int n_pixels)
{
#if defined(COMPILE_VIS_IS_OKAY)

View File

@@ -102,7 +102,7 @@ pixel_format=[
def mode_name(mode):
s = string.replace(mode.lower(), "gimp_composite_", "")
return (s)
def pixel_depth_name(pixel_format):
s = string.replace(pixel_format.lower(), "gimp_pixelformat_", "")
return (s)
@@ -135,7 +135,7 @@ def print_function_table(fpout, name, function_table, requirements=[]):
if len(function_table) < 1:
return;
print >>fpout, 'static const struct install_table {'
print >>fpout, ' GimpCompositeOperation mode;'
print >>fpout, ' GimpPixelFormat A;'
@@ -148,7 +148,7 @@ def print_function_table(fpout, name, function_table, requirements=[]):
for r in requirements:
print >>fpout, '#if %s' % (r)
pass
for mode in composite_modes:
for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format):
for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format):
@@ -168,9 +168,9 @@ def print_function_table(fpout, name, function_table, requirements=[]):
print >>fpout, ' { 0, 0, 0, 0, NULL }'
print >>fpout, '};'
return
def print_function_table_name(fpout, name, function_table):
print >>fpout, ''
@@ -197,9 +197,9 @@ def print_function_table_name(fpout, name, function_table):
pass
print >>fpout, '};\n'
return
def load_function_table(filename):
nmx = ns.nmx(filename)
@@ -210,12 +210,12 @@ def load_function_table(filename):
for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format):
for D in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format):
key = "%s_%s_%s_%s" % (string.lower(mode), pixel_depth_name(A), pixel_depth_name(B), pixel_depth_name(D))
for a in ["GIMP_PIXELFORMAT_ANY", A]:
for b in ["GIMP_PIXELFORMAT_ANY", B]:
for d in ["GIMP_PIXELFORMAT_ANY", D]:
key = "%s_%s_%s_%s" % (string.lower(mode), pixel_depth_name(a), pixel_depth_name(b), pixel_depth_name(d))
f = nmx.exports_re(key + ".*")
if f != None: gimp_composite_function["%s_%s_%s_%s" % (string.lower(mode), pixel_depth_name(A), pixel_depth_name(B), pixel_depth_name(D))] = [f]
pass
@@ -231,7 +231,7 @@ def load_function_table(filename):
def merge_function_tables(tables):
main_table = copy.deepcopy(tables[0][1])
for t in tables[1:]:
#print >>sys.stderr, t[0]
for mode in composite_modes:
@@ -248,7 +248,7 @@ def merge_function_tables(tables):
pass
pass
pass
return (main_table)
@@ -281,7 +281,7 @@ def gimp_composite_regression(fpout, function_tables, options):
for r in options.requires:
print >>fpout, '#if %s' % (r)
pass
print >>fpout, ' GimpCompositeContext generic_ctx;'
print >>fpout, ' GimpCompositeContext special_ctx;'
print >>fpout, ' double ft0;'
@@ -349,11 +349,11 @@ def gimp_composite_regression(fpout, function_tables, options):
print >>fpout, ' gimp_composite_context_init (&generic_ctx, %s, %s, %s, %s, %s, n_pixels, (unsigned char *) %sA, (unsigned char *) %sB, (unsigned char *) %sB, (unsigned char *) %sD1);' % (
mode, A, B, D, D, pixel_depth_name(A), pixel_depth_name(B), pixel_depth_name(D), pixel_depth_name(D))
print >>fpout, ' ft0 = gimp_composite_regression_time_function (iterations, %s, &generic_ctx);' % ("gimp_composite_dispatch")
print >>fpout, ' ft1 = gimp_composite_regression_time_function (iterations, %s, &special_ctx);' % (generic_table[key][0])
print >>fpout, ' if (gimp_composite_regression_compare_contexts ("%s", &generic_ctx, &special_ctx))' % (mode_name(mode))
print >>fpout, ' {'
print >>fpout, ' printf("%s_%s_%s_%s failed\\n");' % (mode_name(mode), pixel_depth_name(A), pixel_depth_name(B), pixel_depth_name(D))
print >>fpout, ' return (1);'
@@ -364,11 +364,11 @@ def gimp_composite_regression(fpout, function_tables, options):
pass
pass
pass
for r in options.requires:
print >>fpout, '#endif'
pass
print >>fpout, ' return (0);'
print >>fpout, '}'
@@ -434,7 +434,7 @@ def gimp_composite_installer_install2(fpout, name, function_table, requirements=
else:
print >>fpout, ' /* nothing to do */'
pass
print >>fpout, ''
print >>fpout, ' return (FALSE);'
print >>fpout, '}'
@@ -499,7 +499,7 @@ def gimp_composite_hfile(fpout, name, function_table):
print >>fpout, 'void %s_install (void);' % (functionnameify(name))
print >>fpout, ''
print >>fpout, 'typedef void (*%s_table[%s][%s][%s][%s]);' % (functionnameify(name), "GIMP_COMPOSITE_N", "GIMP_PIXELFORMAT_N", "GIMP_PIXELFORMAT_N", "GIMP_PIXELFORMAT_N")
return
def gimp_composite_cfile(fpout, name, function_table, requirements=[], cpu_feature=[]):

View File

@@ -42,7 +42,7 @@ class nmx:
def __init__(self, objfile=None):
self.objects = dict()
self.filename = None
if objfile != None:
self.update(objfile)
pass
@@ -71,7 +71,7 @@ class nmx:
pass
object = objfile
for (type, symbol) in symbols:
if not self.objects.has_key(object):
self.objects.update({ object : dict({ "exports" : dict(), "imports" : dict() }) })

View File

@@ -7,6 +7,18 @@ libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).la
libgimpthumb = $(top_builddir)/libgimpthumb/libgimpthumb-$(GIMP_API_VERSION).la
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gimp-Config\" \
-DGIMP_APP_VERSION_STRING=\"$(GIMP_APP_VERSION)\"
INCLUDES = \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_builddir)/app \
-I$(top_srcdir)/app \
$(GDK_PIXBUF_CFLAGS) \
-I$(includedir)
noinst_LIBRARIES = libappconfig.a
libappconfig_a_SOURCES = \
@@ -39,19 +51,6 @@ libappconfig_a_SOURCES = \
gimpxmlparser.c \
gimpxmlparser.h
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gimp-Config\"
INCLUDES = \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_builddir)/app \
-I$(top_srcdir)/app \
$(GDK_PIXBUF_CFLAGS) \
$(GLIB_CFLAGS) \
-I$(includedir)
EXTRA_PROGRAMS = test-config
EXTRA_DIST = makefile.msc
@@ -65,10 +64,11 @@ TESTS = test-config
test_config_DEPENDENCIES = $(gimpconfig_libs)
test_config_LDFLAGS = \
-u $(SYMPREFIX)xcf_init \
-u $(SYMPREFIX)internal_procs_init \
-u $(SYMPREFIX)gimp_coords_mix \
-u $(SYMPREFIX)gimp_plug_in_manager_restore
-u $(SYMPREFIX)xcf_init \
-u $(SYMPREFIX)internal_procs_init \
-u $(SYMPREFIX)gimp_coords_mix \
-u $(SYMPREFIX)gimp_plug_in_manager_restore \
-u $(SYMPREFIX)gimp_image_map_config_get_type
test_config_LDADD = \
../widgets/widgets-enums.o \
@@ -83,8 +83,8 @@ test_config_LDADD = \
../vectors/libappvectors.a \
../paint/libapppaint.a \
../text/libapptext.a \
libappconfig.a \
../gegl/libappgegl.a \
libappconfig.a \
../paint-funcs/libapppaint-funcs.a \
../composite/libappcomposite.a \
../base/libappbase.a \
@@ -95,11 +95,11 @@ test_config_LDADD = \
$(libgimpmath) \
$(libgimpconfig) \
$(libgimpbase) \
$(CAIRO_LIBS) \
$(PANGOFT2_LIBS) \
$(GDK_PIXBUF_LIBS) \
$(LIBART_LIBS) \
$(GEGL_LIBS) \
$(GLIB_LIBS)
CLEANFILES = $(EXTRA_PROGRAMS) foorc

View File

@@ -48,7 +48,10 @@ enum
PROP_TEMP_PATH,
PROP_SWAP_PATH,
PROP_NUM_PROCESSORS,
PROP_TILE_CACHE_SIZE
PROP_TILE_CACHE_SIZE,
/* ignored, only for backward compatibility: */
PROP_STINGY_MEMORY_USE
};
@@ -103,10 +106,16 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_TILE_CACHE_SIZE,
"tile-cache-size", TILE_CACHE_SIZE_BLURB,
0, MIN (G_MAXULONG, GIMP_MAX_MEMSIZE),
0, MIN (G_MAXSIZE, GIMP_MAX_MEMSIZE),
1 << 30, /* 1GB */
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_CONFIRM);
/* only for backward compatibility: */
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_STINGY_MEMORY_USE,
"stingy-memory-use", NULL,
FALSE,
GIMP_CONFIG_PARAM_IGNORE);
}
static void
@@ -150,6 +159,10 @@ gimp_base_config_set_property (GObject *object,
base_config->tile_cache_size = g_value_get_uint64 (value);
break;
case PROP_STINGY_MEMORY_USE:
/* ignored */
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -179,6 +192,10 @@ gimp_base_config_get_property (GObject *object,
g_value_set_uint64 (value, base_config->tile_cache_size);
break;
case PROP_STINGY_MEMORY_USE:
/* ignored */
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;

View File

@@ -363,9 +363,8 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
/* not serialized */
g_object_class_install_property (object_class, PROP_USE_GEGL,
g_param_spec_boolean ("use-gegl",
"Use GEGL",
"Use GEGL",
TRUE,
"Use GEGL", NULL,
FALSE,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
}

View File

@@ -34,15 +34,18 @@
#include "gimp-intl.h"
#define DEFAULT_GIMP_HELP_BROWSER GIMP_HELP_BROWSER_GIMP
#define DEFAULT_THEME "Default"
#define DEFAULT_HELP_BROWSER GIMP_HELP_BROWSER_GIMP
#define DEFAULT_THEME "Default"
#define DEFAULT_USER_MANUAL_ONLINE_URI \
"http://docs.gimp.org/" GIMP_APP_VERSION_STRING
#ifdef G_OS_WIN32
# define DEFAULT_WEB_BROWSER "not used on Windows"
# define DEFAULT_WEB_BROWSER "not used on Windows"
#elif HAVE_CARBON
# define DEFAULT_WEB_BROWSER "open %s"
# define DEFAULT_WEB_BROWSER "open %s"
#else
# define DEFAULT_WEB_BROWSER "xdg-open %s"
# define DEFAULT_WEB_BROWSER "firefox %s"
#endif
@@ -67,6 +70,7 @@ enum
PROP_TOOLBOX_COLOR_AREA,
PROP_TOOLBOX_FOO_AREA,
PROP_TOOLBOX_IMAGE_AREA,
PROP_TOOLBOX_WILBER,
PROP_THEME_PATH,
PROP_THEME,
PROP_USE_HELP,
@@ -74,10 +78,17 @@ enum
PROP_HELP_LOCALES,
PROP_HELP_BROWSER,
PROP_WEB_BROWSER,
PROP_USER_MANUAL_ONLINE,
PROP_USER_MANUAL_ONLINE_URI,
PROP_TOOLBOX_WINDOW_HINT,
PROP_DOCK_WINDOW_HINT,
PROP_TRANSIENT_DOCKS,
PROP_CURSOR_FORMAT
PROP_CURSOR_FORMAT,
/* ignored, only for backward compatibility: */
PROP_INFO_WINDOW_PER_DISPLAY,
PROP_SHOW_TOOL_TIPS,
PROP_SHOW_TIPS
};
@@ -119,7 +130,7 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TRUST_DIRTY_FLAG,
"trust-dirty-flag",
TRUST_DIRTY_FLAG_BLURB,
FALSE,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SAVE_DEVICE_STATUS,
"save-device-status",
@@ -191,6 +202,11 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
TOOLBOX_IMAGE_AREA_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TOOLBOX_WILBER,
"toolbox-wilber",
TOOLBOX_WILBER_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
path = gimp_config_build_data_path ("themes");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_THEME_PATH,
"theme-path", THEME_PATH_BLURB,
@@ -217,13 +233,23 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_HELP_BROWSER,
"help-browser", HELP_BROWSER_BLURB,
GIMP_TYPE_HELP_BROWSER_TYPE,
DEFAULT_GIMP_HELP_BROWSER,
DEFAULT_HELP_BROWSER,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_WEB_BROWSER,
"web-browser", WEB_BROWSER_BLURB,
GIMP_CONFIG_PATH_FILE,
DEFAULT_WEB_BROWSER,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_USER_MANUAL_ONLINE,
"user-manual-online",
USER_MANUAL_ONLINE_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_USER_MANUAL_ONLINE_URI,
"user-manual-online-uri",
USER_MANUAL_ONLINE_URI_BLURB,
DEFAULT_USER_MANUAL_ONLINE_URI,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_TOOLBOX_WINDOW_HINT,
"toolbox-window-hint",
TOOLBOX_WINDOW_HINT_BLURB,
@@ -247,6 +273,24 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
GIMP_TYPE_CURSOR_FORMAT,
GIMP_CURSOR_FORMAT_PIXBUF,
GIMP_PARAM_STATIC_STRINGS);
/* only for backward compatibility: */
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_INFO_WINDOW_PER_DISPLAY,
"info-window-per-display",
NULL,
FALSE,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_IGNORE);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_TOOL_TIPS,
"show-tool-tips", NULL,
FALSE,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_IGNORE);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_TIPS,
"show-tips", NULL,
FALSE,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_IGNORE);
}
static void
@@ -263,6 +307,7 @@ gimp_gui_config_finalize (GObject *object)
g_free (gui_config->theme);
g_free (gui_config->help_locales);
g_free (gui_config->web_browser);
g_free (gui_config->user_manual_online_uri);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -331,7 +376,10 @@ gimp_gui_config_set_property (GObject *object,
case PROP_TOOLBOX_IMAGE_AREA:
gui_config->toolbox_image_area = g_value_get_boolean (value);
break;
case PROP_THEME_PATH:
case PROP_TOOLBOX_WILBER:
gui_config->toolbox_wilber = g_value_get_boolean (value);
break;
case PROP_THEME_PATH:
g_free (gui_config->theme_path);
gui_config->theme_path = g_value_dup_string (value);
break;
@@ -356,6 +404,13 @@ gimp_gui_config_set_property (GObject *object,
g_free (gui_config->web_browser);
gui_config->web_browser = g_value_dup_string (value);
break;
case PROP_USER_MANUAL_ONLINE:
gui_config->user_manual_online = g_value_get_boolean (value);
break;
case PROP_USER_MANUAL_ONLINE_URI:
g_free (gui_config->user_manual_online_uri);
gui_config->user_manual_online_uri = g_value_dup_string (value);
break;
case PROP_TOOLBOX_WINDOW_HINT:
gui_config->toolbox_window_hint = g_value_get_enum (value);
break;
@@ -369,6 +424,12 @@ gimp_gui_config_set_property (GObject *object,
gui_config->cursor_format = g_value_get_enum (value);
break;
case PROP_INFO_WINDOW_PER_DISPLAY:
case PROP_SHOW_TOOL_TIPS:
case PROP_SHOW_TIPS:
/* ignored */
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -439,6 +500,9 @@ gimp_gui_config_get_property (GObject *object,
case PROP_TOOLBOX_IMAGE_AREA:
g_value_set_boolean (value, gui_config->toolbox_image_area);
break;
case PROP_TOOLBOX_WILBER:
g_value_set_boolean (value, gui_config->toolbox_wilber);
break;
case PROP_THEME_PATH:
g_value_set_string (value, gui_config->theme_path);
break;
@@ -460,6 +524,12 @@ gimp_gui_config_get_property (GObject *object,
case PROP_WEB_BROWSER:
g_value_set_string (value, gui_config->web_browser);
break;
case PROP_USER_MANUAL_ONLINE:
g_value_set_boolean (value, gui_config->user_manual_online);
break;
case PROP_USER_MANUAL_ONLINE_URI:
g_value_set_string (value, gui_config->user_manual_online_uri);
break;
case PROP_TOOLBOX_WINDOW_HINT:
g_value_set_enum (value, gui_config->toolbox_window_hint);
break;
@@ -473,6 +543,12 @@ gimp_gui_config_get_property (GObject *object,
g_value_set_enum (value, gui_config->cursor_format);
break;
case PROP_INFO_WINDOW_PER_DISPLAY:
case PROP_SHOW_TOOL_TIPS:
case PROP_SHOW_TIPS:
/* ignored */
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;

View File

@@ -58,6 +58,7 @@ struct _GimpGuiConfig
gboolean toolbox_color_area;
gboolean toolbox_foo_area;
gboolean toolbox_image_area;
gboolean toolbox_wilber;
gchar *theme_path;
gchar *theme;
gboolean use_help;
@@ -65,6 +66,8 @@ struct _GimpGuiConfig
gchar *help_locales;
GimpHelpBrowserType help_browser;
gchar *web_browser;
gboolean user_manual_online;
gchar *user_manual_online_uri;
GimpWindowHint toolbox_window_hint;
GimpWindowHint dock_window_hint;
gboolean transient_docks;

View File

@@ -386,9 +386,17 @@ N_("When the amount of pixel data exceeds this limit, GIMP will start to " \
"work on images that wouldn't fit into memory otherwise. If you have a " \
"lot of RAM, you may want to set this to a higher value.")
#define TOOLBOX_COLOR_AREA_BLURB NULL
#define TOOLBOX_FOO_AREA_BLURB NULL
#define TOOLBOX_IMAGE_AREA_BLURB NULL
#define TOOLBOX_COLOR_AREA_BLURB \
N_("Show the current foreground and background colors in the toolbox.")
#define TOOLBOX_FOO_AREA_BLURB \
N_("Show the currently selected brush, pattern and gradient in the toolbox.")
#define TOOLBOX_IMAGE_AREA_BLURB \
N_("Show the currently active image in the toolbox.")
#define TOOLBOX_WILBER_BLURB \
"Show the GIMP mascot at the top of the toolbox."
#define TOOLBOX_WINDOW_HINT_BLURB \
N_("The window type hint that is set on the toolbox. This may affect " \
@@ -419,6 +427,14 @@ N_("Sets the size of the previews in the Undo History.")
#define USE_HELP_BLURB \
N_("When enabled, pressing F1 will open the help browser.")
#define USER_MANUAL_ONLINE_BLURB \
"When enabled, the online user manual will be used by the help system. " \
"Otherwise the locally installed copy is used."
#define USER_MANUAL_ONLINE_URI_BLURB \
"The location of the online user manual. This is used if " \
"'user-manual-online' is enabled."
#define WEB_BROWSER_BLURB \
N_("Sets the external web browser to be used. This can be an absolute " \
"path or the name of an executable to search for in the user's PATH. " \

View File

@@ -51,8 +51,8 @@ gimp_rc_deserialize (GimpConfig *config,
guint i;
guint scope_id;
guint old_scope_id;
GTokenType token;
GTokenType next;
GTokenType token;
GTokenType next;
g_return_val_if_fail (GIMP_IS_CONFIG (config), FALSE);
@@ -86,9 +86,8 @@ gimp_rc_deserialize (GimpConfig *config,
{
next = g_scanner_peek_next_token (scanner);
if (G_UNLIKELY (next != token &&
! (token == G_TOKEN_SYMBOL &&
next == G_TOKEN_IDENTIFIER)))
if (G_UNLIKELY (next != token && ! (token == G_TOKEN_SYMBOL &&
next == G_TOKEN_IDENTIFIER)))
{
break;
}

View File

@@ -49,7 +49,8 @@ INCLUDES = \
# -DG_DISABLE_CAST_CHECKS
DEFINES = \
-DG_LOG_DOMAIN=\"Gimp-Config\"
-DG_LOG_DOMAIN=\"Gimp-Config\" \
$(GIMP_VERSION_DEFINES)
all : \
$(PRJ_TOP)\config.h \

View File

@@ -9,10 +9,9 @@ INCLUDES = \
-I$(top_srcdir) \
-I$(top_builddir)/app \
-I$(top_srcdir)/app \
$(GDK_PIXBUF_CFLAGS) \
$(CAIRO_CFLAGS) \
$(GLIB_CFLAGS) \
$(GEGL_CFLAGS) \
$(GDK_PIXBUF_CFLAGS) \
-I$(includedir)
noinst_LIBRARIES = libappcore.a
@@ -157,8 +156,12 @@ libappcore_a_sources = \
gimpdrawable-transform.h \
gimpdrawablemodundo.c \
gimpdrawablemodundo.h \
gimpdrawablestack.c \
gimpdrawablestack.h \
gimpdrawableundo.c \
gimpdrawableundo.h \
gimpfilteredcontainer.c \
gimpfilteredcontainer.h \
gimpfloatingselundo.c \
gimpfloatingselundo.h \
gimpgradient.c \
@@ -310,6 +313,10 @@ libappcore_a_sources = \
gimpstrokeoptions.h \
gimpsubprogress.c \
gimpsubprogress.h \
gimptag.c \
gimptag.h \
gimptagcache.c \
gimptagcache.h \
gimptagged.c \
gimptagged.h \
gimptemplate.c \

View File

@@ -45,11 +45,14 @@
#define GIMP_COORDS_MAX_WHEEL 1.0
#define GIMP_COORDS_DEFAULT_WHEEL 0.5
#define GIMP_COORDS_DEFAULT_VALUES { 0.0, 0.0, \
GIMP_COORDS_DEFAULT_PRESSURE, \
GIMP_COORDS_DEFAULT_TILT, \
GIMP_COORDS_DEFAULT_TILT, \
GIMP_COORDS_DEFAULT_WHEEL }
#define GIMP_COORDS_DEFAULT_VELOCITY 0.0
#define GIMP_COORDS_DEFAULT_VALUES { 0.0, 0.0, \
GIMP_COORDS_DEFAULT_PRESSURE, \
GIMP_COORDS_DEFAULT_TILT, \
GIMP_COORDS_DEFAULT_TILT, \
GIMP_COORDS_DEFAULT_WHEEL, \
GIMP_COORDS_DEFAULT_VELOCITY }
/* base classes */
@@ -65,8 +68,10 @@ typedef struct _GimpImage GimpImage;
/* containers */
typedef struct _GimpContainer GimpContainer;
typedef struct _GimpFilteredContainer GimpFilteredContainer;
typedef struct _GimpList GimpList;
typedef struct _GimpDocumentList GimpDocumentList;
typedef struct _GimpDrawableStack GimpDrawableStack;
typedef struct _GimpToolPresets GimpToolPresets;
@@ -86,6 +91,7 @@ typedef struct _GimpToolInfo GimpToolInfo;
/* data objects */
typedef struct _GimpDataFactory GimpDataFactory;
typedef struct _GimpTagCache GimpTagCache;
typedef struct _GimpData GimpData;
typedef struct _GimpBrush GimpBrush;
typedef struct _GimpBrushClipboard GimpBrushClipboard;
@@ -167,9 +173,7 @@ typedef struct _GimpScanConvert GimpScanConvert;
/* tags */
typedef GQuark GimpTag;
#define gimp_tag_new(name) g_quark_from_string (name)
#define gimp_tag_get_name(tag) g_quark_to_string (name)
typedef struct _GimpTag GimpTag;
/* functions */
@@ -199,12 +203,7 @@ struct _GimpCoords
gdouble xtilt;
gdouble ytilt;
gdouble wheel;
gdouble delta_time;
gdouble delta_x;
gdouble delta_y;
gdouble distance;
gdouble velocity;
gdouble random;
};

View File

@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <glib-object.h>
#include <gegl.h>
#include "libgimpbase/gimpbase.h"
@@ -272,7 +272,7 @@ gimp_edit_paste (GimpImage *image,
if (drawable)
floating_sel_attach (layer, drawable);
else
gimp_image_add_layer (image, layer, 0);
gimp_image_add_layer (image, layer, 0, TRUE);
/* end the group undo */
gimp_image_undo_group_end (image);
@@ -332,7 +332,7 @@ gimp_edit_paste_as_new (Gimp *gimp,
return NULL;
}
gimp_image_add_layer (image, layer, 0);
gimp_image_add_layer (image, layer, 0, TRUE);
gimp_image_undo_enable (image);

View File

@@ -88,7 +88,7 @@ gimp_gradients_add_gradient (Gimp *gimp,
{
GimpGradient *gradient = GIMP_GRADIENT (gimp_gradient_new (name));
gimp_data_make_internal (GIMP_DATA (gradient));
gimp_data_make_internal (GIMP_DATA (gradient), id);
gradient->segments->left_color_type = GIMP_GRADIENT_COLOR_FOREGROUND;
gradient->segments->right_color_type = GIMP_GRADIENT_COLOR_BACKGROUND;

View File

@@ -18,7 +18,7 @@
#include "config.h"
#include <glib-object.h>
#include <gegl.h>
#include "libgimpbase/gimpbase.h"
@@ -190,14 +190,16 @@ gimp_show_message (Gimp *gimp,
}
void
gimp_help (Gimp *gimp,
const gchar *help_domain,
const gchar *help_id)
gimp_help (Gimp *gimp,
GimpProgress *progress,
const gchar *help_domain,
const gchar *help_id)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
if (gimp->gui.help)
gimp->gui.help (gimp, help_domain, help_id);
gimp->gui.help (gimp, progress, help_domain, help_id);
}
const gchar *

View File

@@ -38,6 +38,7 @@ struct _GimpGui
const gchar *domain,
const gchar *message);
void (* help) (Gimp *gimp,
GimpProgress *progress,
const gchar *help_domain,
const gchar *help_id);
@@ -126,6 +127,7 @@ void gimp_show_message (Gimp *gimp,
const gchar *domain,
const gchar *message);
void gimp_help (Gimp *gimp,
GimpProgress *progress,
const gchar *help_domain,
const gchar *help_id);

View File

@@ -179,7 +179,7 @@ gimp_modules_unload (Gimp *gimp)
{
GimpConfigWriter *writer;
GString *str;
gchar *p;
const gchar *p;
gchar *filename;
GError *error = NULL;

Some files were not shown because too many files have changed in this diff Show More