Commit Graph

53 Commits

Author SHA1 Message Date
Jehan c6906e77da app: get rid of dummy "*-menu" and "*-popup" actions.
With our old code, we needed dummy actions for every submenu. This is not needed
anymore. Actions are only for end menu items (items which actually do something,
not just open a submenu).
Get rid of them all, as well as the code to ignore any action ending with such
suffixes in action-listing pieces of code.
2023-04-20 15:36:11 +02:00
Jehan 89772351c9 Issue #9349: Add concept of "short" (contextual) vs "long" label for actions.
All Gimp*ActionEntry (except GimpProcedureActionEntry) now have a short_label
member.
This commit doesn't add any new short label yet. It just fixes the struct usage,
and fixes a few localization contexts here and there when I saw such broken
strings.

I also fixed a few gradient editor action strings which were not proper labels
(like "splitmidpoint" or "splituniform", or missing uppercase, etc.).
2023-04-14 17:48:57 +02:00
Jehan 71c8ff1f21 app: change all action entry structs to allow several shortcuts.
- The `accelerator` variable is a NULL-terminated array, allowing up to 3
  accelerators per action (so far, none has more than 2).
- Only the struct GimpProcedureActionEntry still has a single accelerator as I
  don't think it makes sense that we change the plug-in API to allow a plug-in
  to register more than 1 shortcut for a procedure (e.g. we don't want a plug-in
  to just register all possible keys for their procedure!).
  Of course, users will still be allowed to register more shortcuts for plug-in
  actions through the shortcut dialog. It's only the initialization which
  1-shortcut max for procedure actions.
- Remove all actions ending up in "-accel" as these were only a trick to
  register more shortcut for a same action. Now we just have the real
  possibility (rather than creating bogus duplicate actions). As a consequence,
  these actions accelerators have been moved as secondary accelerator to their
  main action.
  The deleted actions are: "view-zoom-out-accel", "view-zoom-in-accel",
  "view-zoom-16-1-accel", "view-zoom-4-1-accel", "view-zoom-2-1-accel" and
  "view-zoom-1-1-accel".
2023-04-12 22:07:09 +02:00
Jehan 897d7ef168 app: channels and path to selection actions multi-item aware. 2023-01-10 20:07:44 +01:00
Jehan cef6737d86 app: plural is expected here with multi-layer selected support.
Thanks to Anders Jonsson for noticing.
2022-02-12 18:55:56 +01:00
Jehan a6dccf5c2f app: fix icons for the "*-lock-*" actions.
Now that we have dedicated icons made by Aryeom!
2021-12-23 13:39:43 +01:00
Jehan d9846ac9dd app: get rid of all "*-linked" actions.
I.e.: "layers-linked", "channels-linked", "vectors-linked" and
"drawable-linked".
2021-12-23 13:39:43 +01:00
Jehan 5c63c2478f app: duplicate and delete channel actions multi-channel aware. 2021-12-23 12:55:11 +01:00
Jehan 718177b8bc app: raise/lower channels one step or to top/bottom multi-channel aware. 2021-12-23 12:55:11 +01:00
Jehan 8d38b72446 app: channel selection actions now multi-channel aware. 2021-12-23 12:55:11 +01:00
Jehan 811d356953 app: GimpAction now has a "reason" parameter to explain being disabled.
In some cases, in particular for actions generated from plug-in
procedure right now, we were displaying the reason of the insensitivity
(typically right now, only the drawable type is cited). This was done by
appending the reason to the tooltip, separated by 2 newlines, which
resulted in extra ugly design, no nice way to style this info directly
(with pango for instance if the widget display allows it, or on a
separate info widget in a possible future, or whatnot).

Also it would mean that the action search could match a disabled action
by mistake if a search word happens to be in the reason message.

This improves the situation with the following changes:
* gimp_action_set_sensitive() now takes an optional reason string to set
  the reason message.
* Same for gimp_action_group_set_action_sensitive().
* gimp_action_get_sensitive() returns an optional reason string.
* gimp_procedure_get_sensitive()'s tooltip return value now becomes a
  reason (it won't contain anymore the tooltip and the reason
  concatenated, only the reason for separate processing).
2021-04-23 19:43:30 +02:00
Jehan 5b4c2dac7a app: implement multi-selection code for channels and vectors.
I have not enabled actual multi-selection yet for these 2 item types,
but at least implement enough to not crash!
2020-05-17 18:32:15 +02:00
Michael Natterer 3b6b3fc189 app: GtkAction -> GAction madness part two
Change all action callbacks so they can be invoked by a GAction:

- add GimpActionCallback typedef:
  void (* cb) (GimpAction*, GVariant*, gpointer)
- change all action callbacks to the GimpActionCallback signature
- add "gimp-activate" and "gimp-change-state" signals to GimpAction,
  with the same signature as the resp. GAction signals
- remove all other custom action signals and only use the new
  GimpAction signals
- pass around appropriate GVariants containing booleans, int32,
  strings
- badly hack around to force a GimpProcedure pointer into a
  uint64 variant
- remove all G_CALLBACK() casts from all action callbacks,
  they all have the same signature now
2019-07-04 01:11:48 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Jehan d88a09334d app: get rid of more abused GIMP_ICON_CLOSE on *-color-tag-menu.
I just replaced them by NULL. I don't think that is really necessary to
have any icons on these.
2017-11-23 20:40:49 +01:00
Jehan 39d03909dc app: s/GIMP_ICON_CLOSE/GIMP_ICON_EDIT_CLEAR/ for *-color-tag-none.
This part of commit 189a474502 was still
right. Keep it.
2017-11-20 02:44:44 +01:00
Jehan e3f8b470d2 Revert "app: copy *-color-tag-* tooltips into labels."
This reverts commit 189a474502.
As Mitch notes, this does not look that good in the menus. As for the
action search, since the tooltip is still shown below, the shortness and
duplication of the action labels make it less a problem.
2017-11-20 02:40:16 +01:00
Jehan 189a474502 app: copy *-color-tag-* tooltips into labels.
Current labels were very uninformative while tooltips contained what
should have been the labels. Just switch these.
Also replace GIMP_ICON_CLOSE by GIMP_ICON_EDIT_CLEAR for the various
*-color-tag-none actions. As a comment was reminding next to these
icons, the close icon was abused. The edit-clear icon on the other hand
is quite relevant.
2017-11-16 03:20:42 +01:00
Jehan 0e8b89c821 app: more casing inconsistencies and a double space. 2017-11-16 02:38:49 +01:00
Jehan be9d5758c2 app: various action labels made more accurate.
"Linked", "Lock Pixels|Position|Strokes" and color tags were not precise
enough to know if that were for channels, layers, any drawable or paths.
2017-11-16 02:34:27 +01:00
Jehan 6b0f9f001f app: apply Title Case to action labels.
Looking at most action labels, it seems the "Title Case" mixed-case
style has to be applied. Fix the few labels I found which were not
following this case style.
Also no need to have a tooltip when it is basically the same as the
label.
2017-11-16 02:27:24 +01:00
Jehan 1e87642ef0 Bug 785061 - Add channels-select-(prev|next|top|bottom) actions. 2017-11-16 01:26:19 +01:00
Jehan 87140a4cc6 app: more accurate labels for "Visible" actions.
There were 4 actions displaying as "Visible" only: channels-visible,
drawable-visible, layers-visible and vectors-visible. This was not very
useful to differentiate them (for instance in action search). Just make
clearer labels.
2017-11-15 21:14:41 +01:00
Alexandre Prokoudine 40dccbddd8 Bug 556884 - More messages marked for translation
Humanize action names to make them readable while
preserving their original grouping. Mark for translation
the missing ones. Use absolute values to make
"increase/decrease more" less cryptic since we hardcode
those values anyway.
2017-06-17 18:54:45 +03:00
Michael Natterer dda54c1df8 Deprecate stock items for good and change all icon defines to GIMP_ICON_*
Try to sort all GIMP_ICON_* defines into FDO categories like in
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html

Add defines for all icons we override, rename some icons to their FDO
standard names, and mark the ones we duplicate with a comment so we
don't forget to rename those to standard names in 3.0.
2017-03-05 16:01:59 +01:00
Michael Natterer 31fcd79dd9 Bug 769738 - Add color tags/labels for layers/channels/paths
Add property "color-tag" of type enum GimpColorTag to GimpItem so all
layers, channels and paths can be tagged with a color.

For interoperability, use the color list from Krita which is a
superset of Photoshop's colors.

Features a "Color Tag" submenu in the layers, channels and paths
menus, a row of color radio buttons in the properties dialogs,
undo and PDB API.

As a side effect, some common code is now factores out into
items-actions.[ch] and items-commands.[ch] which adds visible, linked
and lock actions for layers and channels.
2016-10-29 17:02:16 +02:00
Michael Natterer 65a65947d9 app, libgimp: replace GTK_STOCK_FOO by icon names
unless it's a stock ID used for an action button, will address that
later.
2014-05-11 22:49:22 +02:00
Michael Natterer 603d3441e7 Use gimp_item_get_container_iter() instead of the GimpImage iter APIs
Using the new function makes sure the sensitivity of the raise and
lower actions corresponds to what is possible (raising and lowering
within the group).
2009-08-01 22:54:49 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Sven Neumann ff6bde0a88 also use the translation context for the tooltips.
2008-12-04  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpactiongroup.[ch]: also use the translation
	context for the tooltips.

	* app/actions/*.c: added translation context to all tooltips. 
Also
	improved some tooltips while I was on it.


svn path=/trunk/; revision=27757
2008-12-04 10:32:20 +00:00
Sven Neumann 74e76f2c6a added an extra parameter for the translation context to all
2008-12-03  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpactiongroup.[ch]: added an extra parameter for
	the translation context to all gimp_action_group_add methods.

	* app/actions/*.c: added a translation context to all action
	labels. Also unified and improved the labels and tooltips in a 
few
	places.


svn path=/trunk/; revision=27754
2008-12-03 15:27:42 +00:00
Michael Natterer fb1660a4ea rename gimp_image_floating_sel() to gimp_image_get_floating_selection().
2008-11-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: rename gimp_image_floating_sel() to
	gimp_image_get_floating_selection().

	* app/actions/channels-actions.c
	* app/actions/image-actions.c
	* app/actions/layers-actions.c
	* app/actions/layers-commands.c
	* app/actions/select-actions.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimpselection.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptexttool.c
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/image.pdb: changed accordingly, replaced some
	instances of direct acces by the accessor.

	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27649
2008-11-14 15:01:44 +00:00
Michael Natterer d1ca165b4e add new functions gimp_image_get_layer_iter(), channel_iter() and
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add new functions
	gimp_image_get_layer_iter(), channel_iter() and vectors_iter()
	which return the GList inside the resp. GimpList.

	* app/actions/channels-actions.c
	* app/actions/layers-actions.c
	* app/actions/vectors-actions.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-item-list.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage.c
	* app/core/gimpimage.h
	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-draw.c
	* app/file/file-open.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpdrawtool.c
	* app/vectors/gimpvectors-compat.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/image.pdb: use the new functions instead of
	peeking both into the image and the list. Remove inclusions of
	"gimplist.h" or change them into "gimpcontainer.h" if needed.

	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27524
2008-11-02 20:46:57 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
	had a GEGL dependency (they will have in the next commit, but I
	wanted to keep the commit separate).

	* app/dialogs/Makefile.am
	* app/file/Makefile.am
	* app/gui/Makefile.am
	* app/menus/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/vectors/Makefile.am
	* app/widgets/Makefile.am
	* app/xcf/Makefile.am: add GEGL_CFLAGS.

	* app/actions/*.c
	* app/core/*.c
	* app/dialogs/*.c
	* app/display/*.c
	* app/file/*.c
	* app/gui/*.c
	* app/menus/*.c
	* app/paint/*.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/*.c
	* app/text/*.c
	* app/tools/*.c
	* app/vectors/*.c
	* app/widgets/*.c
	* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
	to all files which include a drawable subclass or gimpimage.h

	* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
	in all generated files.

	* app/pdb/*-cmds.c: regenerated.

	* data/images/gimp-splash.png: the goat is still sleeping.
	By Aurore Derriennic.


svn path=/trunk/; revision=27202
2008-10-09 20:24:04 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Sven Neumann 12920b5a17 take const arrays of action entries.
2006-04-10  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpactiongroup.[ch]: take const arrays of action
	entries.

	* app/actions/*-actions.c: declare action arrays as const.
2006-04-10 08:06:18 +00:00
Sven Neumann 905fdfcbed did a global gimage -> image substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gimage -> image substitution.
2006-03-28 17:08:36 +00:00
Sven Neumann ce4f646661 app/actions/channels-actions.c app/actions/edit-actions.c
2006-03-15  Sven Neumann  <sven@gimp.org>

	* app/actions/channels-actions.c
	* app/actions/edit-actions.c
	* app/actions/file-actions.c
	* app/actions/image-actions.c
	* app/actions/layers-actions.c
	* app/actions/view-actions.c: added more action blurbs.
2006-03-15 11:46:19 +00:00
Sven Neumann 3b28167dd2 use GTK_STOCK_FILE for File actions.
2005-09-19  Sven Neumann  <sven@gimp.org>

	* app/actions/actions.c: use GTK_STOCK_FILE for File actions.

	* app/actions/dialogs-actions.c
	* plug-ins/gimpressionist/gimpressionist.c
	* plug-ins/print/gimp_main_window.c: use GTK_STOCK_ABOUT for About
	dialogs.

	* app/actions/actions.c
	* app/actions/brushes-actions.c
	* app/actions/channels-actions.c
	* app/actions/channels-commands.c
	* app/actions/colormap-editor-actions.c
	* app/actions/gradients-actions.c
	* app/actions/layers-actions.c
	* app/actions/layers-commands.c
	* app/actions/palette-editor-actions.c
	* app/actions/palettes-actions.c
	* app/actions/patterns-actions.c
	* app/actions/templates-actions.c
	* app/actions/templates-commands.c
	* app/actions/text-editor-actions.c
	* app/actions/tool-options-actions.c
	* app/actions/vectors-actions.c
	* app/actions/vectors-commands.c
	* app/tools/gimptexttool.c
	* app/widgets/gimpcontrollereditor.c
	* app/widgets/gimpcontrollerlist.c
	* plug-ins/flame/flame.c
	* plug-ins/gflare/gflare.c
	* plug-ins/gimpressionist/orientation.c
	* plug-ins/gimpressionist/size.c
	* plug-ins/metadata/interface.c: s/GIMP_STOCK_EDIT/GTK_STOCK_EDIT/
2005-09-19 13:07:24 +00:00
Michael Natterer 567bb7b2db added boolean property "value-variable" which specifies if the
2004-11-18  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpenumaction.[ch]: added boolean property
	"value-variable" which specifies if the GimpEnumAction::selected()
	signal may be emitted with arbirtary values (value-variable = TRUE)
	or *only* with enum_action->value (value-variable = FALSE).

	* app/widgets/gimpactiongroup.[ch]: added "gboolean
	value_variable" to GimpEnumActionEntry and set it in
	gimp_action_group_add_enum_actions().

	* app/actions/channels-actions.c
	* app/actions/colormap-editor-actions.c
	* app/actions/context-actions.c
	* app/actions/drawable-actions.c
	* app/actions/edit-actions.c
	* app/actions/error-console-actions.c
	* app/actions/gradient-editor-actions.c
	* app/actions/image-actions.c
	* app/actions/layers-actions.c
	* app/actions/palette-editor-actions.c
	* app/actions/plug-in-actions.c
	* app/actions/vectors-actions.c
	* app/actions/view-actions.c: set "variable" to FALSE for all enum
	actions except those which are used with the GIMP_ACTION_SELECT_SET
	voodoo.

	* app/widgets/gimpcontrollers.c (gimp_controllers_event_mapped):
	fall back to gtk_action_activate() if the action specified in a
	GIMP_CONTROLLER_EVENT_VALUE mapping is not variable. Enables
	triggering of enum actions from GIMP_CONTROLLER_EVENT_VALUE events
	(like midi note-on and note-off).
2004-11-18 16:04:41 +00:00
Michael Natterer fd6d30fd30 When there are variants of actions with and without dialog, let the
2004-10-23  Michael Natterer  <mitch@gimp.org>

	When there are variants of actions with and without dialog, let
	the dialog-less actions try to use the values from the last dialog
	invocation:

	* app/actions/channels-actions.c
	* app/actions/channels-commands.[ch]
	* app/actions/layers-actions.c
	* app/actions/layers-commands.[ch]
	* app/actions/vectors-actions.c
	* app/actions/vectors-commands.[ch]: renamed the foo-new-defaults
	actions to foo-new-last-values and use the last values entered in
	the dialogs.

	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpvectorstreeview.c: changed accordingly. Show
	the dialog on clicking "New" and call the last-values action on
	<shift>+click.

	* app/actions/select-actions.c
	* app/actions/vectors-commands.c: renamed the foo-stroke-last-vals
	to -last-values.

	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpvectorstreeview.c: stroke with last values on
	<shift> clicking the stroke buttons.
2004-10-23 00:53:48 +00:00
Michael Natterer c49df22eef Action code review and pre-release consistency cleanup:
2004-10-18  Michael Natterer  <mitch@gimp.org>

	Action code review and pre-release consistency cleanup:

	* app/actions/*-actions.c: added some missing and resolved
	conflicting mnemonics, added missing help IDs. Cleaned up the
	*_actions_update() functions.

	* app/actions/channels-actions.c
	* app/actions/layers-actions.c
	* app/actions/vectors-actions.c (*_actions_update): simplified
	the code that figures the prev and next channel,layer,vectors.

	* app/actions/qmask-actions.c: use the same accelerator for
	"qmask-active" and "qmask-toggle". Fixed action sensitivity.

	* app/actions/channels-commands.c
	* app/actions/dockable-commands.c
	* app/actions/documents-commands.c
	* app/actions/gradients-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/image-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c: folded tons of private utility
	functions into their only callers (they used to be public and
	called from outside before the switch to action based menus).
	Renamed functions and variables saying "query" or "qbox" to
	"dialog". Moved static functions to the end of the files. Misc
	minor cleanups.

	* app/actions/drawable-actions.c
	* app/actions/drawable-commands.c: made the "drawable-visible" and
	"drawable-linked" actions affect the layer if the active drawable
	is a layer mask.

	* app/actions/select-commands.c: added action to stroke with the
	last values used in an attempt to address bug #135746 but #if 0'ed
	it because the approach is too ugly.

	* app/tools/gimpiscissorstool.c: changed mnemonic from I to S.

	* menus/image-menu-xml.in: added more stuff to the (commented out)
	"context" menu.
2004-10-18 11:29:58 +00:00
Michael Natterer f4d7260c64 app/actions/channels-actions.c app/actions/colormap-editor-actions.c
2004-10-16  Michael Natterer  <mitch@gimp.org>

	* app/actions/channels-actions.c
	* app/actions/colormap-editor-actions.c
	* app/actions/documents-actions.c
	* app/actions/tool-options-actions.c
	* app/actions/vectors-actions.c: added more tooltips for actions
	which are used as extended dialog button callbacks.

	* app/widgets/gimpeditor.c (gimp_editor_add_action_button): keep
	the list of extended actions in reverse order.

	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpdocumentview.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimptooloptionseditor.c
	* app/widgets/gimpvectorstreeview.c: don't set the tooltips
	manually. Removes another bunch of insane translatable multiline
	format strings. Pass the extended actions in the right order
	to gimp_editor_add_action_button().
2004-10-16 17:10:04 +00:00
Michael Natterer 8effb0cfaf Ported the layers, channels and paths dialogs from
2004-10-16  Michael Natterer  <mitch@gimp.org>

	Ported the layers, channels and paths dialogs from
	gimp_editor_add_button() to gimp_editor_add_action_button(),
	removing a massive amount of duplicated code, sensitivity logic
	and confusing utility functions.

	* app/actions/channels-actions.c
	* app/actions/channels-commands.[ch]
	* app/actions/layers-actions.c
	* app/actions/layers-commands.[ch]
	* app/actions/vectors-actions.c
	* app/actions/vectors-commands.[ch]: added "foo-new-default"
	actions and callbacks which create items without a dialog,
	optionally using default values from a passed template. Removed
	all public utility function that were passed as function pointers
	to widget construtors. Added tooltips to all actions which are now
	used for dialog buttons.

	* app/widgets/gimpeditor.c (gimp_editor_add_action_button):
	automatically create multi-line tooltips showing the modifiers for
	extended action buttons. Removes the need for lots of insane
	format strings that need to be translated correctly.

	* app/widgets/gimpitemtreeview.[ch] (struct GimpItemTreeViewClass):
	replaced tooltip and help_id strings by action names.

	(struct GimpItemTreeView)
	(gimp_item_tree_view_new): removed "edit", "new" and "activate"
	function pointers.

	(gimp_item_tree_view_constructor): create all buttons
	with gimp_editor_add_action_button(), using the action names
	from GimpItemTreeViewClass.

	Removed tons of "clicked" callbacks and all code which sets the
	buttons' sensitivity. They are not needed any longer.

	Require all subclasses to implement GimpItemTreeView::new_item(),
	a new virtual function which creates a plain new item without
	showing a dialog.

	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpvectorstreeview.c: fill in the action names and
	implement GimpItemTreeView::new_item(). Removed all button
	sensitivity logic.

	* app/dialogs/dialogs-constructors.c: changed accordingly. Doesn't
	include anything from actions/ any more.
2004-10-16 15:48:23 +00:00
Michael Natterer 43cdd54dd1 reoedered to somehow reflect the class hierarchy.
2004-05-23  Michael Natterer  <mitch@gimp.org>

	* app/widgets/widgets-types.h: reoedered to somehow reflect the
	class hierarchy.

	Some dockable context handling cleanup:

	* app/widgets/gimpdocked.[ch]: removed "prev_context" parameter
	from GimpDocked::set_context(). Widgets which need the old context
	to disconnect from should remember it themselves.

	* app/widgets/gimpdockable.c (gimp_dockable_set_context): don't
	pass the old context to gimp_docked_set_context().
	Some cleanup.

	* app/widgets/gimpcontainerbox.c
	* app/widgets/gimpcontainereditor.c: changed accordingly.

	* app/display/gimpnavigationview.[ch]
	* app/widgets/gimpimageeditor.[ch]
	* app/widgets/gimpitemtreeview.[ch]: added a "context" member
	which holds the context set by GimpDocked::set_context().

	* app/widgets/gimpdrawabletreeview.c: use the view's context
	instead of gimp_get_user_context().

	* app/widgets/gimpcoloreditor.[ch]: removed separate API to
	set the context because it implements the GimpDockedInterface.

	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimperrorconsole.c: pass "menu-factory",
	"menu-identifier" and "ui-path" to g_object_new() instead of
	calling gimp_editor_create_menu() later.

	Action cleanup partly related to the context stuff above:

	* app/actions/actions.c (action_data_get_gimp): get the Gimp from
	context->gimp, not gimage->gimp because gimage may be NULL.

	(action_data_get_context): changed to use the new context members
	added above.

	* app/actions/channels-actions.c (channels_actions_update): cleanup.

	* app/actions/edit-actions.c (edit_actions_update): fixed
	sensitivity of "edit-undo-clear".

	* app/actions/vectors-actions.c (vectors_actions_update): make
	"vectors-merge-visible" sensitive only if there is more than one
	GimpVectors in the image.

	* app/actions/colormap-editor-actions.c
	* app/actions/gradient-editor-actions.c
	* app/actions/palette-editor-actions.c: added FG/BG color previews
	to actions which take colors from them. Changed code to be safe
	against "context" being NULL.

	* app/actions/drawable-commands.c:
	s/active_drawable/drawable/g. Makes the code more readable.

	* app/actions/select-commands.[ch]
	* app/actions/vectors-commands.[ch]: removed public stroke utility
	functions and other stuff which is not needed any more because
	dialog buttons invoke the correct actions now. Moved the
	functions' code to the resp. action callbacks.
2004-05-23 10:04:41 +00:00
Michael Natterer d745841e4d added some utility functions to get a Gimp, GimpImage, GimpDisplay and
2004-05-03  Michael Natterer  <mitch@gimp.org>

	* app/actions/actions.[ch]: added some utility functions to get a
	Gimp, GimpImage, GimpDisplay and GtkWidget from the "data" pointer
	passed to action callbacks.

	* app/actions/channels-actions.c
	* app/actions/channels-commands.c
	* app/actions/drawable-actions.c
	* app/actions/drawable-commands.c
	* app/actions/edit-actions.c
	* app/actions/edit-commands.c
	* app/actions/file-actions.c
	* app/actions/file-commands.c
	* app/actions/help-commands.c
	* app/actions/image-actions.c
	* app/actions/image-commands.c
	* app/actions/layers-actions.c
	* app/actions/layers-commands.c
	* app/actions/plug-in-actions.c
	* app/actions/plug-in-commands.c
	* app/actions/qmask-actions.c
	* app/actions/qmask-commands.c
	* app/actions/select-actions.c
	* app/actions/select-commands.c
	* app/actions/tools-commands.c
	* app/actions/vectors-actions.c
	* app/actions/vectors-commands.c
	* app/actions/view-commands.c: use the new functions instead of
	duplicating insane macros and if() constructs over and over again.
2004-05-03 14:03:51 +00:00
Michael Natterer 8895917db2 renamed action "qmask-toggle" to "qmask-active" and added new action
2004-05-02  Michael Natterer  <mitch@gimp.org>

	* app/actions/qmask-actions.c: renamed action "qmask-toggle" to
	"qmask-active" and added new action "qmask-toggle" with a label
	and shortcut suited for the "Select" menu.

	* app/actions/select-actions.c: removed "select-toggle-qmask".

	* app/actions/select-commands.[ch]: removed callback
	select_toggle_quickmask_cmd_callback().

	* app/actions/channels-actions.c (channels_actions_update)
	* app/actions/vectors-actions.c (vectors_actions_update): handle
	"data" being both GimpDisplay and GimpDisplayShell so the actions
	can be used in the image menu.

	* menus/image-menu.xml.in: s/select-toggle-qmask/qmask-toggle/.

	* menus/qmask-menu.xml: s/qmask-toggle/qmask-active/.
2004-05-02 19:37:17 +00:00
Michael Natterer 9377b26ebc added help IDs to all actions representing the toplevel popups and menus
2004-05-02  Michael Natterer  <mitch@gimp.org>

	* app/actions/*-actions.c: added help IDs to all actions
	representing the toplevel popups and menus (as fallbacks for the
	still-to-be-written help system intrgration of GimpUIManager).

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): removed
	call to gtk_ui_manager_ensure_update() because that's done by
	gimp_ui_manager_ui_get() now.

	* app/widgets/gimpmenufactory.[ch]: removed API to register and
	create item factories.

	* app/gui/menus.c: changed accordingly.

	* app/gui/dialogs.c
	* app/actions/plug-in-commands.c
	* app/gui/file-dialog-utils.c
	* app/gui/file-save-dialog.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdockable.c
	* app/widgets/gimpdockbook.[ch]
	* app/widgets/gimpimagedock.c
	* app/widgets/gimpitemtreeview.c: removed leftover item factory
	cruft.

	* app/widgets/widgets-types.h: removed item factory typedefs...

	* app/widgets/gimpitemfactory.h: ...and added them here.

	* app/widgets/gimpactiongroup.[ch]: added new function
	gimp_action_group_add_plug_in_actions().

	* app/actions/plug-in-actions.c: use it here instead of adding
	the actions manually.

	* app/widgets/gimptoolbox.c: ported the code which dynamically
	updates the tool button tooltips on accelerator changes to
	GtkAction. Disabled the whole stuff because GTK+ lacks
	gtk_action_get_accel_closure().
2004-05-02 08:56:07 +00:00
Michael Natterer aae726ee94 app/widgets/Makefile.am app/widgets/widgets-types.h new GtkAction subclass
2004-04-27  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimppluginaction.[ch]: new GtkAction subclass which
	remembers the PlugInProcDef.

	* app/widgets/gimpactiongroup.[ch]: added "gpointer user_data" to
	the GimpActionGroup struct and to gimp_action_group_new(). Removed
	the user_data parameter from gimp_action_group_add_*_actions().

	* app/widgets/gimpactionfactory.[ch]: changed accordingly.

	* app/actions/*-actions.[ch]: removed user_data from all setup_funcs.

	* app/actions/plug-in-actions.c: use a GimpPlugInAction and
	finally use the right user_data for the callback so plug-in
	callbacks have a proper context.

	* app/gui/plug-in-menus.[ch]: renamed plug_in_menus_create2() to
	plug_in_menus_setup().

	* app/gui/image-menu.c
	* app/gui/toolbox-menu.c: changed accordingly.
2004-04-27 13:55:26 +00:00
Michael Natterer 42f79826a9 implemented gimp_action_group_set_action_color() and
2004-04-22  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpactiongroup.[ch]: implemented
	gimp_action_group_set_action_color() and
	gimp_action_group_set_action_viewable().

	* app/actions/*-actions.c: added stock IDs to all actions which
	represent toplevel popup menus. Fixed typos.

	* menus/brushes-menu.xml
	* menus/colormap-editor-menu.xml
	* menus/dockable-menu.xml
	* menus/gradients-menu.xml
	* menus/patterns-menu.xml
	* menus/toolbox-menu.xml: fixed typos.
2004-04-22 16:16:43 +00:00