Commit Graph

183 Commits

Author SHA1 Message Date
Michael Natterer bacc9c9635 Bug 688348 - Layer tab and Images tab: not updated on dropping...
...one image onto another

gimp_dock_window_display_changed(): make sure the "auto-follow-active"
logic works both ways: when the active image or display is changed in
a dockable, update the global context. Fixes multi-window mode.

gimp_context_real_set_display(): make sure a context's display and
image are always in a consistent state and never have a display that
is not display->image: when display is the same as context->display,
check that the context's image matches display->image, so that after a
gimp_context_set_display(), the context is consistent in all
cases. Fixes single-window mode.
2013-04-23 21:05:33 +02:00
Michael Natterer c262fee244 Bug 689523 - GIMP crashes (segfault) when loading a context with a font...
Make gimp_context_get|set_font_name() actually deal with
context->font_name, so the context can do its job of keeping the name
of an unavailable object around.
2013-01-18 01:02:31 +01:00
Michael Natterer 0a37a0490f app: fix indentation in GimpContext 2013-01-18 00:50:12 +01:00
Michael Natterer 908f727f0a Chain up unconditionally in GObject::constructed()
It's supported since GLib 2.28.
2012-11-12 21:51:22 +01:00
Michael Natterer 3ad73b3658 libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
Michael Natterer 7ec6c48636 app: use gimp_rgba_set,get_pixel() instead of babl_process() directly 2012-05-02 17:50:53 +02:00
Michael Natterer 867da8f293 app: add gimp_context_get_foreground,background_pixel()
which takes a Babl format to convert from/to.
Include <gegl.h> in a million places.
2012-05-02 17:50:41 +02:00
Michael Natterer cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Michael Natterer 5e4eee4653 app: implement GObject::constructed() instead of ::constructor() 2011-01-12 22:53:58 +01:00
Sven Neumann f1d89f712d Bug 626446 - segfaults when started with -i argument
We don't need a standard tool-preset object, so just remove the
code that was copied and pasted from other GimpData objects.
Fixes the crash on startup in non-interactive mode.
2010-08-25 21:47:22 +02:00
Michael Natterer e24c2d2249 app: add a local "container" variable to make the code more readable 2010-06-26 15:49:10 +02:00
Michael Natterer e0d5bab077 app: remove the static variables for the "standard_foo" fallback members
Instead, call gimp_foo_get_standard() when a fallback object is
needed (keeping them around as static variables was a silly
micro-optimization).
2010-06-24 22:33:33 +02:00
Michael Natterer 44e6acbef8 app: the name of the standard paint is "gimp-paintbrush" not "GimpPaintbrush" 2010-06-24 18:38:19 +02:00
Michael Natterer 5db9d31498 app: drop all object references in dispose() insatead of finalize() 2010-06-24 18:38:18 +02:00
Michael Natterer 430b0e5517 app: add a GimpContext parameter to all functions which create GimpData
and pass a context whereever needed. Fix up gimp_tool_preset_new()
to actually make a copy of the context's active tool's options.
2010-04-05 13:26:31 +02:00
Michael Natterer efed2bf623 app: some cleanup and fixes in the tool preset infrastructure 2010-04-04 13:58:55 +02:00
Alexia Death 29f7fe87b0 Base infra for tool presets. 2010-04-03 21:06:15 +03:00
Michael Natterer 4da60dd1b3 app: add context->dynamics_name to the context's memsize 2010-04-01 20:46:31 +02:00
Michael Natterer f9cb5fbc10 app: derive GimpContext from GimpViewable instead of GimpObject
because the device info container wants to be displayed in a container
view soon. Also we are about to get lists of tool presets and stuff,
which are also contexts.
2010-02-13 15:04:32 +01:00
Michael Natterer 3438287f03 Remove member "name" from the GimpDynamics struct
...and use GimpObject's name in GimpContext. Might be the last
bit to make the context's dynamics work completely.
2009-10-11 13:18:23 +02:00
Michael Natterer 3aa8db4cea Use the configured default_dynamics from the config object 2009-10-11 01:36:24 +02:00
Michael Natterer 26bda5a2e2 Some more cleanup
- move the GimpDynamics typedef to core-types.h
- related changes
- clean up gimpcontext.c
2009-10-11 00:20:06 +02:00
Alexia Death 26e7b5f0e2 Fix ennum ordering 2009-10-03 16:08:15 +03:00
Michael Natterer f5f571bce5 Formatting cleanup 2009-10-03 13:53:40 +02:00
Alexia Death da2920b0eb Adding random as part of the calculations, renaming calc method to linear for type 2009-10-03 14:08:05 +03:00
Alexia Death cd36753f17 Fixed loading for dynamics and made them actually accessible 2009-10-03 12:59:45 +03:00
Alexia Death bb18654483 Fix some compile errors 2009-09-28 20:30:03 +03:00
Alexia Death be78fe3b1d Merge commit 'origin/master' into soc-2009-dynamics 2009-09-20 14:32:32 +03:00
Michael Natterer a3558e3cb8 Remove GIMP_OBJECT() casts when calling gimp_object_get_name() 2009-08-31 22:47:18 +02:00
Martin Nordholts 957cf2cfa9 app: Always use gimp_object_get_name()
Begin to consider GimpObject::name as private and always use
gimp_object_get_name(). Change gimp_object_get_name() to take an
untyped pointer so we don't have to do so awfully many casts. There is
a runtime check for the type inside the function anyway.
2009-08-29 12:41:29 +02:00
Alexia Death d2143b8886 Merging master to current state 2009-08-21 19:26:05 +03:00
Alexia Death e04a7617d5 Cleaning up the dynamics init a little bit more 2009-08-20 18:24:50 +03:00
Alexia Death 93f8216881 Renaming GimpDynamicsOptions to GimpDynamics and moving from paint/ to core/. A BIG change. 2009-08-20 04:25:26 +03:00
Alexia Death 460bf0ecdd Fixing some more props errors in context 2009-08-20 03:20:17 +03:00
zhenfeng zhao 822e394981 Fix seg fault for gimpcontext 2009-08-19 13:29:06 -03:00
Sven Neumann d655f03607 correct a comment 2009-08-19 16:59:15 +02:00
zhenfeng zhao 6aa4d55315 Solve errors in gimpcontext for dynamics. 2009-08-18 22:38:45 -03:00
zhenfeng zhao f48a7e4a8b Add dynamics context and factory data and functions (need debugging). 2009-08-17 23:47:26 -03:00
Sven Neumann 640afea581 Bug 471681 – Keyboard shortcuts for brush size/params need feedback
2009-03-19  Sven Neumann  <sven@gimp.org>

	Bug 471681 – Keyboard shortcuts for brush size/params need 
feedback

	* app/core/gimpbrushgenerated.c
	* app/core/gimpcontext.c
	* app/paint/gimppaintoptions.c: applied patch from Stephen G. 
that
	marks some strings for translation.


svn path=/trunk/; revision=28182
2009-03-19 20:40:43 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Martin Nordholts 4981816c0b Make instance members private and add getters for required members.
* app/core/gimpdatafactory.[ch]: Make instance members private and
add getters for required members.

(gimp_data_factory_get_container)
(gimp_data_factory_get_gimp)
(gimp_data_factory_has_data_new_func): The new getters.

* app/actions/context-commands.c
* app/actions/data-commands.c
* app/core/gimp-gradients.c
* app/core/gimp.c
* app/core/gimpcontext.c
* app/core/gimpdatafactory.c
* app/core/gimpdatafactory.h
* app/dialogs/convert-dialog.c
* app/dialogs/palette-import-dialog.c
* app/pdb/gimppdb-utils.c
* app/widgets/gimpbrushfactoryview.c
* app/widgets/gimpdataeditor.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpselectiondata.c
* app/widgets/gimpviewablebox.c
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/palette_select.pdb
* tools/pdbgen/pdb/palettes.pdb
* tools/pdbgen/pdb/pattern_select.pdb
* tools/pdbgen/pdb/patterns.pdb: Use the getters.


* app/pdb/brush-select-cmds.c
* app/pdb/brushes-cmds.c
* app/pdb/gradient-select-cmds.c
* app/pdb/gradients-cmds.c
* app/pdb/palette-select-cmds.c
* app/pdb/palettes-cmds.c
* app/pdb/pattern-select-cmds.c
* app/pdb/patterns-cmds.c: Regenerated.

svn path=/trunk/; revision=27812
2008-12-19 21:58:17 +00:00
Michael Natterer a92925361b bail out if the notification is not about one of our own properties (but
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_parent_notify): bail out if
	the notification is not about one of our own properties
	(but from a subclass).


svn path=/trunk/; revision=27394
2008-10-25 09:14:16 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
	had a GEGL dependency (they will have in the next commit, but I
	wanted to keep the commit separate).

	* app/dialogs/Makefile.am
	* app/file/Makefile.am
	* app/gui/Makefile.am
	* app/menus/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/vectors/Makefile.am
	* app/widgets/Makefile.am
	* app/xcf/Makefile.am: add GEGL_CFLAGS.

	* app/actions/*.c
	* app/core/*.c
	* app/dialogs/*.c
	* app/display/*.c
	* app/file/*.c
	* app/gui/*.c
	* app/menus/*.c
	* app/paint/*.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/*.c
	* app/text/*.c
	* app/tools/*.c
	* app/vectors/*.c
	* app/widgets/*.c
	* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
	to all files which include a drawable subclass or gimpimage.h

	* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
	in all generated files.

	* app/pdb/*-cmds.c: regenerated.

	* data/images/gimp-splash.png: the goat is still sleeping.
	By Aurore Derriennic.


svn path=/trunk/; revision=27202
2008-10-09 20:24:04 +00:00
Michael Natterer 90db7d443c paranoia fix for hypothetical but harmful misbehavior: when setting the
2008-10-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_real_set_display): paranoia
	fix for hypothetical but harmful misbehavior: when setting the
	display from !=NULL to NULL, also set the image to NULL instead of
	relying on whatever obscure implicit behavior of other parts of
	GIMP which set a new display right away or make sure the image
	goes away together with the display.


svn path=/trunk/; revision=27145
2008-10-06 19:54:42 +00:00
Michael Natterer b3fb3cf608 set the image also if it is NULL.
2008-03-23  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_real_set_display): set the
	image also if it is NULL.


svn path=/trunk/; revision=25174
2008-03-23 13:27:51 +00:00
Michael Natterer cee3baea0f First draft of the "no image open" window, which is implemented as a
2008-03-18  Michael Natterer  <mitch@gimp.org>

	First draft of the "no image open" window, which is implemented as
	a display without image (a view with NULL model). Didn't change
	the display's appearance yet so I can first make sure the display
	without image works properly in all details before hiding these
	details.

	* app/core/gimp-gui.[ch]: add "gimp" parameter to display_create()
	and allow "image" to be NULL.

	* app/core/gimpcontext.c (gimp_context_real_set_display): a
	display's image can be NULL now.

	* app/display/gimpdisplay.[ch]: add Gimp and GimpDisplayConfig
	members.  Add Gimp parameter to gimp_display_shell_new(). Changed
	gimp_display_reconnect() to gimp_display_set_image() and allow to
	set a NULL image.

	* app/gui/gui-vtable.c (gui_display_create): if there is a single
	display without an image, call gimp_display_set_image() on that
	display instead of creating a new one.

	* app/display/gimpdisplayshell-close.c: if the last display is
	closed, don't close it but make it empty. Factored out that code
	to gimp_display_shell_really_close().

	* app/display/gimpdisplayshell-dnd.c: when dropping uris on an
	empty display, open the first one into that display and the other
	ones as layers of the newly opened image. This is consistent with
	dropping on an existing image but maybe needs some discussion.

	* app/display/gimpdisplayshell-callbacks.c: bail out early in the
	tool event callback so tools never have to deal with empty
	displays. In expose(), draw the drop zone on the empty display.

	* app/display/gimpdisplayshell-title.c: set the empty display's
	title to "Gimp - Drop Files".

	* app/display/gimpdisplay-foreach.c
	* app/display/gimpdisplay-handlers.c
	* app/display/gimpdisplayshell-appearance.c
	* app/display/gimpdisplayshell-autoscroll.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-cursor.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-filter-dialog.c
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell-preview.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-scroll.c
	* app/display/gimpdisplayshell-selection.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpnavigationeditor.c
	* app/display/gimpstatusbar.c: use display->gimp and
	display->config instead of going via the image. Guard against
	empty displays in some few places (most places can't be
	called). Where needed, use the canvas' dimensions instead of the
	image's dimensions so scroll offsets and scrollbars still have
	sane values instead of the last image's ones.

	* app/actions/actions.c (action_data_get_gimp)
	(action_data_get_context): use display->gimp instead of
	display->image->gimp.

	* app/actions/edit-commands.c (edit_paste_cmd_callback): redirect
	to "paste as new" if there is an empty display.

	* app/actions/tools-commands.c (tools_select_cmd_callback): don't
	initialize the new tool on an empty display.

	* app/actions/view-actions.c (view_actions_update): changed lots
	of sensitivity settings to be insensitive when there is no image
	(instead of no display).

	* app/actions/view-commands.c: use the display's config object
	instead of gimp's.


svn path=/trunk/; revision=25113
2008-03-18 21:22:21 +00:00
Michael Natterer 036085fd9e app/base/temp-buf.c app/base/tile-manager.c accept NULL in all
2007-11-16  Michael Natterer  <mitch@gimp.org>

	* app/base/temp-buf.c
	* app/base/tile-manager.c
	* app/core/gimpobject.c: accept NULL in all get_memsize() functions.

	* app/core/gimp-utils.[ch]: ditto. Added gimp_string_get_memsize().

	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdata.c
	* app/core/gimpdrawable.c
	* app/core/gimpdrawablemodundo.c
	* app/core/gimpdrawableundo.c
	* app/core/gimpimage.c
	* app/core/gimpitempropundo.c
	* app/core/gimplayer.c
	* app/core/gimpmaskundo.c
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimppreviewcache.c
	* app/core/gimpundo.c
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugindef.c
	* app/plug-in/gimppluginmanager.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptext.c
	* app/text/gimptextlayer.c
	* app/text/gimptextundo.c
	* app/vectors/gimpvectorsmodundo.c: simplify
	GimpObject::get_memsize() implementations accordingly.

	* app/core/gimpimageundo.c: ditto. Always keep around colormaps in
	chunks of GIMP_IMAGE_COLORMAP_SIZE to be coonsistent with the
	other colormap handling code.


svn path=/trunk/; revision=24174
2007-11-16 18:19:30 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Michael Natterer fa03960519 the default tool is the paintbrush, not rect select.
2006-05-24  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_tool_list_thaw): the
	default tool is the paintbrush, not rect select.

	* app/tools/gimp-tools.c (gimp_tools_register): attach the default
	visibility state to the tool_info.

	* app/actions/tools-commands.c (tools_reset_cmd_callback): use the
	attached boolean instead of reimplementing the default visibility
	logic.
2006-05-24 15:04:45 +00:00
Karine Delvare 1ce44a4555 app/core/gimpcontext.c app/tools/gimp-tools.c
2006-05-23  Karine Delvare  <edhel@gimp.org>

	* app/core/gimpcontext.c
	* app/tools/gimp-tools.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimprectselecttool.c
	* app/widgets/gimptoolbox.c
	* menus/image-menu.xml.in: replace old rect select by new in the
	toolbox.
2006-05-23 18:14:51 +00:00