summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-09-08 19:04:45 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-09-08 19:04:45 +0100
commitf13a11e31fa6a4c3fd5966a61dbc82cf94a486b3 (patch)
tree11aa5015c8016d26fedab1b942b37896410495a4
parent683ff4d1b51eb46cea9889c04a89edf4ad564c5e (diff)
downloadnetsurf-f13a11e31fa6a4c3fd5966a61dbc82cf94a486b3.tar.gz
netsurf-f13a11e31fa6a4c3fd5966a61dbc82cf94a486b3.tar.bz2
Destroy treeviews.
-rw-r--r--riscos/cookies.c12
-rw-r--r--riscos/cookies.h1
-rw-r--r--riscos/global_history.c12
-rw-r--r--riscos/global_history.h1
-rw-r--r--riscos/gui.c3
-rw-r--r--riscos/hotlist.c13
-rw-r--r--riscos/hotlist.h1
7 files changed, 43 insertions, 0 deletions
diff --git a/riscos/cookies.c b/riscos/cookies.c
index 7f37de812..0a1529737 100644
--- a/riscos/cookies.c
+++ b/riscos/cookies.c
@@ -153,6 +153,18 @@ void ro_gui_cookies_postinitialise(void)
}
/**
+ * Destroy the cookies window.
+ */
+
+void ro_gui_cookies_destroy(void)
+{
+ if (cookies_window.tv == NULL)
+ return;
+
+ ro_treeview_destroy(cookies_window.tv);
+}
+
+/**
* Open the cookies window.
*
*/
diff --git a/riscos/cookies.h b/riscos/cookies.h
index e55ca0275..b7313393e 100644
--- a/riscos/cookies.h
+++ b/riscos/cookies.h
@@ -28,6 +28,7 @@
void ro_gui_cookies_preinitialise(void);
void ro_gui_cookies_postinitialise(void);
+void ro_gui_cookies_destroy(void);
bool ro_gui_cookies_check_window(wimp_w window);
bool ro_gui_cookies_check_menu(wimp_menu *menu);
diff --git a/riscos/global_history.c b/riscos/global_history.c
index dfabbe9cf..840271f93 100644
--- a/riscos/global_history.c
+++ b/riscos/global_history.c
@@ -160,6 +160,18 @@ void ro_gui_global_history_postinitialise(void)
}
/**
+ * Destroy the global history window.
+ */
+
+void ro_gui_global_history_destroy(void)
+{
+ if (global_history_window.tv == NULL)
+ return;
+
+ ro_treeview_destroy(global_history_window.tv);
+}
+
+/**
* Open the global history window.
*/
diff --git a/riscos/global_history.h b/riscos/global_history.h
index 99ea8c609..6f5ba11eb 100644
--- a/riscos/global_history.h
+++ b/riscos/global_history.h
@@ -28,6 +28,7 @@
void ro_gui_global_history_preinitialise(void);
void ro_gui_global_history_postinitialise(void);
+void ro_gui_global_history_destroy(void);
void ro_gui_global_history_open(void);
void ro_gui_global_history_save(void);
bool ro_gui_global_history_check_window(wimp_w window);
diff --git a/riscos/gui.c b/riscos/gui.c
index 69ec7e8a3..4ce5c8154 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -919,6 +919,9 @@ void gui_quit(void)
urldb_save_cookies(nsoption_charp(cookie_jar));
urldb_save(nsoption_charp(url_save));
ro_gui_window_quit();
+ ro_gui_global_history_destroy();
+ ro_gui_hotlist_destroy();
+ ro_gui_cookies_destroy();
ro_gui_saveas_quit();
rufl_quit();
free(gui_sprites);
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index d00e72479..9e86542b2 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -182,6 +182,19 @@ void ro_gui_hotlist_postinitialise(void)
ro_gui_hotlist_menu_warning);
}
+/**
+ * Destroy the hotlist window.
+ */
+
+void ro_gui_hotlist_destroy(void)
+{
+ if (hotlist_window.tv == NULL)
+ return;
+
+ tree_hotlist_path = nsoption_charp(hotlist_save);
+ ro_treeview_destroy(hotlist_window.tv);
+}
+
/**
* Open the hotlist window.
diff --git a/riscos/hotlist.h b/riscos/hotlist.h
index 55f8d648c..05ff08811 100644
--- a/riscos/hotlist.h
+++ b/riscos/hotlist.h
@@ -38,6 +38,7 @@
void ro_gui_hotlist_preinitialise(void);
void ro_gui_hotlist_postinitialise(void);
+void ro_gui_hotlist_destroy(void);
void ro_gui_hotlist_open(void);
void ro_gui_hotlist_save(void);
bool ro_gui_hotlist_check_window(wimp_w window);