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).
* Don't generate our own marshallers if they are available in GLib
already
* Don't set the c_marshaller parameter in `g_signal_new()` if it's a
default marshaller provided by GLib. See commit message of commit
39e4aa3c57 on why this is the case.
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
Step one: get rid of all those deprecation warnings that make
it hard to see any other warnings:
- add a lot of dummy API to GimpAction, GimpActionGroup, GimpUIManager
etc. which simply forwards to the deprecated GTK functions, they
will all go away again later
- rename GimpAction to GimpActionImpl
- add interface GimpAction that is implemented by all action classes,
creates a common interface and allows to remove some duplicated
logic from GimpToggleAction and GimpRadioAction, and at the same
time adds more features
which is just a #define to g_assert for now, but can now easily be
turned into something that does some nicer debugging using our new
stack trace infrastructure. This commit also reverts all constructed()
functions to use assert again.
gtk_action_group_remove_action() removes the action from the group while
not actually cleaning any accelerator. This is a problem for transient
actions which have only a meaning within the current session, such as
the display switching actions named with the display ID (unique within
the session only).
Current commit, combined with the previous one (commit c0ee959), fix
"windows-display-*" actions being saved inside menurc.
Add "action-group" signal to GimpActionGroup, such that we can
properly set the accel group and connect the accelerator on actions
that are created after the initial setup of the menus.
There is GtkSettings:gtk-enable-mnemonics: now, so there is no
reason to do the same in GIMP:
* app/config/gimpguiconfig.[ch]: turn "menu-mnemonics" into a dummy.
* app/dialogs/preferences-dialog.c: remove its GUI.
* app/widgets/gimpactionfactory.[ch]
* app/widgets/gimpactiongroup.[ch]: remove infrastructure for disabling
menu mnemonics.
* app/actions/actions.c: bye bye glue code.
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
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-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 Sven Neumann <sven@gimp.org>
* app/widgets/gimpactiongroup.c: check that the action name is
unique before adding it to a GimpActionGroup.
svn path=/trunk/; revision=27751
2008-05-20 Sven Neumann <sven@gimp.org>
* app/widgets/Makefile.am
* app/widgets/gimptoggleaction.[ch]
* app/widgets/gimpradioaction.[ch]: added new action types derived
from GtkToggleAction and GtkRadioAction. These types override the
"connect_proxy" method to enable tooltips in menus.
* app/widgets/gimpactiongroup.c: use the new action types.
* app/actions/dockable-actions.c: added a tooltip for the
"dockable-lock-tab" action.
svn path=/trunk/; revision=25717
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-05 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-types.h
* app/plug-in/plug-in-proc-def.[ch]: renamed to GimpPlugInProcedure
and made a GObject derived from GimpProcedure (instead of having
a pointer to a GimpProcedure). Added image_types and file_magic
utility functions taken from plug-ins.[ch]. Still lives in the
same crappy files because I am undecided where to put it...
* app/pdb/gimpprocedure.c (gimp_procedure_real_execute): removed
switch() statement and always call the internal marshaller because
GimpProcedure::execute() is properly overridden by
GimpPlugInProcedure now.
* app/plug-in/plug-ins.[ch]: removed the mime_type and file_magic
utilities added to GimpPlugInProcedure.
* app/actions/file-commands.c
* app/actions/plug-in-actions.[ch]
* app/actions/plug-in-commands.[ch]
* app/core/gimp-gui.[ch]
* app/core/gimp.[ch]
* app/core/gimpimage.[ch]
* app/dialogs/file-open-dialog.c
* app/dialogs/file-save-dialog.c
* app/dialogs/print-size-dialog.c
* app/file/file-open.[ch]
* app/file/file-save.[ch]
* app/file/file-utils.[ch]
* app/gui/gui-vtable.c
* app/menus/plug-in-menus.[ch]
* app/plug-in/plug-in-def.[ch]
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-rc.c
* app/plug-in/plug-in-run.c
* app/plug-in/plug-in.c
* app/plug-in/plug-ins-query.c
* app/widgets/gimpactiongroup.[ch]
* app/widgets/gimpdnd-xds.c
* app/widgets/gimpfiledialog.[ch]
* app/widgets/gimpfileprocview.[ch]
* app/widgets/gimppluginaction.[ch]
* app/xcf/xcf.c
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/plug_in.pdb: changed addordingly.
* app/pdb/fileops_cmds.c
* app/pdb/plug_in_cmds.c: regenerated.
2006-01-18 Michael Natterer <mitch@gimp.org>
* app/config/config-types.c: define GIMP_PARAM_STATIC_STRINGS
which is G_PARAM_STATIC_NAME|NICK|BLURB. Also define
GIMP_PARAM_READABLE, _WRITABLE and _READWRITE which include
GIMP_PARAM_STATIC_STRINGS.
* app/*/*.c: use them for all object properties so their
strings are not copied.
2005-11-15 Michael Natterer <mitch@gimp.org>
Allow to construct a group of radio actions in multiple chunks.
(not used yet).
* app/widgets/gimpactiongroup.[ch]
(gimp_action_group_add_radio_actions): added "GSList *radio_group"
parameter and return value.
* app/actions/dockable-actions.c
* app/actions/gradient-editor-actions.c
* app/actions/quick-mask-actions.c
* app/actions/text-editor-actions.c
* app/actions/view-actions.c
* app/actions/window-actions.c: pass NULL as radio_group.
2005-09-24 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpactiongroup.c
(gimp_action_group_set_action_hide_empty): renamed from
set_action_important(). Set the "hide-if-empty" property so
showing an insensitive "Empty" item instead of hiding the submenu
works again (did this ever work?).
* app/actions/tool-options-actions.c (tool_options_actions_setup):
changed accordingly. Keeps the tool options submenus from
disappearing.
2005-03-22 Sven Neumann <sven@gimp.org>
* app/widgets/gimpactiongroup.c
* app/widgets/gimpcolorpanel.c: use gtk_action_set_sensitive()
and gtk_action_set_visible() instead of setting the respective
properties.
2004-11-30 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpactiongroup.c
(gimp_action_group_set_action_color)
(gimp_action_group_set_action_color): allow to set color and
viewable to NULL, GimpAction handles this nicely. Fixes warnings
some foo_actions_update() functions were triggering.
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-09-16 Michael Natterer <mitch@gimp.org>
* configure.in: depend on GLib >= 2.4.5 and GTK+ >= 2.4.4.
* app/gui/gui.c: changed accordingly.
* app/sanity.c: ditto. Added check for GLib and put each check
into its own utility function. Enabled #if 0'ed check for
FreeType >= 6.2.7.
* app/widgets/gimpactiongroup.c
* app/widgets/gimpcursor.c
* app/widgets/gimpselectiondata.c
* app/widgets/gimpuimanager.c
* app/widgets/gimpwidgets-utils.c: removed workarounds for library
versions we refuse to start with.