gimp/app/widgets/gimpselectioneditor.c

351 lines
12 KiB
C
Raw Normal View History

/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "widgets-types.h"
#include "config/gimpcoreconfig.h"
#include "core/gimp.h"
Treat changes to the selection like changes to any other drawable: 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.
2003-10-06 20:17:11 +08:00
#include "core/gimpchannel-select.h"
#include "core/gimpcontainer.h"
#include "core/gimpimage.h"
#include "core/gimpimage-pick-color.h"
#include "core/gimpselection.h"
#include "core/gimptoolinfo.h"
/* FIXME: #include "tools/tools-types.h" */
#include "tools/tools-types.h"
#include "tools/gimpregionselectoptions.h"
#include "gimpselectioneditor.h"
#include "gimpdnd.h"
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-30 05:44:51 +08:00
#include "gimpdocked.h"
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
#include "gimpmenufactory.h"
#include "gimpview.h"
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-26 06:31:44 +08:00
#include "gimpviewrenderer.h"
#include "gimpwidgets-utils.h"
#include "gimp-intl.h"
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-30 05:44:51 +08:00
static void gimp_selection_editor_docked_iface_init (GimpDockedInterface *iface);
static void gimp_selection_editor_constructed (GObject *object);
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
static void gimp_selection_editor_set_image (GimpImageEditor *editor,
GimpImage *image);
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-30 05:44:51 +08:00
static void gimp_selection_editor_set_context (GimpDocked *docked,
GimpContext *context);
app/actions/dockable-actions.c app/actions/dockable-commands.[ch] 2006-01-17 Michael Natterer <mitch@gimp.org> * app/actions/dockable-actions.c * app/actions/dockable-commands.[ch] * app/dialogs/dialogs-constructors.[ch] * app/dialogs/dialogs.c * app/display/gimpdisplayshell-layer-select.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbrushfactoryview.h * app/widgets/gimpbufferview.[ch] * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcomponenteditor.[ch] * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerentry.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerpopup.[ch] * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpfontview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpmenudock.c * app/widgets/gimppatternfactoryview.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpsessioninfo.[ch] * app/widgets/gimptemplateview.[ch] * app/widgets/gimptooloptionseditor.c * app/widgets/gimptoolview.[ch] * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpviewablebox.c * app/widgets/gimpviewablebutton.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpviewrenderer.c: change the word "preview" to "view" whereever we talk about GimpView or GimpViewRenderer objects or their sizes. Ther were renamed from "Preview" a long time ago and we had a preview/view naming mess ever since.
2006-01-17 18:08:50 +08:00
static gboolean gimp_selection_view_button_press (GtkWidget *widget,
GdkEventButton *bevent,
GimpSelectionEditor *editor);
static void gimp_selection_editor_drop_color (GtkWidget *widget,
gint x,
gint y,
const GimpRGB *color,
gpointer data);
static void gimp_selection_editor_mask_changed (GimpImage *image,
GimpSelectionEditor *editor);
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-30 05:44:51 +08:00
G_DEFINE_TYPE_WITH_CODE (GimpSelectionEditor, gimp_selection_editor,
GIMP_TYPE_IMAGE_EDITOR,
G_IMPLEMENT_INTERFACE (GIMP_TYPE_DOCKED,
gimp_selection_editor_docked_iface_init))
#define parent_class gimp_selection_editor_parent_class
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-30 05:44:51 +08:00
static GimpDockedInterface *parent_docked_iface = NULL;
static void
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-30 05:44:51 +08:00
gimp_selection_editor_class_init (GimpSelectionEditorClass *klass)
{
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpImageEditorClass *image_editor_class = GIMP_IMAGE_EDITOR_CLASS (klass);
object_class->constructed = gimp_selection_editor_constructed;
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
image_editor_class->set_image = gimp_selection_editor_set_image;
}
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-30 05:44:51 +08:00
static void
gimp_selection_editor_docked_iface_init (GimpDockedInterface *iface)
{
parent_docked_iface = g_type_interface_peek_parent (iface);
if (! parent_docked_iface)
parent_docked_iface = g_type_default_interface_peek (GIMP_TYPE_DOCKED);
iface->set_context = gimp_selection_editor_set_context;
}
static void
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
gimp_selection_editor_init (GimpSelectionEditor *editor)
{
2003-03-10 22:07:22 +08:00
GtkWidget *frame;
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
gtk_box_pack_start (GTK_BOX (editor), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
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-30 05:44:51 +08:00
editor->view = gimp_view_new_by_types (NULL,
GIMP_TYPE_VIEW,
app/actions/dockable-actions.c app/actions/dockable-commands.[ch] 2006-01-17 Michael Natterer <mitch@gimp.org> * app/actions/dockable-actions.c * app/actions/dockable-commands.[ch] * app/dialogs/dialogs-constructors.[ch] * app/dialogs/dialogs.c * app/display/gimpdisplayshell-layer-select.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbrushfactoryview.h * app/widgets/gimpbufferview.[ch] * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcomponenteditor.[ch] * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerentry.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerpopup.[ch] * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpfontview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpmenudock.c * app/widgets/gimppatternfactoryview.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpsessioninfo.[ch] * app/widgets/gimptemplateview.[ch] * app/widgets/gimptooloptionseditor.c * app/widgets/gimptoolview.[ch] * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpviewablebox.c * app/widgets/gimpviewablebutton.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpviewrenderer.c: change the word "preview" to "view" whereever we talk about GimpView or GimpViewRenderer objects or their sizes. Ther were renamed from "Preview" a long time ago and we had a preview/view naming mess ever since.
2006-01-17 18:08:50 +08:00
GIMP_TYPE_SELECTION,
GIMP_VIEW_SIZE_HUGE,
0, TRUE);
gimp_view_renderer_set_background (GIMP_VIEW (editor->view)->renderer,
GIMP_ICON_TEXTURE);
app/actions/dockable-actions.c app/actions/dockable-commands.[ch] 2006-01-17 Michael Natterer <mitch@gimp.org> * app/actions/dockable-actions.c * app/actions/dockable-commands.[ch] * app/dialogs/dialogs-constructors.[ch] * app/dialogs/dialogs.c * app/display/gimpdisplayshell-layer-select.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbrushfactoryview.h * app/widgets/gimpbufferview.[ch] * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcomponenteditor.[ch] * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerentry.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerpopup.[ch] * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpfontview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpmenudock.c * app/widgets/gimppatternfactoryview.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpsessioninfo.[ch] * app/widgets/gimptemplateview.[ch] * app/widgets/gimptooloptionseditor.c * app/widgets/gimptoolview.[ch] * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpviewablebox.c * app/widgets/gimpviewablebutton.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpviewrenderer.c: change the word "preview" to "view" whereever we talk about GimpView or GimpViewRenderer objects or their sizes. Ther were renamed from "Preview" a long time ago and we had a preview/view naming mess ever since.
2006-01-17 18:08:50 +08:00
gtk_widget_set_size_request (editor->view,
GIMP_VIEW_SIZE_HUGE, GIMP_VIEW_SIZE_HUGE);
app/actions/dockable-actions.c app/actions/dockable-commands.[ch] 2006-01-17 Michael Natterer <mitch@gimp.org> * app/actions/dockable-actions.c * app/actions/dockable-commands.[ch] * app/dialogs/dialogs-constructors.[ch] * app/dialogs/dialogs.c * app/display/gimpdisplayshell-layer-select.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbrushfactoryview.h * app/widgets/gimpbufferview.[ch] * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcomponenteditor.[ch] * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerentry.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerpopup.[ch] * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpfontview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpmenudock.c * app/widgets/gimppatternfactoryview.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpsessioninfo.[ch] * app/widgets/gimptemplateview.[ch] * app/widgets/gimptooloptionseditor.c * app/widgets/gimptoolview.[ch] * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpviewablebox.c * app/widgets/gimpviewablebutton.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpviewrenderer.c: change the word "preview" to "view" whereever we talk about GimpView or GimpViewRenderer objects or their sizes. Ther were renamed from "Preview" a long time ago and we had a preview/view naming mess ever since.
2006-01-17 18:08:50 +08:00
gimp_view_set_expand (GIMP_VIEW (editor->view), TRUE);
gtk_container_add (GTK_CONTAINER (frame), editor->view);
gtk_widget_show (editor->view);
app/actions/dockable-actions.c app/actions/dockable-commands.[ch] 2006-01-17 Michael Natterer <mitch@gimp.org> * app/actions/dockable-actions.c * app/actions/dockable-commands.[ch] * app/dialogs/dialogs-constructors.[ch] * app/dialogs/dialogs.c * app/display/gimpdisplayshell-layer-select.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbrushfactoryview.h * app/widgets/gimpbufferview.[ch] * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcomponenteditor.[ch] * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerentry.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerpopup.[ch] * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpfontview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpmenudock.c * app/widgets/gimppatternfactoryview.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpsessioninfo.[ch] * app/widgets/gimptemplateview.[ch] * app/widgets/gimptooloptionseditor.c * app/widgets/gimptoolview.[ch] * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpviewablebox.c * app/widgets/gimpviewablebutton.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpviewrenderer.c: change the word "preview" to "view" whereever we talk about GimpView or GimpViewRenderer objects or their sizes. Ther were renamed from "Preview" a long time ago and we had a preview/view naming mess ever since.
2006-01-17 18:08:50 +08:00
g_signal_connect (editor->view, "button-press-event",
G_CALLBACK (gimp_selection_view_button_press),
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
editor);
app/actions/dockable-actions.c app/actions/dockable-commands.[ch] 2006-01-17 Michael Natterer <mitch@gimp.org> * app/actions/dockable-actions.c * app/actions/dockable-commands.[ch] * app/dialogs/dialogs-constructors.[ch] * app/dialogs/dialogs.c * app/display/gimpdisplayshell-layer-select.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbrushfactoryview.h * app/widgets/gimpbufferview.[ch] * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcomponenteditor.[ch] * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerentry.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerpopup.[ch] * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpfontview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpmenudock.c * app/widgets/gimppatternfactoryview.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpsessioninfo.[ch] * app/widgets/gimptemplateview.[ch] * app/widgets/gimptooloptionseditor.c * app/widgets/gimptoolview.[ch] * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpviewablebox.c * app/widgets/gimpviewablebutton.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpviewrenderer.c: change the word "preview" to "view" whereever we talk about GimpView or GimpViewRenderer objects or their sizes. Ther were renamed from "Preview" a long time ago and we had a preview/view naming mess ever since.
2006-01-17 18:08:50 +08:00
gimp_dnd_color_dest_add (editor->view,
gimp_selection_editor_drop_color,
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
editor);
gtk_widget_set_sensitive (GTK_WIDGET (editor), FALSE);
}
static void
gimp_selection_editor_constructed (GObject *object)
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
{
GimpSelectionEditor *editor = GIMP_SELECTION_EDITOR (object);
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
G_OBJECT_CLASS (parent_class)->constructed (object);
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
editor->all_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor), "select",
"select-all", NULL);
editor->none_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor), "select",
"select-none", NULL);
editor->invert_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor), "select",
"select-invert", NULL);
editor->save_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor), "select",
"select-save", NULL);
editor->path_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor), "vectors",
"vectors-selection-to-vectors",
"vectors-selection-to-vectors-advanced",
GDK_SHIFT_MASK,
NULL);
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
editor->stroke_button =
gimp_editor_add_action_button (GIMP_EDITOR (editor), "select",
"select-stroke",
"select-stroke-last-values",
GDK_SHIFT_MASK,
NULL);
}
static void
gimp_selection_editor_set_image (GimpImageEditor *image_editor,
GimpImage *image)
{
GimpSelectionEditor *editor = GIMP_SELECTION_EDITOR (image_editor);
if (image_editor->image)
{
g_signal_handlers_disconnect_by_func (image_editor->image,
gimp_selection_editor_mask_changed,
editor);
}
GIMP_IMAGE_EDITOR_CLASS (parent_class)->set_image (image_editor, image);
if (image)
{
g_signal_connect (image, "mask-changed",
G_CALLBACK (gimp_selection_editor_mask_changed),
editor);
app/actions/dockable-actions.c app/actions/dockable-commands.[ch] 2006-01-17 Michael Natterer <mitch@gimp.org> * app/actions/dockable-actions.c * app/actions/dockable-commands.[ch] * app/dialogs/dialogs-constructors.[ch] * app/dialogs/dialogs.c * app/display/gimpdisplayshell-layer-select.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbrushfactoryview.h * app/widgets/gimpbufferview.[ch] * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcomponenteditor.[ch] * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerentry.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerpopup.[ch] * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpfontview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpmenudock.c * app/widgets/gimppatternfactoryview.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpsessioninfo.[ch] * app/widgets/gimptemplateview.[ch] * app/widgets/gimptooloptionseditor.c * app/widgets/gimptoolview.[ch] * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpviewablebox.c * app/widgets/gimpviewablebutton.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpviewrenderer.c: change the word "preview" to "view" whereever we talk about GimpView or GimpViewRenderer objects or their sizes. Ther were renamed from "Preview" a long time ago and we had a preview/view naming mess ever since.
2006-01-17 18:08:50 +08:00
gimp_view_set_viewable (GIMP_VIEW (editor->view),
GIMP_VIEWABLE (gimp_image_get_mask (image)));
}
else
{
app/actions/dockable-actions.c app/actions/dockable-commands.[ch] 2006-01-17 Michael Natterer <mitch@gimp.org> * app/actions/dockable-actions.c * app/actions/dockable-commands.[ch] * app/dialogs/dialogs-constructors.[ch] * app/dialogs/dialogs.c * app/display/gimpdisplayshell-layer-select.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbrushfactoryview.h * app/widgets/gimpbufferview.[ch] * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcomponenteditor.[ch] * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerentry.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerpopup.[ch] * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpfontview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpmenudock.c * app/widgets/gimppatternfactoryview.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpsessioninfo.[ch] * app/widgets/gimptemplateview.[ch] * app/widgets/gimptooloptionseditor.c * app/widgets/gimptoolview.[ch] * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpviewablebox.c * app/widgets/gimpviewablebutton.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpviewrenderer.c: change the word "preview" to "view" whereever we talk about GimpView or GimpViewRenderer objects or their sizes. Ther were renamed from "Preview" a long time ago and we had a preview/view naming mess ever since.
2006-01-17 18:08:50 +08:00
gimp_view_set_viewable (GIMP_VIEW (editor->view), NULL);
}
}
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-30 05:44:51 +08:00
static void
gimp_selection_editor_set_context (GimpDocked *docked,
GimpContext *context)
{
GimpSelectionEditor *editor = GIMP_SELECTION_EDITOR (docked);
parent_docked_iface->set_context (docked, context);
gimp_view_renderer_set_context (GIMP_VIEW (editor->view)->renderer,
context);
}
/* public functions */
GtkWidget *
gimp_selection_editor_new (GimpMenuFactory *menu_factory)
{
app/actions/documents-actions.c app/actions/documents-commands.c 2004-05-12 Michael Natterer <mitch@gimp.org> * app/actions/documents-actions.c * app/actions/documents-commands.c * app/actions/edit-actions.c * app/actions/edit-commands.[ch] * app/actions/layers-actions.c * app/actions/layers-commands.c * app/actions/select-actions.c * app/actions/select-commands.[ch] * app/actions/vectors-actions.c * app/actions/vectors-commands.[ch]: added tooltips for actions which are now used for dialog buttons, added callback implementations which formerly lived in various widgets, moved some actions around and did some general cleanups. * menus/image-menu.xml.in: s/edit-stroke/select-stroke/ * menus/Makefile.am * menus/selection-editor-menu.xml: new popup menu. * app/menus/menus.c: register <SelectionEditor> and <UndoEditor> UI managers. * app/widgets/gimpeditor.[ch]: added construct properties "menu-factory", "menu-identifier", "ui-path" and "popup-data". Implement GObject::constructor() and create the UI manager if all needed properties were set. Enables creating action buttons at widget construction time because they need a UI manager. (gimp_editor_add_action_button): changed to take a va_list of "extended" actions which are invoked if the resp. button emits "extended_clicked". Store the actions and their modifier masks in a list attached to the button. * app/widgets/gimpcontainerview.c (gimp_container_view_item_selected): if the view has container *and* context, simply change the context and return. (gimp_container_view_context_changed): don't emit "select_item" manually but simply call gimp_container_view_select_item(). (gimp_container_view_viewable_dropped): use gimp_container_view_item_selected() instead of changing the context directly. * app/widgets/gimpcontainereditor.c (gimp_container_editor_select_item): update the UI manager. * app/widgets/gimpdockable.c: don't try to fiddle with the dialog's menu if it doesn't have a ui_path (happens if the UI manager is just a collection of actions for the dialog buttons and has no menu registered). * app/widgets/gimpimageeditor.c: connect to the image's "flush" signal and update the UI manager in the callback. * app/widgets/gimpitemtreeview.c: use GimpEditor's construct properties to create the UI manager so GimpItemTreeView subclasses can have action buttons. Update the UI manager in gimp_item_tree_view_select_item(). * app/widgets/gimpbufferview.c * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpdatafactoryview.c * app/widgets/gimpfontview.c * app/widgets/gimpimageview.c * app/widgets/gimptemplateview.c * app/widgets/gimptoolview.c: changed calls to gimp_editor_add_action_button() accordingly and removed some unneeded select_item() implementations. * app/widgets/gimpchanneltreeview.c * app/widgets/gimpvectorstreeview.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpundoeditor.[ch]: use action buttons and removed lots of callbacks which went to the resp. action callbacks. * app/widgets/widgets-types.h: removed some now unneeded function prototypes. * app/gui/dialogs-constructors.c: changed (simplified) many dialog constructors accordingly.
2004-05-13 02:36:33 +08:00
g_return_val_if_fail (GIMP_IS_MENU_FACTORY (menu_factory), NULL);
return g_object_new (GIMP_TYPE_SELECTION_EDITOR,
"menu-factory", menu_factory,
"menu-identifier", "<Selection>",
"ui-path", "/selection-popup",
NULL);
}
static gboolean
app/actions/dockable-actions.c app/actions/dockable-commands.[ch] 2006-01-17 Michael Natterer <mitch@gimp.org> * app/actions/dockable-actions.c * app/actions/dockable-commands.[ch] * app/dialogs/dialogs-constructors.[ch] * app/dialogs/dialogs.c * app/display/gimpdisplayshell-layer-select.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbrushfactoryview.h * app/widgets/gimpbufferview.[ch] * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcomponenteditor.[ch] * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerentry.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerpopup.[ch] * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpfontview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpmenudock.c * app/widgets/gimppatternfactoryview.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpsessioninfo.[ch] * app/widgets/gimptemplateview.[ch] * app/widgets/gimptooloptionseditor.c * app/widgets/gimptoolview.[ch] * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpviewablebox.c * app/widgets/gimpviewablebutton.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpviewrenderer.c: change the word "preview" to "view" whereever we talk about GimpView or GimpViewRenderer objects or their sizes. Ther were renamed from "Preview" a long time ago and we had a preview/view naming mess ever since.
2006-01-17 18:08:50 +08:00
gimp_selection_view_button_press (GtkWidget *widget,
GdkEventButton *bevent,
GimpSelectionEditor *editor)
{
GimpImageEditor *image_editor = GIMP_IMAGE_EDITOR (editor);
GimpViewRenderer *renderer;
GimpToolInfo *tool_info;
GimpSelectionOptions *sel_options;
GimpRegionSelectOptions *options;
GimpDrawable *drawable;
GimpChannelOps operation;
gint x, y;
GimpRGB color;
if (! image_editor->image)
return TRUE;
app/actions/dockable-actions.c app/actions/dockable-commands.[ch] 2006-01-17 Michael Natterer <mitch@gimp.org> * app/actions/dockable-actions.c * app/actions/dockable-commands.[ch] * app/dialogs/dialogs-constructors.[ch] * app/dialogs/dialogs.c * app/display/gimpdisplayshell-layer-select.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbrushfactoryview.h * app/widgets/gimpbufferview.[ch] * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcomponenteditor.[ch] * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerentry.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerpopup.[ch] * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpfontview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpmenudock.c * app/widgets/gimppatternfactoryview.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpsessioninfo.[ch] * app/widgets/gimptemplateview.[ch] * app/widgets/gimptooloptionseditor.c * app/widgets/gimptoolview.[ch] * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpviewablebox.c * app/widgets/gimpviewablebutton.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpviewrenderer.c: change the word "preview" to "view" whereever we talk about GimpView or GimpViewRenderer objects or their sizes. Ther were renamed from "Preview" a long time ago and we had a preview/view naming mess ever since.
2006-01-17 18:08:50 +08:00
renderer = GIMP_VIEW (editor->view)->renderer;
2003-03-10 22:07:22 +08:00
tool_info = gimp_get_tool_info (image_editor->image->gimp,
"gimp-by-color-select-tool");
if (! tool_info)
return TRUE;
sel_options = GIMP_SELECTION_OPTIONS (tool_info->tool_options);
options = GIMP_REGION_SELECT_OPTIONS (tool_info->tool_options);
drawable = gimp_image_get_active_drawable (image_editor->image);
if (! drawable)
return TRUE;
operation = gimp_modifiers_to_channel_op (bevent->state);
app/actions/channels-commands.c app/actions/colormap-actions.c 2007-12-25 Michael Natterer <mitch@gimp.org> * app/actions/channels-commands.c * app/actions/colormap-actions.c * app/actions/colormap-commands.c * app/actions/image-commands.c * app/core/gimp-edit.c * app/core/gimpdrawable-preview.c * app/core/gimpimage-colorhash.c * app/core/gimpimage-colormap.c * app/core/gimpimage-convert.c * app/core/gimpimage-crop.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-flip.c * app/core/gimpimage-guides.c * app/core/gimpimage-merge.c * app/core/gimpimage-preview.c * app/core/gimpimage-quick-mask.c * app/core/gimpimage-resize.c * app/core/gimpimage-rotate.c * app/core/gimpimage-sample-points.c * app/core/gimpimage-scale.c * app/core/gimpimage-snap.c * app/core/gimpimage.c * app/core/gimpimagefile.c * app/core/gimpimageundo.c * app/core/gimpitem-preview.c * app/core/gimpitem.c * app/core/gimplayer.c * app/core/gimppalette-import.c * app/core/gimpprojection-construct.c * app/core/gimpprojection.c * app/core/gimpselection.c * app/core/gimpundo.c * app/dialogs/layer-options-dialog.c * app/dialogs/print-size-dialog.c * app/display/gimpdisplay.c * app/display/gimpdisplayshell-draw.c * app/display/gimpdisplayshell-scale.c * app/display/gimpdisplayshell-scroll.c * app/display/gimpdisplayshell-title.c * app/display/gimpdisplayshell-transform.c * app/display/gimpdisplayshell.c * app/display/gimpstatusbar.c * app/file/file-open.c * app/paint/gimppaintoptions.c * app/tools/gimpaligntool.c * app/tools/gimpcolortool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpiscissorstool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimpperspectiveclonetool.c * app/tools/gimprectangleselecttool.c * app/tools/gimprectangletool.c * app/tools/gimprotatetool.c * app/vectors/gimpvectors-export.c * app/vectors/gimpvectors-import.c * app/vectors/gimpvectors.c * app/widgets/gimpimagepropview.c * app/widgets/gimpnavigationview.c * app/widgets/gimpselectioneditor.c * app/widgets/gimpviewrendererdrawable.c * app/widgets/gimpviewrendererimage.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * tools/pdbgen/pdb/guides.pdb * tools/pdbgen/pdb/image.pdb: use accessors for many image properties. * app/pdb/guides_cmds.c * app/pdb/image_cmds.c: regenerated. svn path=/trunk/; revision=24432
2007-12-26 00:21:40 +08:00
x = gimp_image_get_width (image_editor->image) * bevent->x / renderer->width;
y = gimp_image_get_height (image_editor->image) * bevent->y / renderer->height;
2003-03-10 22:07:22 +08:00
if (gimp_image_pick_color (image_editor->image, drawable, x, y,
options->sample_merged,
FALSE, 0.0,
NULL,
NULL, &color))
{
gimp_channel_select_by_color (gimp_image_get_mask (image_editor->image),
drawable,
options->sample_merged,
&color,
options->threshold,
options->select_transparent,
options->select_criterion,
operation,
sel_options->antialias,
sel_options->feather,
sel_options->feather_radius,
sel_options->feather_radius);
gimp_image_flush (image_editor->image);
}
return TRUE;
}
static void
gimp_selection_editor_drop_color (GtkWidget *widget,
gint x,
gint y,
const GimpRGB *color,
gpointer data)
{
GimpImageEditor *editor = GIMP_IMAGE_EDITOR (data);
GimpToolInfo *tool_info;
GimpSelectionOptions *sel_options;
GimpRegionSelectOptions *options;
GimpDrawable *drawable;
if (! editor->image)
return;
tool_info = gimp_get_tool_info (editor->image->gimp,
"gimp-by-color-select-tool");
if (! tool_info)
return;
sel_options = GIMP_SELECTION_OPTIONS (tool_info->tool_options);
options = GIMP_REGION_SELECT_OPTIONS (tool_info->tool_options);
drawable = gimp_image_get_active_drawable (editor->image);
if (! drawable)
return;
gimp_channel_select_by_color (gimp_image_get_mask (editor->image),
Treat changes to the selection like changes to any other drawable: 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.
2003-10-06 20:17:11 +08:00
drawable,
options->sample_merged,
color,
options->threshold,
options->select_transparent,
options->select_criterion,
sel_options->operation,
sel_options->antialias,
sel_options->feather,
sel_options->feather_radius,
sel_options->feather_radius);
gimp_image_flush (editor->image);
}
static void
gimp_selection_editor_mask_changed (GimpImage *image,
GimpSelectionEditor *editor)
{
app/actions/dockable-actions.c app/actions/dockable-commands.[ch] 2006-01-17 Michael Natterer <mitch@gimp.org> * app/actions/dockable-actions.c * app/actions/dockable-commands.[ch] * app/dialogs/dialogs-constructors.[ch] * app/dialogs/dialogs.c * app/display/gimpdisplayshell-layer-select.c * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpbrushfactoryview.h * app/widgets/gimpbufferview.[ch] * app/widgets/gimpchanneltreeview.c * app/widgets/gimpcomponenteditor.[ch] * app/widgets/gimpcontainerbox.c * app/widgets/gimpcontainercombobox.[ch] * app/widgets/gimpcontainereditor.[ch] * app/widgets/gimpcontainerentry.[ch] * app/widgets/gimpcontainergridview.[ch] * app/widgets/gimpcontainerpopup.[ch] * app/widgets/gimpcontainertreeview.[ch] * app/widgets/gimpcontainerview.[ch] * app/widgets/gimpdatafactoryview.[ch] * app/widgets/gimpdevicestatus.c * app/widgets/gimpdialogfactory.[ch] * app/widgets/gimpdocumentview.[ch] * app/widgets/gimpfontview.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimpimageview.[ch] * app/widgets/gimpitemtreeview.[ch] * app/widgets/gimplayertreeview.c * app/widgets/gimpmenudock.c * app/widgets/gimppatternfactoryview.[ch] * app/widgets/gimppropwidgets.[ch] * app/widgets/gimpselectioneditor.[ch] * app/widgets/gimpsessioninfo.[ch] * app/widgets/gimptemplateview.[ch] * app/widgets/gimptooloptionseditor.c * app/widgets/gimptoolview.[ch] * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpviewablebox.c * app/widgets/gimpviewablebutton.[ch] * app/widgets/gimpviewabledialog.[ch] * app/widgets/gimpviewrenderer.c: change the word "preview" to "view" whereever we talk about GimpView or GimpViewRenderer objects or their sizes. Ther were renamed from "Preview" a long time ago and we had a preview/view naming mess ever since.
2006-01-17 18:08:50 +08:00
gimp_view_renderer_invalidate (GIMP_VIEW (editor->view)->renderer);
}