Hi,

I've been able to embed the design window by using a hack that involves
removing the top level flag and making some other changes.

It almost works out of the box, but it crashes when clicking on a
widget. The attached patch fixes the crash.

Lluis.

El lun, 05-12-2005 a las 17:53 -0500, Tristan Van Berkom escribió:
> Lluis Sanchez wrote:
> > Hi,
> > 
> > Right now it is possible to embed the property editor, the widget
> > palette and the project view into any GTK container. However, it is not
> > possible to do the same with the windows being designed, which keep
> > floating as top level windows.
> > 
> > I'm wondering if you are planning support for embedding the design
> > windows as well. In IDEs it is usual to show the window being designed
> > in a tab, together with the corresponding source code.
> > 
> > So, any plans for this?
> 
>      No solid plans for that in the making, it would be nice
> if you could arrange the glade-3 UI in whatever way is
> comfortable for the user... Maybe we could have a setup
> where each project is viewed in a seperate tab...
> 
> I just wonder how to achieve this with GTK+ (I'm thinking
> of how QT Designer allows you to drag your toplevels inside
> a desktop inside a notebook tab :-/ )
> 
> I dont have any objections, just other priorities to focus
> on, sooo... if someone feels like looking into that ...
> 
> Cheers,
>                             -Tristan
? top.diff
Index: src/glade-widget.c
===================================================================
RCS file: /cvs/gnome/glade3/src/glade-widget.c,v
retrieving revision 1.149
diff -u -r1.149 glade-widget.c
--- src/glade-widget.c	9 Dec 2005 03:49:52 -0000	1.149
+++ src/glade-widget.c	14 Dec 2005 16:54:04 -0000
@@ -1773,12 +1773,16 @@
 glade_widget_retrieve_from_position (GtkWidget *base, int x, int y)
 {
 	GtkWidget *toplevel_widget;
+	GtkWidget *next_widget;
 	gint top_x;
 	gint top_y;
 	
-	toplevel_widget = gtk_widget_get_toplevel (base);
-	if (!GTK_WIDGET_TOPLEVEL (toplevel_widget))
-		return NULL;
+	next_widget = base;
+	toplevel_widget = base;
+	while (next_widget && glade_widget_get_from_gobject (next_widget)) {
+		toplevel_widget = next_widget;
+		next_widget = gtk_widget_get_parent (next_widget);
+	}
 
 	gtk_widget_translate_coordinates (base, toplevel_widget, x, y, &top_x, &top_y);
 	return glade_widget_find_deepest_child_at_position
_______________________________________________
Glade-devel maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/glade-devel

Reply via email to