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

« back to all changes in this revision

Viewing changes to app/actions/vectors-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
38
38
#include "gimp-intl.h"
39
39
 
40
40
 
41
 
static GimpActionEntry vectors_actions[] =
 
41
static const GimpActionEntry vectors_actions[] =
42
42
{
43
43
  { "vectors-popup", GIMP_STOCK_PATHS,
44
44
    N_("Paths Menu"), NULL, NULL, NULL,
49
49
    G_CALLBACK (vectors_vectors_tool_cmd_callback),
50
50
    GIMP_HELP_TOOL_VECTORS },
51
51
 
52
 
  { "vectors-edit-attributes", GIMP_STOCK_EDIT,
 
52
  { "vectors-edit-attributes", GTK_STOCK_EDIT,
53
53
    N_("_Edit Path Attributes..."), NULL,
54
54
    N_("Edit path attributes"),
55
55
    G_CALLBACK (vectors_edit_attributes_cmd_callback),
110
110
 
111
111
  { "vectors-stroke", GIMP_STOCK_PATH_STROKE,
112
112
    N_("Stro_ke Path..."), NULL,
113
 
    N_("Stroke path..."),
 
113
    N_("Paint along the path"),
114
114
    G_CALLBACK (vectors_stroke_cmd_callback),
115
115
    GIMP_HELP_PATH_STROKE },
116
116
 
117
117
  { "vectors-stroke-last-values", GIMP_STOCK_PATH_STROKE,
118
118
    N_("Stro_ke Path"), NULL,
119
 
    N_("Stroke path with last values"),
 
119
    N_("Paint along the path with last values"),
120
120
    G_CALLBACK (vectors_stroke_last_vals_cmd_callback),
121
121
    GIMP_HELP_PATH_STROKE },
122
122
 
130
130
    G_CALLBACK (vectors_paste_cmd_callback),
131
131
    GIMP_HELP_PATH_PASTE },
132
132
 
 
133
  { "vectors-export", GTK_STOCK_SAVE,
 
134
    N_("E_xport Path..."), "", NULL,
 
135
    G_CALLBACK (vectors_export_cmd_callback),
 
136
    GIMP_HELP_PATH_EXPORT },
 
137
 
133
138
  { "vectors-import", GTK_STOCK_OPEN,
134
139
    N_("I_mport Path..."), "", NULL,
135
140
    G_CALLBACK (vectors_import_cmd_callback),
136
 
    GIMP_HELP_PATH_IMPORT },
137
 
 
138
 
  { "vectors-export", GTK_STOCK_SAVE,
139
 
    N_("E_xport Path..."), "", NULL,
140
 
    G_CALLBACK (vectors_export_cmd_callback),
141
 
    GIMP_HELP_PATH_EXPORT }
 
141
    GIMP_HELP_PATH_IMPORT }
142
142
};
143
143
 
144
 
static GimpToggleActionEntry vectors_toggle_actions[] =
 
144
static const GimpToggleActionEntry vectors_toggle_actions[] =
145
145
{
146
146
  { "vectors-visible", GIMP_STOCK_VISIBLE,
147
147
    N_("_Visible"), NULL, NULL,
156
156
    GIMP_HELP_PATH_LINKED }
157
157
};
158
158
 
159
 
static GimpEnumActionEntry vectors_to_selection_actions[] =
 
159
static const GimpEnumActionEntry vectors_to_selection_actions[] =
160
160
{
161
161
  { "vectors-selection-replace", GIMP_STOCK_SELECTION_REPLACE,
162
162
    N_("Path to Sele_ction"), NULL,
188
188
    GIMP_HELP_PATH_SELECTION_INTERSECT }
189
189
};
190
190
 
191
 
static GimpEnumActionEntry vectors_selection_to_vectors_actions[] =
 
191
static const GimpEnumActionEntry vectors_selection_to_vectors_actions[] =
192
192
{
193
193
  { "vectors-selection-to-vectors", GIMP_STOCK_SELECTION_TO_PATH,
194
194
    N_("Selecti_on to Path"), NULL,
197
197
    GIMP_HELP_SELECTION_TO_PATH },
198
198
 
199
199
  { "vectors-selection-to-vectors-short", GIMP_STOCK_SELECTION_TO_PATH,
200
 
    N_("To _Path"), NULL, NULL,
 
200
    N_("To _Path"), NULL,
 
201
    N_("Selection to path"),
201
202
    FALSE, FALSE,
202
203
    GIMP_HELP_SELECTION_TO_PATH },
203
204
 
235
236
vectors_actions_update (GimpActionGroup *group,
236
237
                        gpointer         data)
237
238
{
238
 
  GimpImage   *gimage     = action_data_get_image (data);
 
239
  GimpImage   *image     = action_data_get_image (data);
239
240
  GimpVectors *vectors    = NULL;
240
241
  gint         n_vectors  = 0;
241
242
  gboolean     mask_empty = TRUE;
245
246
  GList       *next       = NULL;
246
247
  GList       *prev       = NULL;
247
248
 
248
 
  if (gimage)
 
249
  if (image)
249
250
    {
250
 
      n_vectors  = gimp_container_num_children (gimage->vectors);
251
 
      mask_empty = gimp_channel_is_empty (gimp_image_get_mask (gimage));
 
251
      n_vectors  = gimp_container_num_children (image->vectors);
 
252
      mask_empty = gimp_channel_is_empty (gimp_image_get_mask (image));
252
253
      global_buf = FALSE;
253
254
 
254
 
      vectors = gimp_image_get_active_vectors (gimage);
 
255
      vectors = gimp_image_get_active_vectors (image);
255
256
 
256
257
      if (vectors)
257
258
        {
261
262
          visible = gimp_item_get_visible (item);
262
263
          linked  = gimp_item_get_linked  (item);
263
264
 
264
 
          list = g_list_find (GIMP_LIST (gimage->vectors)->list, vectors);
 
265
          list = g_list_find (GIMP_LIST (image->vectors)->list, vectors);
265
266
 
266
267
          if (list)
267
268
            {
279
280
  SET_SENSITIVE ("vectors-path-tool",       vectors);
280
281
  SET_SENSITIVE ("vectors-edit-attributes", vectors);
281
282
 
282
 
  SET_SENSITIVE ("vectors-new",             gimage);
283
 
  SET_SENSITIVE ("vectors-new-last-values", gimage);
 
283
  SET_SENSITIVE ("vectors-new",             image);
 
284
  SET_SENSITIVE ("vectors-new-last-values", image);
284
285
  SET_SENSITIVE ("vectors-duplicate",       vectors);
285
286
  SET_SENSITIVE ("vectors-delete",          vectors);
286
287
  SET_SENSITIVE ("vectors-merge-visible",   n_vectors > 1);
291
292
  SET_SENSITIVE ("vectors-lower-to-bottom", vectors && next);
292
293
 
293
294
  SET_SENSITIVE ("vectors-copy",   vectors);
294
 
  SET_SENSITIVE ("vectors-paste",  global_buf);
295
 
  SET_SENSITIVE ("vectors-import", gimage);
 
295
  SET_SENSITIVE ("vectors-paste",  image);
296
296
  SET_SENSITIVE ("vectors-export", vectors);
 
297
  SET_SENSITIVE ("vectors-import", image);
297
298
 
298
299
  SET_SENSITIVE ("vectors-visible", vectors);
299
300
  SET_SENSITIVE ("vectors-linked",  vectors);
301
302
  SET_ACTIVE ("vectors-visible", visible);
302
303
  SET_ACTIVE ("vectors-linked",  linked);
303
304
 
304
 
  SET_SENSITIVE ("vectors-selection-to-vectors",          gimage && !mask_empty);
305
 
  SET_SENSITIVE ("vectors-selection-to-vectors-short",    gimage && !mask_empty);
306
 
  SET_SENSITIVE ("vectors-selection-to-vectors-advanced", gimage && !mask_empty);
 
305
  SET_SENSITIVE ("vectors-selection-to-vectors",          image && !mask_empty);
 
306
  SET_SENSITIVE ("vectors-selection-to-vectors-short",    image && !mask_empty);
 
307
  SET_SENSITIVE ("vectors-selection-to-vectors-advanced", image && !mask_empty);
307
308
  SET_SENSITIVE ("vectors-stroke",                        vectors);
308
309
  SET_SENSITIVE ("vectors-stroke-last-values",            vectors);
309
310