[gnome-initial-setup] gis-assistant: Allow a way to destroy all pages
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] gis-assistant: Allow a way to destroy all pages
- Date: Tue, 21 Aug 2012 19:37:31 +0000 (UTC)
commit a960cf55f66f89a20b3fcc26ff51f348d39cae41
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Aug 21 15:06:05 2012 -0400
gis-assistant: Allow a way to destroy all pages
gnome-initial-setup/gis-assistant.c | 20 ++++++++++++++++++++
gnome-initial-setup/gis-assistant.h | 1 +
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/gnome-initial-setup/gis-assistant.c b/gnome-initial-setup/gis-assistant.c
index cae83be..166ebc0 100644
--- a/gnome-initial-setup/gis-assistant.c
+++ b/gnome-initial-setup/gis-assistant.c
@@ -210,6 +210,26 @@ gis_assistant_add_page (GisAssistant *assistant,
update_navigation_buttons (assistant, priv->current_page->widget);
}
+void
+gis_assistant_destroy_all_pages (GisAssistant *assistant)
+{
+ GisAssistantPrivate *priv = assistant->priv;
+ GList *l, *next;
+
+ g_object_freeze_notify (G_OBJECT (assistant));
+
+ for (l = priv->pages; l != NULL; l = next)
+ {
+ PageData *page_data = l->data;
+ next = l->next;
+ gtk_widget_destroy (page_data->widget);
+ }
+
+ g_object_thaw_notify (G_OBJECT (assistant));
+
+ g_assert (priv->pages == NULL);
+}
+
static void
go_forward (GtkWidget *button,
GisAssistant *assistant)
diff --git a/gnome-initial-setup/gis-assistant.h b/gnome-initial-setup/gis-assistant.h
index c2695fb..e364313 100644
--- a/gnome-initial-setup/gis-assistant.h
+++ b/gnome-initial-setup/gis-assistant.h
@@ -43,6 +43,7 @@ void gis_assistant_add_page (GisAssistant *assistant,
void gis_assistant_next_page (GisAssistant *assistant);
void gis_assistant_previous_page (GisAssistant *assistant);
+void gis_assistant_destroy_all_pages (GisAssistant *assistant);
void gis_assistant_set_page_complete (GisAssistant *assistant,
GtkWidget *page,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]