~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to app/actions/drawable-actions.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* The GIMP -- an image manipulation program
 
1
/* GIMP - The GNU Image Manipulation Program
2
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
39
39
#include "gimp-intl.h"
40
40
 
41
41
 
42
 
static GimpActionEntry drawable_actions[] =
 
42
static const GimpActionEntry drawable_actions[] =
43
43
{
44
44
  { "drawable-desaturate", GIMP_STOCK_CONVERT_GRAYSCALE,
45
 
    N_("_Desaturate"), NULL, NULL,
 
45
    N_("_Desaturate..."), NULL,
 
46
    N_("Turn colors into shades of gray"),
46
47
    G_CALLBACK (drawable_desaturate_cmd_callback),
47
48
    GIMP_HELP_LAYER_DESATURATE },
48
49
 
49
50
  { "drawable-equalize", NULL,
50
 
    N_("_Equalize"), NULL, NULL,
 
51
    N_("_Equalize"), NULL,
 
52
    N_("Automatic contrast enhancement"),
51
53
    G_CALLBACK (drawable_equalize_cmd_callback),
52
54
    GIMP_HELP_LAYER_EQUALIZE },
53
55
 
54
56
  { "drawable-invert", GIMP_STOCK_INVERT,
55
 
    N_("In_vert"), NULL, NULL,
 
57
    N_("In_vert"), NULL,
 
58
    N_("Invert the colors"),
56
59
    G_CALLBACK (drawable_invert_cmd_callback),
57
60
    GIMP_HELP_LAYER_INVERT },
58
61
 
59
62
  { "drawable-levels-stretch", NULL,
60
 
    N_("_White Balance"), NULL, NULL,
 
63
    N_("_White Balance"), NULL,
 
64
    N_("Automatic white balance correction"),
61
65
    G_CALLBACK (drawable_levels_stretch_cmd_callback),
62
66
    GIMP_HELP_LAYER_WHITE_BALANCE},
63
67
 
64
68
  { "drawable-offset", NULL,
65
 
    N_("_Offset..."), "<control><shift>O", NULL,
 
69
    N_("_Offset..."), "<control><shift>O",
 
70
    N_("Shift the pixels, optionally wrapping them at the borders"),
66
71
    G_CALLBACK (drawable_offset_cmd_callback),
67
72
    GIMP_HELP_LAYER_OFFSET }
68
73
};
69
74
 
70
 
static GimpToggleActionEntry drawable_toggle_actions[] =
 
75
static const GimpToggleActionEntry drawable_toggle_actions[] =
71
76
{
72
77
  { "drawable-linked", GIMP_STOCK_LINKED,
73
 
    N_("_Linked"), NULL, NULL,
 
78
    N_("_Linked"), NULL,
 
79
    N_("Toggle the linked state"),
74
80
    G_CALLBACK (drawable_linked_cmd_callback),
75
81
    FALSE,
76
82
    GIMP_HELP_LAYER_LINKED },
77
83
 
78
84
  { "drawable-visible", GIMP_STOCK_VISIBLE,
79
 
    N_("_Visible"), NULL, NULL,
 
85
    N_("_Visible"), NULL,
 
86
    N_("Toggle visibility"),
80
87
    G_CALLBACK (drawable_visible_cmd_callback),
81
88
    FALSE,
82
89
    GIMP_HELP_LAYER_VISIBLE }
83
90
};
84
91
 
85
 
static GimpEnumActionEntry drawable_flip_actions[] =
 
92
static const GimpEnumActionEntry drawable_flip_actions[] =
86
93
{
87
94
  { "drawable-flip-horizontal", GIMP_STOCK_FLIP_HORIZONTAL,
88
 
    N_("Flip _Horizontally"), NULL, NULL,
 
95
    N_("Flip _Horizontally"), NULL,
 
96
    N_("Flip horizontally"),
89
97
    GIMP_ORIENTATION_HORIZONTAL, FALSE,
90
98
    GIMP_HELP_LAYER_FLIP_HORIZONTAL },
91
99
 
92
100
  { "drawable-flip-vertical", GIMP_STOCK_FLIP_VERTICAL,
93
 
    N_("Flip _Vertically"), NULL, NULL,
 
101
    N_("Flip _Vertically"), NULL,
 
102
    N_("Flip vertically"),
94
103
    GIMP_ORIENTATION_VERTICAL, FALSE,
95
104
    GIMP_HELP_LAYER_FLIP_VERTICAL }
96
105
};
97
106
 
98
 
static GimpEnumActionEntry drawable_rotate_actions[] =
 
107
static const GimpEnumActionEntry drawable_rotate_actions[] =
99
108
{
100
109
  { "drawable-rotate-90", GIMP_STOCK_ROTATE_90,
101
 
    N_("Rotate 90 degrees _CW"), NULL, NULL,
 
110
    N_("Rotate 90° _clockwise"), NULL,
 
111
    N_("Rotate 90 degrees to the right"),
102
112
    GIMP_ROTATE_90, FALSE,
103
113
    GIMP_HELP_LAYER_ROTATE_90 },
104
114
 
105
115
  { "drawable-rotate-180", GIMP_STOCK_ROTATE_180,
106
 
    N_("Rotate _180 degrees"), NULL, NULL,
 
116
    N_("Rotate _180°"), NULL,
 
117
    N_("Turn upside-down"),
107
118
    GIMP_ROTATE_180, FALSE,
108
119
    GIMP_HELP_LAYER_ROTATE_180 },
109
120
 
110
121
  { "drawable-rotate-270", GIMP_STOCK_ROTATE_270,
111
 
    N_("Rotate 90 degrees CC_W"), NULL, NULL,
 
122
    N_("Rotate 90° counter-clock_wise"), NULL,
 
123
    N_("Rotate 90 degrees to the left"),
112
124
    GIMP_ROTATE_270, FALSE,
113
125
    GIMP_HELP_LAYER_ROTATE_270 }
114
126
};
140
152
drawable_actions_update (GimpActionGroup *group,
141
153
                         gpointer         data)
142
154
{
143
 
  GimpImage    *gimage;
 
155
  GimpImage    *image;
144
156
  GimpDrawable *drawable   = NULL;
145
157
  gboolean      is_rgb     = FALSE;
146
158
  gboolean      is_gray    = FALSE;
148
160
  gboolean      visible    = FALSE;
149
161
  gboolean      linked     = FALSE;
150
162
 
151
 
  gimage = action_data_get_image (data);
 
163
  image = action_data_get_image (data);
152
164
 
153
 
  if (gimage)
 
165
  if (image)
154
166
    {
155
 
      drawable = gimp_image_active_drawable (gimage);
 
167
      drawable = gimp_image_active_drawable (image);
156
168
 
157
169
      if (drawable)
158
170
        {