Index: gtkassistant.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkassistant.c,v
retrieving revision 1.8
diff -u -r1.8 gtkassistant.c
--- gtkassistant.c	30 Jan 2006 15:51:54 -0000	1.8
+++ gtkassistant.c	31 Jan 2006 12:20:55 -0000
@@ -824,6 +824,18 @@
 }
 
 static void
+on_page_notify_visibility (GtkWidget  *widget,
+			   GParamSpec *arg,
+			   gpointer    data)
+{
+  GtkAssistant *assistant = GTK_ASSISTANT (data);
+
+  /* update buttons state, flow may have changed */
+  if (GTK_WIDGET_MAPPED (assistant))
+    _set_assistant_buttons_state (assistant);
+}
+
+static void
 remove_page (GtkAssistant *assistant, 
 	     GList        *element)
 {
@@ -837,8 +849,9 @@
     compute_next_step (assistant);
 
   priv->pages = g_list_remove_link (priv->pages, element);
-
   priv->visited_pages = g_slist_remove_all (priv->visited_pages, page_info);
+
+  g_signal_handlers_disconnect_by_func (page_info->page, on_page_notify_visibility, assistant);
   gtk_widget_unparent (page_info->page);
 
   if (page_info->header_image)
@@ -1610,6 +1623,9 @@
   page_info->page  = page;
   page_info->title = gtk_label_new (NULL);
 
+  g_signal_connect (G_OBJECT (page), "notify::visible",
+		    G_CALLBACK (on_page_notify_visibility), assistant);
+
   gtk_misc_set_alignment (GTK_MISC (page_info->title), 0.,0.5);
   set_title_colors (GTK_WIDGET (assistant), page_info->title);
   set_title_font   (GTK_WIDGET (assistant), page_info->title);
@@ -2118,6 +2134,22 @@
   page_info = (GtkAssistantPage*) child->data;
 
   return page_info->complete;
+}
+
+/**
+ * gtk_assistant_update_buttons_state:
+ * @assistant: a #GtkAssistant
+ * 
+ * Forces @assistant to recompute the buttons state, this is
+ * recommended when there has been a change in the current
+ * page that might cause the "last" button to change its state.
+ **/
+void
+gtk_assistant_update_buttons_state (GtkAssistant *assistant)
+{
+  g_return_if_fail (GTK_IS_ASSISTANT (assistant));
+
+  _set_assistant_buttons_state (assistant);
 }
 
 
Index: gtkassistant.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkassistant.h,v
retrieving revision 1.3
diff -u -r1.3 gtkassistant.h
--- gtkassistant.h	19 Jan 2006 16:51:21 -0000	1.3
+++ gtkassistant.h	31 Jan 2006 12:20:55 -0000
@@ -134,6 +134,8 @@
 void                  gtk_assistant_remove_action_widget  (GtkAssistant         *assistant,
 							   GtkWidget            *child);
 
+void                  gtk_assistant_update_buttons_state  (GtkAssistant *assistant);
+
 G_END_DECLS
 
 #endif /* __GTK_ASSISTANT_H__ */
