[glade] Fixed bug when copying a button with custom content. Custom widget was being replaced with a placeho
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Fixed bug when copying a button with custom content. Custom widget was being replaced with a placeho
- Date: Mon, 16 Sep 2013 19:08:31 +0000 (UTC)
commit f5308942e755afa144057156fa022031f32681e2
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Mon Sep 16 15:40:55 2013 -0300
Fixed bug when copying a button with custom content.
Custom widget was being replaced with a placeholder when syncing
custom-child property.
plugins/gtk+/glade-gtk-button.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/plugins/gtk+/glade-gtk-button.c b/plugins/gtk+/glade-gtk-button.c
index 3c588df..ab6f985 100644
--- a/plugins/gtk+/glade-gtk-button.c
+++ b/plugins/gtk+/glade-gtk-button.c
@@ -186,8 +186,13 @@ glade_gtk_button_set_property (GladeWidgetAdaptor * adaptor,
if (strcmp (id, "custom-child") == 0)
{
GtkWidget *child = gtk_bin_get_child (GTK_BIN (object));
+ gboolean custom_child = g_value_get_boolean (value);
- if (g_value_get_boolean (value))
+ /* Avoid removing a child if we already have a custom child */
+ if (custom_child && (child && glade_widget_get_from_gobject (child)))
+ return;
+
+ if (custom_child)
{
if (child)
gtk_container_remove (GTK_CONTAINER (object), child);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]