Add gtk_assistant_remove_page

This was suspiciously missing, considering we have the usual
append/prepend/insert_page methods.
This commit is contained in:
Matthias Clasen 2011-07-11 21:46:38 -04:00
parent ad9da2727d
commit 86fcb8b66f
4 changed files with 28 additions and 0 deletions

View File

@ -354,6 +354,7 @@ gtk_assistant_get_nth_page
gtk_assistant_prepend_page
gtk_assistant_append_page
gtk_assistant_insert_page
gtk_assistant_remove_page
GtkAssistantPageFunc
gtk_assistant_set_forward_page_func
GtkAssistantPageType

View File

@ -244,6 +244,7 @@ gtk_assistant_page_type_get_type
gtk_assistant_prepend_page
gtk_assistant_previous_page
gtk_assistant_remove_action_widget
gtk_assistant_remove_page
gtk_assistant_set_current_page
gtk_assistant_set_forward_page_func
gtk_assistant_set_page_complete

View File

@ -1648,6 +1648,30 @@ gtk_assistant_insert_page (GtkAssistant *assistant,
return position;
}
/**
* gtk_assistant_remove_page:
* @assistant: a #GtkAssistant
* @page_num: the index of a page in the @assistant,
* or -1 to get the last page
*
* Removes the @page_num's page from @assistant.
*
* Since: 3.2
*/
void
gtk_assistant_remove_page (GtkAssistant *assistant,
gint page_num)
{
GtkWidget *page;
g_return_if_fail (GTK_IS_ASSISTANT (assistant));
page = gtk_assistant_get_nth_page (assistant, page_num);
if (page)
gtk_assistant_remove (assistant, page);
}
/**
* gtk_assistant_set_forward_page_func:
* @assistant: a #GtkAssistant

View File

@ -139,6 +139,8 @@ gint gtk_assistant_append_page (GtkAssistant
gint gtk_assistant_insert_page (GtkAssistant *assistant,
GtkWidget *page,
gint position);
void gtk_asssistant_remove_page (GtkAssistant *assistant,
gint page_num);
void gtk_assistant_set_forward_page_func (GtkAssistant *assistant,
GtkAssistantPageFunc page_func,
gpointer data,