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

« back to all changes in this revision

Viewing changes to app/widgets/gimpfontselect.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
 * gimpfontselect.c
29
29
 
30
30
#include "core/gimp.h"
31
31
#include "core/gimpcontext.h"
 
32
#include "core/gimpparamspecs.h"
32
33
 
33
34
#include "text/gimpfont.h"
34
35
 
35
 
#include "pdb/procedural_db.h"
 
36
#include "pdb/gimppdb.h"
36
37
 
37
38
#include "gimpcontainerbox.h"
38
39
#include "gimpfontselect.h"
39
40
#include "gimpfontview.h"
40
41
 
41
42
 
42
 
static void       gimp_font_select_class_init   (GimpFontSelectClass *klass);
43
 
 
44
 
static GObject  * gimp_font_select_constructor  (GType          type,
45
 
                                                 guint          n_params,
46
 
                                                 GObjectConstructParam *params);
47
 
 
48
 
static Argument * gimp_font_select_run_callback (GimpPdbDialog *dialog,
49
 
                                                 GimpObject    *object,
50
 
                                                 gboolean       closing,
51
 
                                                 gint          *n_return_vals);
52
 
 
53
 
 
54
 
static GimpPdbDialogClass *parent_class = NULL;
55
 
 
56
 
 
57
 
GType
58
 
gimp_font_select_get_type (void)
59
 
{
60
 
  static GType dialog_type = 0;
61
 
 
62
 
  if (! dialog_type)
63
 
    {
64
 
      static const GTypeInfo dialog_info =
65
 
      {
66
 
        sizeof (GimpFontSelectClass),
67
 
        (GBaseInitFunc) NULL,
68
 
        (GBaseFinalizeFunc) NULL,
69
 
        (GClassInitFunc) gimp_font_select_class_init,
70
 
        NULL,           /* class_finalize */
71
 
        NULL,           /* class_data     */
72
 
        sizeof (GimpFontSelect),
73
 
        0,              /* n_preallocs    */
74
 
        NULL            /* instance_init  */
75
 
      };
76
 
 
77
 
      dialog_type = g_type_register_static (GIMP_TYPE_PDB_DIALOG,
78
 
                                            "GimpFontSelect",
79
 
                                            &dialog_info, 0);
80
 
    }
81
 
 
82
 
  return dialog_type;
83
 
}
 
43
static GObject     * gimp_font_select_constructor  (GType          type,
 
44
                                                    guint          n_params,
 
45
                                                    GObjectConstructParam *params);
 
46
 
 
47
static GValueArray * gimp_font_select_run_callback (GimpPdbDialog *dialog,
 
48
                                                    GimpObject    *object,
 
49
                                                    gboolean       closing);
 
50
 
 
51
 
 
52
G_DEFINE_TYPE (GimpFontSelect, gimp_font_select, GIMP_TYPE_PDB_DIALOG)
 
53
 
 
54
#define parent_class gimp_font_select_parent_class
 
55
 
84
56
 
85
57
static void
86
58
gimp_font_select_class_init (GimpFontSelectClass *klass)
88
60
  GObjectClass       *object_class = G_OBJECT_CLASS (klass);
89
61
  GimpPdbDialogClass *pdb_class    = GIMP_PDB_DIALOG_CLASS (klass);
90
62
 
91
 
  parent_class = g_type_class_peek_parent (klass);
92
 
 
93
63
  object_class->constructor = gimp_font_select_constructor;
94
64
 
95
65
  pdb_class->run_callback   = gimp_font_select_run_callback;
96
66
}
97
67
 
 
68
static void
 
69
gimp_font_select_init (GimpFontSelect *select)
 
70
{
 
71
}
 
72
 
98
73
static GObject *
99
74
gimp_font_select_constructor (GType                  type,
100
75
                              guint                  n_params,
124
99
  return object;
125
100
}
126
101
 
127
 
static Argument *
 
102
static GValueArray *
128
103
gimp_font_select_run_callback (GimpPdbDialog *dialog,
129
104
                               GimpObject    *object,
130
 
                               gboolean       closing,
131
 
                               gint          *n_return_vals)
 
105
                               gboolean       closing)
132
106
{
133
 
  return procedural_db_run_proc (dialog->caller_context->gimp,
134
 
                                 dialog->caller_context,
135
 
                                 NULL,
136
 
                                 dialog->callback_name,
137
 
                                 n_return_vals,
138
 
                                 GIMP_PDB_STRING, object->name,
139
 
                                 GIMP_PDB_INT32,  closing,
140
 
                                 GIMP_PDB_END);
 
107
  return gimp_pdb_execute_procedure_by_name (dialog->pdb,
 
108
                                             dialog->caller_context,
 
109
                                             NULL,
 
110
                                             dialog->callback_name,
 
111
                                             G_TYPE_STRING,   object->name,
 
112
                                             GIMP_TYPE_INT32, closing,
 
113
                                             G_TYPE_NONE);
141
114
}