gimp r28015 - in trunk: . app/widgets
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r28015 - in trunk: . app/widgets
- Date: Thu, 12 Feb 2009 18:20:45 +0000 (UTC)
Author: mitch
Date: Thu Feb 12 18:20:45 2009
New Revision: 28015
URL: http://svn.gnome.org/viewvc/gimp?rev=28015&view=rev
Log:
2009-02-12 Michael Natterer <mitch gimp org>
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:
trunk/ChangeLog
trunk/app/widgets/gtkscalebutton.c
Modified: trunk/app/widgets/gtkscalebutton.c
==============================================================================
--- trunk/app/widgets/gtkscalebutton.c (original)
+++ trunk/app/widgets/gtkscalebutton.c Thu Feb 12 18:20:45 2009
@@ -158,7 +158,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,
@@ -196,6 +227,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]