Index: glade3/ChangeLog
===================================================================
RCS file: /cvs/gnome/glade3/ChangeLog,v
retrieving revision 1.313
diff -u -p -r1.313 ChangeLog
--- glade3/ChangeLog	28 Oct 2004 18:35:30 -0000	1.313
+++ glade3/ChangeLog	1 Nov 2004 12:57:59 -0000
@@ -1,3 +1,12 @@
+2004-11-01 Shane Butler <shane_b@users.sourceforge.net>
+
+	* src/glade-gtk.c (glade_gtk_notebook_get_tab_label_text, 
+	glade_gtk_notebook_set_tab_label_text): New functions to handle setting the tab label text on the GtkNotebook child widget.
+	(glade_gtk_notebook_replace_child): Make it so the label is handled correctly and the correct notebook page is still selected.
+	* widgets/gtknotebook.xml: Updated with tab label hook functions.
+	* src/glade-widget.c: Choose the mapped widget rather than just the last child widget in the list.
+	* src/main.c (glade_init): Spelling mistake reported by Andrew Burton <adb@iinet.net.au>.
+
 2004-10-28  Tristan Van Berkom  <tristan.van.berkom@gmail.com>
 
 	* src/glade-editor.[ch]: Implemented glade_editor_query_popup(), also obsoleted
Index: glade3/src/glade-gtk.c
===================================================================
RCS file: /cvs/gnome/glade3/src/glade-gtk.c,v
retrieving revision 1.57
diff -u -p -r1.57 glade-gtk.c
--- glade3/src/glade-gtk.c	28 Oct 2004 18:35:30 -0000	1.57
+++ glade3/src/glade-gtk.c	1 Nov 2004 12:58:02 -0000
@@ -137,7 +137,7 @@ glade_gtk_widget_condition (GladeWidgetC
 }
 
 /**
- * glade_gtk-widget_set_tooltip:
+ * glade_gtk_widget_set_tooltip:
  * @object:
  * @value:
  *
@@ -160,7 +160,7 @@ glade_gtk_widget_set_tooltip (GObject *o
 }
 
 /**
- * glade_gtk-widget_get_tooltip:
+ * glade_gtk_widget_get_tooltip:
  * @object:
  * @value:
  *
@@ -511,6 +511,52 @@ glade_gtk_notebook_set_n_pages (GObject 
 	}
 }
 
+/**
+ * glade_gtk_notebook_get_tab_label_text:
+ * @object: A GtkWidget which is a page on the notebook.
+ * @value: The label text is returned as a GValue.
+ *
+ * Gets the tab label text of a GtkNotebook child widget.
+ */
+void GLADEGTK_API
+glade_gtk_notebook_get_tab_label_text (GObject *object, GValue *value)
+{
+	GtkNotebook *notebook;
+	GtkWidget *child;
+
+	g_value_reset (value);
+	child = GTK_WIDGET (object);
+	g_return_if_fail (GTK_IS_WIDGET (child));
+	notebook = GTK_NOTEBOOK (gtk_widget_get_parent (child));
+	g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
+
+	g_value_set_string (value, 
+		gtk_notebook_get_tab_label_text (notebook, child));
+}
+
+/**
+ * glade_gtk_notebook_set_tab_label_text:
+ * @object: A GtkWidget which is a page on the notebook.
+ * @value: The new label text to be set.
+ *
+ * Sets the tab label text of a GtkNotebook child widget.
+ */
+void GLADEGTK_API
+glade_gtk_notebook_set_tab_label_text (GObject *object, GValue *value)
+{
+	GtkNotebook *notebook;
+	GtkWidget *child;
+	gchar *label_text;
+
+	child = GTK_WIDGET (object);
+	g_return_if_fail (GTK_IS_WIDGET (child));
+	notebook = GTK_NOTEBOOK (gtk_widget_get_parent (child));
+	g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
+
+	label_text = g_value_get_string (value);
+	gtk_notebook_set_tab_label_text (notebook, child, 
+		g_value_get_string (value));
+}
 
 static gboolean
 glade_gtk_table_has_child (GtkTable *table,
@@ -550,7 +596,7 @@ glade_gtk_table_widget_exceeds_bounds (G
 }
 
 /**
- * glade_gtk_notebook_set_n_common:
+ * glade_gtk_table_set_n_common:
  * @object:
  * @value:
  *
@@ -1137,12 +1183,14 @@ glade_gtk_notebook_replace_child (GtkWid
 
 	gtk_notebook_remove_page (notebook, page_num);
 	gtk_notebook_insert_page (notebook, new, label, page_num);
-	gtk_notebook_set_tab_label (notebook, new, label);
 
 	gtk_widget_unref (page);
 	if (label)
 		gtk_widget_unref (label);
 
+	/* There seems to be a GtkNotebook bug where if the page is
+	 * not shown first it will not set the current page */
+	gtk_widget_show (new);
 	gtk_notebook_set_current_page (notebook, page_num);
 }
 
Index: glade3/src/glade-widget.c
===================================================================
RCS file: /cvs/gnome/glade3/src/glade-widget.c,v
retrieving revision 1.119
diff -u -p -r1.119 glade-widget.c
--- glade3/src/glade-widget.c	28 Oct 2004 18:35:30 -0000	1.119
+++ glade3/src/glade-widget.c	1 Nov 2004 12:58:07 -0000
@@ -986,7 +986,7 @@ glade_widget_find_inside_container (GtkW
 
 	gtk_widget_translate_coordinates (data->toplevel, widget, data->x, data->y, &x, &y);
 	if (x >= 0 && x < widget->allocation.width && y >= 0 && y < widget->allocation.height &&
-	    (glade_widget_get_from_gtk_widget (widget)))
+	    (glade_widget_get_from_gtk_widget (widget)) && GTK_WIDGET_MAPPED(widget))
 		data->found = widget;
 }
 
Index: glade3/src/main.c
===================================================================
RCS file: /cvs/gnome/glade3/src/main.c,v
retrieving revision 1.30
diff -u -p -r1.30 main.c
--- glade3/src/main.c	25 Oct 2004 17:47:02 -0000	1.30
+++ glade3/src/main.c	1 Nov 2004 12:58:07 -0000
@@ -99,7 +99,7 @@ glade_init (void)
 
 	if (!g_module_supported ())
 	{
-		g_warning (_("gmodule support not found. gmodule support is requiered "
+		g_warning (_("gmodule support not found. gmodule support is required "
 			     "for glade to work"));
 		return FALSE;
 	}
Index: glade3/widgets/gtknotebook.xml
===================================================================
RCS file: /cvs/gnome/glade3/widgets/gtknotebook.xml,v
retrieving revision 1.12
diff -u -p -r1.12 gtknotebook.xml
--- glade3/widgets/gtknotebook.xml	28 Oct 2004 18:36:41 -0000	1.12
+++ glade3/widgets/gtknotebook.xml	1 Nov 2004 12:58:07 -0000
@@ -12,7 +12,7 @@
         <Parameter Key="Max" Value="100"/>
         <Parameter Key="StepIncrement" Value="1"/>
         <Parameter Key="PageIncrement" Value="1"/>
-        <Parameter Key="ClibmRate" Value="1"/>
+        <Parameter Key="ClimbRate" Value="1"/>
       </Parameters>
       <SetFunction>glade_gtk_notebook_set_n_pages</SetFunction>
       <GetFunction>glade_gtk_notebook_get_n_pages</GetFunction>
@@ -20,4 +20,13 @@
 
   </Properties>
 
+  <ChildProperties>
+    <Property Id="tab-label" Name="Tab Label Text" >
+      <Type>String</Type>
+      <Tooltip>The tab label text of this page widget</Tooltip>
+      <SetFunction>glade_gtk_notebook_set_tab_label_text</SetFunction>
+      <GetFunction>glade_gtk_notebook_get_tab_label_text</GetFunction>
+    </Property>
+  </ChildProperties>
+
 </GladeWidgetClass>
