summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/glade-palette.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8542e29d..689ca888 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-20 Tristan Van Berkom <tvb@gnome.org>
+
+ * src/glade-palette.c: Fixed to not stick on class->toplevel widget classes,
+ this avoids segfaults when trying to add toplevels to placeholders.
+
2006-08-18 Juan Pablo Ugarte <juanpablougarte@gmail.com>
* src/glade-widget-class.c: sort signals alphabetically in
diff --git a/src/glade-palette.c b/src/glade-palette.c
index e1848efa..e6c801c3 100644
--- a/src/glade-palette.c
+++ b/src/glade-palette.c
@@ -298,10 +298,13 @@ glade_palette_on_button_toggled (GtkWidget *button, GladePalette *palette)
{
GdkModifierType mask;
- priv->current_item_class = glade_palette_item_get_widget_class (GLADE_PALETTE_ITEM (button));
+ priv->current_item_class =
+ glade_palette_item_get_widget_class (GLADE_PALETTE_ITEM (button));
gdk_window_get_pointer (button->window, NULL, NULL, &mask);
- priv->locked = mask & GDK_CONTROL_MASK;
+
+ priv->locked =
+ (!priv->current_item_class->toplevel) && (mask & GDK_CONTROL_MASK);
}
g_signal_emit (G_OBJECT (palette), glade_palette_signals[TOGGLED], 0);