~ubuntu-branches/ubuntu/vivid/gimp/vivid

« back to all changes in this revision

Viewing changes to plug-ins/pygimp/pygimp-tile.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach
  • Date: 2012-05-08 18:50:03 UTC
  • mto: (1.1.26) (0.5.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 71.
  • Revision ID: package-import@ubuntu.com-20120508185003-tltkvbaysf8d2426
ImportĀ upstreamĀ versionĀ 2.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- Mode: C; c-basic-offset: 4 -*-
2
 
    Gimp-Python - allows the writing of Gimp plugins in Python.
3
 
    Copyright (C) 1997-2002  James Henstridge <james@daa.com.au>
4
 
 
5
 
    This program is free software; you can redistribute it and/or modify
6
 
    it under the terms of the GNU General Public License as published by
7
 
    the Free Software Foundation; either version 2 of the License, or
8
 
    (at your option) any later version.
9
 
 
10
 
    This program is distributed in the hope that it will be useful,
11
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
    GNU General Public License for more details.
14
 
 
15
 
    You should have received a copy of the GNU General Public License
16
 
    along with this program; if not, write to the Free Software
17
 
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
2
 * Gimp-Python - allows the writing of Gimp plugins in Python.
 
3
 * Copyright (C) 1997-2002  James Henstridge <james@daa.com.au>
 
4
 *
 
5
 * This program is free software: you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License as published by
 
7
 * the Free Software Foundation; either version 3 of the License, or
 
8
 * (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
17
 */
19
18
 
20
19
#ifdef HAVE_CONFIG_H
131
130
    PyObject *s;
132
131
    gchar *name;
133
132
 
134
 
    name = gimp_drawable_get_name(self->tile->drawable->drawable_id);
 
133
    name = gimp_item_get_name(self->tile->drawable->drawable_id);
135
134
 
136
135
    if (self->tile->shadow)
137
136
        s = PyString_FromFormat("<gimp.Tile for drawable '%s' (shadow)>", name);
690
689
    PyObject *s;
691
690
    gchar *name;
692
691
 
693
 
    name = gimp_drawable_get_name(self->drawable->drawable->drawable_id);
 
692
    name = gimp_item_get_name(self->drawable->drawable->drawable_id);
694
693
    s = PyString_FromFormat("<gimp.PixelRgn for drawable '%s'>", name);
695
694
    g_free(name);
696
695
 
876
875
}
877
876
 
878
877
static PyMappingMethods pf_as_mapping = {
879
 
    (inquiry)pf_length,
 
878
    (lenfunc)pf_length,
880
879
    (binaryfunc)pf_subscript,
881
880
    (objobjargproc)pf_ass_sub,
882
881
};
951
950
    PyObject *s;
952
951
    char *name;
953
952
 
954
 
    name = gimp_drawable_get_name(self->drawable->drawable->drawable_id);
 
953
    name = gimp_item_get_name(self->drawable->drawable->drawable_id);
955
954
 
956
955
    if (self->shadow)
957
956
        s = PyString_FromFormat("<gimp.PixelFetcher for drawable '%s' (shadow)>", name);