[gnome-initial-setup] gis-assistant: Make sure to delete the link from the list
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] gis-assistant: Make sure to delete the link from the list
- Date: Tue, 21 Aug 2012 19:37:16 +0000 (UTC)
commit 5376133a510e2b59e2753ee01fd148de4f213b67
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Aug 21 14:55:53 2012 -0400
gis-assistant: Make sure to delete the link from the list
gnome-initial-setup/gis-assistant.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gnome-initial-setup/gis-assistant.c b/gnome-initial-setup/gis-assistant.c
index 0d5a7e0..d3adb8e 100644
--- a/gnome-initial-setup/gis-assistant.c
+++ b/gnome-initial-setup/gis-assistant.c
@@ -66,6 +66,8 @@ struct _GisAssistantPrivate
struct _PageData
{
+ GisAssistant *assistant;
+
GtkWidget *widget;
gboolean page_complete : 1;
gboolean use_unicode_buttons : 1;
@@ -84,15 +86,19 @@ get_page_data_for_page (GtkWidget *page)
static void
free_page_data (PageData *page_data)
{
+ GisAssistantPrivate *priv = page_data->assistant->priv;
+ priv->pages = g_list_delete_link (priv->pages, page_data->link);
g_free (page_data->title);
g_slice_free (PageData, page_data);
}
static PageData *
-create_page_data_for_page (GtkWidget *page)
+create_page_data_for_page (GisAssistant *assistant,
+ GtkWidget *page)
{
PageData *page_data = g_slice_new0 (PageData);
page_data->widget = page;
+ page_data->assistant = assistant;
g_object_set_data_full (G_OBJECT (page), "gis-assistant-page-data",
page_data, (GDestroyNotify) free_page_data);
@@ -164,7 +170,7 @@ gis_assistant_add_page (GisAssistant *assistant,
GtkWidget *page)
{
GisAssistantPrivate *priv = assistant->priv;
- PageData *page_data = create_page_data_for_page (page);
+ PageData *page_data = create_page_data_for_page (assistant, page);
priv->pages = g_list_append (priv->pages, page_data);
page_data->link = g_list_last (priv->pages);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]