diff --git a/ChangeLog b/ChangeLog index 2b29016f55..8472a464ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2004-09-25 Michael Natterer + + * 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 * plug-ins/common/engrave.c: Added a preview and #if'ed out some diff --git a/app/actions/qmask-actions.c b/app/actions/qmask-actions.c index 963f54bb5d..10bd3fe0ff 100644 --- a/app/actions/qmask-actions.c +++ b/app/actions/qmask-actions.c @@ -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"), "Q", NULL, + N_("Toggle _Quick Mask"), "Q", NULL, G_CALLBACK (qmask_toggle_cmd_callback), FALSE, GIMP_HELP_QMASK_TOGGLE } diff --git a/app/actions/qmask-commands.c b/app/actions/qmask-commands.c index b26c0c46b5..edebfe85a6 100644 --- a/app/actions/qmask-commands.c +++ b/app/actions/qmask-commands.c @@ -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, diff --git a/app/actions/quick-mask-actions.c b/app/actions/quick-mask-actions.c index 963f54bb5d..10bd3fe0ff 100644 --- a/app/actions/quick-mask-actions.c +++ b/app/actions/quick-mask-actions.c @@ -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"), "Q", NULL, + N_("Toggle _Quick Mask"), "Q", NULL, G_CALLBACK (qmask_toggle_cmd_callback), FALSE, GIMP_HELP_QMASK_TOGGLE } diff --git a/app/actions/quick-mask-commands.c b/app/actions/quick-mask-commands.c index b26c0c46b5..edebfe85a6 100644 --- a/app/actions/quick-mask-commands.c +++ b/app/actions/quick-mask-commands.c @@ -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, diff --git a/app/core/core-enums.c b/app/core/core-enums.c index 1179fca517..4eac236333 100644 --- a/app/core/core-enums.c +++ b/app/core/core-enums.c @@ -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" }, diff --git a/app/core/core-enums.h b/app/core/core-enums.h index 89284e32c3..b0d50d2667 100644 --- a/app/core/core-enums.h +++ b/app/core/core-enums.h @@ -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" >*/ diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c index 7ba90fdc44..f8e1f82711 100644 --- a/app/core/gimpchannel.c +++ b/app/core/gimpchannel.c @@ -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) { diff --git a/app/core/gimpimage-qmask.c b/app/core/gimpimage-qmask.c index 8b9d240caa..0ba032530b 100644 --- a/app/core/gimpimage-qmask.c +++ b/app/core/gimpimage-qmask.c @@ -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); diff --git a/app/core/gimpimage-qmask.h b/app/core/gimpimage-qmask.h index 7c0656af1a..1e693fe6bc 100644 --- a/app/core/gimpimage-qmask.h +++ b/app/core/gimpimage-qmask.h @@ -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" diff --git a/app/core/gimpimage-quick-mask.c b/app/core/gimpimage-quick-mask.c index 8b9d240caa..0ba032530b 100644 --- a/app/core/gimpimage-quick-mask.c +++ b/app/core/gimpimage-quick-mask.c @@ -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); diff --git a/app/core/gimpimage-quick-mask.h b/app/core/gimpimage-quick-mask.h index 7c0656af1a..1e693fe6bc 100644 --- a/app/core/gimpimage-quick-mask.h +++ b/app/core/gimpimage-quick-mask.h @@ -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" diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c index d5f8934625..5507181c68 100644 --- a/app/display/gimpdisplayshell.c +++ b/app/display/gimpdisplayshell.c @@ -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",