gimp/app/actions/palette-editor-actions.c

184 lines
6.1 KiB
C
Raw Normal View History

/* GIMP - The GNU Image Manipulation Program
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
* (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 <https://www.gnu.org/licenses/>.
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
*/
#include "config.h"
#include <gegl.h>
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
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 18:04:41 +08:00
#include "core/gimp.h"
#include "core/gimpcontext.h"
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimppaletteeditor.h"
#include "data-editor-commands.h"
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
#include "palette-editor-actions.h"
#include "palette-editor-commands.h"
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
#include "gimp-intl.h"
static const GimpActionEntry palette_editor_actions[] =
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
{
{ "palette-editor-popup", GIMP_ICON_PALETTE,
NC_("palette-editor-action", "Palette Editor Menu"), NULL, NULL, NULL,
GIMP_HELP_PALETTE_EDITOR_DIALOG },
{ "palette-editor-edit-color", GIMP_ICON_EDIT,
NC_("palette-editor-action", "_Edit Color..."), NULL,
NC_("palette-editor-action", "Edit this entry"),
palette_editor_edit_color_cmd_callback,
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
GIMP_HELP_PALETTE_EDITOR_EDIT },
{ "palette-editor-delete-color", GIMP_ICON_EDIT_DELETE,
NC_("palette-editor-action", "_Delete Color"), NULL,
NC_("palette-editor-action", "Delete this entry"),
palette_editor_delete_color_cmd_callback,
GIMP_HELP_PALETTE_EDITOR_DELETE }
};
static const GimpToggleActionEntry palette_editor_toggle_actions[] =
{
{ "palette-editor-edit-active", GIMP_ICON_LINKED,
NC_("palette-editor-action", "Edit Active Palette"), NULL, NULL,
data_editor_edit_active_cmd_callback,
FALSE,
GIMP_HELP_PALETTE_EDITOR_EDIT_ACTIVE }
};
static const GimpEnumActionEntry palette_editor_new_actions[] =
{
{ "palette-editor-new-color-fg", GIMP_ICON_DOCUMENT_NEW,
NC_("palette-editor-action", "New Color from _FG"), NULL,
NC_("palette-editor-action",
"Create a new entry from the foreground color"),
FALSE, FALSE,
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
GIMP_HELP_PALETTE_EDITOR_NEW },
{ "palette-editor-new-color-bg", GIMP_ICON_DOCUMENT_NEW,
NC_("palette-editor-action", "New Color from _BG"), NULL,
NC_("palette-editor-action",
"Create a new entry from the background color"),
TRUE, FALSE,
GIMP_HELP_PALETTE_EDITOR_NEW }
};
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
static const GimpEnumActionEntry palette_editor_zoom_actions[] =
{
{ "palette-editor-zoom-in", GIMP_ICON_ZOOM_IN,
N_("Zoom _In"), NULL,
N_("Zoom in"),
GIMP_ZOOM_IN, FALSE,
GIMP_HELP_PALETTE_EDITOR_ZOOM_IN },
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
{ "palette-editor-zoom-out", GIMP_ICON_ZOOM_OUT,
N_("Zoom _Out"), NULL,
N_("Zoom out"),
GIMP_ZOOM_OUT, FALSE,
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
GIMP_HELP_PALETTE_EDITOR_ZOOM_OUT },
{ "palette-editor-zoom-all", GIMP_ICON_ZOOM_FIT_BEST,
N_("Zoom _All"), NULL,
N_("Zoom all"),
GIMP_ZOOM_OUT_MAX, FALSE,
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
GIMP_HELP_PALETTE_EDITOR_ZOOM_ALL }
};
void
palette_editor_actions_setup (GimpActionGroup *group)
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
{
gimp_action_group_add_actions (group, "palette-editor-action",
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
palette_editor_actions,
G_N_ELEMENTS (palette_editor_actions));
gimp_action_group_add_toggle_actions (group, "palette-editor-action",
palette_editor_toggle_actions,
G_N_ELEMENTS (palette_editor_toggle_actions));
gimp_action_group_add_enum_actions (group, "palette-editor-action",
palette_editor_new_actions,
G_N_ELEMENTS (palette_editor_new_actions),
palette_editor_new_color_cmd_callback);
gimp_action_group_add_enum_actions (group, NULL,
palette_editor_zoom_actions,
G_N_ELEMENTS (palette_editor_zoom_actions),
palette_editor_zoom_cmd_callback);
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
}
void
palette_editor_actions_update (GimpActionGroup *group,
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 18:04:41 +08:00
gpointer user_data)
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
{
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 19:29:58 +08:00
GimpPaletteEditor *editor = GIMP_PALETTE_EDITOR (user_data);
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (user_data);
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 18:04:41 +08:00
GimpData *data;
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 19:29:58 +08:00
gboolean editable = FALSE;
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 18:04:41 +08:00
GimpRGB fg;
GimpRGB bg;
gboolean edit_active = FALSE;
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 18:04:41 +08:00
data = data_editor->data;
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
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 18:04:41 +08:00
if (data)
{
if (data_editor->data_editable)
editable = TRUE;
}
if (data_editor->context)
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 18:04:41 +08:00
{
gimp_context_get_foreground (data_editor->context, &fg);
gimp_context_get_background (data_editor->context, &bg);
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 18:04:41 +08:00
}
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
edit_active = gimp_data_editor_get_edit_active (data_editor);
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
#define SET_ACTIVE(action,condition) \
gimp_action_group_set_action_active (group, action, (condition) != 0)
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 18:04:41 +08:00
#define SET_COLOR(action,color) \
gimp_action_group_set_action_color (group, action, color, FALSE);
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
SET_SENSITIVE ("palette-editor-edit-color", editable && editor->color);
SET_SENSITIVE ("palette-editor-delete-color", editable && editor->color);
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
SET_SENSITIVE ("palette-editor-new-color-fg", editable);
SET_SENSITIVE ("palette-editor-new-color-bg", editable);
SET_COLOR ("palette-editor-new-color-fg", data_editor->context ? &fg : NULL);
SET_COLOR ("palette-editor-new-color-bg", data_editor->context ? &bg : NULL);
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
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 18:04:41 +08:00
SET_SENSITIVE ("palette-editor-zoom-out", data);
SET_SENSITIVE ("palette-editor-zoom-in", data);
SET_SENSITIVE ("palette-editor-zoom-all", data);
SET_ACTIVE ("palette-editor-edit-active", edit_active);
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
#undef SET_SENSITIVE
#undef SET_ACTIVE
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 18:04:41 +08:00
#undef SET_COLOR
More GtkAction stuff (still unused): 2004-04-19 Michael Natterer <mitch@gimp.org> More GtkAction stuff (still unused): * configure.in: added new directories menus/ and app/actions/ * Makefile.am: build menus/ * menus/.cvsignore * menus/Makefile.am * menus/*-menu.xml: new files: XML menu descriptions for each menu which is now defined in gui/*-menu.c. * app/widgets/widgets-types.h: some typedefs for GimpActionGroup. * app/widgets/gimpactiongroup.[ch]: added a "Gimp" construct-only property. Added APIs to set actions visible/sensitive/active and an unimplemented stub for setting the action's color. * app/Makefile.am: build actions/ and link libappactions.a * app/actions/.cvsignore * app/actions/Makefile.am * app/actions/*-actions.[ch]: new files: GtkActions for each *-commands.c file in gui/. Ported all "update" functions from the *-menu.c files. (everything completely unused, untested and partly #if 0'ed) * app/core/gimpimage.[ch]: for reasons of (action-) symmetry, added API to raise/lower channels/vectors to top/bottom. * app/gui/channels-commands.[ch] * app/gui/vectors-commands.[ch]: added callbacks for the new to top/bottom functions. * app/gui/Makefile.am * app/gui/dockable-commands.[ch]: new files split out of dialogs-commands.[ch]. * app/gui/dialogs-commands.[ch] * app/gui/dialogs-menu.c: changed accordingly. * app/gui/edit-commands.[ch]: added edit_paste_into_cmd_callback() and remove usage of "guint action". * app/gui/image-menu.c: changed accordingly. * app/gui/palette-editor-commands.[ch]: split +palette_editor_new_color_cmd_callback() into separate callbacks for adding from FG and BG. * app/gui/palette-editor-menu.c: changed accordingly.
2004-04-19 22:54:24 +08:00
}