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

« back to all changes in this revision

Viewing changes to app/widgets/gimpfontview.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
 * gimpfontview.c
31
31
#include "core/gimpcontext.h"
32
32
 
33
33
#include "gimpcontainerview.h"
 
34
#include "gimpeditor.h"
34
35
#include "gimpfontview.h"
35
36
#include "gimphelp-ids.h"
36
37
#include "gimpuimanager.h"
38
39
#include "gimp-intl.h"
39
40
 
40
41
 
41
 
static void   gimp_font_view_class_init    (GimpFontViewClass   *klass);
42
 
static void   gimp_font_view_init          (GimpFontView        *view);
43
 
 
44
42
static void   gimp_font_view_activate_item (GimpContainerEditor *editor,
45
43
                                            GimpViewable        *viewable);
46
44
 
47
45
 
48
 
static GimpContainerEditorClass *parent_class = NULL;
49
 
 
50
 
 
51
 
GType
52
 
gimp_font_view_get_type (void)
53
 
{
54
 
  static GType type = 0;
55
 
 
56
 
  if (! type)
57
 
    {
58
 
      static const GTypeInfo view_info =
59
 
      {
60
 
        sizeof (GimpFontViewClass),
61
 
        NULL,           /* base_init */
62
 
        NULL,           /* base_finalize */
63
 
        (GClassInitFunc) gimp_font_view_class_init,
64
 
        NULL,           /* class_finalize */
65
 
        NULL,           /* class_data */
66
 
        sizeof (GimpFontView),
67
 
        0,              /* n_preallocs */
68
 
        (GInstanceInitFunc) gimp_font_view_init,
69
 
      };
70
 
 
71
 
      type = g_type_register_static (GIMP_TYPE_CONTAINER_EDITOR,
72
 
                                     "GimpFontView",
73
 
                                     &view_info, 0);
74
 
    }
75
 
 
76
 
  return type;
77
 
}
 
46
G_DEFINE_TYPE (GimpFontView, gimp_font_view, GIMP_TYPE_CONTAINER_EDITOR)
 
47
 
 
48
#define parent_class gimp_font_view_parent_class
 
49
 
78
50
 
79
51
static void
80
52
gimp_font_view_class_init (GimpFontViewClass *klass)
81
53
{
82
54
  GimpContainerEditorClass *editor_class = GIMP_CONTAINER_EDITOR_CLASS (klass);
83
55
 
84
 
  parent_class = g_type_class_peek_parent (klass);
85
 
 
86
56
  editor_class->activate_item = gimp_font_view_activate_item;
87
57
}
88
58
 
96
66
gimp_font_view_new (GimpViewType     view_type,
97
67
                    GimpContainer   *container,
98
68
                    GimpContext     *context,
99
 
                    gint             preview_size,
100
 
                    gint             preview_border_width,
 
69
                    gint             view_size,
 
70
                    gint             view_border_width,
101
71
                    GimpMenuFactory *menu_factory)
102
72
{
103
73
  GimpFontView        *font_view;
108
78
  if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (font_view),
109
79
                                         view_type,
110
80
                                         container,context,
111
 
                                         preview_size, preview_border_width,
 
81
                                         view_size, view_border_width,
112
82
                                         menu_factory, "<Fonts>",
113
83
                                         "/fonts-popup"))
114
84
    {
132
102
 
133
103
static void
134
104
gimp_font_view_activate_item (GimpContainerEditor *editor,
135
 
                                GimpViewable        *viewable)
 
105
                                GimpViewable        *viewable)
136
106
{
137
107
  if (GIMP_CONTAINER_EDITOR_CLASS (parent_class)->activate_item)
138
108
    GIMP_CONTAINER_EDITOR_CLASS (parent_class)->activate_item (editor, viewable);