[glade3] * gladeui/glade-project.c: Applying Marco Diego Aurélio Mesquita's patch to make the project pr
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade3] * gladeui/glade-project.c: Applying Marco Diego Aurélio Mesquita's patch to make the project pr
- Date: Mon, 20 Dec 2010 08:20:52 +0000 (UTC)
commit 2603c2ed2baefcb33b60634fc12218c8488293ab
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Mon Dec 20 17:13:52 2010 +0900
* gladeui/glade-project.c: Applying Marco Diego Aurélio Mesquita's patch to
make the project preview only preview toplevels.
ChangeLog | 3 +++
gladeui/glade-project.c | 9 ++++++---
2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4b6e888..517146a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@
Glade to crash when freeing the block with g_slice_free (bug 637563). Many
big thanks to Benjamin Otte for tracking down the problem.
+ * gladeui/glade-project.c: Applying Marco Diego Aurélio Mesquita's patch to
+ make the project preview only preview toplevels.
+
2010-12-19 Tristan Van Berkom <tristanvb openismus com>
* plugins/gtk+/glade-gtk.c: Fix alpha_sort_box_children() to give a consistent
diff --git a/gladeui/glade-project.c b/gladeui/glade-project.c
index 96dd4c6..92593b1 100644
--- a/gladeui/glade-project.c
+++ b/gladeui/glade-project.c
@@ -1931,18 +1931,21 @@ glade_project_preview (GladeProject *project, GladeWidget *gwidget)
{
GladeXmlContext *context;
gchar *text;
- GtkWidget *widget = GTK_WIDGET (gwidget->object);
+ GtkWidget *widget;
- g_return_if_fail (GTK_WIDGET (widget));
g_return_if_fail (GLADE_IS_PROJECT (project));
context = glade_project_write (project);
text = glade_xml_dump_from_context (context);
+ gwidget = glade_widget_get_toplevel (gwidget);
+ if (!GTK_IS_WIDGET (gwidget->object)) return;
+ widget = GTK_WIDGET (gwidget->object);
+
glade_project_launch_preview (project, text, widget);
- g_free(text);
+ g_free (text);
}
/*******************************************************************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]