gimp r28018 - in branches/gimp-2-6: . app/widgets
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r28018 - in branches/gimp-2-6: . app/widgets
- Date: Thu, 12 Feb 2009 20:36:18 +0000 (UTC)
Author: mitch
Date: Thu Feb 12 20:36:18 2009
New Revision: 28018
URL: http://svn.gnome.org/viewvc/gimp?rev=28018&view=rev
Log:
2009-02-12 Michael Natterer <mitch gimp org>
Merged from trunk:
Bug 567840 â GIMP's GtkScaleButton conflicts with GTK's
* app/widgets/gtkscalebutton.c: rename the type to
"GimpGtkScaleButton" so we don't crash if the real
GtkScaleButton type is registered too.
Modified:
branches/gimp-2-6/ChangeLog
branches/gimp-2-6/app/widgets/gtkscalebutton.c
Modified: branches/gimp-2-6/app/widgets/gtkscalebutton.c
==============================================================================
--- branches/gimp-2-6/app/widgets/gtkscalebutton.c (original)
+++ branches/gimp-2-6/app/widgets/gtkscalebutton.c Thu Feb 12 20:36:18 2009
@@ -159,7 +159,38 @@
static guint signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (GtkScaleButton, gimp_gtk_scale_button, GTK_TYPE_BUTTON)
+static void gimp_gtk_scale_button_class_init (GtkScaleButtonClass *klass);
+static void gimp_gtk_scale_button_init (GtkScaleButton *button);
+
+static gpointer gimp_gtk_scale_button_parent_class = NULL;
+
+GType
+gimp_gtk_scale_button_get_type (void)
+{
+ static GType type = 0;
+
+ if (! type)
+ {
+ const GTypeInfo info =
+ {
+ sizeof (GtkScaleButtonClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) gimp_gtk_scale_button_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (GtkScaleButton),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) gimp_gtk_scale_button_init,
+ };
+
+ type = g_type_register_static (GTK_TYPE_BUTTON,
+ "GimpGtkScaleButton",
+ &info, 0);
+ }
+
+ return type;
+}
static guint
gimp_gtk_binding_signal_new (const gchar *signal_name,
@@ -197,6 +228,8 @@
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GtkBindingSet *binding_set;
+ gimp_gtk_scale_button_parent_class = g_type_class_peek_parent (klass);
+
g_type_class_add_private (klass, sizeof (GtkScaleButtonPrivate));
gobject_class->constructor = gtk_scale_button_constructor;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]