- 13 Apr, 2005 1 commit
-
-
Sven Neumann authored
2005-04-13 Sven Neumann <sven@gimp.org> * app/core/gimplayer.c: fixed gtk-doc comment.
-
- 09 Apr, 2005 1 commit
-
-
Michael Natterer authored
2005-04-09 Michael Natterer <mitch@gimp.org> Implement dragging and dropping in any GdkPixbuf supported format. Fixes bug #172794 and bug #172795. * app/core/gimplayer.[ch] (gimp_layer_new_from_region): new function which contains all stuff that was in gimp_layer_new_from_tiles(). (gimp_layer_new_from_tiles): use above function. (gimp_layer_new_from_pixbuf): new function. * app/widgets/Makefile.am * app/widgets/gimppixbuf.[ch]: new files containing GdkPixbuf utility functions for clipboard and DnD. * app/widgets/gimpselectiondata.[ch]: removed gimp_selection_data_set,get_pixbuf(), GTK+ provides the same API. Also removed GdkAtom parameters all over the place because it's always the same as selection_data->target. * app/widgets/gimpclipboard.c: use the new pixbuf utility functions and gtk_selection_data_set,get_pixbuf(). * app/widgets/widgets-enums.h * app/widgets/gimpdnd.[ch]: removed never-implemented GIMP_DND_TYPE_PNG and added a generic GIMP_DND_TYPE_PIXBUF instead. Added API to drag and drop GdkPixbufs which transparently converts from/to and GdkPixbuf-supported image format. Removed passing around of GdkAtoms, since they were always the same as selection_data->target. * app/widgets/gimpdnd-xds.[ch]: follow GdkAtom parameter removal. * app/widgets/gimpcontainertreeview.[ch]: added virtual function GimpContainerTreeView::drop_pixbuf(). * app/widgets/gimpcontainertreeview-dnd.c: dispatch drop_pixbuf(). * app/widgets/gimplayertreeview.c: implement drop_pixbuf(). * app/widgets/gimpdrawabletreeview.c: allow to drag all drawables as pixbufs. * app/display/gimpdisplayshell-dnd.c: allow dropping of pixbufs.
-
- 18 Feb, 2005 1 commit
-
-
Sven Neumann authored
2005-02-18 Sven Neumann <sven@gimp.org> * app/core/Makefile.am * app/core/gimpdrawable-convert.[ch]: new files holding gimp_drawable_convert_rgb() and gimp_drawable_convert_grayscale() moved out of gimpimage-convert.[ch]. * app/core/gimpchannel.c * app/core/gimpimage-convert.[ch] * app/core/gimplayer.c: changed accordingly.
-
- 15 Feb, 2005 1 commit
-
-
Sven Neumann authored
2005-02-16 Sven Neumann <sven@gimp.org> * app/core/gimplayer.c (gimp_layer_transform_color): code cleanup.
-
- 13 Jan, 2005 1 commit
-
-
Michael Natterer authored
2005-01-13 Michael Natterer <mitch@gimp.org> Splitting GimpItem::convert() into two virtual functions was apparently buggy over-engineering. Reverted that stuff and implement item conversion much simpler: * app/core/gimpitem.[ch]: have a single virtual function, GimpItem::convert(), which takes a newly duplicated item and the destination image. (gimp_item_convert): simply call GimpItem::convert() on the result of gimp_item_duplicate(). (gimp_item_real_convert): set the item's new image. * app/core/gimplayer.c (gimp_layer_convert) * app/vectors/gimpvectors.c (gimp_vectors_convert): changed accordingly and chain up after, not before doing our own stuff so the old image is still available as item->image for stuff like colormap conversion. Fixes bug #163879.
-
- 23 Dec, 2004 1 commit
-
-
Michael Natterer authored
2004-12-23 Michael Natterer <mitch@gimp.org> Item conversion depends on the old *and* the new item type, so it can't live in the old item's vtable only: * app/core/gimpitem.[ch]: split GimpItem::convert() into GimpItem::convert_from() (which is called on the old item and creates the new item) and GimpItem::convert_to() (which is called on the new item). This way functions from the old *and* new items' vtables are called and it's possible to convert between item types which live on different branches of the class hierarchy or to item types which live further down the class tree than the old item. (gimp_item_convert): call ::convert_to() on the new item created by ::convert_from(). * app/vectors/gimpvectors.c: changed ::convert() implementation to ::convert_from(). * app/core/gimplayer.c: changed ::convert() to ::convert_to(). Fixes bug #161877.
-
- 16 Nov, 2004 1 commit
-
-
Michael Natterer authored
2004-11-16 Michael Natterer <mitch@gimp.org> * app/core/gimpchannel-select.c * app/core/gimpchannel.c * app/core/gimpdrawable-desaturate.c * app/core/gimpdrawable-equalize.c * app/core/gimpdrawable-histogram.c * app/core/gimpdrawable-invert.c * app/core/gimpdrawable-levels.c * app/core/gimpdrawable-offset.c * app/core/gimpdrawable-stroke.c * app/core/gimpdrawable-transform.c * app/core/gimpdrawable.c * app/core/gimpitem-linked.c * app/core/gimpitem.c * app/core/gimplayer.c * app/core/gimpselection.c * app/paint/gimppaintcore-stroke.c * app/text/gimptextlayer.c: in all functions which somehow (explicitely or implicitely) touch undo, either g_return_if_fail() on gimp_item_is_attached() or simply don't push an undo step if feasible (e.g. for simple stuff like layer opacity). * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/paint_tools.pdb: let PDB wrappers fail accordingly so they don't run into the assertions added above. * app/pdb/color_cmds.c * app/pdb/drawable_cmds.c * app/pdb/image_cmds.c * app/pdb/layer_cmds.c * app/pdb/paint_tools_cmds.c: regenerated.
-
- 22 Sep, 2004 1 commit
-
-
Michael Natterer authored
2004-09-22 Michael Natterer <mitch@gimp.org> * app/widgets/gimplayertreeview.c (gimp_layer_tree_view_floating_selection_changed): removed the hack that was displaying "Floating Selection" instead of the floating layer's real name. * app/core/gimplayer.c: implement GimpViewable::get_description() instead and special case floating selections with a two-line text that contains "Floating Selection". * app/core/gimplayer-floating-sel.c * app/core/gimpimage-undo-push.c: emit "name_changed" on the layer when it changes its state from floating to normal or vice versa so the views can update accordingly. * app/core/gimpselection.c: s/"Selection"/"Floated Layer"/. * app/tools/gimpeditselectiontool.c: s/"Floating Layer"/"Floating Selection"/.
-
- 19 Sep, 2004 1 commit
-
-
Sven Neumann authored
2004-09-19 Sven Neumann <sven@gimp.org> Improved undo memory calculation for paint operations (bug #153035): * app/base/tile-manager.[ch] (tile_manager_get_memsize): added a "gboolean sparse" parameter to get more accurate results for sparse tile-managers. * app/core/gimpbuffer.c * app/core/gimpdrawable.c * app/core/gimpimage-undo-push.c * app/core/gimpimage.c * app/core/gimplayer.c * app/core/gimpprojection.c: changed accordingly.
-
- 10 Aug, 2004 1 commit
-
-
Michael Natterer authored
2004-08-10 Michael Natterer <mitch@gimp.org> Redid the whole internal progress stuff: don't pass around progress_callback and progress_data; instead, provide a pointer to a GimpProgressInterface which can be implemented by a variety of backends. Addresses (but not yet fixes) bugs #6010, #97266 and #135185. * app/display/Makefile.am * app/display/gimpprogress.[ch]: removed the old progress hack. * app/core/Makefile.am * app/core/core-types.h * app/core/gimpprogress.[ch]: implement GimpProgressInterface. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpprogressdialog.[ch]: the standalone progress dialog as widget implementing GimpProgressInterface. * app/display/gimpdisplay.c * app/display/gimpstatusbar.[ch] * app/widgets/gimpfiledialog.[ch] * app/widgets/gimpthumbbox.[ch]: added GimpProgressInterface implementation to these classes. * app/core/gimp-gui.[ch] * app/gui/gui-vtable.c: replaced the old progress vtable entries by two new to create and destroy a GimpProgressDialog in case no other progress is available. * app/pdb/procedural_db.[ch] * app/plug-in/plug-in-run.[ch] * tools/pdbgen/app.pl: pass a GimpProgress to all PDB wrappers and all plug-ins. * app/plug-in/plug-in.[ch] * app/plug-in/plug-ins.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c: handle the case there the plug-in was crated with a progress as well as the case where it wasn't. * app/app_procs.c * app/batch.c * app/xcf/xcf.c * app/file/file-open.[ch] * app/file/file-save.[ch] * app/widgets/gimphelp.c * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: changed accordingly. * app/core/gimpimagefile.[ch] * app/display/gimpdisplayshell-dnd.c * app/gui/file-open-dialog.c * app/gui/file-open-location-dialog.c * app/gui/file-save-dialog.c * app/widgets/gimplayertreeview.c * app/widgets/gimptoolbox-dnd.c: pass a GimpProgress to all file related functions. Embed the progress in the file dialog where possible. * app/core/gimpdrawable-blend.[ch] * app/core/gimpdrawable-transform.[ch] * app/core/gimpimage-convert.[ch] * app/core/gimpimage-flip.[ch] * app/core/gimpimage-resize.[ch] * app/core/gimpimage-rotate.[ch] * app/core/gimpimage-scale.[ch] * app/core/gimpitem-linked.[ch] * app/core/gimpitem.[ch] * app/core/gimpchannel.c * app/core/gimpdrawable.c * app/core/gimplayer.c * app/core/gimpselection.c * app/vectors/gimpvectors.c: replaced callback/data by GimpProgress. * app/tools/gimpblendtool.c * app/tools/gimptransformtool.c * app/gui/convert-dialog.c * app/actions/documents-commands.c * app/actions/file-commands.c * app/actions/image-commands.c * app/actions/layers-commands.c * app/actions/plug-in-commands.c * app/actions/vectors-commands.c * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb: changed callers accordingly. * app/pdb/*_cmds.c: regenerated.
-
- 07 Jul, 2004 2 commits
-
-
Sven Neumann authored
-
Sven Neumann authored
2004-07-07 Sven Neumann <sven@gimp.org> * app/core/gimplayer.c (gimp_layer_new_from_tiles): add an alpha channel if the src tile-manager doesn't have one. Warn on unsupported type conversions instead of silently doing the wrong thing. Fixes bug #145482. * app/core/gimpbuffer.c: cosmetics.
-
- 07 Jun, 2004 1 commit
-
-
Michael Natterer authored
2004-06-07 Michael Natterer <mitch@gimp.org> * app/core/gimplayer.c (gimp_layer_set_tiles): don't set layer->mask's offsets. It is wrong because GimpDrawable::set_tiles() is a lowlevel function which is used by stuff like scale and resize which keep the mask in sync explicitely and don't expect it to be moved in the middle of chaining up. Fixes bug #143860.
-
- 24 May, 2004 1 commit
-
-
Michael Natterer authored
2004-05-24 Michael Natterer <mitch@gimp.org> Long overdue core container cleanup: * app/core/gimplist.[ch]: added "unique-names" and "sort-func" properties and merged the resp. code from GimpDataList into GimpList. Removed "policy" parameters from gimp_list_new() and added "unique_names". Added new constructor gimp_list_new_weak(). Made public function gimp_list_uniquefy_name() private. * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatalist.[ch]: removed. Its functionality is entirely in GimpList now. * app/core/gimpdata.[ch]: added gimp_data_name_compare() which used to live in GimpDataList. * app/core/gimp.c * app/core/gimpdatafactory.c * app/core/gimpimage.c * app/core/gimptoolinfo.c * app/core/gimpundostack.c * app/paint/gimp-paint.c * app/tools/gimp-tools.c * app/widgets/gimpdevices.c * app/widgets/gimptemplateeditor.c * app/widgets/gimpundoeditor.c: changed list creation accordingly. Made gimp->templates, gimp->named_buffers, tool_info->presets and the image's lists of layers, channels and vectors automatically ensure unique names. * app/widgets/gimptemplateview.c * app/actions/file-commands.c * app/actions/templates-commands.c * app/actions/tool-options-commands.c: removed calls to gimp_list_uniquefy_name(). * app/core/gimpitem.c: removed major insanity where the items themselves where ensuring their unique names. Bah! * app/core/gimplayer.c (gimp_layer_name_changed): chain up conditionally. * app/core/gimplayermask.c (gimp_layer_mask_name_changed): removed because there is no need any more to keep the parent implementation from being invoked.
-
- 14 Apr, 2004 1 commit
-
-
Michael Natterer authored
2004-04-15 Michael Natterer <mitch@gimp.org> Get rid of the "current_context" which was in fact just a bunch of global variables. Instead, pass the needed context all the way from the GUI and the PDB to the core. This is a prerequisite for macro recording and generally helps separating the various subsystems from each other. Work in progress... * app/core/gimp.[ch]: removed member "current_context" and gimp_[get|set]_current_context(). * app/core/gimp-edit.[ch] * app/core/gimpdrawable-blend.[ch] * app/core/gimpdrawable-bucket-fill.[ch] * app/core/gimpdrawable-offset.[ch] * app/core/gimpdrawable-transform.[ch] * app/core/gimpimage-crop.[ch] * app/core/gimpimage-flip.[ch] * app/core/gimpimage-merge.[ch] * app/core/gimpimage-resize.[ch] * app/core/gimpimage-rotate.[ch] * app/core/gimpimage.[ch] * app/core/gimpimagefile.[ch] * app/core/gimpitem-linked.[ch] * app/core/gimpitem.[ch] * app/core/gimplayer.[ch] * app/core/gimpselection.[ch] * app/core/gimptemplate.[ch] * app/file/file-open.[ch] * app/file/file-save.[ch] * app/pdb/procedural_db.[ch] * app/text/gimptext-compat.[ch] * app/text/gimptextlayer-transform.[ch] * app/gui/brush-select.[ch] * app/gui/font-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: added tons of "GimpContext *context" parameters and use the passed context instead of gimp_get_current_context(). * app/app_procs.c * app/batch.c * app/core/gimpchannel.c * app/core/gimpdrawable.c * app/paint/gimperaser.c * app/paint/gimppaintbrush.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/text/gimptextlayer.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpcroptool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpfliptool.c * app/tools/gimpinktool.c * app/tools/gimptransformtool.c * app/vectors/gimpvectors.c * app/gui/convert-dialog.c * app/gui/drawable-commands.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/offset-dialog.c * app/gui/select-commands.c * app/gui/vectors-commands.c * app/widgets/gimpdnd.c * app/widgets/gimpdocumentview.c * app/widgets/gimphelp.c * app/widgets/gimpthumbbox.c: pass gimp_get_user_context() or GIMP_CONTEXT(tool_options) or whatever is the right context to the changed core functions. * tools/pdbgen/app.pl: pass "GimpContext *context" to all generated PDB invokers. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/paint_tools.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/text_tool.pdb * tools/pdbgen/pdb/transform_tools.pdb: pass the new context parameter to the changed core functions. * app/pdb/*_cmds.c: regenerated.
-
- 13 Apr, 2004 2 commits
-
-
Michael Natterer authored
2004-04-13 Michael Natterer <mitch@gimp.org> Moved the calls to floating_sel_relax()/rigor() from various places to two single spots in the core where they are actually needed. Fixes bug #138356 (which was caused by the projection being triggered in the middle of changing the floating selection's size or the size of the drawable it is attached to). This commit effectively removes floating selection fiddling from the core's public API. * app/core/gimpdrawable.[ch] (gimp_drawable_has_floating_sel): new function which returns TRUE if there is a floating selection attached to the drawable. * app/core/gimpdrawable.c (gimp_drawable_translate) (gimp_drawable_set_tiles_full): if the drawable *has* a floating selection, relax/rigor it before/after modifying the drawable. * app/core/gimplayer.c (gimp_layer_translate) (gimp_layer_set_tiles): if the layer *is* the floating selection, relax/rigor it before/after modifying it. * app/core/gimpdrawable-transform.c * app/core/gimpimage-convert.c * app/core/gimpimage-crop.c * app/core/gimpimage-flip.c * app/core/gimpimage-resize.c * app/core/gimpimage-rotate.c * app/core/gimpimage-scale.c * app/gui/layers-commands.c * app/tools/gimpeditselectiontool.c * tools/pdbgen/pdb/layer.pdb: removed calls to floating_sel_rigor()/relax() all over the place. Also removed lots of undo groups which are obsolete now. * app/pdb/layer_cmds.c: regenerated.
-
Michael Natterer authored
2004-04-13 Michael Natterer <mitch@gimp.org> GimpItem undo group cleanup in preparation of fixing bug #138356: * app/core/core-enums.[c]: renamed LAYER_SCALE and LAYER_RESIZE undo groups to ITEM_SCALE and ITEM_RESIZE. * app/core/gimpitem.[ch]: always push undo groups around GimpItem::translate(), scale(), resize(), flip(), rotate() and transform(). Added the resp. undo_desc strings to GimpItemClass. * app/core/gimpchannel.[ch] * app/core/gimpdrawable.[ch] * app/core/gimplayer.c: removed all undo groups from implementations of the above methods. Removed the undo_desc strings which were moved to GimpItemClass. * app/core/gimpimage-crop.c * app/core/gimpselection.c * app/gui/layers-commands.c * app/vectors/gimpvectors.c * tools/pdbgen/pdb/layer.pdb: changed accordingly. * app/pdb/layer_cmds.c: regenerated.
-
- 16 Mar, 2004 1 commit
-
-
Michael Natterer authored
2004-03-16 Michael Natterer <mitch@gimp.org> * app/core/gimpdrawable.c (gimp_drawable_set_tiles): ref new tiles before unrefing the old ones. * app/core/gimpimage-undo-push.c: keep undo memsize exact by adjusting undo->size when the stored data changes. * app/core/gimpchannel.[ch] (gimp_channel_new_from_alpha) * app/core/gimpchannel-select.[ch] (gimp_channel_select_alpha): replaced "layer" parameter by "drawable". * app/gui/layers-commands.c * tools/pdbgen/pdb/selection.pdb: changed accordingly. * app/pdb/selection_cmds.c: regenerated. * app/core/gimpchannel.c * app/core/gimplayer.c * app/core/gimplayermask.[ch] * app/core/gimpselection.c: remdom cleanup & code review.
-
- 15 Mar, 2004 5 commits
-
-
Michael Natterer authored
2004-03-15 Michael Natterer <mitch@gimp.org> * app/core/core-enums.[ch] (enum GimpUndoType): replaced GIMP_UNDO_LAYER_MOD and GIMP_UNDO_CHANNEL_MOD by GIMP_UNDO_DRAWABLE_MOD. * app/core/gimpimage-undo-push.[ch]: ditto: replaced gimp_image_undo_push_layer_mod() and gimp_image_undo_push_channel_mod() by gimp_image_undo_push_drawable_mod(). * app/core/gimpdrawable.[ch]: added undo_desc strings for "resize" and "scale" to the GimpDrawableClass struct. (gimp_drawable_scale) (gimp_drawable_resize): pass push_undo = TRUE to gimp_drawable_set_tiles_full() and use the undo_desc from the class. (gimp_drawable_real_set_tiles): push a GIMP_UNDO_DRAWABLE_MOD here... * app/core/gimpchannel.c * app/core/gimplayer.c: ...and don't push undos in GimpItem::scale(), GimpItem::resize(), GimpDrawable::set_tiles(). * app/core/gimpchannel.c: Removed even more bounds_known = FALSE assignments from functions which already call gimp_drawable_set_tiles().
-
Michael Natterer authored
2004-03-15 Michael Natterer <mitch@gimp.org> * app/core/gimpdrawable.[ch]: added "offset_x" and "offset_y" parameters to GimpDrawable::set_tiles(). (gimp_drawable_set_tiles): removed the "GimpImageType" parameter. (gimp_drawable_set_tiles_full): new function adding type, offset_x and offset_y parameters. (gimp_drawable_real_set_tiles): set the drawable's offsets from the offset parameters and its size from the passed TileManager's size. Emit "size_changed" accordingly. * app/core/gimpchannel.c * app/core/gimpdrawable-offset.c * app/core/gimpdrawable-transform.c * app/core/gimpimage-convert.c * app/core/gimpimage-undo-push.c * app/core/gimplayer.c * app/text/gimptextlayer.c * app/tools/gimptransformtool.c: changed accordingly: removed calls to gimp_viewable_size_changed() and all sorts of hackish assignments of the drawable's width/height/offset_x/offset_y properties.
-
Michael Natterer authored
2004-03-15 Michael Natterer <mitch@gimp.org> * app/text/gimptextlayer.c (gimp_text_layer_render): don't call gimp_image_flush(). * app/tools/gimpxttool.c (gimp_text_tool_apply): call it here instead. Now that we have a common place that exchanges drawable->tiles, we can abstract away boundary invalidation for this operation: * app/core/gimpdrawable.c (gimp_drawable_real_set_tiles): call gimp_drawable_invalidate_boundary() before setting the new tiles. * app/core/gimpchannel.c (gimp_channel_set_tiles) * app/core/gimpdrawable-transform.c (gimp_drawable_transform_paste) * app/core/gimpimage-undo-push.c (undo_pop_layer_mod) * app/core/gimplayer.c (gimp_layer_scale) (gimp_layer_resize) (gimp_layer_flip) (gimp_layer_rotate) (gimp_layer_transform) * app/text/gimptextlayer.c (gimp_text_layer_render): removed calls to gimp_drawable_invalidate_boundary() from all functions which finally call gimp_drawable_real_set_tiles(). * app/tools/gimptransformtool.c (gimp_transform_tool_doit): no need to set channel->bounds_known to FALSE, because gimp_drawable_set_tiles() already did this.
-
Michael Natterer authored
2004-03-15 Michael Natterer <mitch@gimp.org> * app/core/gimpimage.[ch]: added "gboolean alpha_changed" to GimpImageFlushAccumulator. Install an "alpha_changed" handler on gimage->layers and set flush_accum.alpha_changed = TRUE whenever the image's *only* layer changed its alpha. * app/core/gimpimage-undo-push.c (undo_pop_layer_mod) * app/core/gimplayer.c (gimp_layer_add_alpha): removed explicit calls to gimp_image_alpha_changed().
-
Michael Natterer authored
2004-03-15 Michael Natterer <mitch@gimp.org> * app/core/gimpdrawable.c (gimp_drawable_real_set_tiles): emit "alpha_changed" if the drawable got/lost an alpha channel by setting the new tiles. * app/core/gimpimage-undo-push.c (undo_pop_layer_mod) * app/core/gimplayer.c (gimp_layer_add_alpha): removed explicit calls to gimp_drawable_alpha_changed().
-
- 14 Mar, 2004 1 commit
-
-
Michael Natterer authored
2004-03-14 Michael Natterer <mitch@gimp.org> * app/core/gimpdrawable-offset.c (gimp_drawable_offset) * app/core/gimpdrawable.c (gimp_drawable_scale) (gimp_drawable_resize) * app/core/gimplayer.c (gimp_layer_convert) (gimp_layer_add_alpha): use gimp_drawable_set_tiles() instead of fiddling with drawable->tiles, ->bytes etc. manually.
-
- 13 Mar, 2004 2 commits
-
-
Michael Natterer authored
2004-03-13 Michael Natterer <mitch@gimp.org> Completed the fix for bug #136702: * app/core/gimpitem.[ch]: added "gboolean supersample" and "gint recursion_level" to GimpItem::transform(). * app/core/gimpitem-linked.[ch] (gimp_item_linked_transform): ditto. * app/core/gimpdrawable-transform.[ch]: added "recursion_level" parameters and removed the RECURSION_LEVEL #define. * app/core/gimpchannel.c * app/core/gimpdrawable.c * app/core/gimplayer.c * app/vectors/gimpvectors.c: changed accordingly. * app/tools/gimptransformoptions.[ch]: added new property "recursion_level" which is not serializable and has no GUI. Pretty useless, but it's IMHO better to hardcode the default value here than in gimpdrawable-transform.c * app/tools/gimptransformtool.c: changed accordingly. * tools/pdbgen/pdb/transform_tools.pdb: hardcode "recursion_level" to 3. * app/pdb/transform_tools_cmds.c: regenerated.
-
Sven Neumann authored
2004-03-13 Sven Neumann <sven@gimp.org> * app/core/gimpdrawable.[ch]: added new virtual function GimpDrawable::set_tiles(). * app/core/gimpchannel.c * app/core/gimplayer.c: push an undo before chaining up in set_tiles(). * app/core/gimpdrawable-transform.c * app/core/gimpimage-convert.c * app/tools/gimptransformtool.c: use gimp_drawable_set_tiles() instead of fiddling with the drawable's tile manager directly.
-
- 28 Feb, 2004 1 commit
-
-
Michael Natterer authored
2004-02-28 Michael Natterer <mitch@gimp.org> * app/core/gimplayer.c (gimp_layer_apply_mask): when deleting the mask, use "Delete Layer Mask" instead of "Apply Layer Mask" as undo description.
-
- 17 Feb, 2004 1 commit
-
-
Michael Natterer authored
2004-02-17 Michael Natterer <mitch@gimp.org> Make sure each GimpItem emits "removed" when it is removed from the image so dialogs have a chance to close themselves: * app/core/gimplayer.c (gimp_layer_apply_mask): emit "removed" from the mask. (gimp_layer_removed): new function which emits "removed" from the layer's mask when the layer gets removed from the image. * app/core/gimpimage.c (gimp_image_dispose): emit "removed" from all layers, channels and vectors. * app/gui/layers-commands.c (layers_scale_layer_query) (layers_resize_layer_query): removed recently added connections to "removed" because GimpViewableDialog does this automatically.
-
- 09 Feb, 2004 1 commit
-
-
Sven Neumann authored
2004-02-09 Sven Neumann <sven@gimp.org> * app/core/gimpitem.[ch]: added progress callback pointers to gimp_item_scale() and its variants. * app/core/gimpchannel.c * app/core/gimpdrawable.c * app/core/gimpimage-scale.c * app/core/gimplayer.c * app/core/gimpselection.c * app/gui/layers-commands.c97999 * app/paint-funcs/paint-funcs.[ch] * app/vectors/gimpvectors.c * tools/pdbgen/pdb/layer.pdb: changed accordingly. Fixes bug #97999. * app/pdb/layer_cmds.c: regenerated.
-
- 01 Feb, 2004 1 commit
-
-
Michael Natterer authored
2004-02-01 Michael Natterer <mitch@gimp.org> Disallow to rename the layer mask. Instead, always name the mask "<layer name> mask". Fixes bug #133112 along with some other unreported ones. * app/core/gimpitem.[ch]: added a boolean return value indicating success to GimpItem::rename(). (gimp_item_real_rename): push an undo step only if the item is attached. * app/core/gimplayer.c (gimp_layer_rename): refuse renaming if the layer is a floating selection floated from a channel (renaming a layer's floating selection makes a new layer out of the floating selection). (gimp_layer_duplicate): use gimp_layer_add_mask() to attach the mask's duplicate. Fixes mask refcount brokenness for duplicated layer masks. (gimp_layer_name_changed): new function. Automatically renames the layer mask when the layer's name changes. * app/core/gimplayermask.c (gimp_layer_mask_rename): new function which refuses renaming. (gimp_layer_mask_name_changed): skip the unique name voodoo GimpItem does by not chaining up. (gimp_layer_mask_set_layer): change the mask's name whenever it is attached to a layer. * app/text/gimptextlayer.c (gimp_text_layer_rename): fiddle with text_layer->auto_rename only if renaming was successful. * app/widgets/gimpitemtreeview.c (gimp_item_tree_view_name_edited): restore the old name if renaming failed. * tools/pdbgen/pdb/drawable.pdb (set_name): return an execution error if renaming failed. * app/pdb/drawable_cmds.c: regenerated.
-
- 26 Jan, 2004 1 commit
-
-
Michael Natterer authored
2004-01-26 Michael Natterer <mitch@gimp.org> * app/core/gimpimage.[ch]: removed gimp_image_owns_item() again. * app/core/gimpitem.[ch]: instead, added new virtual function GimpItem::is_attached(). * app/core/gimpchannel.c * app/core/gimplayer.c * app/core/gimplayermask.c * app/core/gimpselection.c * app/vectors/gimpvectors.c: implement it. * app/core/gimp-edit.c * app/core/gimpdrawable-transform.c * app/core/gimplayer-floating-sel.c * app/text/gimptext-compat.c * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/floating_sel.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/text_tool.pdb * tools/pdbgen/pdb/transform_tools.pdb_ changed accordingly. * app/pdb/edit_cmds.c * app/pdb/floating_sel_cmds.c * app/pdb/selection_cmds.c * app/pdb/text_tool_cmds.c * app/pdb/transform_tools_cmds.c: regenerated.
-
- 09 Dec, 2003 1 commit
-
-
Michael Natterer authored
2003-12-09 Michael Natterer <mitch@gimp.org> Fixed memory management of layers and channels which were created using the PDB: * app/core/gimpitem.[ch]: added "gboolean floating" flag to GimpItem. Items are created with floating == TRUE. Added gimp_item_sink() which resets the floating flag and unrefs the item if it was TRUE. Added gimp_item_is_floating() accessor. * app/core/gimpimage.c (gimp_image_add_layer,channel,vectors): g_object_ref()/gimp_item_sink() added items to take ownership of them. * app/core/gimplayer.c (gimp_layer_add_mask): g_object_ref()/gimp_item_sink() the mask. * app/gui/layers-commands.c * app/xcf/xcf-load.c: don't unref layer masks after adding them to the layer. * tools/pdbgen/pdb/drawable.pdb (drawable_delete): gimp_item_sink() the drawable if it's floating and fail if it's not. Fixes bug #128881. * tools/pdbgen/pdb/layer.pdb (layer_create_mask): fixed docs. * app/pdb/drawable_cmds.c * app/pdb/layer_cmds.c * libgimp/gimplayer_pdb.c: regenerated.
-
- 26 Nov, 2003 2 commits
-
-
Michael Natterer authored
2003-11-26 Michael Natterer <mitch@gimp.org> * app/core/core-enums.[ch]: eek, it should be GIMP_ADD_ALPHA_TRANSFER_MASK, not GIMP_ADD_ALPHA_MASK_TRANSFER. * app/core/gimplayer.c (gimp_layer_create_mask): changed accordingly. * app/pdb/layer_cmds.c * libgimp/gimpenums.h * plug-ins/pygimp/gimpenums.py * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated.
-
Michael Natterer authored
2003-11-26 Michael Natterer <mitch@gimp.org> * app/core/core-enums.[ch]: added enum values GIMP_ADD_ALPHA_MASK_TRANSFER and GIMP_UNDO_GROUP_LAYER_ADD_MASK. * app/core/gimplayer.c (gimp_layer_create_mask): applied patch from Pedro Gimeno which implements the new ADD_MASK type and added undo. Fixes bug #127930. * app/gui/layers-commands.c: push an undo group around layer mask creation & adding since the creation may change the layer now. * app/pdb/layer_cmds.c * libgimp/gimpenums.h * plug-ins/pygimp/gimpenums.py * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated.
-
- 16 Nov, 2003 1 commit
-
-
Sven Neumann authored
2003-11-16 Sven Neumann <sven@gimp.org> * app/config/gimpbaseconfig.h * app/config/gimpcoreconfig.h: use gint64 for all memsize properties. * app/base/tile-manager.[ch] (tile_manager_get_memsize): since tiles can be swapped out, a tilemanager can be larger than gsize (on 32bit platforms). Use a gint64 to avoid an overflow. * 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-push.c * app/core/gimpimage-undo.[ch] * app/core/gimpimage.c * app/core/gimpitem.c * app/core/gimpitemundo.[ch] * app/core/gimplayer.c * app/core/gimplist.c * app/core/gimpobject.[ch] * app/core/gimppalette.c * app/core/gimpparasitelist.c * app/core/gimppattern.c * app/core/gimpundo.[ch] * app/core/gimpundostack.c * app/core/gimpviewable.c * app/text/gimptext.c * app/text/gimptextlayer.c * app/vectors/gimpstroke.c * app/vectors/gimpvectors.c: use gint64 for gimp_object_get_memsize() and all its implementations. * app/display/gimpdisplayshell-title.c * app/gui/info-window.c: changed accordingly.
-
- 06 Oct, 2003 2 commits
-
-
Michael Natterer authored
2003-10-06 Michael Natterer <mitch@gimp.org> * app/core/gimpdrawable.[ch]: added new virtual functions GimpDrawable::get_active_components(), apply_region() and replace_region(). * app/core/Makefile.am * app/core/gimpdrawable-combine.[ch]: new files containing apply_region()'s and replace_region()'s default implementation. They are identical to the ones removed from GimpImage except that they don't mask the selection with itself (bug #107949). * app/core/gimpchannel.c * app/core/gimplayer.c: implement get_active_components(). * app/core/gimpchannel.c: implement apply_region() and replace_region() and invalidate the channel's boundary before upchaining (bug #107949). * app/core/gimpimage.[ch]: removed gimp_image_apply_image(), gimp_image_replace_image() and gimp_image_get_active_components(). * app/core/gimpimage-undo-push.c (undo_pop_image): invalidate boundary and bounds if the drawable is a channel (bug #107949). (undo_pop_mask) (undo_pop_channel_mod): finish previous commit :) * app/core/gimp-edit.c * app/core/gimpdrawable-blend.c * app/core/gimpdrawable-bucket-fill.c * app/core/gimpdrawable-stroke.c * app/core/gimpimagemap.c * app/core/gimplayer-floating-sel.c * app/paint/gimppaintcore.c * app/tools/gimpinktool.c: changed accordingly.
-
Michael Natterer authored
2003-10-06 Michael Natterer <mitch@gimp.org> Treat changes to the selection like changes to any other drawable: * app/core/gimpchannel.c * app/core/gimpchannel-combine.c: call gimp_drawable_update() after changing the channel. * app/core/gimpimage.[ch]: added struct GimpImageFlushAccumulator with one member "gboolean mask_changed". Connect to "update" of the selection and set accum.mask_changed to TRUE in the callback. Added default implementation for GimpImage::flush() and emit "mask_changed" there. Unrelated: * app/core/gimpimage.h: removed GimpGuide struct... * app/core/gimpimage-guides.h: ...and added it here. * app/core/gimpimage-undo-push.c (undo_pop_mask) (undo_pop_channel_mod): don't distinguish between selection and non-selection channels and just call gimp_drawable_update(). * app/core/gimpundo.h * app/core/gimpimage-undo.c: removed "gboolean mask_changed" from the GimpUndoAccumulator struct since we don't have to care about that signal explicitly any more. * app/display/gimpdisplay-foreach.[ch]: removed gimp_displays_flush(). * tools/pdbgen/pdb/display.pdb (displays_flush_invoker): call gimp_image_flush() on all images so the flush accumulator is honored. This generalization enables the removal of more special purpose code which was needed to treat the selection different: * app/core/gimpimage-mask-select.[ch]: removed... * app/core/gimpchannel-select.[ch]: ...and added under a new name because it's not selection specific any more. * app/core/gimpimage-mask.[ch]: removed... * app/core/gimpselection.[ch]: ...added the two remaining functions here. Removed all calls to gimp_image_mask_changed(). * app/core/Makefile.am * app/core/gimp-edit.c * app/core/gimpdrawable-transform.c * app/core/gimpimage-scale.c * app/core/gimpimage-snap.c * app/display/gimpdisplayshell.c * app/gui/channels-commands.c * app/gui/layers-commands.c * app/gui/select-commands.c * app/gui/vectors-commands.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimpiscissorstool.c * app/tools/gimprectselecttool.c * app/tools/gimptransformtool.c * app/widgets/gimpchanneltreeview.c * app/widgets/gimpselectioneditor.c * app/widgets/gimpvectorstreeview.c * app/xcf/xcf-save.c * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/selection_tools.pdb: changed accordingly. * app/core/gimpdrawable-bucket-fill.c * app/core/gimpimage-colormap.c * app/core/gimplayer-floating-sel.c * app/core/gimplayer.c * app/gui/image-menu.c * app/paint/gimppaintcore.c * app/tools/gimpcroptool.c * app/tools/gimpinkoptions.c * app/tools/gimpvectortool.c: removed useless and/or obsolete #includes. * app/pdb/display_cmds.c * app/pdb/paths_cmds.c * app/pdb/selection_cmds.c * app/pdb/selection_tools_cmds.c: regenerated.
-
- 11 Sep, 2003 1 commit
-
-
Michael Natterer authored
2003-09-11 Michael Natterer <mitch@gimp.org> * app/core/gimpdrawable.[ch]: removed "visible" and all its API... * app/core/gimpitem.[ch]: ...and added it here. * app/core/core-enums.[ch] * app/core/gimpimage-undo-push.[ch]: changed the drawable visibility undo to be an item visibility undo. * app/xcf/xcf-load.c * app/xcf/xcf-save.c: save it in PROP_VECTORS and changed channel and layer loading/saving accordingly. * app/core/gimpimage-merge.c * app/core/gimpimage-preview.c * app/core/gimpimage-projection.c * app/core/gimpimage.c * app/core/gimplayer-floating-sel.c * app/core/gimplayer.c * app/core/gimpselection.c * app/text/gimptextlayer.c * app/gui/channels-commands.c * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/layer.pdb: changed accordingly. * app/pdb/channel_cmds.c * app/pdb/layer_cmds.c: regenerated. * app/widgets/gimpdrawabletreeview.[ch]: removed the eye icon... * app/widgets/gimpitemtreeview.[ch]: ...and added it here.
-
- 06 Sep, 2003 1 commit
-
-
Michael Natterer authored
2003-09-06 Michael Natterer <mitch@gimp.org> To optimize duplicate and/or wrong image updates away, introduced new policy that a child object must never explicitly update or invalidate its parent object (just like the GUI is not updated explicitly by the core): * app/core/gimpdrawable.[ch]: added new signal GimpDrawable::update(). Never update or invalidate the image when the drawable is updated or invalidated. (gimp_drawable_set_visible): don't gimp_drawable_update() the drawable since its pixels have not changed. * app/core/gimpimage.[ch]: connect to the "add" and "remove" signals of the layers and channels containers. Also connect to the "update" and "visibility_changed" signals of all drawables in these containers (optimizes away updates issued by drawables which are not yet added to the image and updates of the selection mask). Also, don't propagate updates to the image if the emitting drawable is invisible (optimizes away updates issued by invisible drawables). (gimp_image_add_layer,channel) (gimp_image_remove_layer,channel): don't update the image since that's done by our "add" and "remove" handlers now. (gimp_image_position_layer,channel): update just the image, not the drawable since its pixels have not changed. (gimp_image_real_colormap_changed) (gimp_image_set_component_visible): always call gimp_image_update() *and* gimp_viewable_invalidate_preview() to get everything updated, since update and invalidate of images are not connected. * app/core/gimpimage-undo-push.c (undo_pop_layer,channel): don't update the drawable since (a) its pixels don't change and (b) the image updates itself upon adding/removing now. (undo_pop_layer_mod): replaced gimp_image_update() by gimp_drawable_update() (just for consistency with other similar functions). * app/core/gimplayer.c: connect to "update" of the layer mask and issue updates on the layer if the mask update has any effect on the projection. (gimp_layer_create_mask): don't set the mask's offsets here since they may be different when we later add the mask to the layer. * app/core/gimplayermask.c (gimp_layer_mask_set_layer): set the mask offsets here instead. * app/core/gimpchannel.c (gimp_channel_translate): update the channel even if push_undo == FALSE. * app/paint/gimppaintcore.c (gimp_paint_core_finish) * app/tools/gimpinktool.c (ink_finish): invalidate both the drawable and the image preview since invalidating the drawable doesn't invalidate the image any more. * app/text/gimptextlayer.c (gimp_text_layer_render_now): also update the new extents of the text layer, not only the old one. (gimp_text_layer_render_layout): don't update the drawable since gimp_drawable_fill() already updated it.
-
- 05 Sep, 2003 1 commit
-
-
Michael Natterer authored
2003-09-05 Michael Natterer <mitch@gimp.org> * app/paint-funcs/paint-funcs.[ch]: removed function map_to_color() since it does not belong here and the two places using it look much cleaner when doing that stuff themselves. * app/core/gimpdrawable-preview.c: cleanup. (gimp_drawable_preview_scale): do the indexed palette lookup here instead of calling map_to_color(). * app/core/gimpimage.c (gimp_image_get_color): transform the colors here instead of calling map_to_color(). * app/core/gimpimage.[ch] (gimp_image_get_color): reordered parameters src parameters are before dest parameters. Made the src color const. (gimp_image_transform_color): reordered so src parameters are *after* dest parameters (since this function operates on the dest image and it makes sense to have the dest parameters together). Made the src color const here, too. * app/core/gimpdrawable-bucket-fill.c * app/core/gimpdrawable.c * app/core/gimpimage-contiguous-region.c * app/core/gimpimage-projection.c * app/core/gimpimagemap.c * app/core/gimplayer.c * app/core/gimppalette-import.c * app/paint/gimpclone.c * app/paint/gimppaintcore.c: changed accordingly. * app/core/gimpedit.c (gimp_edit_cut,copy): simplified by moving the "cropped" variable to a local scope. * app/core/gimpimage-mask.c: calling gimp_image_update() followed by gimp_viewable_imvalidate_preview(drawable) is equal to calling gimp_drawable_update() directly.
-