2003-08-27 Michael Natterer <mitch@gimp.org>
Cleaned up my "To Selection" cleanup:
* app/gui/channels-commands.[ch]
* app/gui/layers-commands.[ch]
* app/gui/vectors-commands.[ch]: removed the separate
cmd_callbacks for REPLACE,ADD,SUBTRACT,INTERSECT and pass the
operation as "guint action" to the callback.
* app/gui/channels-menu.c
* app/gui/image-menu.c
* app/gui/layers-menu.c
* app/gui/vectors-menu.c: changed accordingly.
2003-08-21 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
* app/widgets/gimphelp-ids.h: new file defining the available help
topics. Work in progress and totally unusable for matching to the
help system. Stay tuned...
* app/gui/about-dialog.c
* app/gui/brushes-menu.c
* app/gui/buffers-menu.c
* app/gui/channels-commands.[ch]
* app/gui/channels-menu.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/gradients-commands.c
* app/gui/gradients-menu.c
* app/gui/image-menu.c
* app/gui/layers-commands.[ch]
* app/gui/layers-menu.c
* app/gui/module-browser.c
* app/gui/offset-dialog.c
* app/gui/palettes-menu.c
* app/gui/patterns-menu.c
* app/gui/resize-dialog.c
* app/gui/select-commands.c
* app/gui/templates-menu.c
* app/gui/tips-dialog.c
* app/gui/toolbox-menu.c
* app/gui/vectors-commands.[ch]
* app/gui/vectors-menu.c: replaced literal HTML file paths by help
IDs from gimphelp-ids.h. Renamed some menu callbacks to be
consistent with similar ones. This is just an intermediate commit
and not finished.
While browsing all the menus, I noticed that our "x to selection"
functions are not consistent at all. They should all offer the
REPLACE,ADD,SUBTRACT,INTERSECT options:
* app/core/gimpchannel.[ch]: added new function
gimp_channel_new_from_alpha(). Removed gimp_channel_layer_alpha()
and gimp_channel_layer_mask().
* app/core/gimpimage-mask.[ch]: added
gimp_image_mask_select_alpha() and
gimp_image_mask_select_component() which offer the full set of
operation, feather and feather_radius parameters as the other
selection functions.
* app/core/gimpimage-mask-select.[ch]: removed
gimp_image_mask_layer_alpha() and gimp_image_mask_layer_mask().
* app/gui/channels-commands.c (channels_channel_to_selection): use
gimp_image_mask_select_component() instead of implementing it
here.
* app/gui/image-menu.c
* app/gui/layers-commands.[ch]: offer the full choice of
REPLACE,ADD,SUBTRACT,INTERSECT with "Alpha to Selection" and "Mask
to Selection".
* tools/pdbgen/pdb/selection.pdb: changed accordingly.
* app/pdb/selection_cmds.c: regenerated.
2003-03-12 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch]: added descriptions to the
GimpChannelType enum.
* app/core/gimpimage.[ch]: added gimp_image_get_component_index()
utility function which does the GIMP_RED_CHANNEL -> RED_PIX etc.
mapping. Use it in all component getters/setters.
* app/widgets/gimpcomponenteditor.[ch]: new widget implementing
the component list using GtkListStore/GtkTreeView. Still a bit
ugly because it uses the standard check instead of the eye icon.
* app/widgets/gimpcomponentlistitem.[ch]: removed.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpvectorslistview.c: changed accordingly.
* app/widgets/gimpchannellistview.[ch]: create a GimpComponentEditor
and removed the old GtkList based stuff.
* app/widgets/gimpitemlistview.[ch]: keep around a pointer to the
GimpMenuFactory passed to the constructor.
* app/gui/channels-menu.c (channels_menu_update): do the right
thing if "data" is a GimpComponentEditor.
* app/gui/channels-commands.[ch]: ditto. Implemented duplicating
of components and component to selection (bug #61018).
2003-03-12 Sven Neumann <sven@gimp.org>
* app/core/gimpchannel.[ch]: added gimp_channel_new_from_component()
which creates a new GimpChannel from an image's color component.
* app/gui/channels-commands.[ch]: added
channels_duplicate_component_cmd_callback().
* app/paint-funcs/paint-funcs-generic.h
* app/paint-funcs/paint-funcs.[ch]: added code to extract a color
component from a PixelRegion (untested!).
* plug-ins/common/checkerboard.c: cosmetics.
2003-01-13 Michael Natterer <mitch@gimp.org>
* app/gui/brushes-menu.[ch]
* app/gui/buffers-menu.[ch]
* app/gui/channels-menu.[ch]
* app/gui/colormap-editor-menu.[ch]
* app/gui/dialogs-menu.[ch]
* app/gui/documents-menu.[ch]
* app/gui/file-open-menu.[ch]
* app/gui/file-save-menu.[ch]
* app/gui/gradient-editor-menu.[ch]
* app/gui/gradients-menu.[ch]
* app/gui/image-menu.[ch]
* app/gui/images-menu.[ch]
* app/gui/layers-menu.[ch]
* app/gui/palette-editor-menu.[ch]
* app/gui/palettes-menu.[ch]
* app/gui/patterns-menu.[ch]
* app/gui/qmask-menu.[ch]
* app/gui/toolbox-menu.[ch]
* app/gui/vectors-menu.[ch]: new files, one per GimpItemFactory,
containing the menu entries and their setup and update funcs.
* app/gui/brushes-commands.[ch]
* app/gui/patterns-commands.[ch]: removed because they contained
only update funcs.
* app/gui/Makefile.am: changed accordingly. Split the huge
SOURCES list in smaller ones for menus and dialogs.
* app/gui/menus.[ch]: removed the menu entries and setup funcs.
Added MENU_SEPARATOR() and MENU_BRANCH() macros to the header.
Made some utility functions public.
* app/display/gimpdisplayshell.[ch]
* app/gui/buffers-commands.[ch]
* app/gui/channels-commands.[ch]
* app/gui/colormap-editor-commands.[ch]
* app/gui/dialogs-commands.[ch]
* app/gui/documents-commands.[ch]
* app/gui/gradient-editor-commands.[ch]
* app/gui/gradients-commands.[ch]
* app/gui/images-commands.[ch]
* app/gui/layers-commands.[ch]
* app/gui/palette-editor-commands.[ch]
* app/gui/palettes-commands.[ch]
* app/gui/qmask-commands.[ch]
* app/gui/vectors-commands.[ch]: removed the update funcs.
* app/gui/plug-in-menus.[ch]: renamed plug_in_set_menu_sensitivity()
to plug_in_menus_update(). Cleanup.
* app/gui/paths-dialog.[ch]: added the <Paths> entries here
so they will go away together with these files.
* app/gui/dialogs-constructors.c
* app/gui/drawable-commands.c: removed useless #includes.
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.
2001-12-17 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdrawablelistview.[ch]: changed
the GimpNewDrawableFunc typedef to take an additional
"GimpDrawable *template" paramater, added the "Drop to New"
feature again by passing the dropped drawable to
view->new_drawable_func().
* app/gui/channels-commands.[ch]: channels_new_channel_query:
* app/gui/layers-commands.[ch]: layers_new_layer_query:
Added the "template" parameter because they are used as the
views' new_drawable_func(), create layers/channels with
the template's properties if a template is passed.
2001-11-30 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/gimpimage-qmask.[ch]: new files: the QMask stuff
stripped from GUI code. Added gimp_image_qmask_invert().
* app/core/gimpimage.[ch]: removed the QMask functions.
* app/display/Makefile.am
* app/display/gimpdisplayshell-qmask.[ch]: removed.
* app/gui/Makefile.am
* app/gui/qmask-commands.[ch]: new files for the new QMask item
factory callbacks and the qmask query dialog.
* app/gui/menus.c: added a context menu for the QMask button.
* app/display/gimpdisplayshell.c
* app/display/gimpdisplayshell-handlers.c: don't include the qmask
stuff.
* app/display/gimpdisplayshell-callbacks.[ch]: Moved the 2 qmask
callbacks here. Don't popup the dialog on double_click. Show
the contect menu on right-click.
* app/display/gimpdisplayshell-callbacks.[ch]:
gimp_display_shell_canvas_events(): removed the hack of
conntecting "key_press_event" to gtk_true() while a tool is
active. Instead, check for (event & GDK_BUTTON1_MASK) in the
key_press and key_release handlers and stop signal emission. Save
the modifier state on "button_press" and restore it after
"button_release".
Changed the way context menus are updated/shown:
- removed GimpContainerContextFunc.
- pass around item factory identifiers (e.g. "<Brushes>")
- added voodoo to update the menus before showing them.
* app/widgets/gimpitemfactory.[ch]: gimp_item_factory_new(): take
a GimpItemFactoryUpdateFunc parameter, attach it as data to the
factory and use it to update the menu in
gimp_item_factory_popup_with_date().
* app/widgets/gimpwidgets-utils.[ch]: removed
gimp_item_factory_popup_with_data() here.
* app/widgets/gimpbrushfactoryview.[ch]
* app/widgets/gimpbufferview.[ch]
* app/widgets/gimpcontainereditor.[ch]
* app/widgets/gimpdatafactoryview.[ch]
* app/widgets/gimpdocumentview.[ch]
* app/widgets/gimpdrawablelistview.[ch]: use item_factory
identifier strings all over the place.
* app/widgets/gimpdockbook.c: removed the menu update code, it's
now in gui/dialogs-commands.c.
* app/gui/brushes-commands.[ch]
* app/gui/buffers-commands.[c]
* app/gui/channels-commands.[ch]
* app/gui/dialogs-commands.[ch]
* app/gui/documents-commands.[ch]
* app/gui/gradient-editor-commands.[ch]
* app/gui/gradients-commands.[ch]
* app/gui/layers-commands.[ch]
* app/gui/palettes-commands.[ch]
* app/gui/patterns-commands.[ch]: removed all show_context_menu()
functions and made the update functions public. Changed all
update functions to use the gimp_item_factory_set_foo() methods
instead of gimp_menu_item_set_foo().
* app/gui/menus.c: pass the update functions to the
gimp_item_factory_new().
* app/gui/dialogs-constructors.c: pass item factory identifiers to
all view constructors.
* app/gui/gradient-editor.c: show the context menu using the new
method.
* app/gui/toolbox.c: no need to include "dialogs-commands.h".
2001-04-29 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainerview.[ch]: added virtual method
context_item() which works like select_item() and activate_item()
and a function to trigger the signal from subclasses (marked as
"protected").
* app/widgets/gimpcontainerlistview.c: invoke context_item() on
right click.
* app/widgets/gimpdrawablelistview.[ch]: implement context_item()
and show a context menu. The functions to show the menu as well as
functions to create a new drawable and to edit it's attriutes must
be passed to the constructor now.
* app/gui/channels-commands.[ch]
* app/gui/layers-commands.[ch]: added functions which show the
layers and channels context menus. No accelerators supported yet.
Auto-destroy all dialogs when their drawable is removed from the
image.
* app/gui/dialogs-constructors.c: changed the calls to
gimp_drawable_list_view_new() accordingly.
* app/gui/menus.c
* app/gui/test-commands.[ch]: removed some test dialogs.
2001-04-21 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/lc_dialogP.h
* app/paths_dialogP.h: removed stuff that will go away anyway (put
the declarations to the public headers).
* app/gimpui.[ch]: new function gimp_widget_get_callback_context()
which may only be called from a *_cmd_callback() and returns the
data we attached with weird methods.
* app/gui/Makefile.am
* app/gui/channels-commands.[ch]: callbacks independent from the
channels dialog and the "new" and "edit channel" dialogs.
* app/gui/channels-dialog.[ch]
* app/gui/layers-commands.c
* app/gui/layers-dialog.[ch]
* app/lc_dialog.[ch]
* app/gui/menus.c
* app/gui/paths-dialog.[ch]
* app/tools/gimpbezierselecttool.c
* po/POTFILES.in: changed accordingly.