Commit 02de3076 authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

Got rid of the word "editor" were it was good for nothing but exposing an

2006-11-17  Michael Natterer  <mitch@gimp.org>

	Got rid of the word "editor" were it was good for nothing but
	exposing an implementation detail in public API and installed
	files.  Fixes bug #345251:

	* app/actions/colormap-editor-actions.[ch]
	* app/actions/colormap-editor-commands.[ch]
	* app/actions/sample-point-editor-actions.[ch]
	* app/actions/sample-point-editor-commands.[ch]
	* menus/colormap-editor-menu.xml
	* menus/sample-point-editor-menu.xml
	* menus/selection-editor-menu.xml
	* menus/undo-editor-menu.xml: removed.

	* app/actions/colormap-actions.[ch]
	* app/actions/colormap-commands.[ch]
	* app/actions/sample-points-actions.[ch]
	* app/actions/sample-points-commands.[ch]
	* menus/colormap-menu.xml
	* menus/sample-points-menu.xml
	* menus/selection-menu.xml
	* menus/undo-menu.xml: added.

	* app/actions/Makefile.am
	* menus/Makefile.am
	* app/actions/actions.c
	* app/menus/menus.c
	* app/menus/plug-in-menus.c
	* app/plug-in/gimppluginprocedure.c
	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpsamplepointeditor.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpundoeditor.c
	* plug-ins/common/colormap-remap.c: changed accordingly.
parent 4ce3fda9
2006-11-17 Michael Natterer <mitch@gimp.org>
Got rid of the word "editor" were it was good for nothing but
exposing an implementation detail in public API and installed
files. Fixes bug #345251:
* app/actions/colormap-editor-actions.[ch]
* app/actions/colormap-editor-commands.[ch]
* app/actions/sample-point-editor-actions.[ch]
* app/actions/sample-point-editor-commands.[ch]
* menus/colormap-editor-menu.xml
* menus/sample-point-editor-menu.xml
* menus/selection-editor-menu.xml
* menus/undo-editor-menu.xml: removed.
* app/actions/colormap-actions.[ch]
* app/actions/colormap-commands.[ch]
* app/actions/sample-points-actions.[ch]
* app/actions/sample-points-commands.[ch]
* menus/colormap-menu.xml
* menus/sample-points-menu.xml
* menus/selection-menu.xml
* menus/undo-menu.xml: added.
* app/actions/Makefile.am
* menus/Makefile.am
* app/actions/actions.c
* app/menus/menus.c
* app/menus/plug-in-menus.c
* app/plug-in/gimppluginprocedure.c
* app/widgets/gimpcolormapeditor.c
* app/widgets/gimpsamplepointeditor.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpundoeditor.c
* plug-ins/common/colormap-remap.c: changed accordingly.
2006-11-17 Michael Natterer <mitch@gimp.org>
* app/file/file-open.c (file_open_profile_apply_rgb): don't pass
......
......@@ -19,10 +19,10 @@ libappactions_a_SOURCES = \
channels-actions.h \
channels-commands.c \
channels-commands.h \
colormap-editor-actions.c \
colormap-editor-actions.h \
colormap-editor-commands.c \
colormap-editor-commands.h \
colormap-actions.c \
colormap-actions.h \
colormap-commands.c \
colormap-commands.h \
context-actions.c \
context-actions.h \
context-commands.c \
......@@ -117,10 +117,10 @@ libappactions_a_SOURCES = \
quick-mask-actions.h \
quick-mask-commands.c \
quick-mask-commands.h \
sample-point-editor-actions.c \
sample-point-editor-actions.h \
sample-point-editor-commands.c \
sample-point-editor-commands.h \
sample-points-actions.c \
sample-points-actions.h \
sample-points-commands.c \
sample-points-commands.h \
select-actions.c \
select-actions.h \
select-commands.c \
......
......@@ -51,7 +51,7 @@
#include "brushes-actions.h"
#include "buffers-actions.h"
#include "channels-actions.h"
#include "colormap-editor-actions.h"
#include "colormap-actions.h"
#include "context-actions.h"
#include "cursor-info-actions.h"
#include "debug-actions.h"
......@@ -75,7 +75,7 @@
#include "patterns-actions.h"
#include "plug-in-actions.h"
#include "quick-mask-actions.h"
#include "sample-point-editor-actions.h"
#include "sample-points-actions.h"
#include "select-actions.h"
#include "templates-actions.h"
#include "text-editor-actions.h"
......@@ -108,9 +108,9 @@ static GimpActionFactoryEntry action_groups[] =
{ "channels", N_("Channels"), GIMP_STOCK_CHANNEL,
channels_actions_setup,
channels_actions_update },
{ "colormap-editor", N_("Colormap Editor"), GIMP_STOCK_COLORMAP,
colormap_editor_actions_setup,
colormap_editor_actions_update },
{ "colormap", N_("Colormap"), GIMP_STOCK_COLORMAP,
colormap_actions_setup,
colormap_actions_update },
{ "context", N_("Context"), NULL,
context_actions_setup,
context_actions_update },
......@@ -180,9 +180,9 @@ static GimpActionFactoryEntry action_groups[] =
{ "quick-mask", N_("Quick Mask"), GIMP_STOCK_QUICK_MASK_ON,
quick_mask_actions_setup,
quick_mask_actions_update },
{ "sample-point-editor", N_("Sample Points"), GIMP_STOCK_SAMPLE_POINT,
sample_point_editor_actions_setup,
sample_point_editor_actions_update },
{ "sample-points", N_("Sample Points"), GIMP_STOCK_SAMPLE_POINT,
sample_points_actions_setup,
sample_points_actions_update },
{ "select", N_("Select"), GIMP_STOCK_SELECTION,
select_actions_setup,
select_actions_update },
......
......@@ -31,34 +31,34 @@
#include "widgets/gimphelp-ids.h"
#include "actions.h"
#include "colormap-editor-actions.h"
#include "colormap-editor-commands.h"
#include "colormap-actions.h"
#include "colormap-commands.h"
#include "gimp-intl.h"
static const GimpActionEntry colormap_editor_actions[] =
static const GimpActionEntry colormap_actions[] =
{
{ "colormap-editor-popup", GIMP_STOCK_COLORMAP,
{ "colormap-popup", GIMP_STOCK_COLORMAP,
N_("Colormap Menu"), NULL, NULL, NULL,
GIMP_HELP_INDEXED_PALETTE_DIALOG },
{ "colormap-editor-edit-color", GTK_STOCK_EDIT,
{ "colormap-edit-color", GTK_STOCK_EDIT,
N_("_Edit Color..."), NULL,
N_("Edit color"),
G_CALLBACK (colormap_editor_edit_color_cmd_callback),
G_CALLBACK (colormap_edit_color_cmd_callback),
GIMP_HELP_INDEXED_PALETTE_EDIT }
};
static const GimpEnumActionEntry colormap_editor_add_color_actions[] =
static const GimpEnumActionEntry colormap_add_color_actions[] =
{
{ "colormap-editor-add-color-from-fg", GTK_STOCK_ADD,
{ "colormap-add-color-from-fg", GTK_STOCK_ADD,
N_("_Add Color from FG"), "",
N_("Add current foreground color"),
FALSE, FALSE,
GIMP_HELP_INDEXED_PALETTE_ADD },
{ "colormap-editor-add-color-from-bg", GTK_STOCK_ADD,
{ "colormap-add-color-from-bg", GTK_STOCK_ADD,
N_("_Add Color from BG"), "",
N_("Add current background color"),
TRUE, FALSE,
......@@ -67,23 +67,23 @@ static const GimpEnumActionEntry colormap_editor_add_color_actions[] =
void
colormap_editor_actions_setup (GimpActionGroup *group)
colormap_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group,
colormap_editor_actions,
G_N_ELEMENTS (colormap_editor_actions));
colormap_actions,
G_N_ELEMENTS (colormap_actions));
gimp_action_group_add_enum_actions (group,
colormap_editor_add_color_actions,
G_N_ELEMENTS (colormap_editor_add_color_actions),
G_CALLBACK (colormap_editor_add_color_cmd_callback));
colormap_add_color_actions,
G_N_ELEMENTS (colormap_add_color_actions),
G_CALLBACK (colormap_add_color_cmd_callback));
}
void
colormap_editor_actions_update (GimpActionGroup *group,
gpointer data)
colormap_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *image = action_data_get_image (data);
GimpImage *image = action_data_get_image (data);
GimpContext *context = action_data_get_context (data);
gboolean indexed = FALSE;
gint num_colors = 0;
......@@ -107,15 +107,15 @@ colormap_editor_actions_update (GimpActionGroup *group,
#define SET_COLOR(action,color) \
gimp_action_group_set_action_color (group, action, color, FALSE);
SET_SENSITIVE ("colormap-editor-edit-color",
SET_SENSITIVE ("colormap-edit-color",
image && indexed);
SET_SENSITIVE ("colormap-editor-add-color-from-fg",
SET_SENSITIVE ("colormap-add-color-from-fg",
image && indexed && num_colors < 256);
SET_SENSITIVE ("colormap-editor-add-color-from-bg",
SET_SENSITIVE ("colormap-add-color-from-bg",
image && indexed && num_colors < 256);
SET_COLOR ("colormap-editor-add-color-from-fg", context ? &fg : NULL);
SET_COLOR ("colormap-editor-add-color-from-bg", context ? &bg : NULL);
SET_COLOR ("colormap-add-color-from-fg", context ? &fg : NULL);
SET_COLOR ("colormap-add-color-from-bg", context ? &bg : NULL);
#undef SET_SENSITIVE
#undef SET_COLOR
......
......@@ -16,13 +16,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __COLORMAP_EDITOR_ACTIONS_H__
#define __COLORMAP_EDITOR_ACTIONS_H__
#ifndef __COLORMAP_ACTIONS_H__
#define __COLORMAP_ACTIONS_H__
void colormap_editor_actions_setup (GimpActionGroup *group);
void colormap_editor_actions_update (GimpActionGroup *group,
gpointer data);
void colormap_actions_setup (GimpActionGroup *group);
void colormap_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __COLORMAP_EDITOR_ACTIONS_H__ */
#endif /* __COLORMAP_ACTIONS_H__ */
......@@ -34,24 +34,24 @@
#include "widgets/gimpdialogfactory.h"
#include "actions.h"
#include "colormap-editor-commands.h"
#include "colormap-commands.h"
#include "gimp-intl.h"
/* local function prototypes */
static void colormap_editor_edit_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpColormapEditor *editor);
static void colormap_edit_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpColormapEditor *editor);
/* public functions */
void
colormap_editor_edit_color_cmd_callback (GtkAction *action,
gpointer data)
colormap_edit_color_cmd_callback (GtkAction *action,
gpointer data)
{
GimpColormapEditor *editor;
GimpImage *image;
......@@ -88,7 +88,7 @@ colormap_editor_edit_color_cmd_callback (GtkAction *action,
&editor->color_dialog);
g_signal_connect (editor->color_dialog, "update",
G_CALLBACK (colormap_editor_edit_color_update),
G_CALLBACK (colormap_edit_color_update),
editor);
}
else
......@@ -107,9 +107,9 @@ colormap_editor_edit_color_cmd_callback (GtkAction *action,
}
void
colormap_editor_add_color_cmd_callback (GtkAction *action,
gint value,
gpointer data)
colormap_add_color_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpContext *context;
GimpImage *image;
......@@ -134,10 +134,10 @@ colormap_editor_add_color_cmd_callback (GtkAction *action,
/* private functions */
static void
colormap_editor_edit_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpColormapEditor *editor)
colormap_edit_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpColormapEditor *editor)
{
GimpImage *image = GIMP_IMAGE_EDITOR (editor)->image;
......
......@@ -16,15 +16,15 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __COLORMAP_EDITOR_COMMANDS_H__
#define __COLORMAP_EDITOR_COMMANDS_H__
#ifndef __COLORMAP_COMMANDS_H__
#define __COLORMAP_COMMANDS_H__
void colormap_editor_edit_color_cmd_callback (GtkAction *action,
gpointer data);
void colormap_editor_add_color_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void colormap_edit_color_cmd_callback (GtkAction *action,
gpointer data);
void colormap_add_color_cmd_callback (GtkAction *action,
gint value,
gpointer data);
#endif /* __COLORMAP_EDITOR_COMMANDS_H__ */
#endif /* __COLORMAP_COMMANDS_H__ */
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "actions.h"
#include "colormap-editor-actions.h"
#include "colormap-editor-commands.h"
#include "gimp-intl.h"
static const GimpActionEntry colormap_editor_actions[] =
{
{ "colormap-editor-popup", GIMP_STOCK_COLORMAP,
N_("Colormap Menu"), NULL, NULL, NULL,
GIMP_HELP_INDEXED_PALETTE_DIALOG },
{ "colormap-editor-edit-color", GTK_STOCK_EDIT,
N_("_Edit Color..."), NULL,
N_("Edit color"),
G_CALLBACK (colormap_editor_edit_color_cmd_callback),
GIMP_HELP_INDEXED_PALETTE_EDIT }
};
static const GimpEnumActionEntry colormap_editor_add_color_actions[] =
{
{ "colormap-editor-add-color-from-fg", GTK_STOCK_ADD,
N_("_Add Color from FG"), "",
N_("Add current foreground color"),
FALSE, FALSE,
GIMP_HELP_INDEXED_PALETTE_ADD },
{ "colormap-editor-add-color-from-bg", GTK_STOCK_ADD,
N_("_Add Color from BG"), "",
N_("Add current background color"),
TRUE, FALSE,
GIMP_HELP_INDEXED_PALETTE_ADD }
};
void
colormap_editor_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group,
colormap_editor_actions,
G_N_ELEMENTS (colormap_editor_actions));
gimp_action_group_add_enum_actions (group,
colormap_editor_add_color_actions,
G_N_ELEMENTS (colormap_editor_add_color_actions),
G_CALLBACK (colormap_editor_add_color_cmd_callback));
}
void
colormap_editor_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *image = action_data_get_image (data);
GimpContext *context = action_data_get_context (data);
gboolean indexed = FALSE;
gint num_colors = 0;
GimpRGB fg;
GimpRGB bg;
if (image)
{
indexed = gimp_image_base_type (image) == GIMP_INDEXED;
num_colors = image->num_cols;
}
if (context)
{
gimp_context_get_foreground (context, &fg);
gimp_context_get_background (context, &bg);
}
#define SET_SENSITIVE(action,condition) \
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
#define SET_COLOR(action,color) \
gimp_action_group_set_action_color (group, action, color, FALSE);
SET_SENSITIVE ("colormap-editor-edit-color",
image && indexed);
SET_SENSITIVE ("colormap-editor-add-color-from-fg",
image && indexed && num_colors < 256);
SET_SENSITIVE ("colormap-editor-add-color-from-bg",
image && indexed && num_colors < 256);
SET_COLOR ("colormap-editor-add-color-from-fg", context ? &fg : NULL);
SET_COLOR ("colormap-editor-add-color-from-bg", context ? &bg : NULL);
#undef SET_SENSITIVE
#undef SET_COLOR
}
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __COLORMAP_EDITOR_ACTIONS_H__
#define __COLORMAP_EDITOR_ACTIONS_H__
void colormap_editor_actions_setup (GimpActionGroup *group);
void colormap_editor_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __COLORMAP_EDITOR_ACTIONS_H__ */
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpimage-colormap.h"
#include "widgets/gimpcolordialog.h"
#include "widgets/gimpcolormapeditor.h"
#include "widgets/gimpdialogfactory.h"
#include "actions.h"
#include "colormap-editor-commands.h"
#include "gimp-intl.h"
/* local function prototypes */
static void colormap_editor_edit_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpColormapEditor *editor);
/* public functions */
void
colormap_editor_edit_color_cmd_callback (GtkAction *action,
gpointer data)
{
GimpColormapEditor *editor;
GimpImage *image;
GimpRGB color;
gchar *desc;
return_if_no_image (image, data);
editor = GIMP_COLORMAP_EDITOR (data);
gimp_rgba_set_uchar (&color,
image->cmap[editor->col_index * 3],
image->cmap[editor->col_index * 3 + 1],
image->cmap[editor->col_index * 3 + 2],
OPAQUE_OPACITY);
desc = g_strdup_printf (_("Edit colormap entry #%d"), editor->col_index);
if (! editor->color_dialog)
{
editor->color_dialog =
gimp_color_dialog_new (GIMP_VIEWABLE (image),
action_data_get_context (data),
_("Edit Colormap Entry"),
GIMP_STOCK_COLORMAP,
desc,
GTK_WIDGET (editor),
gimp_dialog_factory_from_name ("toplevel"),
"gimp-colormap-editor-color-dialog",
(const GimpRGB *) &color,
FALSE, FALSE);
g_signal_connect (editor->color_dialog, "destroy",
G_CALLBACK (gtk_widget_destroyed),
&editor->color_dialog);
g_signal_connect (editor->color_dialog, "update",
G_CALLBACK (colormap_editor_edit_color_update),
editor);
}
else
{
gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (editor->color_dialog),
GIMP_VIEWABLE (image),
action_data_get_context (data));
g_object_set (editor->color_dialog, "description", desc, NULL);
gimp_color_dialog_set_color (GIMP_COLOR_DIALOG (editor->color_dialog),
&color);
}
g_free (desc);
gtk_window_present (GTK_WINDOW (editor->color_dialog));
}
void
colormap_editor_add_color_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpContext *context;
GimpImage *image;
return_if_no_context (context, data);
return_if_no_image (image, data);
if (image->num_cols < 256)
{
GimpRGB color;
if (value)
gimp_context_get_background (context, &color);
else
gimp_context_get_foreground (context, &color);
gimp_image_add_colormap_entry (image, &color);
gimp_image_flush (image);
}
}
/* private functions */
static void
colormap_editor_edit_color_update (GimpColorDialog *dialog,
const GimpRGB *color,
GimpColorDialogState state,
GimpColormapEditor *editor)
{
GimpImage *image = GIMP_IMAGE_EDITOR (editor)->image;
switch (state)
{
case GIMP_COLOR_DIALOG_UPDATE:
break;
case GIMP_COLOR_DIALOG_OK:
gimp_image_set_colormap_entry (image, editor->col_index, color, TRUE);
gimp_image_flush (image);
/* Fall through */
case GIMP_COLOR_DIALOG_CANCEL:
gtk_widget_hide (editor->color_dialog);
break;
}
}
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __COLORMAP_EDITOR_COMMANDS_H__
#define __COLORMAP_EDITOR_COMMANDS_H__
void colormap_editor_edit_color_cmd_callback (GtkAction *action,
gpointer data);
void colormap_editor_add_color_cmd_callback (GtkAction *action,
gint value,
gpointer data);
#endif /* __COLORMAP_EDITOR_COMMANDS_H__ */
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "actions-types.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpsamplepointeditor.h"
#include "sample-point-editor-actions.h"
#include "sample-point-editor-commands.h"
#include "gimp-intl.h"
static const GimpActionEntry sample_point_editor_actions[] =
{
{ "sample-point-editor-popup", GIMP_STOCK_SAMPLE_POINT,
N_("Sample Point Menu"), NULL, NULL, NULL,
GIMP_HELP_SAMPLE_POINT_DIALOG }
};
static const GimpToggleActionEntry sample_point_editor_toggle_actions[] =
{
{ "sample-point-editor-sample-merged", NULL,
N_("_Sample Merged"), "",
N_("Sample Merged"),
G_CALLBACK (sample_point_editor_sample_merged_cmd_callback),
TRUE,
GIMP_HELP_SAMPLE_POINT_SAMPLE_MERGED }
};
void
sample_point_editor_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group,
sample_point_editor_actions,
G_N_ELEMENTS (sample_point_editor_actions));
gimp_action_group_add_toggle_actions (group,
sample_point_editor_toggle_actions,
G_N_ELEMENTS (sample_point_editor_toggle_actions));
}
void