- gimp_container_tree_view_prepend_toggle_cell_renderer() to
gimp_container_tree_view_add_toggle_cell()
- gimp_container_tree_view_prepend_cell_renderer() to
gimp_container_tree_view_add_renderer_cell()
because "prepend" is an implementation detail, "renderer" is obsolete,
and in the second case it's not "cell renderer" but really a "renderer
cell".
* app/widgets/gimpitemtreeview.[ch]: add class members for the lock
content button's icon, tooltip and help_id and use them when
creating the button. Create the button in constructor() instead of
init() so we have access to our real class structure without the
need for a custom get_type() function.
* app/widgets/gimpdrawabletreeview.c: configure the button as "Lock pixels".
* app/widgets/gimpvectorstreeview.c: configure it as "Lock path strokes".
- new API to add widgets to a box of options, for stuff like the paint
mode menu and opacity scale. Set it sensitive automatically and
update its spacings in GtkWidget::style_set().
- new API to get a hbox for "lock" toggles, for stuff like lock
pixels and lock alpha.
* app/core/gimpimage.[ch]: rename all gimp_image_reposition_foo() to
gimp_image_reorder_foo() and added "new_parent" parameters. Factor
out calculating of the item's new container and index to a utility
function.
* app/core/core-enums.[ch]: rename the REPOSITION undos to REORDER.
* app/core/gimpimage-undo-push.[ch]
* app/core/gimpchannelpropundo.[ch]
* app/core/gimplayerpropundo.[ch]
* app/vectors/gimpvectorspropundo.[ch]: change accordingly. Remember
the old parent item in all item reorder undos.
* app/widgets/gimpitemtreeview.h: change GimpReorderItemFunc prototype
accordingly.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c (class_init): follow image API
name changes.
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_drop_viewable):
implement reordering of items between groups.
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_reorder_item): fix to reorder the item
within its level of the tree (unrelated to above changes, but needed
to make them work).
* app/widgets/gimpcontainertreeview-dnd.c
(gimp_container_tree_view_real_drop_possible): support DND within a
tree and make sure a group item is not dropped into itself.
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_drop_viewable):
implement intra-container reordering within all branches; print a
message for inter-container reordering because that's not yet
implemented in the core.
* app/core/gimpimage.[ch]: make the parent parameter public in
add_layer(), add_layers(), add_channel() and add_vectors().
* app/vectors/gimpvectors-import.[ch]: add parent parameters to
the vectors import functions.
* app/core/gimpchannelundo.[ch]
* app/core/gimplayerundo.[ch]
* app/vectors/gimpvectorsundo.[ch]
* app/core/gimpimage-undo-push.[ch]: remember the parent item when
removing layers, channels and vectors.
* app/actions/channels-commands.c
* app/actions/debug-commands.c
* app/actions/edit-commands.c
* app/actions/layers-commands.c
* app/actions/vectors-commands.c
* app/core/gimp-edit.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-quick-mask.c
* app/core/gimplayer-floating-sel.c
* app/core/gimpselection.c
* app/core/gimptemplate.c
* app/dialogs/file-open-dialog.c
* app/display/gimpdisplayshell-dnd.c
* app/text/gimptext-compat.c
* app/tools/gimptexttool.c
* app/tools/gimpvectortool.c
* app/widgets/gimptoolbox-dnd.c
* app/xcf/xcf-load.c
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/vectors.pdb: pass NULL as parent item to above
functions and add FIXMEs all over the place because there is some
more hacking needed to make adding with index = -1 (on top of the
current item) work again.
* app/pdb/image-cmds.c
* app/pdb/paths-cmds.c
* app/pdb/vectors-cmds.c: regenerated.
* app/core/gimpimage-duplicate.c: duplicate the original image's
tree structure in the copy.
* app/widgets/gimpitemtreeview.[ch]: add parent to GimpAddItemFunc,
add utility function gimp_item_tree_view_get_drop_index() which
figures where to add something dropped to an item tree.
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: changed accordingly, using above
new GimpItemTreeView API.
* app/widgets/gimpcontainerview.[ch]: add and remove container trees
recursively. Change virtual function ::add_item() to pass the
insert_data of the parent viewable.
* app/widgets/gimpcontainercombobox.c
* app/widgets/gimpcontainerentry.c
* app/widgets/gimpcontainergridview.c: changed accordingly.
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c: dito, but actually use the passed
parent_insert_data to insert the item at the right place in the
GtkTreeView.
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
* app/widgets/gimpitemtreeview.[ch]: Make instance member private
and add getter that didn't already exist.
(gimp_item_tree_view_get_new_button)
(gimp_item_tree_view_get_edit_button): New getters.
* app/actions/actions.c
* app/widgets/gimpvectorstreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimpchanneltreeview.c: Use new getters.
svn path=/trunk/; revision=27827
* app/widgets/gimpcontainertreeview.[ch]
* app/widgets/gimpcontainertreeview-private.h: Make the
renderer_cells and toggle_cells members private.
(gimp_container_tree_view_set_main_column_title)
(gimp_container_tree_view_prepend_toggle_cell_renderer)
(gimp_container_tree_view_prepend_cell_renderer): New interface.
* app/widgets/gimptoolview.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpcontrollerlist.c: Use new interface.
svn path=/trunk/; revision=27675
* app/widgets/gimpcontainertreeview.[ch]
(gimp_container_tree_view_set_dnd_drop_to_empty): New setter
function so that we can make the "gboolean dnd_drop_to_empty"
class instance member private.
* app/widgets/gimpcontainertreeview-private.h: Move member here.
* app/widgets/gimpcontainertreeview-dnd.c: Go through priv pointer.
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_init): Use
the new function.
svn path=/trunk/; revision=27671
* app/widgets/widgets-enums.h: Put the GimpContainerTreeView enums
here instead of exposing them through silly class instance
members.
* app/widgets/gimpcontainertreeview.c:
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpsettingseditor.c
* app/widgets/gimptemplateview.c
* app/widgets/gimptoolview.c: Clean up and use new enum names.
svn path=/trunk/; revision=27666
2008-10-09 Michael Natterer <mitch@gimp.org>
Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
had a GEGL dependency (they will have in the next commit, but I
wanted to keep the commit separate).
* app/dialogs/Makefile.am
* app/file/Makefile.am
* app/gui/Makefile.am
* app/menus/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* app/text/Makefile.am
* app/vectors/Makefile.am
* app/widgets/Makefile.am
* app/xcf/Makefile.am: add GEGL_CFLAGS.
* app/actions/*.c
* app/core/*.c
* app/dialogs/*.c
* app/display/*.c
* app/file/*.c
* app/gui/*.c
* app/menus/*.c
* app/paint/*.c
* app/pdb/gimppdb-utils.c
* app/pdb/gimpprocedure.c
* app/plug-in/*.c
* app/text/*.c
* app/tools/*.c
* app/vectors/*.c
* app/widgets/*.c
* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
to all files which include a drawable subclass or gimpimage.h
* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
in all generated files.
* app/pdb/*-cmds.c: regenerated.
* data/images/gimp-splash.png: the goat is still sleeping.
By Aurore Derriennic.
svn path=/trunk/; revision=27202
2008-10-09 Michael Natterer <mitch@gimp.org>
Remove the last code duplication from the undo system (or if not
the last then at least the most ugly):
* app/core/gimpimage.[ch] (gimp_image_add_layer,channel,vectors):
add "gboolean push_undo" parameter and add the item without
touching undo if it's TRUE. Changed assertions from
g_object_is_floating() to !gimp_item_is_attached() so they also
take items from the undo stack and not only newly created ones.
(gimp_image_remove_layer,channel,vectors): add "push_undo"
parameter here too. Also add a "new_active" parameter where an
optional new active item can be passed.
(gimp_image_remove_layer,channel): these functions must not be
called with push_undo=FALSE and a floating selection attached to
the layer/channel. This can't currently happen; added warnings in
case other code is changed and makes it happen anyway.
* app/core/gimpchannelundo.c
* app/core/gimplayerundo.c
* app/vectors/gimpvectorsundo.c: use above functions to add/remove
items instead of duplicating (parts of) their code. Pass
push_undo=FALSE and the previously active item to the remove()
functions.
* app/actions/channels-commands.c
* app/actions/edit-commands.c
* app/actions/layers-commands.c
* app/actions/vectors-commands.c
* app/core/gimp-edit.c
* app/core/gimpchannelundo.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-quick-mask.c
* app/core/gimpimage-scale.c
* app/core/gimplayer-floating-sel.c
* app/core/gimplayerundo.c
* app/core/gimpselection.c
* app/core/gimptemplate.c
* app/display/gimpdisplayshell-dnd.c
* app/text/gimptext-compat.c
* app/tools/gimptexttool.c
* app/tools/gimpvectortool.c
* app/vectors/gimpvectors-import.c
* app/vectors/gimpvectorsundo.c
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpitemtreeview.[ch]
* app/widgets/gimplayertreeview.c
* app/widgets/gimptoolbox-dnd.c
* app/widgets/gimpvectorstreeview.c
* app/xcf/xcf-load.c
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/paths.pdb: changed accordingly (pass TRUE
unless it's a new image like when loading and XCF file).
* app/pdb/image-cmds.c
* app/pdb/paths-cmds.c: regenerated.
svn path=/trunk/; revision=27200
2008-06-28 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.[ch]: add new function
gimp_container_tree_view_connect_name_edited() which makes the
name cell editable and connects a passed "edited" callback.
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimpsettingseditor.c
* app/widgets/gimptemplateview.c: use it instead of having the
same code four times.
svn path=/trunk/; revision=26009
2007-06-26 Michael Natterer <mitch@gimp.org>
Invalidate the image preview after the projection is
completely constructed. Fixes bug #449141.
* app/core/gimpmarshal.list: add VOID:BOOLEAN
* app/core/gimpimage.[ch]: add boolean parameter
invalidate_preview to the "flush" signal.
* app/core/gimpprojection.[ch]: add boolean member
invalidate_preview to the GimpProjection struct. Set it to TRUE if
it was TRUE in the image's "flush" signal. When the projection is
completely constructed after a flush, invalidate the image's
preview.
* app/display/gimpdisplay-handlers.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimpimagedock.c
* app/widgets/gimpimageeditor.c: changed callback signatures
accordingly.
svn path=/trunk/; revision=22840
2007-02-02 Sven Neumann <sven@gimp.org>
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_toggle_clicked):
changed function signature according to changes in internal undo API.
svn path=/trunk/; revision=21836
2006-12-15 Sven Neumann <sven@gimp.org>
* app/widgets/gimpuimanager.[ch]: added new function
gimp_ui_manager_activate_action() as a shortcut for looking up the
action and activating it.
* app/actions/dialogs-actions.c
* app/display/gimpdisplayshell-close.c
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimppaletteeditor.c
* app/widgets/gimptoolbox.c
* app/widgets/gimptooloptionseditor.c: use the new function.
* app/actions/file-commands.c
* app/dialogs/file-save-dialog.c: minor code cleanup.
2006-08-31 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainerview.c
(gimp_container_view_real_set_container)
(gimp_container_view_real_set_context)
(gimp_container_view_item_selected)
(gimp_container_view_thaw): support setting a context even if
the viewed container's children_type is *not* a property of
GimpContext. This removes a major restriction of container
views and allows to get rid of some hacks:
* app/widgets/gimpitemtreeview.[ch]: removed GimpContext member
and implement GimpContainerView::set_context() instead of
GimpDocked::set_context().
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimplayertreeview.c: use GimpContainerView's context
instead of GimpItemTreeView's and implement GimpContainerView's
set_context() instead of GimpDocked's.
* app/actions/actions.c (action_data_get_gimp)
(action_data_get_context): don't special-case GimpItemTreeView any
more, it's just like a normal GimpContainerView now.
* app/widgets/gimpcontrollerlist.c
(gimp_controller_list_constructor): set a context on the
GimpContainerView so its renderers have a context to use.
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-06-16 Michael Natterer <mitch@gimp.org>
Allow plug-ins to register in <Layers>, <Channels>, <Vectors> and
<ColormapEditor>:
* app/pdb/gimppluginprocedure.c
(gimp_plug_in_procedure_add_menu_path): added the argument type
checks for the new locations. Factored out duplicated code.
* app/menus/menus.c (menus_init): add the "plug-in" action
group to the resp. UI managers.
* app/menus/plug-in-menus.c (plug_in_menus_menu_path_added):
support them here too.
* app/widgets/gimpimageeditor.[ch]
* app/widgets/gimpitemtreeview.[ch]: added get_image() functions.
* app/actions/plug-in-commands.c: added new utility functions
which collect plug-in arguments from GimpImageEditor and
GimpItemTreeView widgets.
* menus/channels-menu.xml
* menus/colormap-editor-menu.xml
* menus/layers-menu.xml
* menus/vectors-menu.xml: added separators.
* menus/image-menu.xml.in: added a "Colormap" placeholder in
Colors/Map
* plug-ins/common/colormap-remap.c (query): register a menu
entry in <ColormapEditor> and moved the existing one to the
"Colormap" placeholder. Also register an icon to make this
menu item clearly distinct from the others in that menu.
Unrelated:
* plug-ins/common/colormap-remap.c (run): cleaned up quite a
bit. Fixed last-vals code and simplified map handling.
(remap_swap): removed, folded into run().
(remap_dialog): use the passed map to initialize the dialog so it
starts with the last-vals. Tweaked layout to have 16 columns
and simplified cell renderer creation.
2005-01-17 Michael Natterer <mitch@gimp.org>
Allow to drop stuff onto empty layers, channels and paths dialogs
to create new items:
* app/widgets/gimpcontainertreeview.h (struct GimpContainerTreeView):
added "gboolean dnd_drop_to_empty".
* app/widgets/gimpcontainertreeview-dnd.c: if "dnd_drop_to_empty"
is TRUE, dispatch drops to empty views and to the empty area below
all items.
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_init): set
"dnd_drop_to_empty" to TRUE.
* app/widgets/gimpitemtreeview.c
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: made all drop functions work
with "dest_viewable" being NULL and changed drop_possible()
implementations accordingly. Cleaned up the whole DND code a bit.
* app/widgets/gimplayertreeview.c: removed color and pattern
drop code...
* app/widgets/gimpdrawabletreeview.c: and added it here so colors
and patterns can be dropped to the channels dialog too.
2005-01-15 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.[ch]: added virtual function
GimpContainerTreeView::drop_component(). Added EEKy "dnd_gimp"
needed for gimp_selection_data_get_component().
* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_set_context):
set the "dnd_gimp" pointer if it is NULL.
* app/widgets/gimpcontainertreeview-dnd.c: handle component drops
and dispatch ::drop_component() accordingly.
* app/widgets/gimplayertreeview.c: implement dropping of
components as new layers. Addresses bugs #158483 and #158133.
2005-01-15 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpitemtreeview.c
(gimp_item_tree_view_drop_viewable): handle drops of items of all
types from all images and convert them if needed.
* app/widgets/gimplayertreeview.c: enable dropping of all kinds of
drawables. Addresses bug #158133.