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

« back to all changes in this revision

Viewing changes to app/paint/gimpperspectivecloneoptions.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
/* GIMP - The GNU Image Manipulation Program
 
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; either version 2 of the License, or
 
7
 * (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
17
 */
 
18
 
 
19
#include "config.h"
 
20
 
 
21
#include <glib-object.h>
 
22
 
 
23
#include "libgimpconfig/gimpconfig.h"
 
24
 
 
25
#include "paint-types.h"
 
26
 
 
27
#include "gimpperspectivecloneoptions.h"
 
28
 
 
29
 
 
30
enum
 
31
{
 
32
  PROP_0,
 
33
  PROP_CLONE_MODE
 
34
};
 
35
 
 
36
 
 
37
static void   gimp_perspective_clone_options_set_property (GObject      *object,
 
38
                                                           guint         property_id,
 
39
                                                           const GValue *value,
 
40
                                                           GParamSpec   *pspec);
 
41
static void   gimp_perspective_clone_options_get_property (GObject      *object,
 
42
                                                           guint         property_id,
 
43
                                                           GValue       *value,
 
44
                                                           GParamSpec   *pspec);
 
45
 
 
46
 
 
47
G_DEFINE_TYPE (GimpPerspectiveCloneOptions, gimp_perspective_clone_options,
 
48
               GIMP_TYPE_CLONE_OPTIONS)
 
49
 
 
50
 
 
51
static void
 
52
gimp_perspective_clone_options_class_init (GimpPerspectiveCloneOptionsClass *klass)
 
53
{
 
54
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
55
 
 
56
  object_class->set_property = gimp_perspective_clone_options_set_property;
 
57
  object_class->get_property = gimp_perspective_clone_options_get_property;
 
58
 
 
59
  GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_CLONE_MODE,
 
60
                                 "clone-mode", NULL,
 
61
                                 GIMP_TYPE_PERSPECTIVE_CLONE_MODE,
 
62
                                 GIMP_PERSPECTIVE_CLONE_MODE_ADJUST,
 
63
                                 GIMP_PARAM_STATIC_STRINGS);
 
64
}
 
65
 
 
66
static void
 
67
gimp_perspective_clone_options_init (GimpPerspectiveCloneOptions *options)
 
68
{
 
69
}
 
70
 
 
71
static void
 
72
gimp_perspective_clone_options_set_property (GObject      *object,
 
73
                                             guint         property_id,
 
74
                                             const GValue *value,
 
75
                                             GParamSpec   *pspec)
 
76
{
 
77
  GimpPerspectiveCloneOptions *options = GIMP_PERSPECTIVE_CLONE_OPTIONS (object);
 
78
 
 
79
  switch (property_id)
 
80
    {
 
81
    case PROP_CLONE_MODE:
 
82
      options->clone_mode = g_value_get_enum (value);
 
83
      break;
 
84
 
 
85
    default:
 
86
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
 
87
      break;
 
88
    }
 
89
}
 
90
 
 
91
static void
 
92
gimp_perspective_clone_options_get_property (GObject    *object,
 
93
                                             guint       property_id,
 
94
                                             GValue     *value,
 
95
                                             GParamSpec *pspec)
 
96
{
 
97
  GimpPerspectiveCloneOptions *options = GIMP_PERSPECTIVE_CLONE_OPTIONS (object);
 
98
 
 
99
  switch (property_id)
 
100
    {
 
101
    case PROP_CLONE_MODE:
 
102
      g_value_set_enum (value, options->clone_mode);
 
103
      break;
 
104
 
 
105
    default:
 
106
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
 
107
      break;
 
108
    }
 
109
}