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

« back to all changes in this revision

Viewing changes to app/actions/gradients-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 gradients_actions[] =
 
41
static const GimpActionEntry gradients_actions[] =
42
42
{
43
43
  { "gradients-popup", GIMP_STOCK_GRADIENT,
44
44
    N_("Gradients Menu"), NULL, NULL, NULL,
47
47
  { "gradients-new", GTK_STOCK_NEW,
48
48
    N_("_New Gradient"), "",
49
49
    N_("New gradient"),
50
 
    G_CALLBACK (data_new_data_cmd_callback),
 
50
    G_CALLBACK (data_new_cmd_callback),
51
51
    GIMP_HELP_GRADIENT_NEW },
52
52
 
53
53
  { "gradients-duplicate", GIMP_STOCK_DUPLICATE,
54
54
    N_("D_uplicate Gradient"), NULL,
55
55
    N_("Duplicate gradient"),
56
 
    G_CALLBACK (data_duplicate_data_cmd_callback),
 
56
    G_CALLBACK (data_duplicate_cmd_callback),
57
57
    GIMP_HELP_GRADIENT_DUPLICATE },
58
58
 
 
59
  { "gradients-copy-location", GTK_STOCK_COPY,
 
60
    N_("Copy Gradient _Location"), "",
 
61
    N_("Copy gradient file location to clipboard"),
 
62
    G_CALLBACK (data_copy_location_cmd_callback),
 
63
    GIMP_HELP_GRADIENT_COPY_LOCATION },
 
64
 
59
65
  { "gradients-save-as-pov", GTK_STOCK_SAVE_AS,
60
66
    N_("Save as _POV-Ray..."), "",
61
67
    N_("Save gradient as POV-Ray"),
63
69
    GIMP_HELP_GRADIENT_SAVE_AS_POV },
64
70
 
65
71
  { "gradients-delete", GTK_STOCK_DELETE,
66
 
    N_("_Delete Gradient..."), "",
 
72
    N_("_Delete Gradient"), "",
67
73
    N_("Delete gradient"),
68
 
    G_CALLBACK (data_delete_data_cmd_callback),
 
74
    G_CALLBACK (data_delete_cmd_callback),
69
75
    GIMP_HELP_GRADIENT_DELETE },
70
76
 
71
77
  { "gradients-refresh", GTK_STOCK_REFRESH,
72
78
    N_("_Refresh Gradients"), "",
73
79
    N_("Refresh gradients"),
74
 
    G_CALLBACK (data_refresh_data_cmd_callback),
 
80
    G_CALLBACK (data_refresh_cmd_callback),
75
81
    GIMP_HELP_GRADIENT_REFRESH }
76
82
};
77
83
 
78
 
static GimpStringActionEntry gradients_edit_actions[] =
 
84
static const GimpStringActionEntry gradients_edit_actions[] =
79
85
{
80
 
  { "gradients-edit", GIMP_STOCK_EDIT,
 
86
  { "gradients-edit", GTK_STOCK_EDIT,
81
87
    N_("_Edit Gradient..."), NULL,
82
88
    N_("Edit gradient"),
83
89
    "gimp-gradient-editor",
95
101
  gimp_action_group_add_string_actions (group,
96
102
                                        gradients_edit_actions,
97
103
                                        G_N_ELEMENTS (gradients_edit_actions),
98
 
                                        G_CALLBACK (data_edit_data_cmd_callback));
 
104
                                        G_CALLBACK (data_edit_cmd_callback));
99
105
}
100
106
 
101
107
void
117
123
#define SET_SENSITIVE(action,condition) \
118
124
        gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
119
125
 
120
 
  SET_SENSITIVE ("gradients-edit",        gradient);
121
 
  SET_SENSITIVE ("gradients-duplicate",   gradient);
122
 
  SET_SENSITIVE ("gradients-save-as-pov", gradient);
123
 
  SET_SENSITIVE ("gradients-delete",      gradient && data->deletable);
 
126
  SET_SENSITIVE ("gradients-edit",          gradient);
 
127
  SET_SENSITIVE ("gradients-duplicate",     gradient);
 
128
  SET_SENSITIVE ("gradients-save-as-pov",   gradient);
 
129
  SET_SENSITIVE ("gradients-copy-location", gradient && data->filename);
 
130
  SET_SENSITIVE ("gradients-delete",        gradient && data->deletable);
124
131
 
125
132
#undef SET_SENSITIVE
126
133
}