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

« back to all changes in this revision

Viewing changes to libgimpwidgets/gimpcolorhexentry.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:
49
49
};
50
50
 
51
51
 
52
 
static void      gimp_color_hex_entry_class_init (GimpColorHexEntryClass *klass);
53
 
static void      gimp_color_hex_entry_init       (GimpColorHexEntry  *entry);
54
52
static gboolean  gimp_color_hex_entry_events     (GtkWidget          *widget,
55
53
                                                  GdkEvent           *event);
56
54
 
60
58
                                                  GimpColorHexEntry  *entry);
61
59
 
62
60
 
63
 
static guint  entry_signals[LAST_SIGNAL] = { 0 };
64
 
 
65
 
 
66
 
GType
67
 
gimp_color_hex_entry_get_type (void)
68
 
{
69
 
  static GType entry_type = 0;
70
 
 
71
 
  if (! entry_type)
72
 
    {
73
 
      static const GTypeInfo entry_info =
74
 
      {
75
 
        sizeof (GimpColorHexEntryClass),
76
 
        (GBaseInitFunc) NULL,
77
 
        (GBaseFinalizeFunc) NULL,
78
 
        (GClassInitFunc) gimp_color_hex_entry_class_init,
79
 
        NULL,           /* class_finalize */
80
 
        NULL,           /* class_data     */
81
 
        sizeof (GimpColorHexEntry),
82
 
        0,              /* n_preallocs    */
83
 
        (GInstanceInitFunc) gimp_color_hex_entry_init,
84
 
      };
85
 
 
86
 
      entry_type = g_type_register_static (GTK_TYPE_ENTRY,
87
 
                                           "GimpColorHexEntry",
88
 
                                           &entry_info, 0);
89
 
    }
90
 
 
91
 
  return entry_type;
92
 
}
 
61
G_DEFINE_TYPE (GimpColorHexEntry, gimp_color_hex_entry, GTK_TYPE_ENTRY)
 
62
 
 
63
#define parent_class gimp_color_hex_entry_parent_class
 
64
 
 
65
static guint entry_signals[LAST_SIGNAL] = { 0 };
 
66
 
93
67
 
94
68
static void
95
69
gimp_color_hex_entry_class_init (GimpColorHexEntryClass *klass)
96
70
{
97
71
  entry_signals[COLOR_CHANGED] =
98
 
    g_signal_new ("color_changed",
 
72
    g_signal_new ("color-changed",
99
73
                  G_TYPE_FROM_CLASS (klass),
100
74
                  G_SIGNAL_RUN_FIRST,
101
75
                  G_STRUCT_OFFSET (GimpColorHexEntryClass, color_changed),
155
129
 
156
130
  gtk_entry_set_text (GTK_ENTRY (entry), "000000");
157
131
 
158
 
  g_signal_connect (entry, "focus_out_event",
 
132
  g_signal_connect (entry, "focus-out-event",
159
133
                    G_CALLBACK (gimp_color_hex_entry_events),
160
134
                    NULL);
161
 
  g_signal_connect (entry, "key_press_event",
 
135
  g_signal_connect (entry, "key-press-event",
162
136
                    G_CALLBACK (gimp_color_hex_entry_events),
163
137
                    NULL);
164
138
 
165
 
  g_signal_connect (completion, "match_selected",
 
139
  g_signal_connect (completion, "match-selected",
166
140
                    G_CALLBACK (gimp_color_hex_entry_matched),
167
141
                    entry);
168
142
}
186
160
 * @color: pointer to a #GimpRGB
187
161
 *
188
162
 * Sets the color displayed by a #GimpColorHexEntry. If the new color
189
 
 * is different to the previously set color, the "color_changed"
 
163
 * is different to the previously set color, the "color-changed"
190
164
 * signal is emitted.
191
165
 *
192
166
 * Since: GIMP 2.2