Rather than trying to fix up our own heuristics using a
`GtkMenuPositionFunc`, use whatever GTK provides to position given a
specific rectangle, which also has the benefit of nicely integrating
with GDK backends such as Wayland. Another advantage is that we can use
GdkGravity to center the popup.
Since GTK 3, GtkWidget also gained a "popup-menu" signal, which we
can/should use instead of rolling our own context signals.
These actions raise a GimpViewableDialog. For this to work, I made this
widget work with a list of GimpViewable, not a single viewable anymore
(so maybe the widget class name should change?).
When this list contains only a single GimpViewable, it will display
exactly like before, with a viewable preview. With several viewables,
the preview won't show.
This allows to add masks to all selected layers at once, with the same
basic options for all masks, as set in the dialog.
...-last positioned- monitor
Use gimp_dialog_factory_position_dialog() in GimpColormapEditor and
GimpPaletteEditor so the color dialogs appear where they were before.
When loading indexed images, the image type is not obvious at all
(basically only reference is in the title bar). The main issue is that
if you don't realize it when editing, GIMP appear broken when the
expected colors don't appear on canvas.
Commit e48c239459 was a first step by showing various color widgets with
out-of-gamut warnings contextually. This additional commits will also
allows color selection for painting tools (i.e. foreground and
background colors) to be done within the image palette by default. This
way, the fact that this image impose working with limited color palette
is obvious as soon as you try to edit colors.
Make the bottom-left entry request only minimal width, it expands
anyway. Also replace the "Columns:" label by a "grid" icon and set a
tooltip on the columns spinbutton.
It's deprecated in GTK+ 3.x, so we get rid of some deprecation
warnings. Also, it has always only been a utility function that hides
what is really going on in the widget hierarchy.
It used to be { NEW, UPDATE } but that didn't allow to distinguish the
final END update, which we will soon need for automatic color history
updating. Make sure all places that handle motion events on colors
(pick from canvas, gradient editor) correctly send and handle END
events.
Allow to drop colors also on the palette view's parent viewport, so
colors can be dropped everywhere inside the scrolled window, also when
the palette view is invisible because it has zero colors. Also allow
dropping of palettes on the viewport to change the editor's active
palette.
Remove a crack eventbox and a double crack alignment and suddenly the
widget behaves properly. I have no idea what "important" feature I
killed with that removal, but the whole palette editing code needs
some serious chopping soon.
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2007-03-17 Michael Natterer <mitch@gimp.org>
Make the height of the previews in data editors configurable.
Fixes bug #337757.
* app/widgets/gimpdataeditor.[ch]: add member "view" which needs
to be set by subclasses. Add style property "minimal-height" which
defaults to 96. Add style_set() implementation which sets
editor->view's height to the configured value.
* app/widgets/gimpbrusheditor.[ch]
* app/widgets/gimpgradienteditor.[ch]
* app/widgets/gimppaletteeditor.[ch]: use data_editor->view for
storing the view widget and removed own view members. Remove
separate #defines for the view's default width and height, it's
width follows the dialog anyway.
* themes/Default/gtkrc: document the default value of 96.
* themes/Small/gtkrc: set it to 64.
svn path=/trunk/; revision=22137
2007-03-09 Michael Natterer <mitch@gimp.org>
* app/core/core-types.h: include "libgimpmath/gimpmathtypes.h"
instead of "libgimpmath/gimpmath.h".
* app/core/gimpbrush.h
* app/paint/gimppaintcore.h
* app/paint/gimpperspectiveclone.h
* app/text/gimptext.h
* app/tools/gimptransformtool.h: include gimpvector.h and
gimpmatrix.h explicitely where they are needed in public structs.
* app/*/*.c
* tools/pdbgen/pdb/paths.pdb: include "libgimpmath/gimpmath.h"
where needed.
* app/pdb/paths_cmds.c: regenerated.
svn path=/trunk/; revision=22084
2006-12-15 Sven Neumann <sven@gimp.org>
* app/widgets/gimpuimanager.[ch]: added new function
gimp_ui_manager_activate_action() as a shortcut for looking up the
action and activating it.
* app/actions/dialogs-actions.c
* app/display/gimpdisplayshell-close.c
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimppaletteeditor.c
* app/widgets/gimptoolbox.c
* app/widgets/gimptooloptionseditor.c: use the new function.
* app/actions/file-commands.c
* app/dialogs/file-save-dialog.c: minor code cleanup.
2006-12-14 Michael Natterer <mitch@gimp.org>
Applied slightly modified patch from David Gowers which abstracts
away and unifies seraching a color in a palette (bug #132146):
* app/core/gimppalette.[ch]: added gimp_palette_find_entry().
* app/widgets/gimpcolorselectorpalette.c
* app/widgets/gimppaletteeditor.c: use it for selecting matching
colors from the active palette.
2006-11-25 Simon Budig <simon@gimp.org>
* libgimpwidgets/gimpresolutionentry.c
* libgimpwidgets/gimpwidgets.def: fix typo in a function name.
* app/widgets/gimpgradienteditor.c
* app/widgets/gimppaletteeditor.c
* app/actions/gradient-editor-actions.c
* app/actions/palette-editor-actions.c: handle all enum values
and use sane ones.
* app/widgets/gimpcontrollerinfo.c: fix a warning.
2006-11-01 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdataeditor.c
* app/widgets/gimppaletteeditor.c: set the editable state, not
the
sensitivity of the entries according to the data's editable
state.
2006-09-12 Sven Neumann <sven@gimp.org>
* app/widgets/gimppaletteeditor.c (gimp_palette_editor_get_index):
applied a modified patch from David Gowers that changes the search
behaviour to favour colors in the neighborhood of the selected color
(bug #355520).
2006-08-31 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpgradienteditor.[ch] (struct GimpGradientEditor):
removed GimpContext member I added before deciding it needs to be
added to GimpDataEditor.
Use GimpDataEditor's context instead of the bogus one. Also use
the data editor's context instead of the user context wherever it
was used.
* app/widgets/gimppaletteeditor.c: use GimpDataEditor's context
instead of the user context here too.
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-07-18 Sven Neumann <sven@gimp.org>
* app/widgets/gimppaletteeditor.c (gimp_palette_editor_get_index,
gimp_palette_editor_set_index, gimp_palette_editor_max_index):
fixed potential crash based on a patch from David Gowers (bug #347593).
2006-05-28 Michael Natterer <mitch@gimp.org>
Applied patch from David Gowers which adds actions to select
palette and colormap colors with actions. Modified the patch quite
a bit. Fixes bug #130123.
* app/widgets/gimpcolormapeditor.[ch]
* app/widgets/gimppaletteeditor.[ch]: add functions get_index()
which gets the currently selected color's index (optionally the
index of a passed color), set_index() which sets the selected
color by index, and max_index() which returns the maximum possible
color index.
* app/dialogs/dialogs-constructors.c: changed accordingly.
* app/actions/context-actions.c
* app/actions/context-commands.[ch]: actions and callbacks which
use the new functions.