[gtk+] gtktoolpalette: Only call gdk_atom_intern when we're constructed
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtktoolpalette: Only call gdk_atom_intern when we're constructed
- Date: Sat, 23 Mar 2013 21:07:45 +0000 (UTC)
commit 4f0e9cbf8190d55ef65deaa21be4b523807d1697
Author: Colin Walters <walters verbum org>
Date: Sat Mar 23 14:09:20 2013 -0400
gtktoolpalette: Only call gdk_atom_intern when we're constructed
Otherwise we end up trying to instantiate a display manager in
class_init which breaks introspection scanning.
https://bugzilla.gnome.org/show_bug.cgi?id=696457
gtk/gtktoolpalette.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c
index 3d9d7f3..a579053 100644
--- a/gtk/gtktoolpalette.c
+++ b/gtk/gtktoolpalette.c
@@ -216,6 +216,12 @@ gtk_tool_palette_init (GtkToolPalette *palette)
palette->priv->style_set = FALSE;
palette->priv->text_size_group = gtk_size_group_new (GTK_SIZE_GROUP_BOTH);
+
+ if (dnd_target_atom_item == GDK_NONE)
+ {
+ dnd_target_atom_item = gdk_atom_intern_static_string (dnd_targets[0].target);
+ dnd_target_atom_group = gdk_atom_intern_static_string (dnd_targets[1].target);
+ }
}
static void
@@ -1080,9 +1086,6 @@ gtk_tool_palette_class_init (GtkToolPaletteClass *cls)
GTK_PARAM_READWRITE));
g_type_class_add_private (cls, sizeof (GtkToolPalettePrivate));
-
- dnd_target_atom_item = gdk_atom_intern_static_string (dnd_targets[0].target);
- dnd_target_atom_group = gdk_atom_intern_static_string (dnd_targets[1].target);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]