Commit Graph

116 Commits

Author SHA1 Message Date
Michael Natterer d85fb156b5 app/widgets/gimpblobeditor.c app/widgets/gimpbrushselect.c
2009-03-22  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpblobeditor.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpcolorbar.c
	* app/widgets/gimpcolordialog.c
	* app/widgets/gimpcolorframe.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainerpopup.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpcontrollereditor.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpcursor.c
	* app/widgets/gimpcurveview.c
	* app/widgets/gimpdasheditor.c
	* app/widgets/gimpdialogfactory.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimpdockable.c
	* app/widgets/gimperrordialog.c
	* app/widgets/gimpfgbgeditor.c
	* app/widgets/gimpfgbgview.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimphandlebar.c
	* app/widgets/gimphistogrambox.c
	* app/widgets/gimphistogramview.c
	* app/widgets/gimpmessagedialog.c
	* app/widgets/gimpnavigationview.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppaletteview.c
	* app/widgets/gimppatternselect.c
	* app/widgets/gimpprogressbox.c
	* app/widgets/gimpprogressdialog.c
	* app/widgets/gimpscalebutton.c
	* app/widgets/gimpselectiondata.c
	* app/widgets/gimpsessioninfo.c
	* app/widgets/gimpsettingsbox.c
	* app/widgets/gimpstrokeeditor.c
	* app/widgets/gimptexteditor.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimpuimanager.c
	* app/widgets/gimpview-popup.c
	* app/widgets/gimpview.c
	* app/widgets/gimpviewabledialog.c
	* app/widgets/gimpwidgets-utils.c: use accessors for various
	members of GTK+ structures that don't exist any longer when
	GSEAL_ENABLE is defined.


svn path=/trunk/; revision=28193
2009-03-22 16:35:53 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

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

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

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


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann 734e02f121 app/widgets/Makefile.am new files holding Cairo utility functions.
2007-11-02  Sven Neumann  <sven@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/gimpcairo-utils.[ch]: new files holding Cairo
	utility functions.

	* app/widgets/gimpviewrenderer.[ch]: ported partly to Cairo 
drawing.

	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainercombobox.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpview.c: removed calls to
	gimp_view_renderer_unrealize() which are not needed anymore
	because we don't allocate a GC in the renderer any longer.

	* app/widgets/gimpcellrendererdashes.c: removed a redundant 
cast.


svn path=/trunk/; revision=24039
2007-11-01 23:37:00 +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 b53aa45a76 Changed GimpViewable preview rendering to have a context to get
2006-08-29  Michael Natterer  <mitch@gimp.org>

	Changed GimpViewable preview rendering to have a context to get
	FG/BG/whatever from. Use the context to enable dynamic FG/BG
	colors in gradients. Fixes bug #127676 and bug #352214. Addresses
	bug #128367 (doesn't fix it because there's no loading/saving and
	no GUI yet).

	* app/core/core-enums.[ch]: added enum GimpGradientColor to enable
	specifying gradient colors in terms of foreground and background.

	* app/core/gimpgradient.[ch]: added color_type members to the
	GimpGradientSegment struct and honor them in
	gimp_gradient_get_color_at(). Added GimpContext parameters to all
	functions which finally call get_color_at().

	* app/core/gimp-gradients.c: use the new method to implement the
	builtin gradients.

	* app/core/gimpviewable.[ch]: added GimpContext parameters to all
	get_preview() and get_pixbuf() functions.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-preview.[ch]
	* app/core/gimpgradient.c
	* app/core/gimpimage-preview.[ch]
	* app/core/gimpimagefile.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpundo.[ch]
	* app/text/gimpfont.c
	* app/vectors/gimpvectors-preview.[ch]: changed ::get_preview()
	and ::get_pixbuf() implementations accordingly.

	* app/core/gimpdrawable-blend.c
	* app/core/gimppalette-import.[ch]
	* app/dialogs/dialogs-constructors.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/resize-dialog.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpnavigationeditor.c
	* app/paint/gimppaintoptions.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimptexttool.c
	* app/actions/gradient-editor-commands.c
	* app/widgets/gimpaction.c
	* app/widgets/gimpbrusheditor.[ch]
	* app/widgets/gimpbufferview.c
	* app/widgets/gimpcellrendererviewable.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpclipboard.c
	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainerbox.c
	* app/widgets/gimpcontainercombobox.c
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainerentry.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainertreeview.[ch]
	* app/widgets/gimpdataeditor.[ch]
	* app/widgets/gimpdevicestatus.c
	* app/widgets/gimpdnd.[ch]
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpgradienteditor.[ch]
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimppaletteeditor.[ch]
	* app/widgets/gimppropwidgets.[ch]
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpthumbbox.[ch]
	* app/widgets/gimptoolbox-image-area.c
	* app/widgets/gimptoolbox-indicator-area.c
	* app/widgets/gimptooloptionseditor.c
	* app/widgets/gimpundoeditor.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpview-popup.[ch]
	* app/widgets/gimpview.[ch]
	* app/widgets/gimpviewablebutton.c
	* app/widgets/gimpviewabledialog.c
	* app/widgets/gimpviewrenderer.[ch]
	* app/widgets/gimpviewrenderer-frame.c
	* app/widgets/gimpviewrendererbrush.c
	* app/widgets/gimpviewrendererbuffer.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderergradient.c
	* app/widgets/gimpviewrendererimage.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb: added tons of GimpContext members
	and parameters, implement GimpDocked::set_context() in many
	widgets. Pass these locally remembered contexts to GimpViewable
	functions. Did some minor cleanups on the way. There are still
	some minor FIXMEs around where the code uses a NULL context (which
	is allowed by the APIs)

	* app/pdb/drawable_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/image_cmds.c: regenerated.
2006-08-29 21:44:51 +00:00
Sven Neumann cba830e75b fixed casts to silence compiler warnings.
2006-06-17  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpview.c: fixed casts to silence compiler
warnings.
2006-06-17 08:51:47 +00:00
Sven Neumann 6ebcf700d1 removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15  Sven Neumann  <sven@gimp.org>

	* app/*/*.c:
	* lib*/*.c: removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15 09:46:31 +00:00
Michael Natterer 401b865e22 save 20 bytes per instance by using single bits instead of 6 gbooleans.
2006-05-12  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpview.h: save 20 bytes per instance by using
	single bits instead of 6 gbooleans.

	* app/widgets/gimpview.c: some code cleanup.

	* app/widgets/gimpviewrendererbrush.c: don't #include "gimpbrush.h".

	* app/widgets/gimpviewrendererbuffer.c: don't #include "gimpbuffer.h".

	* app/widgets/gimpviewrenderergradient.c
	* app/widgets/gimpviewrendererimagefile.c
	* app/widgets/gimpviewrendererimagefile.h: micro cosmetics.
2006-05-12 15:39:31 +00:00
Michael Natterer 61df53ec54 port to G_DEFINE_TYPE() and friends. Some related cleanup.
2005-12-19  Michael Natterer  <mitch@gimp.org>

	* app/widgets/*.c: port to G_DEFINE_TYPE() and friends. Some
	related cleanup.
2005-12-19 22:37:49 +00:00
Michael Natterer 57f7f66a5f minor code and formatting cleanup.
2005-08-25  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpview.[ch]: minor code and formatting cleanup.
2005-08-25 19:06:49 +00:00
Sven Neumann 3ca90a182e Use the canonical form for signal names in lots of places (but by far not
2005-05-27  Sven Neumann  <sven@gimp.org>

	* (lots of files): Use the canonical form for signal names in lots
	of places (but by far not all).
2005-05-27 13:05:26 +00:00
Michael Natterer 7abaab62e0 added virtual function GimpViewable::get_size() and public API
2005-05-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.[ch]: added virtual function
	GimpViewable::get_size() and public API gimp_viewable_get_size()
	which return width and height and a boolean indicating if the
	viewable has a size at all.
	Added default implementation of GimpViewable::get_popup_size()
	using the new get_size() API.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage.c
	* app/core/gimppattern.c: implement GimpViewable::get_size().

	* app/core/gimpbrush.c
	* app/core/gimppattern.c: removed GimpViewable::get_popup_size()
	implementations, the default one is good enough.

	* app/core/gimpbrushpipe.c (gimp_brush_pipe_get_popup_size):
	redirect to gimp_viewable_get_size() instead of duplicating its
	return values.

	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpview.c: allow pixbuf dragging out of any
	viewable that has a size.

	* app/widgets/gimpdrawabletreeview.c: removed pixbuf dragging code
	here.

	* app/widgets/gimpdnd.c: set gimp busy around encoding/decoding
	pixbufs into/from GtkSelectionData, because it can be a time
	consuming operation.
2005-05-25 10:05:17 +00:00
Sven Neumann 5e32e298d2 added VOID: OBJECT, OBJECT.
2005-03-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimpmarshal.list: added VOID: OBJECT, OBJECT.

	* app/widgets/gimpview.[ch]: pass old and new viewable in the
	"set-viewable" signal.

	* app/widgets/gimptoolbox-image-area.c: don't add the XDS drag source
	more than once.
2005-03-25 18:58:04 +00:00
Sven Neumann 7684721c15 virtualized GimpView::set_viewable.
2005-03-25  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpview.[ch]: virtualized GimpView::set_viewable.

	* app/widgets/gimptoolbox-image-area.c: hook into "set_viewable"
	and add an XDS drag source.

	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimpdnd.c: unset the XdndDirectSave0 property when
	the drag ends, minor cleanups.
2005-03-25 17:16:07 +00:00
Sven Neumann 299dad1de3 invalidate the preview when the toggle buttons are used. Reported by
2004-10-08  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/apply_lens.c (lens_dialog): invalidate the
	preview when the toggle buttons are used. Reported by Olivier.

	* app/widgets/gimpview.c: minor cleanup.
2004-10-08 18:09:41 +00:00
David Odin 1622243213 app/widgets/gimppreviewrenderer-utils.c
* app/widgets/gimppreviewrenderer-utils.c
* app/widgets/gimppreviewrenderer-utils.h
* app/widgets/gimppreviewrendererbrush.c
* app/widgets/gimppreviewrendererbrush.h
* app/widgets/gimppreviewrendererdrawable.c
* app/widgets/gimppreviewrendererdrawable.h
* app/widgets/gimppreviewrenderergradient.c
* app/widgets/gimppreviewrenderergradient.h
* app/widgets/gimppreviewrendererimage.c
* app/widgets/gimppreviewrendererimage.h
* app/widgets/gimppreviewrendererimagefile.c
* app/widgets/gimppreviewrendererimagefile.h
* app/widgets/gimppreviewrendererlayer.c
* app/widgets/gimppreviewrendererlayer.h
* app/widgets/gimppreviewrenderervectors.c
* app/widgets/gimppreviewrenderervectors.h: Renamed all these files...

* app/widgets/gimpviewrenderer-utils.c
* app/widgets/gimpviewrenderer-utils.h
* app/widgets/gimpviewrendererbrush.c
* app/widgets/gimpviewrendererbrush.h
* app/widgets/gimpviewrendererdrawable.c
* app/widgets/gimpviewrendererdrawable.h
* app/widgets/gimpviewrenderergradient.c
* app/widgets/gimpviewrenderergradient.h
* app/widgets/gimpviewrendererimage.c
* app/widgets/gimpviewrendererimage.h
* app/widgets/gimpviewrendererimagefile.c
* app/widgets/gimpviewrendererimagefile.h
* app/widgets/gimpviewrendererlayer.c
* app/widgets/gimpviewrendererlayer.h
* app/widgets/gimpviewrenderervectors.c
* app/widgets/gimpviewrenderervectors.h: ... to these names. And also
  changed all the GimpPreviewRenderer* types to GimpViewRenderer* ones.

* app/tools/gimppaintoptions-gui.c

* app/widgets/Makefile.am
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimpview.c
* app/widgets/widgets-types.h
* app/widgets/gimpviewrenderer.c
* app/widgets/gimpviewrenderer.h: modified accordingly.
2004-08-26 14:20:30 +00:00
David Odin e91187ae86 app/widgets/gimppreview-popup.c renamed these files...
* app/widgets/gimppreview-popup.c
* app/widgets/gimppreview-popup.h: renamed these files...

* app/widgets/gimpview-popup.c
* app/widgets/gimpview-popup.h: .. to these files, and changed the
  GimpPreviewPopup type to GimpViewPopup.

* app/widgets/gimppreviewrenderer.c
* app/widgets/gimppreviewrenderer.h: renamed these files...

* app/widgets/gimpviewrenderer.c
* app/widgets/gimpviewrenderer.h: .. to these files, and changed
  GimpPreviewRenderer to GimpViewRenderer.

This is the second step of the great Preview->View renaming process.

* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpnavigationeditor.c

* app/widgets/Makefile.am
* app/widgets/gimpbrushfactoryview.c
* app/widgets/gimpbufferview.c
* app/widgets/gimpcellrendererviewable.c
* app/widgets/gimpcellrendererviewable.h
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainercombobox.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainerentry.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontainerview.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpnavigationpreview.c
* app/widgets/gimppatternfactoryview.c
* app/widgets/gimppreviewrenderer-utils.c
* app/widgets/gimppreviewrendererbrush.c
* app/widgets/gimppreviewrendererbrush.h
* app/widgets/gimppreviewrendererdrawable.c
* app/widgets/gimppreviewrendererdrawable.h
* app/widgets/gimppreviewrenderergradient.c
* app/widgets/gimppreviewrenderergradient.h
* app/widgets/gimppreviewrendererimage.c
* app/widgets/gimppreviewrendererimage.h
* app/widgets/gimppreviewrendererimagefile.c
* app/widgets/gimppreviewrendererimagefile.h
* app/widgets/gimppreviewrendererlayer.c
* app/widgets/gimppreviewrenderervectors.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimptemplateview.c
* app/widgets/gimptooloptionseditor.c
* app/widgets/gimptoolview.c
* app/widgets/gimpview.c
* app/widgets/gimpview.h
* app/widgets/gimpviewablebutton.c
* app/widgets/widgets-enums.h
* app/widgets/widgets-types.h: Modified accordingly.
2004-08-25 22:31:44 +00:00
David Odin cddf61a3e6 app/widgets/gimppreview.c renamed these two files to...
* app/widgets/gimppreview.c
* app/widgets/gimppreview.h: renamed these two files to...

* app/widgets/gimpview.c
* app/widgets/gimpview.h: ... these files.

Also renamed GimpPreview to GimpView.
This is the first step of the great Preview->View renaming process.

* app/actions/palettes-commands.c

* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpnavigationview.c

* app/gui/palette-import-dialog.c

* app/tools/gimppaintoptions-gui.c

* app/widgets/Makefile.am
* app/widgets/gimpaction.c
* app/widgets/gimpactiongroup.c
* app/widgets/gimpbrusheditor.c
* app/widgets/gimpbufferview.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainergridview.h
* app/widgets/gimpdevicestatus.c
* app/widgets/gimpdnd.c
* app/widgets/gimpdockbook.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimpnavigationpreview.c
* app/widgets/gimpnavigationpreview.h
* app/widgets/gimppaletteeditor.c
* app/widgets/gimppreview-popup.c
* app/widgets/gimppropwidgets.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpthumbbox.c
* app/widgets/gimptoolbox-image-area.c
* app/widgets/gimptoolbox-indicator-area.c
* app/widgets/gimptooloptionseditor.c
* app/widgets/gimpviewabledialog.c
* app/widgets/widgets-types.h: changed accordingly.
2004-08-24 17:16:46 +00:00
Michael Natterer 60fd11d79b Enabled previewing items without selecting them in all list and grid views
2004-08-05  Michael Natterer  <mitch@gimp.org>

	Enabled previewing items without selecting them in all list and
	grid views using mouse button 2. Implicitly enables previewing of
	items in container popups and thus fixes bug #121011:

	* app/widgets/gimppreview.c (gimp_preview_button_press_event)
	* app/widgets/gimpcellrendererviewable.c
	(gimp_cell_renderer_viewable_clicked): show the preview also on
	mouse button 2 click.

	* app/widgets/gimpcontainertreeview.c
	(gimp_container_tree_view_button_press): dispatch mouse button 2
	clicks to GimpCellRendererViewable, but don't select or change
	anything in the tree_view.

	Unrelated cleanup:

	* app/widgets/gimppreview.c (gimp_preview_button_press_event):
	don't offset bevent->x,y by widget->allocation.x,y before calling
	gimp_preview_popup_show() ...

	* app/widgets/gimppreview-popup.c (gimp_preview_popup_show):
	... instead, do it here generically (check if the parent widget is
	GTK_WIDGET_NO_WINDOW()).
2004-08-05 13:43:38 +00:00
Michael Natterer 5fef0b83a1 don't invoke the popup preview if there is no viewable.
2004-05-28  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimppreview.c (gimp_preview_button_press_event):
	don't invoke the popup preview if there is no viewable.
2004-05-28 14:51:48 +00:00
Michael Natterer c5865e497c changed drag source stuff to allow multiple data types. Changed DND source
2003-11-20  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.[ch]: changed drag source stuff to allow
	multiple data types. Changed DND source API to speak in terms of
	add()/remove() instead of set()/unset(). Added GimpDndDragFileFunc
	typedef and gimp_dnd_file_source_add().

	Unfortunately GTK+'s DND API lacks symmetry here (no GtkTargetList
	based API for drag sources), so we cannot really change drag
	sources on-the-fly and need to set GtkTargetEntry arrays manually.

	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpmenuitem.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimppreview.c
	* app/widgets/gimptoolbox-color-area.c: changed accordingly.

	* app/widgets/gimpdocumentview.c: ditto. Additionally offer
	"text/uri-list" so it's possible to drag images from the document
	history to the file manager or browser.
2003-11-20 16:26:15 +00:00
Sven Neumann dab006d51d removed the unused GimpViewable parameter from
2003-11-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimpviewable.[ch]: removed the unused GimpViewable
	parameter from gimp_viewable_calc_preview_size().

	* app/core/gimpbuffer.c
	* app/core/gimpimage-preview.c
	* app/core/gimpimagefile.c
	* app/core/gimpitem-preview.c
	* app/core/gimpundo.c
	* app/widgets/gimppreview.c
	* app/widgets/gimppreviewrendererdrawable.c
	* app/widgets/gimppreviewrendererimage.c: changed accordingly.

	* app/widgets/gimppreviewrenderer.[ch]: store the viewable_type in
	the preview renderer and use its default stock_id if no viewable
	is set.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpgradient.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpundo.c: set a default stock_id.
2003-11-17 13:34:38 +00:00
Michael Natterer 2b6ed25f06 multihead fix: added gimp_preview_renderer_unrealize() which destroys the
2003-11-13  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimppreviewrenderer.[ch]: multihead fix: added
	gimp_preview_renderer_unrealize() which destroys the cached
	GdkGC. This function must be called whenever the widget owning the
	renderer is unrealized.

	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimppreview.c: implement GtkWidget::unrealize() and
	call gimp_preview_renderer_unrealize() on all renderers.
2003-11-13 15:04:13 +00:00
Michael Natterer 24f3da165b changed GimpObject::get_memsize() to return a second value named
2003-08-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpobject.[ch]: changed GimpObject::get_memsize() to
	return a second value named "gui_size", where the primary return
	value is the "constant" actual size (as long as no operation is
	performed on the object), and the second "gui_size" return value
	is the size of temporary stuff like preview caches or boundary
	segments (which may change asynchronously, even if the object is
	on the undo stack).

	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpbuffer.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdata.c
	* app/core/gimpdatafactory.c
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-undo.c
	* app/core/gimpimage.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimplist.c
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimpundo.c
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpstroke.c
	* app/vectors/gimpvectors.c: changed get_memsize() implementations
	accordingly.

	* app/display/gimpdisplayshell-title.c
	* app/gui/debug-commands.c
	* app/widgets/gimppreview.c: changed callers accordingly.

	* app/core/gimpimage-undo-push.c: changed layer, channel, vectors
	and layer_mask undo steps to add/subtract the size of the
	resp. objects whenever they take/drop ownership of them. Ignore
	the objects' "gui_size" to get identical sizes on
	adding/subtracting. Fixes bug #120429.
2003-08-25 10:49:33 +00:00
Michael Natterer ec8365d927 return early if the widget is not realized to enable destroying the widget
2003-08-14  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimppreview.c (gimp_preview_button_press_event):
	return early if the widget is not realized to enable destroying
	the widget from an external "button_press_event" handler which
	returns FALSE (as done in GimpContainerGridView).
	Fixes bug #119413.

	Some paranoia fixes for similar (although unseen) problems:

	* app/widgets/gimppreview.[ch]: remember if we own a grab and
	remove it in GtkWidget::unmap().

	* app/widgets/gimppreview-popup.c: destroy the popup when the
	parent widget gets unmapped.
2003-08-13 23:28:26 +00:00
Sven Neumann a8697d3e02 app/widgets/gimppreview.[ch] moved background functionality into the
2003-04-11  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimppreview.[ch]
	* app/widgets/gimppreviewrenderer.[ch]: moved background
	functionality into the renderer. Removed some GimpPreview
	functions that used to wrap GimpPreviewRenderer functionality.

	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpnavigationview.c
	* app/gui/dialogs-constructors.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainermenuimpl.c
	* app/widgets/gimppreview-popup.c
	* app/widgets/gimpselectioneditor.[ch]: changed accordingly.
2003-04-11 11:18:12 +00:00
Sven Neumann 6d8249bd86 made GimpPreview a NO_WINDOW widget that draws on the parent window. Added
2003-04-11  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimppreview.[ch]: made GimpPreview a NO_WINDOW
	widget that draws on the parent window. Added an INPUT_ONLY window
	for events.

	* app/widgets/gimpnavigationpreview.c: take the widget's
	allocation into account when rendering the marker and grab the
	mouse on the preview's event_window.

	* app/widgets/gimppreviewrenderer.[ch]: pass GdkRectangles as const.
2003-04-11 08:37:26 +00:00
Sven Neumann c556c957a2 themes/Default/images/Makefile.am
2003-04-03  Sven Neumann  <sven@gimp.org>

	* themes/Default/images/Makefile.am
	* themes/Default/images/stock-template-16.png
	* themes/Default/images/stock-texture-64.png: new icons by Jimmac.

	* libgimpwidgets/gimpstock.[ch]: register the new icons.

	* app/widgets/gimppreview.[ch]: added the possibility to set a
	background pixmap on the preview widget.

	* app/gui/dialogs-constructors.c
	* app/display/gimpnavigationview.[ch]
	* app/widgets/gimpselectioneditor.[ch]: set a background on the
	navigation and selection previews when layer previews are disabled
	in the preferences.
2003-04-03 16:13:12 +00:00
Michael Natterer fdb7265a7c #define GIMP_VIEWABLE_MAX_PREVIEW_SIZE here.
2003-04-01  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.h: #define GIMP_VIEWABLE_MAX_PREVIEW_SIZE
	here.

	* app/widgets/gimppreview.h
	* app/widgets/gimppreviewrenderer.h: removed the #defines here.

	* app/core/gimpviewable.c (gimp_preview_get[_popup]_size): check
	the return values to be within bounds.

	* app/text/gimpfont.c
	* app/display/gimpdisplayshell-render.c: use the new constant
	instead of the magic "1024".

	* app/core/gimpdrawable-preview.c: #include our own header file.

	* app/widgets/gimpbrushfactoryview.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainermenu.c
	* app/widgets/gimpcontainermenuimpl.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpcontainerview.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppreview.c
	* app/widgets/gimppreviewrenderer.c: changed accordingly.
2003-04-01 13:53:47 +00:00
Michael Natterer 4d6b4f512c implement GtkDialog::close() and synthesize a "delete_event"
2003-03-20  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpdialog.c: implement GtkDialog::close() and
	synthesize a "delete_event" unconditionally.

	* app/widgets/gimpviewabledialog.c: emit "close" instead of
	synthesizing "delete_event".

	* app/widgets/gimppreview.[ch]: removed "extended_clicked" signal
	and added "GdkModifierType state" to "clicked"'s signature.

	* app/gui/file-open-dialog.c
	* app/gui/test-commands.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimptoolbox-indicator-area.c: changed accordingly.
2003-03-20 15:49:48 +00:00
Sven Neumann 166078e101 pass the modifier mask as GdkModifierType instead of guint.
2003-03-20  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpbutton.[ch]: pass the modifier mask as
	GdkModifierType instead of guint.

	* app/core/gimpmarshal.list
	* app/widgets/gimpcellrenderertoggle.c
	* app/widgets/gimpcellrendererviewable.c
	* app/widgets/gimppreview.c: use proper marshallers for signals
	that take flags as parameters.

	* app/core/gimpcontext.c: added the G_SIGNAL_TYPE_STATIC_SCOPE flag
	to the GimpRGB signal parameter.

2003-03-20  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/libgimpwidgets.types
	* libgimpwidgets/tmpl/gimpbutton.sgml
	* libgimpwidgets/tmpl/gimppickbutton.sgml: improved.
2003-03-20 13:22:22 +00:00
Michael Natterer 1522b841fa added "gboolean data_editable" which gets set in
2003-03-10  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdataeditor.[ch]: added "gboolean data_editable"
	which gets set in gimp_data_editor_real_set_data(). Set the name
	entry insensitive if the data is not editable.

	* app/widgets/gimpbrusheditor.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimpgradienteditor.c: look at editor->data_editable
	instead of duplicating the logic in all subclasses.

	* app/widgets/gimppreview.[ch]: added "gboolean expand" and
	gimp_preview_set_expand() like in GtkPreview bacause smooth auto
	resizing can only be done by the widget itself, not via external
	callbacks.

	* app/display/gimpnavigationview.c
	* app/widgets/gimpbrusheditor.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpselectioneditor.c: set expand == TRUE. Removed
	"size_allocate" callbacks. They resize *much* smoother now.
	Various cleanups.

	* app/widgets/gimpnavigationpreview.c: recalculate the preview
	coordinates when the size changes.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimppreviewrenderer-utils.c
	* app/widgets/gimppreviewrenderergradient.[ch]: new renderer which
	is much faster because it projects the gradient without creating
	intermediate buffers. Rendering can be restricted to an interval
	from [left...right].

	* app/widgets/gimpgradienteditor.[ch]: undeprecated by using
	GimpPreview instead of GtkPreview. Cleanup.

	* app/gui/gradient-editor-commands.c: changed accordingly.
2003-03-10 14:07:22 +00:00
Michael Natterer b31fd4b911 removed the constructors with a GimpViewable parameter and always create
2003-03-03  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimppreviewrenderer.[ch]: removed the constructors
	with a GimpViewable parameter and always create renderers from
	viewable types only. Made gimp_preview_renderer_update() emit only
	the "update" signal and added the new function
	gimp_preview_renderer_invalidate() which does what the old
	_update() did (invalidating and adding an idle function which
	emits "update"). Added gimp_preview_renderer_remove_idle() so
	renderer updating can be fully controlled using public functions.

	* app/widgets/gimppreviewrendererbrush.[ch]: no need to remember
	the widget for the brushpipe animation, simply call
	gimp_preview_renderer_update() in the animation timeout.

	* app/widgets/gimppreview.[ch]
	* app/widgets/gimpcontainertreeview.c: changed accordingly. Call
	gimp_preview_renderer_remove_idle() after setting the initial
	viewable because we will be updated anyway by the first expose.

	* app/widgets/gimppreview.[ch]: Added a size_request()
	implementation. Removed gimp_preview_update(). Added new
	constructor gimp_preview_new_full_by_types() to make the
	constructor API symmetric. Removed code duplication by calling the
	_by_types() constructors from the ones taking GimpViewable
	parameters.

	* app/gui/palette-import-dialog.c
	* app/widgets/gimppropwidgets.c
	* app/widgets/gimpselectioneditor.c: changed accordingly.
2003-03-03 12:59:03 +00:00
Michael Natterer 251f6b0483 added "gint bytes" to the GimpPreviewRenderer struct and pass it to
2003-03-01  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimppreviewrenderer.[ch]: added "gint bytes" to the
	GimpPreviewRenderer struct and pass it to
	gimp_preview_render_to_buffer().

	* app/widgets/gimppreviewrendererbrush.[ch]: render the indicators
	to the renderer's buffer, not to the TempBuf so they always appear
	in the corner again.

	Misc cleanups:

	* app/core/gimpbuffer.c (gimp_buffer_get_new_preview)
	* app/core/gimppattern.c (gimp_pattern_get_new_preview): no need
	to center the TempBuf if smaller than requested because
	GimpPreviewRenderer::render()'s default implementation adjusts the
	offsets itself.

	* app/widgets/gimppreview.c (gimp_preview_set_viewable): no need
	to update ourselves after we changed the renderer because the
	renderer's signal will update us.

	* app/widgets/gimppreviewrenderer.c (gimp_preview_renderer_draw):
	replaced my stupid buf_rect calculation overkill by something
	simple that does the same.
2003-03-01 12:55:43 +00:00
Michael Natterer 48bf4fb7b2 don't scale the preview up if the buffer is too small.
2003-03-01  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbuffer.c: don't scale the preview up if the
	buffer is too small.

	* app/core/gimppattern.c: don't add a white border around the
	preview if the pattern is too small.

	* app/widgets/gimppreviewrenderer.[ch]: new object. A buffer
	that updates itself on GimpViewable changes and can render
	itself to any widget. Basically GimpPreview reduced to the
	render and draw code.

	* app/widgets/gimppreview.[ch]: removed all rendering and drawing
	code and keep a GimpPreviewRenderer instance. Connect to its
	"update" signal for queuing draws on the preview.

	* app/widgets/gimpcellrendererviewable.[ch]
	* app/widgets/gimpcontainertreeview.c: same here: removed
	rendering and drawing code and keep GimpPreviewRenderers in the
	list store.  Delays preview creation for GtkTreeViews until the
	buffer is really needed for drawing and adds idle preview updating
	on viewable changes.

	* app/widgets/gimppreview-utils.[ch]
	* app/widgets/gimpbrushpreview.[ch]
	* app/widgets/gimpbufferpreview.[ch]
	* app/widgets/gimpdrawablepreview.[ch]
	* app/widgets/gimpimagepreview.[ch]: removed...

	* app/widgets/gimppreviewrenderer-utils.[ch]
	* app/widgets/gimppreviewrendererbrush.[ch]
	* app/widgets/gimppreviewrendererdrawable.[ch]
	* app/widgets/gimppreviewrendererimage.[ch]: ...and converted to
	GimpPreviewRenderer subclasses.

	* app/display/gimpnavigationview.c
	* app/gui/palette-import-dialog.c
	* app/widgets/Makefile.am
	* app/widgets/widgets-enums.h
	* app/widgets/widgets-types.h
	* app/widgets/gimpchannellistview.c
	* app/widgets/gimpcomponentlistitem.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainermenuimpl.c
	* app/widgets/gimplayerlistitem.c
	* app/widgets/gimplistitem.c
	* app/widgets/gimpnavigationpreview.[ch]
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpvectorslistview.c: changed accordingly.
2003-03-01 03:53:41 +00:00
Michael Natterer 0614aa5329 added virtual function get_popup_size() which returns a boolean indicating
2003-02-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.[ch]: added virtual function
	get_popup_size() which returns a boolean indicating if a popup is
	needed and its size.

	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-preview.[ch]
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpundo.c: implement it.

	* app/widgets/gimppreview.[ch]: removed virtual functions
	needs_popup() and create_popup(). Removed the code which creates
	the popup and the popup members of the GimpPreview struct.

	* app/widgets/gimppreview-popup.[ch]: new files providing the
	utility function gimp_preview_popup_show() which can show popups
	from any widget, not just from a GimpPreview. Checks if a popup is
	needed using gimp_viewable_get_popup_size().

	* app/widgets/gimpcellrendererviewable.c: show popups here too.

	* app/widgets/gimpbrushpreview.c
	* app/widgets/gimpbufferpreview.c
	* app/widgets/gimpdrawablepreview.c
	* app/widgets/gimpimagepreview.c: removed needs_popup() and
	create_popup() implementations.

	* app/widgets/gimpnavigationpreview.c: removed empty render()
	implementation.

	* app/widgets/gimpundoeditor.c: use a tree instead of a list view.

	* app/widgets/gimpgradientpreview.[ch]
	* app/widgets/gimppalettepreview.[ch]
	* app/widgets/gimppatternpreview.[ch]: removed because they only
	implemented the removed popup functions.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpmenuitem.c
	* app/widgets/gimppreview-utils.c: changed accordingly
2003-02-27 13:59:41 +00:00
Sven Neumann 0ceeeb0254 added a writeable field to GimpData and set it from
2003-02-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdata.[ch]: added a writeable field to GimpData and
	set it from gimp_data_set_filename().

	* app/gui/brushes-menu.c
	* app/gui/gradients-menu.c
	* app/gui/palettes-menu.c
	* app/gui/patterns-menu.c
	* app/widgets/gimpbrushfactoryview.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimpgradienteditor.c: look at data->writeable when
	setting widgets sensitivity.

	* app/gui/user-install-dialog.c (user_install_dialog_create): reduce
	some of the dialog clutter by not showing the directories created for
	plug-ins.

	* app/core/gimpviewable.[ch]: added a default_stock_id to
	GimpViewableClass so we don't need to hold a copy in each instance.
	Added accessor functions to set and get the stock_id.

	* app/core/gimptoolinfo.c
	* app/gui/dialogs-constructors.c
	* app/gui/image-menu.c
	* app/tools/gimpcroptool.c
	* app/tools/gimphistogramtool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimptransformtool.c
	* app/widgets/gimpcellrendererviewable.c
	* app/widgets/gimppreview.c
	* app/widgets/gimptoolbox.c: use gimp_viewable_get_stock_id().

	* app/text/gimptextlayer.c: set a text icon as default stock_id.
2003-02-26 18:08:26 +00:00
Michael Natterer 305db405b2 added "gchar *stock_id" to the GimpViewable struct. It is used by the GUI
2003-02-26  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.[ch]: added "gchar *stock_id" to the
	GimpViewable struct. It is used by the GUI if the get_preview()
	functions return NULL. Default to GTK_STOCK_DIALOG_QUESTION.

	* app/core/gimptoolinfo.[ch]: set the tool's stock_id. Removed
	the cached GdkPixbuf. Don't implement any preview function
	so the GUI uses the stock_id.

	* app/tools/tool_manager.c: removed GdkPixbuf creation, removed
	the #warning about the buggy way we created the pixbuf.

	* app/gui/dialogs-constructors.c
	* app/gui/image-menu.c
	* app/tools/gimpcroptool.c
	* app/tools/gimphistogramtool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimptransformtool.c
	* app/widgets/gimptoolbox.c: use viewable->stock_id instead
	of tool_info->stock_id.

	* app/core/gimpbrush.c
	* app/core/gimpgradient.c
	* app/core/gimpimagefile.c
	* app/core/gimpundo.c: simplified get_preview() implementations:

	- never scale previews up, only down.
	- don't render white or checks backgrounds but simply return
	  TempBufs with alpha and let the preview system do its job.
	- don't add padding but simply return previews smaller than
	  requested.

	* app/display/gimpdisplayshell-render.[ch]: added
	"render_blend_white", a 2d lookup table for blending on white,
	just as the check lookup tables. Added "render_white_buf".

	* app/widgets/gimppreview.[ch]: changed a lot:

	- don't render the preview's border into the buffer.
	- added "GdkGC *border_gc" and draw the preview's border in expose()
	  using gdk_draw_rectangle().
	- added "GdkPixbuf *no_preview_pixbuf" and create it in
	  gimp_preview_real_render() if gimp_viewable_get_preview()
	  returned NULL.
	- factored the actual preview rendering out to
	  gimp_preview_render_to_buffer(). Added configurable background
	  rendering for the preview itself and it's padding area
	  (the area the preview is larger than the buffer returned
	  by gimp_viewable_get_preview()).
	- changed gimp_preview_render_and_flush() to
	  gimp_preview_render_preview() and added "inside_bg" and
	  "outside_bg" parameters.
	- use the new render buffers for blending on white.

	* app/widgets/gimpbrushpreview.c
	* app/widgets/gimpbufferpreview.c
	* app/widgets/gimpdrawablepreview.c
	* app/widgets/gimpgradientpreview.c
	* app/widgets/gimpimagepreview.c
	* app/widgets/gimppalettepreview.c
	* app/widgets/gimppatternpreview.c: don't create large white
	TempBufs to center the previews in but simply set the TempBuf's
	offsets to get them centered. Simplified & cleaned up many preview
	render functions. Pass the correct GimpPreviewBG modes to
	gimp_preview_render_preview().

	* app/widgets/gimpcellrendererviewable.[ch]: new GtkCellRenderer
	class derived from GtkCellRendererPixbuf which knows how
	to use gimp_viewable_get_preview_size() and renders the
	viewable's stock item if no preview can be created.

	* app/widgets/gimpcontainertreeview.c: added a GtkTreeCellDataFunc
	which creates the preview pixbuf if needed so we don't create it
	unconditionally upon item insertion. Fixed preview size assertion
	to use GIMP_PREVIEW_MAX_SIZE, not "64". Block "selection_changed"
	while reordering the selected item.

	* app/widgets/gimpcontainerview.c: cosmetic.

	* app/widgets/gimpimagefilepreview.[ch]
	* app/widgets/gimptoolinfopreview.[ch]
	* app/widgets/gimpundopreview.[ch]: removed because the default
	implementation is good enough.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimppreview-utils.c: changed accordingly.

	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs-menu.c
	* app/gui/dialogs.c
	* app/gui/image-menu.c
	* app/gui/toolbox-menu.c: register grid and tree view variants
	of the document history.

	Unrelated:

	* app/gui/gui.c (gui_exit_finish_callback): disconnect from
	signals earlier.

	* app/gui/user-install-dialog.c: create the "tool-options" subdir
	of the user's ~/.gimp-1.3 directory.
2003-02-26 16:17:10 +00:00
Michael Natterer 9ee632a656 Started migration from GtkList to GtkTreeView:
2003-02-21  Michael Natterer  <mitch@gimp.org>

	Started migration from GtkList to GtkTreeView:

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpcontainertreeview.[ch]; new GimpContainerView
	subclass using GtkListStore/GtkTreeView.

	* app/widgets/widgets-enums.h: added GIMP_VIEW_TYPE_TREE to
	thje GimpViewType enum.

	* app/widgets/gimpcontainereditor.c: added GimpContainerTreeView
	to the switch() which selects the view type.

	* app/gui/dialogs-commands.c
	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs-menu.c
	* app/gui/dialogs.c: added tree view versions of many dialogs.

	* app/widgets/gimppreview.[ch]: removed the get_size() virtual
	function and gimp_preview_calc_size().

	* app/core/gimpviewable.[ch]: added virtual function
	get_preview_size() and gimp_viewable_calc_preview_size().

	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-preview.[ch]
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage.c
	* app/core/gimppalette.c: added get_preview_size() implementations.

	* app/widgets/gimpbufferpreview.c
	* app/widgets/gimpdrawablepreview.c
	* app/widgets/gimpgradientpreview.c
	* app/widgets/gimpimagepreview.c
	* app/widgets/gimppalettepreview.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpundopreview.c
	* app/display/gimpnavigationview.c: changed accordingly, removed
	get_size() implementations.

	* app/widgets/widgets-types.h: changed the first param of
	GimpItemGetNameFunc from GtkWidget to GObject.

	* app/widgets/gimpcontainerview-utils.c: accept a GimpViewable as
	object in the built-in get_name funcs.

	* app/widgets/gimpcomponentlistitem.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimplistitem.c
	* app/widgets/gimpmenuitem.c: changed accordingly.
2003-02-21 19:03:19 +00:00
Michael Natterer c8b4394d71 Reimplemented the undo history:
2003-02-20  Michael Natterer  <mitch@gimp.org>

	Reimplemented the undo history:

	* app/Makefile.am
	* app/undo_history.[ch]: removed.

	Changes/cleanups to the undo system to enable/simplify the new
	undo history implementation:

	* app/core/core-types.h: removed enum undo_event_t. Removed the
	GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc
	because GimpUndo has a GimpImage pointer now (see below).

	* app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an
	enum value for REDO_EXPIRED.

	* app/core/gimpimage.[ch]: added a GimpUndo pointer to the
	"undo_event" signal which needs to be passed for all events except
	UNDO_FREE.

	* app/display/gimpdisplayshell-handlers.c: changed accordingly.

	* app/core/gimpundo.[ch]: added a GimpImage pointer to the
	GimpUndo struct. Removed GimpImage parameters all over the
	place. Added preview stuff. The preview creation needs to be
	triggered explicitly using gimp_undo_create_preview() because the
	GimpUndo can't know when it's possible to create the preview.

	* app/core/gimpimage-undo-push.c
	* app/paint/gimppaintcore-undo.c
	* app/tools/gimptransformtool-undo.c: changed accordingly, cleanup.

	* app/core/gimpundostack.[ch]: ditto. Return the freed undo from
	gimp_undo_stack_free_bottom(). Removed unused container signal
	handlers.

	* app/core/gimpimage-undo.c: free the redo stack the same way old
	undos are freed (from bottom up). Emit "undo_event" with event ==
	REDO_EXPIRED for each removed redo.

	* app/core/gimpmarshal.list: added new marshallers.

	New undo history implementation:

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpundoeditor.[ch]
	* app/widgets/gimpundopreview.[ch]: new widgets for the undo
	step previews and the history itself.

	* app/widgets/gimppreview-utils.c: added GimpUndoPreview to the
	list of possible preview types.

	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs-menu.c
	* app/gui/dialogs.c
	* app/gui/image-menu.c
	* app/gui/toolbox-menu.c: removed the old and added the new undo
	history to the dialog factory and the various dialog menus.

	* app/widgets/gimpdnd.[ch]: don't warn if a GType has no
	corresponding DND type. Instead, return FALSE from the function
	that failed.

	* app/widgets/gimppreview.c: check the return value of gimpdnd
	functions.  Not only add drag sources but also remove them when no
	longer needed.

	* app/widgets/gimpselectioneditor.h: removed unneeded inclusion of
	"gui/gui-types.h".
2003-02-20 12:47:42 +00:00
Manish Singh 1a44f2126c cleanup, removed unecessary G_OBJECT() casts. Should do the same for
2003-01-05  Manish Singh  <yosh@gimp.org>

        * many files in app, modules and libgimp*: cleanup, removed unecessary
        G_OBJECT() casts. Should do the same for plug-ins, when more of them
        get undeprecated.
2003-01-05 22:07:10 +00:00
Manish Singh 51537fd6ba use a low priority idle handler to queue redraws, since we really want
2002-11-09  Manish Singh  <yosh@gimp.org>

        * app/widgets/gimppreview.[ch]: use a low priority idle handler to
        queue redraws, since we really want updates when nothing else is
        going on.
2002-11-09 20:01:19 +00:00
Michael Natterer f901058b4b removed idle rendering and render the preview on "expose" if needed.
2002-11-04  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimppreview.[ch]: removed idle rendering and render
	the preview on "expose" if needed. Renamed gimp_preview_render()
	to gimp_preview_update(). Cleanup.

	* app/widgets/gimpimagefilepreview.c
	* app/widgets/gimpselectioneditor.[ch]
	* app/widgets/gimptoolinfopreview.c: changed accordingly.
2002-11-04 12:15:29 +00:00
Hans Breuer e17baf71d6 updated
2002-09-06  Hans Breuer  <hans@breuer.org>

	* */*/makefile.msc : updated

	* libgimptool/makefile.msc : new file, libgimptool
	is currently build as static lib due to references
	into app/core

	* themes/Default/makefile.msc : removed
	* themes/Default/images/makefile.msc : new file

	* libgimpwidgets/makefile.msc libgimpwidgets/gimpwidgets.c
	updated (externals)

	* app/paint-funcs.c : replaced gccism varibale size array on
	stack with portable alloca, removed sizeof(buf) check which
	must fail now.

	* app/config/gimpconfig.c : get write/close protos
	on win32 from io.h
	* app/config/gimprc.c : dito and <string.h>
	* app/config/gimpscanner.c : <string.h> only

	* app/core/gimpcontainer.c : workaround for clumsy
	compilers not supporting vararg macros

	* app/core/gimpdocumentlist.c app/core/gimpparasitelist.c
	include <io.h> on win32

	* app/widgets/gimpdocumentview.c
	  app/widgets/gimpimagedock.c
	  app/widgets/gimppreview.c : add #ifdef __GNUC__
	to avoid breaking on non standard pragma #warning.

	* app/gui/session.c : include <string.h>

	* regexrepl/makefile.msc : build as dll

	* plug-ins/makefile.msc : updated

	* plug-ins/common/pix.c : open file binary

	* plug-ins/common/spheredesigner.c : avoid error
	'incompatible types' while assigning, use memcpy()
2002-09-06 22:25:19 +00:00
Michael Natterer c5d4b7020b DND cleanup part 1:
2002-09-02  Michael Natterer  <mitch@gimp.org>

	DND cleanup part 1:

	* app/widgets/gimpdnd.[ch]: changed all gimp_dnd_*_dest_set() and
	_unset() functions to _dest_add() and _dest_remove(). Switch from
	using static arrays of GtkTargetEntries to dynamic GtkTargetLists.
	The _add() and _remove() functions configure the drag dest
	automatically if not already done, so there is no need to call
	gtk_drag_dest_set() on the widget any more. Drag source cleanup
	will follow...

	Renamed silly function names gimp_gtk_* to gimp_dnd_*

	* app/display/gimpdisplayshell.c
	* app/tools/gimpblendtool.c
	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcontainerview.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimplistitem.c
	* app/widgets/gimpmenuitem.c
	* app/widgets/gimppreview.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimptoolbox-color-area.c
	* app/widgets/gimptoolbox-indicator-area.c
	* app/widgets/gimptoolbox.c
	* app/gui/about-dialog.c
	* app/gui/color-select.c
	* app/gui/device-status-dialog.c
	* app/gui/tool-options-dialog.c: changed accordingly. Removed
	all calls to gtk_drag_dest_set() and their GtkTargetEntry tables.

	* app/widgets/gimpchannellistitem.c: enabled some commented out
	dnd code (which will not work since dnd needs more love...)

	* app/widgets/gimpitemlistview.[ch]: added a third
	"gboolean interactive" parameter to GimpItemNewFunc.

	* app/gui/channels-commands.[ch]
	* app/gui/layers-commands.[ch]
	* app/gui/vectors-commands.[ch]: if the new_item_func is called
	with "interactive == FALSE", don't pop up a dialog but silently
	create a new item of the image's size.

	* app/widgets/gimpdrawablelistview.c: use the new feature to allow
	color and pattern drops to the "New" button, which creates a new
	layer/channel filled with the color/pattern.
	(special feature for drc ;-)

	* app/widgets/gimppaletteeditor.c: fixed event handling so we see
	the context menu again. Also, don't redraw on "expose", since
	GtkPreview does that for us.
2002-09-02 14:39:08 +00:00
Michael Natterer c46dedd9c5 added #define for GIMP_PREVIEW_MAX_BORDER_WIDTH instead of hardcoding it
2002-08-27  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimppreview.[ch]: added #define for
	GIMP_PREVIEW_MAX_BORDER_WIDTH instead of hardcoding it all over
	the place, cleanup.
2002-08-27 15:31:24 +00:00
Michael Natterer e62c2c58c7 bumped version number to 1.3.9
2002-08-22  Michael Natterer  <mitch@gimp.org>

	* configure.in: bumped version number to 1.3.9

	* app/tools/gimpbycolorselecttool.[ch]: removed the ByColorDialog
	and cleaned up the code.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpselectioneditor.[ch]: added new widget
	GimpSelectionEditor with same same functionality as the old
	ByColorDialog which can be open all the time (independent of the
	active tool).

	* app/widgets/gimppreview.[ch]: added gimp_preview_new_by_type()
	so previews can be created without a viewable.

	* app/widgets/gimppreview-utils.[ch]: changed
	gimp_preview_type_from_viewable() to
	gimp_preview_type_from_viewable_type().

	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs.c
	* app/gui/menus.c: register the new dialog type.
2002-08-22 12:49:01 +00:00
Sven Neumann 117a8032d1 center the preview's allocation.
2002-06-12  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimppreview.c (gimp_preview_size_allocate): center
	the preview's allocation.

	* app/tools/gimpblendtool.c (blend_options_new): use a button for
	the gradient so it's more obvious that it can be pressed.
2002-06-12 15:39:03 +00:00
Michael Natterer 6707e317d1 Yes, this is a bit hackish...
2002-05-28  Michael Natterer  <mitch@gimp.org>

	Yes, this is a bit hackish...

	* app/widgets/gimppreview.[ch]: added "gboolean eat_button_events"
	to enable previews which are clickable *and* let the click through
	to their parent widget.

	* app/widgets/gimpdrawablelistitem.c
	* app/widgets/gimplayerlistitem.c: set "eat_button_events" to
	FALSE whenever we set "clickable" to TRUE so the GtkListItems get
	the click and can set the active drawable.
2002-05-28 20:04:28 +00:00
Michael Natterer 384a2a851e connect to size allocations of the navigation preview's parent container
2002-05-11  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpnavigationview.c: connect to size allocations of
	the navigation preview's parent container and resize it so it
	takes all available space.

	* app/widgets/gimppreview.[ch]: replaced magic values by public
	#defines of GIMP_PREVIEW_MAX_SIZE and GIMP_PREVIEW_MAX_POPUP_SIZE.
	Increased the maximum preview size to 1024. Don't call the virtual
	get_size() function if preview->viewable is NULL but call
	gimp_preview_real_get_size() directly.

	* app/widgets/gimpbufferpreview.c
	* app/widgets/gimpcomponentlistitem.c
	* app/widgets/gimpcontainermenu.c
	* app/widgets/gimpdrawablepreview.c
	* app/widgets/gimpimagepreview.c
	* app/widgets/gimplistitem.c
	* app/widgets/gimpmenuitem.c
	* app/widgets/gimpnavigationpreview.c: replaced magic values by
	the new costants.
2002-05-11 13:51:26 +00:00