summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-09-02 22:41:04 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-09-02 22:41:04 +0100
commitcf8ffa412a55a8884fdd8f348b3fb28108d59b6c (patch)
treeff9a998daae20f16a3537d78bd141ea662863cf8 /desktop
parente9f65ff9cb60c94b43d4b875892918b90fb2a067 (diff)
downloadnetsurf-cf8ffa412a55a8884fdd8f348b3fb28108d59b6c.tar.gz
netsurf-cf8ffa412a55a8884fdd8f348b3fb28108d59b6c.tar.bz2
Remove old hotlist, cookies, and history_global_core modules.
New versions of expand/collapse node functions for these modules aren't yet implemented.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/Makefile8
-rw-r--r--desktop/browser.c2
-rw-r--r--desktop/cookie_manager.c1
-rw-r--r--desktop/cookie_manager.h4
-rw-r--r--desktop/cookies_old.c112
-rw-r--r--desktop/cookies_old.h41
-rw-r--r--desktop/global_history.c1
-rw-r--r--desktop/global_history.h4
-rw-r--r--desktop/history_global_core.c125
-rw-r--r--desktop/history_global_core.h40
-rw-r--r--desktop/hotlist.c3
-rw-r--r--desktop/hotlist.h4
-rw-r--r--desktop/hotlist_old.c209
-rw-r--r--desktop/hotlist_old.h50
-rw-r--r--desktop/sslcert_viewer.c1
-rw-r--r--desktop/sslcert_viewer.h4
16 files changed, 21 insertions, 588 deletions
diff --git a/desktop/Makefile b/desktop/Makefile
index 8dccc226b..f7020074e 100644
--- a/desktop/Makefile
+++ b/desktop/Makefile
@@ -1,9 +1,9 @@
# Sources for desktop
-S_DESKTOP := cookie_manager.c cookies_old.c history_global_core.c hotlist_old.c knockout.c \
- hotlist.c mouse.c plot_style.c print.c search.c searchweb.c \
- scrollbar.c sslcert_viewer.c textarea.c thumbnail.c tree.c \
- version.c system_colour.c global_history.c treeview.c
+S_DESKTOP := cookie_manager.c knockout.c hotlist.c mouse.c \
+ plot_style.c print.c search.c searchweb.c scrollbar.c \
+ sslcert_viewer.c textarea.c thumbnail.c tree.c version.c \
+ system_colour.c global_history.c treeview.c
S_DESKTOP := $(addprefix desktop/,$(S_DESKTOP))
diff --git a/desktop/browser.c b/desktop/browser.c
index de0373507..99994442e 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -47,9 +47,7 @@
#include "desktop/frames.h"
#include "desktop/global_history.h"
#include "desktop/gui.h"
-#include "desktop/history_global_core.h"
#include "desktop/hotlist.h"
-#include "desktop/hotlist_old.h"
#include "desktop/knockout.h"
#include "desktop/local_history.h"
#include "utils/nsoption.h"
diff --git a/desktop/cookie_manager.c b/desktop/cookie_manager.c
index 5f7f038d3..d9fd21cbf 100644
--- a/desktop/cookie_manager.c
+++ b/desktop/cookie_manager.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
#include "content/urldb.h"
-#include "desktop/browser.h"
#include "desktop/cookie_manager.h"
#include "desktop/treeview.h"
#include "utils/messages.h"
diff --git a/desktop/cookie_manager.h b/desktop/cookie_manager.h
index b84490726..4da85a895 100644
--- a/desktop/cookie_manager.h
+++ b/desktop/cookie_manager.h
@@ -24,8 +24,12 @@
#define _NETSURF_DESKTOP_COOKIE_MANAGER_H_
#include <stdbool.h>
+#include <stdint.h>
+#include "desktop/browser.h"
#include "desktop/core_window.h"
+#include "desktop/textinput.h"
+#include "utils/errors.h"
struct cookie_data;
diff --git a/desktop/cookies_old.c b/desktop/cookies_old.c
deleted file mode 100644
index 7981e910e..000000000
--- a/desktop/cookies_old.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright 2006 Richard Wilson <info@tinct.net>
- * Copyright 2009 Paul Blokus <paul_pl@users.sourceforge.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/** \file
- * Cookies (implementation).
- */
-
-#include <assert.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include "content/content.h"
-#include "content/hlcache.h"
-#include "content/urldb.h"
-#include "desktop/cookies_old.h"
-#include "utils/nsoption.h"
-#include "desktop/tree.h"
-#include "utils/log.h"
-#include "utils/messages.h"
-#include "utils/schedule.h"
-#include "utils/url.h"
-#include "utils/utils.h"
-
-/* Actions to be connected to front end specific toolbars */
-
-/**
- * Delete nodes which are currently selected.
- */
-void cookies_delete_selected(void)
-{
-}
-
-/**
- * Delete all nodes.
- */
-void cookies_delete_all(void)
-{
-}
-
-/**
- * Select all nodes in the tree.
- */
-void cookies_select_all(void)
-{
-}
-
-/**
- * Unselect all nodes.
- */
-void cookies_clear_selection(void)
-{
-}
-
-/**
- * Expand both domain and cookie nodes.
- */
-void cookies_expand_all(void)
-{
-}
-
-/**
- * Expand domain nodes only.
- */
-void cookies_expand_domains(void)
-{
-}
-
-/**
- * Expand cookie nodes only.
- */
-void cookies_expand_cookies(void)
-{
-}
-
-/**
- * Collapse both domain and cookie nodes.
- */
-void cookies_collapse_all(void)
-{
-}
-
-/**
- * Collapse domain nodes only.
- */
-void cookies_collapse_domains(void)
-{
-}
-
-/**
- * Collapse cookie nodes only.
- */
-void cookies_collapse_cookies(void)
-{
-}
diff --git a/desktop/cookies_old.h b/desktop/cookies_old.h
deleted file mode 100644
index dba5f1710..000000000
--- a/desktop/cookies_old.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2006 Richard Wilson <info@tinct.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/** \file
- * Cookies (interface).
- */
-
-#ifndef _NETSURF_DESKTOP_COOKIES_OLD_H_
-#define _NETSURF_DESKTOP_COOKIES_OLD_H_
-
-#include <stdbool.h>
-
-#include "desktop/tree.h"
-
-void cookies_delete_selected(void);
-void cookies_delete_all(void);
-void cookies_select_all(void);
-void cookies_clear_selection(void);
-void cookies_expand_all(void);
-void cookies_expand_domains(void);
-void cookies_expand_cookies(void);
-void cookies_collapse_all(void);
-void cookies_collapse_domains(void);
-void cookies_collapse_cookies(void);
-
-#endif
diff --git a/desktop/global_history.c b/desktop/global_history.c
index 2b384b1ef..d20eb37e1 100644
--- a/desktop/global_history.c
+++ b/desktop/global_history.c
@@ -20,7 +20,6 @@
#include <stdlib.h>
#include "content/urldb.h"
-#include "desktop/browser.h"
#include "desktop/global_history.h"
#include "desktop/treeview.h"
#include "utils/messages.h"
diff --git a/desktop/global_history.h b/desktop/global_history.h
index 6e5ff1ecc..a720d3016 100644
--- a/desktop/global_history.h
+++ b/desktop/global_history.h
@@ -20,8 +20,12 @@
#define _NETSURF_DESKTOP_GLOBAL_HISTORY_H_
#include <stdbool.h>
+#include <stdint.h>
+#include "desktop/browser.h"
#include "desktop/core_window.h"
+#include "desktop/textinput.h"
+#include "utils/errors.h"
#include "utils/nsurl.h"
diff --git a/desktop/history_global_core.c b/desktop/history_global_core.c
deleted file mode 100644
index 1f788adc3..000000000
--- a/desktop/history_global_core.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright 2005 Richard Wilson <info@tinct.net>
- * Copyright 2009 Paul Blokus <paul_pl@users.sourceforge.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include <stdlib.h>
-
-#include "content/content.h"
-#include "content/hlcache.h"
-#include "content/urldb.h"
-#include "desktop/browser.h"
-#include "desktop/history_global_core.h"
-#include "desktop/global_history.h"
-#include "desktop/plotters.h"
-#include "desktop/tree.h"
-#include "utils/messages.h"
-#include "utils/utils.h"
-#include "utils/log.h"
-
-
-/* Actions to be connected to front end specific toolbars */
-
-/**
- * Save the global history in a human-readable form under the given location.
- *
- * \param path the path where the history will be saved
- */
-bool history_global_export(const char *path)
-{
- return global_history_export(path, NULL) == NSERROR_OK;
-}
-
-/**
- * Delete nodes which are currently selected.
- */
-void history_global_delete_selected(void)
-{
-}
-
-/**
- * Delete all nodes.
- */
-void history_global_delete_all(void)
-{
-}
-
-/**
- * Select all nodes in the tree.
- */
-void history_global_select_all(void)
-{
-}
-
-/**
- * Unselect all nodes.
- */
-void history_global_clear_selection(void)
-{
-}
-
-/**
- * Expand grouping folders and history entries.
- */
-void history_global_expand_all(void)
-{
-}
-
-/**
- * Expand grouping folders only.
- */
-void history_global_expand_directories(void)
-{
-}
-
-/**
- * Expand history entries only.
- */
-void history_global_expand_addresses(void)
-{
-}
-
-/**
- * Collapse grouping folders and history entries.
- */
-void history_global_collapse_all(void)
-{
-}
-
-/**
- * Collapse grouping folders only.
- */
-void history_global_collapse_directories(void)
-{
-}
-
-/**
- * Collapse history entries only.
- */
-void history_global_collapse_addresses(void)
-{
-}
-
-/**
- * Open the selected entries in seperate browser windows.
- *
- * \param tabs open multiple entries in tabs in the new window
- */
-void history_global_launch_selected(bool tabs)
-{
-}
diff --git a/desktop/history_global_core.h b/desktop/history_global_core.h
deleted file mode 100644
index 29b3f09c9..000000000
--- a/desktop/history_global_core.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2005 Richard Wilson <info@tinct.net>
- * Copyright 2009 Paul Blokus <paul_pl@users.sourceforge.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef _NETSURF_DESKTOP_HISTORY_GLOBAL_H_
-#define _NETSURF_DESKTOP_HISTORY_GLOBAL_H_
-
-#include <stdbool.h>
-
-#include "desktop/tree.h"
-
-bool history_global_export(const char *path);
-void history_global_delete_selected(void);
-void history_global_delete_all(void);
-void history_global_select_all(void);
-void history_global_clear_selection(void);
-void history_global_expand_all(void);
-void history_global_expand_directories(void);
-void history_global_expand_addresses(void);
-void history_global_collapse_all(void);
-void history_global_collapse_directories(void);
-void history_global_collapse_addresses(void);
-void history_global_launch_selected(bool tabs);
-
-#endif
diff --git a/desktop/hotlist.c b/desktop/hotlist.c
index 683fdc4b1..ce9156308 100644
--- a/desktop/hotlist.c
+++ b/desktop/hotlist.c
@@ -24,7 +24,6 @@
#include <dom/bindings/hubbub/parser.h>
#include "content/urldb.h"
-#include "desktop/browser.h"
#include "desktop/hotlist.h"
#include "desktop/treeview.h"
#include "utils/corestrings.h"
@@ -1336,7 +1335,7 @@ nserror hotlist_add_entry(nsurl *url, const char *title, bool at_y, int y)
if (title != NULL) {
title = strdup(title);
if (title == NULL) {
- nsurl_ref(url);
+ nsurl_unref(url);
return NSERROR_NOMEM;
}
}
diff --git a/desktop/hotlist.h b/desktop/hotlist.h
index 171fdd723..d192eaa48 100644
--- a/desktop/hotlist.h
+++ b/desktop/hotlist.h
@@ -20,8 +20,12 @@
#define _NETSURF_DESKTOP_HOTLIST_H_
#include <stdbool.h>
+#include <stdint.h>
+#include "desktop/browser.h"
#include "desktop/core_window.h"
+#include "desktop/textinput.h"
+#include "utils/errors.h"
#include "utils/nsurl.h"
diff --git a/desktop/hotlist_old.c b/desktop/hotlist_old.c
deleted file mode 100644
index a2c094a16..000000000
--- a/desktop/hotlist_old.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright 2004, 2005 Richard Wilson <info@tinct.net>
- * Copyright 2009 Paul Blokus <paul_pl@users.sourceforge.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <ctype.h>
-#include <stdlib.h>
-
-#include "utils/nsoption.h"
-#include "content/content.h"
-#include "content/hlcache.h"
-#include "content/urldb.h"
-#include "desktop/browser.h"
-#include "desktop/hotlist.h"
-#include "desktop/hotlist_old.h"
-#include "desktop/plotters.h"
-#include "desktop/textinput.h"
-#include "desktop/tree.h"
-
-#include "utils/messages.h"
-#include "utils/utils.h"
-#include "utils/log.h"
-
-/**
- * Save the hotlist in a human-readable form under the given location.
- *
- * \param path the path where the hotlist will be saved
- */
-bool hotlist_old_export(const char *path)
-{
- nserror err;
- err = hotlist_export(path, NULL);
- return (err == NSERROR_OK);
-}
-
-/**
- * Edit the node which is currently selected. Works only if one node is
- * selected.
- */
-void hotlist_old_edit_selected(void)
-{
- /* Update new hotlist */
- hotlist_edit_selection();
-}
-
-/**
- * Delete nodes which are currently selected.
- */
-void hotlist_old_delete_selected(void)
-{
- hotlist_keypress(KEY_DELETE_LEFT);
-}
-
-/**
- * Select all nodes in the tree.
- */
-void hotlist_old_select_all(void)
-{
- hotlist_keypress(KEY_SELECT_ALL);
-}
-
-/**
- * Unselect all nodes.
- */
-void hotlist_old_clear_selection(void)
-{
- hotlist_keypress(KEY_CLEAR_SELECTION);
-}
-
-/**
- * Expand grouping folders and history entries.
- */
-void hotlist_old_expand_all(void)
-{
-}
-
-/**
- * Expand grouping folders only.
- */
-void hotlist_old_expand_directories(void)
-{
-}
-
-/**
- * Expand history entries only.
- */
-void hotlist_old_expand_addresses(void)
-{
-}
-
-/**
- * Collapse grouping folders and history entries.
- */
-void hotlist_old_collapse_all(void)
-{
-}
-
-/**
- * Collapse grouping folders only.
- */
-void hotlist_old_collapse_directories(void)
-{
-}
-
-/**
- * Collapse history entries only.
- */
-void hotlist_old_collapse_addresses(void)
-{
-}
-
-/**
- * Add a folder node.
- *
- * \param selected create the folder in the currently-selected node
- */
-void hotlist_old_add_folder(bool selected)
-{
- hotlist_add_folder(NULL, false, 0);
-}
-
-/**
- * Add an entry node.
- *
- * \param selected add the entry in the currently-selected node
- */
-void hotlist_old_add_entry(bool selected)
-{
- nsurl *url;
-
- if (nsurl_create("http://netsurf-browser.org/", &url) != NSERROR_OK)
- return;
-
- hotlist_add_entry(url, "New untitled entry", false, 0);
- nsurl_unref(url);
-}
-
-/**
- * Adds the currently viewed page to the hotlist
- */
-void hotlist_old_add_page(const char *url)
-{
- nsurl *nsurl;
-
- if (url == NULL)
- return;
-
- if (nsurl_create(url, &nsurl) != NSERROR_OK)
- return;
-
- /* Update new hotlist */
- hotlist_add_url(nsurl);
- nsurl_unref(nsurl);
-}
-
-/**
- * Adds the currently viewed page to the hotlist at the given co-ordinates
- * \param url url of the page
- * \param x X cooridinate with respect to tree origin
- * \param y Y cooridinate with respect to tree origin
- */
-void hotlist_old_add_page_xy(const char *url, int x, int y)
-{
- nsurl *nsurl;
-
- if (url == NULL)
- return;
-
- if (nsurl_create(url, &nsurl) != NSERROR_OK)
- return;
-
- /* Update new hotlist */
- hotlist_add_entry(nsurl, NULL, true, y);
- nsurl_unref(nsurl);
-}
-
-/**
- * Open the selected entries in separate browser windows.
- *
- * \param tabs open multiple entries in tabs in the new window
- */
-void hotlist_old_launch_selected(bool tabs)
-{
- hotlist_keypress(KEY_CR);
-}
-
-/**
- * Set the hotlist's default folder to the selected node.
- *
- * \param clear reset the default to tree root
- */
-bool hotlist_old_set_default_folder(bool clear)
-{
- return false;
-}
diff --git a/desktop/hotlist_old.h b/desktop/hotlist_old.h
deleted file mode 100644
index 9e88d847e..000000000
--- a/desktop/hotlist_old.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2004, 2005 Richard Wilson <info@tinct.net>
- * Copyright 2009 Paul Blokus <paul_pl@users.sourceforge.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-
-/** \file
- * Hotlist (interface).
- */
-
-#ifndef _NETSURF_DESKTOP_HOTLIST_OLD_H_
-#define _NETSURF_DESKTOP_HOTLIST_OLD_H_
-
-#include <stdbool.h>
-
-#include "desktop/tree.h"
-
-bool hotlist_old_export(const char *path);
-void hotlist_old_edit_selected(void);
-void hotlist_old_delete_selected(void);
-void hotlist_old_select_all(void);
-void hotlist_old_clear_selection(void);
-void hotlist_old_expand_all(void);
-void hotlist_old_expand_directories(void);
-void hotlist_old_expand_addresses(void);
-void hotlist_old_collapse_all(void);
-void hotlist_old_collapse_directories(void);
-void hotlist_old_collapse_addresses(void);
-void hotlist_old_add_folder(bool selected);
-void hotlist_old_add_entry(bool selected);
-void hotlist_old_add_page(const char *url);
-void hotlist_old_add_page_xy(const char *url, int x, int y);
-void hotlist_old_launch_selected(bool tabs);
-bool hotlist_old_set_default_folder(bool clear);
-#endif
diff --git a/desktop/sslcert_viewer.c b/desktop/sslcert_viewer.c
index 736237173..f1cfcca14 100644
--- a/desktop/sslcert_viewer.c
+++ b/desktop/sslcert_viewer.c
@@ -27,7 +27,6 @@
#include "content/fetch.h"
#include "content/urldb.h"
-#include "desktop/browser.h"
#include "desktop/sslcert_viewer.h"
#include "desktop/treeview.h"
#include "utils/messages.h"
diff --git a/desktop/sslcert_viewer.h b/desktop/sslcert_viewer.h
index c5bb5c049..002e919ff 100644
--- a/desktop/sslcert_viewer.h
+++ b/desktop/sslcert_viewer.h
@@ -22,8 +22,12 @@
#define _NETSURF_DESKTOP_SSLCERT_VIEWER_H_
#include <stdbool.h>
+#include <stdint.h>
+#include "desktop/browser.h"
#include "desktop/core_window.h"
+#include "desktop/textinput.h"
+#include "utils/errors.h"
struct sslcert_session_data;