Commit 5aeac72e authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

added comment about not changing the silly "Qmask" string because it is

2004-09-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-qmask.h: added comment about not changing the
	silly "Qmask" string because it is used to identify the Quick Mask
	in the XCF.

	* app/core/gimpchannel.c: implement GimpViewable::get_description()
	and return "Quick Mask" if it's the Quick Mask.

	* app/actions/qmask-actions.c
	* app/actions/qmask-commands.c
	* app/core/core-enums.[ch]
	* app/core/gimpimage-qmask.c
	* app/display/gimpdisplayshell.c: s/QuickMask/Quick Mask/.
parent b1f789d6
2004-09-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-qmask.h: added comment about not changing the
silly "Qmask" string because it is used to identify the Quick Mask
in the XCF.
* app/core/gimpchannel.c: implement GimpViewable::get_description()
and return "Quick Mask" if it's the Quick Mask.
* app/actions/qmask-actions.c
* app/actions/qmask-commands.c
* app/core/core-enums.[ch]
* app/core/gimpimage-qmask.c
* app/display/gimpdisplayshell.c: s/QuickMask/Quick Mask/.
2004-09-25 DindinX <dindinx@gimp.org>
* plug-ins/common/engrave.c: Added a preview and #if'ed out some
......
......@@ -38,7 +38,7 @@
static GimpActionEntry qmask_actions[] =
{
{ "qmask-popup", NULL, N_("QuickMask Menu"), NULL, NULL, NULL,
{ "qmask-popup", NULL, N_("Quick Mask Menu"), NULL, NULL, NULL,
GIMP_HELP_QMASK },
{ "qmask-configure", NULL,
......@@ -50,13 +50,13 @@ static GimpActionEntry qmask_actions[] =
static GimpToggleActionEntry qmask_toggle_actions[] =
{
{ "qmask-active", NULL,
N_("_QuickMask Active"), NULL, NULL,
N_("_Quick Mask Active"), NULL, NULL,
G_CALLBACK (qmask_toggle_cmd_callback),
FALSE,
GIMP_HELP_QMASK_TOGGLE },
{ "qmask-toggle", GIMP_STOCK_QMASK_ON,
N_("Toggle _QuickMask"), "<shift>Q", NULL,
N_("Toggle _Quick Mask"), "<shift>Q", NULL,
G_CALLBACK (qmask_toggle_cmd_callback),
FALSE,
GIMP_HELP_QMASK_TOGGLE }
......
......@@ -134,7 +134,7 @@ qmask_channel_query (GimpDisplayShell *shell)
options = g_new0 (EditQmaskOptions, 1);
options->gimage = shell->gdisp->gimage;
options->color_panel = gimp_color_panel_new (_("Edit QuickMask Color"),
options->color_panel = gimp_color_panel_new (_("Edit Quick Mask Color"),
&color,
GIMP_COLOR_AREA_LARGE_CHECKS,
48, 64);
......@@ -144,9 +144,9 @@ qmask_channel_query (GimpDisplayShell *shell)
/* The dialog */
options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (shell->gdisp->gimage),
_("QuickMask Attributes"), "gimp-qmask-edit",
_("Quick Mask Attributes"), "gimp-qmask-edit",
GIMP_STOCK_QMASK_ON,
_("Edit QuickMask Attributes"),
_("Edit Quick Mask Attributes"),
GTK_WIDGET (shell),
gimp_standard_help_func,
GIMP_HELP_QMASK_EDIT,
......
......@@ -38,7 +38,7 @@
static GimpActionEntry qmask_actions[] =
{
{ "qmask-popup", NULL, N_("QuickMask Menu"), NULL, NULL, NULL,
{ "qmask-popup", NULL, N_("Quick Mask Menu"), NULL, NULL, NULL,
GIMP_HELP_QMASK },
{ "qmask-configure", NULL,
......@@ -50,13 +50,13 @@ static GimpActionEntry qmask_actions[] =
static GimpToggleActionEntry qmask_toggle_actions[] =
{
{ "qmask-active", NULL,
N_("_QuickMask Active"), NULL, NULL,
N_("_Quick Mask Active"), NULL, NULL,
G_CALLBACK (qmask_toggle_cmd_callback),
FALSE,
GIMP_HELP_QMASK_TOGGLE },
{ "qmask-toggle", GIMP_STOCK_QMASK_ON,
N_("Toggle _QuickMask"), "<shift>Q", NULL,
N_("Toggle _Quick Mask"), "<shift>Q", NULL,
G_CALLBACK (qmask_toggle_cmd_callback),
FALSE,
GIMP_HELP_QMASK_TOGGLE }
......
......@@ -134,7 +134,7 @@ qmask_channel_query (GimpDisplayShell *shell)
options = g_new0 (EditQmaskOptions, 1);
options->gimage = shell->gdisp->gimage;
options->color_panel = gimp_color_panel_new (_("Edit QuickMask Color"),
options->color_panel = gimp_color_panel_new (_("Edit Quick Mask Color"),
&color,
GIMP_COLOR_AREA_LARGE_CHECKS,
48, 64);
......@@ -144,9 +144,9 @@ qmask_channel_query (GimpDisplayShell *shell)
/* The dialog */
options->query_box =
gimp_viewable_dialog_new (GIMP_VIEWABLE (shell->gdisp->gimage),
_("QuickMask Attributes"), "gimp-qmask-edit",
_("Quick Mask Attributes"), "gimp-qmask-edit",
GIMP_STOCK_QMASK_ON,
_("Edit QuickMask Attributes"),
_("Edit Quick Mask Attributes"),
GTK_WIDGET (shell),
gimp_standard_help_func,
GIMP_HELP_QMASK_EDIT,
......
......@@ -561,7 +561,7 @@ gimp_undo_type_get_type (void)
{ GIMP_UNDO_GROUP_IMAGE_CONVERT, N_("Convert image"), "group-image-convert" },
{ GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, N_("Merge layers"), "group-image-layers-merge" },
{ GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, N_("Merge vectors"), "group-image-vectors-merge" },
{ GIMP_UNDO_GROUP_IMAGE_QMASK, N_("QuickMask"), "group-image-qmask" },
{ GIMP_UNDO_GROUP_IMAGE_QMASK, N_("Quick Mask"), "group-image-qmask" },
{ GIMP_UNDO_GROUP_IMAGE_GRID, N_("Grid"), "group-image-grid" },
{ GIMP_UNDO_GROUP_IMAGE_GUIDE, N_("Guide"), "group-image-guide" },
{ GIMP_UNDO_GROUP_DRAWABLE, N_("Drawable"), "group-drawable" },
......
......@@ -416,7 +416,7 @@ typedef enum /*< pdb-skip >*/
GIMP_UNDO_GROUP_IMAGE_CONVERT, /*< desc="Convert image" >*/
GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, /*< desc="Merge layers" >*/
GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE,/*< desc="Merge vectors" >*/
GIMP_UNDO_GROUP_IMAGE_QMASK, /*< desc="QuickMask" >*/
GIMP_UNDO_GROUP_IMAGE_QMASK, /*< desc="Quick Mask" >*/
GIMP_UNDO_GROUP_IMAGE_GRID, /*< desc="Grid" >*/
GIMP_UNDO_GROUP_IMAGE_GUIDE, /*< desc="Guide" >*/
GIMP_UNDO_GROUP_DRAWABLE, /*< desc="Drawable" >*/
......
......@@ -43,6 +43,7 @@
#include "gimp-utils.h"
#include "gimpcontainer.h"
#include "gimpimage.h"
#include "gimpimage-qmask.h"
#include "gimpimage-undo.h"
#include "gimpimage-undo-push.h"
#include "gimpchannel.h"
......@@ -71,6 +72,9 @@ static void gimp_channel_finalize (GObject *object);
static gint64 gimp_channel_get_memsize (GimpObject *object,
gint64 *gui_size);
static gchar * gimp_channel_get_description (GimpViewable *viewable,
gchar **tooltip);
static gboolean gimp_channel_is_attached (GimpItem *item);
static GimpItem * gimp_channel_duplicate (GimpItem *item,
GType new_type,
......@@ -261,6 +265,7 @@ gimp_channel_class_init (GimpChannelClass *klass)
gimp_object_class->get_memsize = gimp_channel_get_memsize;
viewable_class->get_description = gimp_channel_get_description;
viewable_class->default_stock_id = "gimp-channel";
item_class->is_attached = gimp_channel_is_attached;
......@@ -365,6 +370,23 @@ gimp_channel_get_memsize (GimpObject *object,
return GIMP_OBJECT_CLASS (parent_class)->get_memsize (object, gui_size);
}
static gchar *
gimp_channel_get_description (GimpViewable *viewable,
gchar **tooltip)
{
if (! strcmp (GIMP_IMAGE_QMASK_NAME,
gimp_object_get_name (GIMP_OBJECT (viewable))))
{
if (tooltip)
*tooltip = NULL;
return g_strdup (_("Quick Mask"));
}
return GIMP_VIEWABLE_CLASS (parent_class)->get_description (viewable,
tooltip);
}
static gboolean
gimp_channel_is_attached (GimpItem *item)
{
......
......@@ -64,7 +64,7 @@ gimp_image_set_qmask_state (GimpImage *gimage,
if (! mask)
{
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_QMASK,
_("Enable QuickMask"));
_("Enable Quick Mask"));
if (gimp_channel_is_empty (selection))
{
......@@ -114,7 +114,7 @@ gimp_image_set_qmask_state (GimpImage *gimage,
GimpLayer *floating_sel = gimp_image_floating_sel (gimage);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_QMASK,
_("Disable QuickMask"));
_("Disable Quick Mask"));
if (gimage->qmask_inverted)
gimp_channel_invert (mask, TRUE);
......
......@@ -20,6 +20,9 @@
#define __GIMP_IMAGE_QMASK_H__
/* don't change this string, it's used to identify the Quick Mask
* when opening files.
*/
#define GIMP_IMAGE_QMASK_NAME "Qmask"
......
......@@ -64,7 +64,7 @@ gimp_image_set_qmask_state (GimpImage *gimage,
if (! mask)
{
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_QMASK,
_("Enable QuickMask"));
_("Enable Quick Mask"));
if (gimp_channel_is_empty (selection))
{
......@@ -114,7 +114,7 @@ gimp_image_set_qmask_state (GimpImage *gimage,
GimpLayer *floating_sel = gimp_image_floating_sel (gimage);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_QMASK,
_("Disable QuickMask"));
_("Disable Quick Mask"));
if (gimage->qmask_inverted)
gimp_channel_invert (mask, TRUE);
......
......@@ -20,6 +20,9 @@
#define __GIMP_IMAGE_QMASK_H__
/* don't change this string, it's used to identify the Quick Mask
* when opening files.
*/
#define GIMP_IMAGE_QMASK_NAME "Qmask"
......
......@@ -884,7 +884,7 @@ gimp_display_shell_new (GimpDisplay *gdisp,
gtk_widget_show (image);
gimp_help_set_help_data (shell->qmask_button,
_("Toggle QuickMask"),
_("Toggle Quick Mask"),
GIMP_HELP_IMAGE_WINDOW_QMASK_BUTTON);
g_signal_connect (shell->qmask_button, "toggled",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment