Commit 1adf3d71 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

Did a global s/qmask/quick-mask/:

2005-09-19  Michael Natterer  <mitch@gimp.org>

	Did a global s/qmask/quick-mask/:

	* app/actions/qmask-actions.[ch]
	* app/actions/qmask-commands.[ch]
	* app/core/gimpimage-qmask.[ch]
	* menus/qmask-menu.xml
	* themes/Default/images/stock-qmask-off-16.png
	* themes/Default/images/stock-qmask-on-16.png: removed.

	* app/actions/quick-mask-actions.[ch]
	* app/actions/quick-mask-commands.[ch]
	* app/core/gimpimage-quick-mask.[ch]
	* menus/quick-mask-menu.xml
	* themes/Default/images/stock-quick-mask-off-16.png
	* themes/Default/images/stock-quick-mask-on-16.png: added.

	* app/actions/Makefile.am
	* app/actions/actions.c
	* app/core/Makefile.am
	* app/core/core-enums.[ch]
	* app/core/gimpchannel.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-undo.c
	* app/core/gimpimage.[ch]
	* app/core/gimpundo.[ch]
	* app/display/gimpdisplayshell-appearance.c
	* app/display/gimpdisplayshell-callbacks.[ch]
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell.[ch]
	* app/menus/menus.c
	* app/widgets/gimphelp-ids.h
	* libgimpwidgets/gimpstock.[ch]
	* menus/Makefile.am
	* menus/image-menu.xml.in
	* themes/Default/images/Makefile.am: changed accordingly.
parent 7f95ed53
2005-09-19 Michael Natterer <mitch@gimp.org>
Did a global s/qmask/quick-mask/:
* app/actions/qmask-actions.[ch]
* app/actions/qmask-commands.[ch]
* app/core/gimpimage-qmask.[ch]
* menus/qmask-menu.xml
* themes/Default/images/stock-qmask-off-16.png
* themes/Default/images/stock-qmask-on-16.png: removed.
* app/actions/quick-mask-actions.[ch]
* app/actions/quick-mask-commands.[ch]
* app/core/gimpimage-quick-mask.[ch]
* menus/quick-mask-menu.xml
* themes/Default/images/stock-quick-mask-off-16.png
* themes/Default/images/stock-quick-mask-on-16.png: added.
* app/actions/Makefile.am
* app/actions/actions.c
* app/core/Makefile.am
* app/core/core-enums.[ch]
* app/core/gimpchannel.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-undo.c
* app/core/gimpimage.[ch]
* app/core/gimpundo.[ch]
* app/display/gimpdisplayshell-appearance.c
* app/display/gimpdisplayshell-callbacks.[ch]
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell.[ch]
* app/menus/menus.c
* app/widgets/gimphelp-ids.h
* libgimpwidgets/gimpstock.[ch]
* menus/Makefile.am
* menus/image-menu.xml.in
* themes/Default/images/Makefile.am: changed accordingly.
2005-09-19 Sven Neumann <sven@gimp.org>
* app/core/gimpimagefile.c (gimp_imagefile_get_new_pixbuf): use
......
......@@ -109,10 +109,10 @@ libappactions_a_SOURCES = \
plug-in-actions.h \
plug-in-commands.c \
plug-in-commands.h \
qmask-actions.c \
qmask-actions.h \
qmask-commands.c \
qmask-commands.h \
quick-mask-actions.c \
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 \
......
......@@ -72,7 +72,7 @@
#include "palettes-actions.h"
#include "patterns-actions.h"
#include "plug-in-actions.h"
#include "qmask-actions.h"
#include "quick-mask-actions.h"
#include "sample-point-editor-actions.h"
#include "select-actions.h"
#include "templates-actions.h"
......@@ -172,9 +172,9 @@ static GimpActionFactoryEntry action_groups[] =
{ "plug-in", N_("Plug-Ins"), GIMP_STOCK_PLUGIN,
plug_in_actions_setup,
plug_in_actions_update },
{ "qmask", N_("Quick Mask"), GIMP_STOCK_QMASK_ON,
qmask_actions_setup,
qmask_actions_update },
{ "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 },
......
/* 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/gimpimage.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "actions.h"
#include "qmask-actions.h"
#include "qmask-commands.h"
#include "gimp-intl.h"
static GimpActionEntry qmask_actions[] =
{
{ "qmask-popup", NULL,
N_("Quick Mask Menu"), NULL, NULL, NULL,
GIMP_HELP_QMASK },
{ "qmask-configure", NULL,
N_("_Configure Color and Opacity..."), NULL, NULL,
G_CALLBACK (qmask_configure_cmd_callback),
GIMP_HELP_QMASK_EDIT }
};
static GimpToggleActionEntry qmask_toggle_actions[] =
{
{ "qmask-toggle", GIMP_STOCK_QMASK_ON,
N_("Toggle _Quick Mask"), "<shift>Q", NULL,
G_CALLBACK (qmask_toggle_cmd_callback),
FALSE,
GIMP_HELP_QMASK_TOGGLE }
};
static GimpRadioActionEntry qmask_invert_actions[] =
{
{ "qmask-invert-on", NULL,
N_("Mask _Selected Areas"), NULL, NULL,
TRUE,
GIMP_HELP_QMASK_INVERT },
{ "qmask-invert-off", NULL,
N_("Mask _Unselected Areas"), NULL, NULL,
FALSE,
GIMP_HELP_QMASK_INVERT }
};
void
qmask_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group,
qmask_actions,
G_N_ELEMENTS (qmask_actions));
gimp_action_group_add_toggle_actions (group,
qmask_toggle_actions,
G_N_ELEMENTS (qmask_toggle_actions));
gimp_action_group_add_radio_actions (group,
qmask_invert_actions,
G_N_ELEMENTS (qmask_invert_actions),
FALSE,
G_CALLBACK (qmask_invert_cmd_callback));
}
void
qmask_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *gimage = action_data_get_image (data);
#define SET_SENSITIVE(action,sensitive) \
gimp_action_group_set_action_sensitive (group, action, (sensitive) != 0)
#define SET_ACTIVE(action,active) \
gimp_action_group_set_action_active (group, action, (active) != 0)
#define SET_COLOR(action,color) \
gimp_action_group_set_action_color (group, action, (color), FALSE)
SET_SENSITIVE ("qmask-toggle", gimage);
SET_ACTIVE ("qmask-toggle", gimage && gimage->qmask_state);
SET_SENSITIVE ("qmask-invert-on", gimage);
SET_SENSITIVE ("qmask-invert-off", gimage);
if (gimage && gimage->qmask_inverted)
SET_ACTIVE ("qmask-invert-on", TRUE);
else
SET_ACTIVE ("qmask-invert-off", TRUE);
SET_SENSITIVE ("qmask-configure", gimage);
if (gimage)
SET_COLOR ("qmask-configure", &gimage->qmask_color);
#undef SET_SENSITIVE
#undef SET_ACTIVE
#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 __QMASK_ACTIONS_H__
#define __QMASK_ACTIONS_H__
void qmask_actions_setup (GimpActionGroup *group);
void qmask_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __QMASK_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/gimp.h"
#include "core/gimpchannel.h"
#include "core/gimpimage.h"
#include "core/gimpimage-qmask.h"
#include "widgets/gimphelp-ids.h"
#include "dialogs/channel-options-dialog.h"
#include "actions.h"
#include "qmask-commands.h"
#include "gimp-intl.h"
/* local function prototypes */
static void qmask_configure_response (GtkWidget *widget,
gint response_id,
ChannelOptionsDialog *options);
/* public functionss */
void
qmask_toggle_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *gimage;
gboolean active;
return_if_no_image (gimage, data);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (active != gimp_image_get_qmask_state (gimage))
{
gimp_image_set_qmask_state (gimage, active);
gimp_image_flush (gimage);
}
}
void
qmask_invert_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data)
{
GimpImage *gimage;
gint value;
return_if_no_image (gimage, data);
value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
if (value != gimage->qmask_inverted)
{
gimp_image_qmask_invert (gimage);
gimp_image_flush (gimage);
}
}
void
qmask_configure_cmd_callback (GtkAction *action,
gpointer data)
{
ChannelOptionsDialog *options;
GimpImage *gimage;
GtkWidget *widget;
GimpRGB color;
return_if_no_image (gimage, data);
return_if_no_widget (widget, data);
gimp_image_get_qmask_color (gimage, &color);
options = channel_options_dialog_new (gimage,
action_data_get_context (data),
NULL,
widget,
&color,
NULL,
_("Quick Mask Attributes"),
"gimp-qmask-edit",
GIMP_STOCK_QMASK_ON,
_("Edit Quick Mask Attributes"),
GIMP_HELP_QMASK_EDIT,
_("Edit Quick Mask Color"),
_("_Mask opacity:"),
FALSE);
g_signal_connect (options->dialog, "response",
G_CALLBACK (qmask_configure_response),
options);
gtk_widget_show (options->dialog);
}
/* private functions */
static void
qmask_configure_response (GtkWidget *widget,
gint response_id,
ChannelOptionsDialog *options)
{
if (response_id == GTK_RESPONSE_OK)
{
GimpRGB old_color;
GimpRGB new_color;
gimp_image_get_qmask_color (options->gimage, &old_color);
gimp_color_button_get_color (GIMP_COLOR_BUTTON (options->color_panel),
&new_color);
if (gimp_rgba_distance (&old_color, &new_color) > 0.0001)
{
gimp_image_set_qmask_color (options->gimage, &new_color);
gimp_image_flush (options->gimage);
}
}
gtk_widget_destroy (options->dialog);
}
/* 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 __QMASK_COMMANDS_H__
#define __QMASK_COMMANDS_H__
void qmask_toggle_cmd_callback (GtkAction *action,
gpointer data);
void qmask_invert_cmd_callback (GtkAction *action,
GtkAction *current,
gpointer data);
void qmask_configure_cmd_callback (GtkAction *action,
gpointer data);
#endif /* __QMASK_COMMANDS_H__ */
......@@ -30,68 +30,68 @@
#include "widgets/gimphelp-ids.h"
#include "actions.h"
#include "qmask-actions.h"
#include "qmask-commands.h"
#include "quick-mask-actions.h"
#include "quick-mask-commands.h"
#include "gimp-intl.h"
static GimpActionEntry qmask_actions[] =
static GimpActionEntry quick_mask_actions[] =
{
{ "qmask-popup", NULL,
{ "quick-mask-popup", NULL,
N_("Quick Mask Menu"), NULL, NULL, NULL,
GIMP_HELP_QMASK },
GIMP_HELP_QUICK_MASK },
{ "qmask-configure", NULL,
{ "quick-mask-configure", NULL,
N_("_Configure Color and Opacity..."), NULL, NULL,
G_CALLBACK (qmask_configure_cmd_callback),
GIMP_HELP_QMASK_EDIT }
G_CALLBACK (quick_mask_configure_cmd_callback),
GIMP_HELP_QUICK_MASK_EDIT }
};
static GimpToggleActionEntry qmask_toggle_actions[] =
static GimpToggleActionEntry quick_mask_toggle_actions[] =
{
{ "qmask-toggle", GIMP_STOCK_QMASK_ON,
{ "quick-mask-toggle", GIMP_STOCK_QUICK_MASK_ON,
N_("Toggle _Quick Mask"), "<shift>Q", NULL,
G_CALLBACK (qmask_toggle_cmd_callback),
G_CALLBACK (quick_mask_toggle_cmd_callback),
FALSE,
GIMP_HELP_QMASK_TOGGLE }
GIMP_HELP_QUICK_MASK_TOGGLE }
};
static GimpRadioActionEntry qmask_invert_actions[] =
static GimpRadioActionEntry quick_mask_invert_actions[] =
{
{ "qmask-invert-on", NULL,
{ "quick-mask-invert-on", NULL,
N_("Mask _Selected Areas"), NULL, NULL,
TRUE,
GIMP_HELP_QMASK_INVERT },
GIMP_HELP_QUICK_MASK_INVERT },
{ "qmask-invert-off", NULL,
{ "quick-mask-invert-off", NULL,
N_("Mask _Unselected Areas"), NULL, NULL,
FALSE,
GIMP_HELP_QMASK_INVERT }
GIMP_HELP_QUICK_MASK_INVERT }
};
void
qmask_actions_setup (GimpActionGroup *group)
quick_mask_actions_setup (GimpActionGroup *group)
{
gimp_action_group_add_actions (group,
qmask_actions,
G_N_ELEMENTS (qmask_actions));
quick_mask_actions,
G_N_ELEMENTS (quick_mask_actions));
gimp_action_group_add_toggle_actions (group,
qmask_toggle_actions,
G_N_ELEMENTS (qmask_toggle_actions));
quick_mask_toggle_actions,
G_N_ELEMENTS (quick_mask_toggle_actions));
gimp_action_group_add_radio_actions (group,
qmask_invert_actions,
G_N_ELEMENTS (qmask_invert_actions),
quick_mask_invert_actions,
G_N_ELEMENTS (quick_mask_invert_actions),
FALSE,
G_CALLBACK (qmask_invert_cmd_callback));
G_CALLBACK (quick_mask_invert_cmd_callback));
}
void
qmask_actions_update (GimpActionGroup *group,
gpointer data)
quick_mask_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *gimage = action_data_get_image (data);
......@@ -102,21 +102,21 @@ qmask_actions_update (GimpActionGroup *group,
#define SET_COLOR(action,color) \
gimp_action_group_set_action_color (group, action, (color), FALSE)
SET_SENSITIVE ("qmask-toggle", gimage);
SET_ACTIVE ("qmask-toggle", gimage && gimage->qmask_state);
SET_SENSITIVE ("quick-mask-toggle", gimage);
SET_ACTIVE ("quick-mask-toggle", gimage && gimage->quick_mask_state);
SET_SENSITIVE ("qmask-invert-on", gimage);
SET_SENSITIVE ("qmask-invert-off", gimage);
SET_SENSITIVE ("quick-mask-invert-on", gimage);
SET_SENSITIVE ("quick-mask-invert-off", gimage);
if (gimage && gimage->qmask_inverted)
SET_ACTIVE ("qmask-invert-on", TRUE);
if (gimage && gimage->quick_mask_inverted)
SET_ACTIVE ("quick-mask-invert-on", TRUE);
else
SET_ACTIVE ("qmask-invert-off", TRUE);
SET_ACTIVE ("quick-mask-invert-off", TRUE);
SET_SENSITIVE ("qmask-configure", gimage);
SET_SENSITIVE ("quick-mask-configure", gimage);
if (gimage)
SET_COLOR ("qmask-configure", &gimage->qmask_color);
SET_COLOR ("quick-mask-configure", &gimage->quick_mask_color);
#undef SET_SENSITIVE
#undef SET_ACTIVE
......
......@@ -16,13 +16,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __QMASK_ACTIONS_H__
#define __QMASK_ACTIONS_H__
#ifndef __QUICK_MASK_ACTIONS_H__
#define __QUICK_MASK_ACTIONS_H__
void qmask_actions_setup (GimpActionGroup *group);
void qmask_actions_update (GimpActionGroup *group,
gpointer data);
void quick_mask_actions_setup (GimpActionGroup *group);
void quick_mask_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __QMASK_ACTIONS_H__ */
#endif /* __QUICK_MASK_ACTIONS_H__ */
......@@ -28,30 +28,30 @@
#include "core/gimp.h"
#include "core/gimpchannel.h"
#include "core/gimpimage.h"
#include "core/gimpimage-qmask.h"
#include "core/gimpimage-quick-mask.h"
#include "widgets/gimphelp-ids.h"
#include "dialogs/channel-options-dialog.h"
#include "actions.h"
#include "qmask-commands.h"
#include "quick-mask-commands.h"
#include "gimp-intl.h"
/* local function prototypes */
static void qmask_configure_response (GtkWidget *widget,
gint response_id,
ChannelOptionsDialog *options);
static void quick_mask_configure_response (GtkWidget *widget,
gint response_id,
ChannelOptionsDialog *options);
/* public functionss */
void
qmask_toggle_cmd_callback (GtkAction *action,
gpointer data)
quick_mask_toggle_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *gimage;
gboolean active;
......@@ -59,17 +59,17 @@ qmask_toggle_cmd_callback (GtkAction *action,
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (active != gimp_image_get_qmask_state (gimage))
if (active != gimp_image_get_quick_mask_state (gimage))
{
gimp_image_set_qmask_state (gimage, active);
gimp_image_set_quick_mask_state (gimage, active);
gimp_image_flush (gimage);
}
}
void
qmask_invert_cmd_callback (GtkAction *action,
GtkAction *current,