diff options
author | Sven Herzberg <herzi@gnome-de.org> | 2009-12-10 17:34:29 +0100 |
---|---|---|
committer | Sven Herzberg <herzi@gnome-de.org> | 2009-12-10 22:06:30 +0100 |
commit | 70440523e3d92fd6e1a228c176e4e700012b4ba0 (patch) | |
tree | 54bc913f7dfa2d70d17ad7d4901cb81b3ecf735c /tests | |
parent | 6879032113bf72aa28272fc198339b0d6c62388e (diff) | |
download | gtk+-70440523e3d92fd6e1a228c176e4e700012b4ba0.tar.gz |
let the close button reflect the page_complete status of SUMMARY pages
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=604289
In order to respect this properly, we have to restore the original
behavior by watching a flag to check if the user has already set this.
* gtk/gtkassistant.c: fix the bug by introducing a flag to check for
non-automatic value setting
* tests/testassistant.c: updated the "generous assistant" to permit
quick manual testing of this feature
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testassistant.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/testassistant.c b/tests/testassistant.c index 3eff2cdf5d..91774e3651 100644 --- a/tests/testassistant.c +++ b/tests/testassistant.c @@ -213,6 +213,7 @@ create_generous_assistant (GtkWidget *widget) if (!assistant) { GtkWidget *page, *next, *check; + PageData *pdata; assistant = gtk_assistant_new (); gtk_window_set_default_size (GTK_WINDOW (assistant), 400, 300); @@ -259,12 +260,21 @@ create_generous_assistant (GtkWidget *widget) gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), page, "Progress"); gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), page, GTK_ASSISTANT_PAGE_PROGRESS); - page = get_test_page ("Summary"); + page = gtk_check_button_new_with_label ("Summary complete"); gtk_widget_show (page); gtk_assistant_append_page (GTK_ASSISTANT (assistant), page); gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), page, "Summary"); gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), page, GTK_ASSISTANT_PAGE_SUMMARY); - gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), page, TRUE); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page), + gtk_assistant_get_page_complete (GTK_ASSISTANT (assistant), + page)); + + pdata = g_new (PageData, 1); + pdata->assistant = GTK_ASSISTANT (assistant); + pdata->page = page; + g_signal_connect (page, "toggled", + G_CALLBACK (complete_cb), pdata); } if (!GTK_WIDGET_VISIBLE (assistant)) |