[PATCH] GtkAssistant, GtkFrame, GtkExpander

Antti Kaijanmäki <[email protected]>
Newsgroups gmane.comp.gnome.glade.devel
Message-ID <[email protected]>
Hi,

I just wanted to send these patches. I'm not sure if they are correct as
I haven't dug very deep inside glade, but these have helped me get on
with my project[1].


fix_gtk_assistant_navigation_after_load.patch:

* GtkAssistant can't be navigated after a project is loaded from file.


fix_gtk_frame_label_child_type.patch,
fix_gtk_expander_label_child_type.patch: 

* child types are wrong[2][3] causing GtkBuilder to segfault.


best regards,
Antti Kaijanmäki

[1] http://www.kaijanmaki.net/blog
[2] http://library.gnome.org/devel/gtk/stable/GtkFrame.html
[3] http://library.gnome.org/devel/gtk/stable/GtkExpander.html

_______________________________________________
Glade-devel maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/glade-devel
fix_gtk_assistant_navigation_after_load.patch (text/x-patch, 522 B)
Index: plugins/gtk+/glade-gtk.c
===================================================================
--- plugins/gtk+/glade-gtk.c	(revision 1832)
+++ plugins/gtk+/glade-gtk.c	(working copy)
@@ -7308,6 +7308,9 @@
 	
 	if (pages)
 	{
+		/* also sets pages "complete" and thus allows navigation under glade */
+		glade_gtk_assistant_update_page_type (assistant);
+		
 		gtk_assistant_set_current_page (assistant, 0);
 		glade_widget_property_set (glade_widget_get_from_gobject (object),
 					   "size", pages);
fix_gtk_expander_label_child_type.patch (text/x-patch, 1.7 KB)
Index: plugins/gtk+/glade-gtk.c
===================================================================
--- plugins/gtk+/glade-gtk.c	(revision 1832)
+++ plugins/gtk+/glade-gtk.c	(working copy)
@@ -4180,7 +4180,7 @@
 		
 		glade_widget_property_set (glabel, "label", "expander");
 
-		g_object_set_data (glabel->object, "special-child-type", "label_item");
+		g_object_set_data (glabel->object, "special-child-type", "label");
 		gtk_expander_set_label_widget (GTK_EXPANDER (expander), 
 					       GTK_WIDGET (glabel->object));
 
@@ -4204,9 +4204,9 @@
 	special_child_type =
 		g_object_get_data (G_OBJECT (current), "special-child-type");
 
-	if (special_child_type && !strcmp (special_child_type, "label_item"))
+	if (special_child_type && !strcmp (special_child_type, "label"))
 	{
-		g_object_set_data (G_OBJECT (new_widget), "special-child-type", "label_item");
+		g_object_set_data (G_OBJECT (new_widget), "special-child-type", "label");
 		gtk_expander_set_label_widget (GTK_EXPANDER (container), new_widget);
 		return;
 	}
@@ -4230,7 +4230,7 @@
 	special_child_type = g_object_get_data (child, "special-child-type");
 	
 	if (special_child_type &&
-	    !strcmp (special_child_type, "label_item"))
+	    !strcmp (special_child_type, "label"))
 	{
 		gtk_expander_set_label_widget (GTK_EXPANDER (object),
 					       GTK_WIDGET (child));
@@ -4249,7 +4249,7 @@
 
 	special_child_type = g_object_get_data (child, "special-child-type");
 	if (special_child_type &&
-	    !strcmp (special_child_type, "label_item"))
+	    !strcmp (special_child_type, "label"))
 	{
 		gtk_expander_set_label_widget (GTK_EXPANDER (object),
 					       glade_placeholder_new ());
fix_gtk_frame_label_child_type.patch (text/x-patch, 1.4 KB)
Index: plugins/gtk+/glade-gtk.c
===================================================================
--- plugins/gtk+/glade-gtk.c	(revision 1832)
+++ plugins/gtk+/glade-gtk.c	(working copy)
@@ -3098,7 +3098,7 @@
 		glade_widget_property_set (glabel, "label", label_text);
 		glade_widget_property_set (glabel, "use-markup", "TRUE");
 
-		g_object_set_data (glabel->object, "special-child-type", "label_item");
+		g_object_set_data (glabel->object, "special-child-type", "label");
 		gtk_frame_set_label_widget (GTK_FRAME (frame), GTK_WIDGET (glabel->object));
 		gtk_widget_show (GTK_WIDGET (glabel->object));
 		g_free (label_text);
@@ -3129,9 +3129,9 @@
 	special_child_type =
 		g_object_get_data (G_OBJECT (current), "special-child-type");
 
-	if (special_child_type && !strcmp (special_child_type, "label_item"))
+	if (special_child_type && !strcmp (special_child_type, "label"))
 	{
-		g_object_set_data (G_OBJECT (new_widget), "special-child-type", "label_item");
+		g_object_set_data (G_OBJECT (new_widget), "special-child-type", "label");
 		gtk_frame_set_label_widget (GTK_FRAME (container), new_widget);
 		return;
 	}
@@ -3154,7 +3154,7 @@
 	special_child_type = g_object_get_data (child, "special-child-type");
 
 	if (special_child_type &&
-	    !strcmp (special_child_type, "label_item"))
+	    !strcmp (special_child_type, "label"))
 	{
 		gtk_frame_set_label_widget (GTK_FRAME (object),
 					    GTK_WIDGET (child));
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBIRXHCxyyCWWVycu8RAs6eAJ9FFCDMB5n2eSNNL/sgMuypIa/FUQCdG+c7
trE2jWSDgWjw5kXi/9UALX4=
=F2O7
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.