Add a more complex widget in the flipping assistant

This reproduces the problem from bug
https://bugzilla.gnome.org/show_bug.cgi?id=756385
This commit is contained in:
Sébastien Granjoux 2015-10-26 21:52:34 +01:00 committed by Matthias Clasen
parent a0a78a8973
commit ffaaa1e66e
2 changed files with 8 additions and 4 deletions

View File

@ -1134,7 +1134,6 @@ assistant_remove_page_cb (GtkContainer *container,
return; return;
page_info = element->data; page_info = element->data;
g_print ("remove page cb: %s\n", page_info->title);
/* If this is the current page, we need to switch away. */ /* If this is the current page, we need to switch away. */
if (page_info == priv->current_page) if (page_info == priv->current_page)

View File

@ -607,7 +607,7 @@ flip_pages (GtkButton *button, GtkAssistant *assistant)
gtk_assistant_remove_page (assistant, 1); gtk_assistant_remove_page (assistant, 1);
gtk_assistant_insert_page (assistant, page, 2); gtk_assistant_insert_page (assistant, page, 2);
gtk_widget_show (page); gtk_widget_show_all (page);
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), page, title); gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), page, title);
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), page, TRUE); gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), page, TRUE);
@ -650,8 +650,13 @@ create_page_flipping_assistant (GtkWidget *widget)
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), page, "Page 1"); gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), page, "Page 1");
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), page, TRUE); gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), page, TRUE);
page = get_test_page ("Page 2"); page = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show (page); gtk_box_pack_start (GTK_BOX (page),
get_test_page ("Page 2"),
TRUE,
TRUE,
0);
gtk_widget_show_all (page);
gtk_assistant_append_page (GTK_ASSISTANT (assistant), page); gtk_assistant_append_page (GTK_ASSISTANT (assistant), page);
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), page, "Page 2"); gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), page, "Page 2");
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), page, TRUE); gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), page, TRUE);