diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2010-10-05 19:14:46 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2010-10-05 19:14:46 +0000 |
commit | 6173bb0e6c3bf51cd463f7bc4f725429d9087b2b (patch) | |
tree | de3e013699742960b97ee4a5eda240908d0ea8e6 /framebuffer | |
parent | 195c1ea3193f169c6825eca1fc6207e138126e98 (diff) | |
download | netsurf-6173bb0e6c3bf51cd463f7bc4f725429d9087b2b.tar.gz |
Merge treeview-redux to trunk
svn path=/trunk/netsurf/; revision=10865
Diffstat (limited to 'framebuffer')
-rw-r--r-- | framebuffer/history.c | 41 | ||||
-rw-r--r-- | framebuffer/hotlist.c | 23 | ||||
-rw-r--r-- | framebuffer/misc.c | 6 | ||||
-rw-r--r-- | framebuffer/tree.c | 83 |
4 files changed, 47 insertions, 106 deletions
diff --git a/framebuffer/history.c b/framebuffer/history.c deleted file mode 100644 index b0cf20495..000000000 --- a/framebuffer/history.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2008 Vincent Sanders <vince@simtec.co.uk> - * - * 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 "content/urldb.h" -#include "desktop/browser.h" - -void global_history_add(const char *url) -{ - const struct url_data *data; - - data = urldb_get_url_data(url); - if (!data) - return; - - -} - -void global_history_add_recent(const char *url) -{ -} - -char **global_history_get_recent(int *count) -{ - return NULL; -} - diff --git a/framebuffer/hotlist.c b/framebuffer/hotlist.c deleted file mode 100644 index 727200fe3..000000000 --- a/framebuffer/hotlist.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2008 Vincent Sanders <vince@simtec.co.uk> - * - * 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 "desktop/browser.h" - -void hotlist_visited(struct hlcache_handle *content) -{ -} diff --git a/framebuffer/misc.c b/framebuffer/misc.c index 889e3ec3f..ac15c5293 100644 --- a/framebuffer/misc.c +++ b/framebuffer/misc.c @@ -35,12 +35,6 @@ void die(const char *error) exit(1); } -bool cookies_update(const char *domain, const struct cookie_data *data) -{ - return true; -} - - /** * Return the filename part of a full path * diff --git a/framebuffer/tree.c b/framebuffer/tree.c index e5cb390b5..61e32e0a5 100644 --- a/framebuffer/tree.c +++ b/framebuffer/tree.c @@ -18,45 +18,56 @@ #include "desktop/tree.h" -void tree_initialise_redraw(struct tree *tree) -{ -} - -void tree_redraw_area(struct tree *tree, int x, int y, int width, int height) -{ -} - -void tree_draw_line(int x, int y, int width, int height) -{ -} - -void tree_draw_node_element(struct tree *tree, struct node_element *element) -{ -} - -void tree_draw_node_expansion(struct tree *tree, struct node *node) -{ -} +const char tree_directory_icon_name[] = "directory.png"; +const char tree_content_icon_name[] = "content.png"; -void tree_recalculate_node_element(struct node_element *element) -{ -} -void tree_update_URL_node(struct node *node, const char *url, - const struct url_data *data) -{ -} -void tree_resized(struct tree *tree) -{ -} -void tree_set_node_sprite_folder(struct node *node) -{ -} - -void tree_set_node_sprite(struct node *node, const char *sprite, - const char *expanded) +/** + * Translates a content_type to the name of a respective icon + * + * \param content_type content type + * \param buffer buffer for the icon name + */ +void tree_icon_name_from_content_type(char *buffer, content_type type) { + // TODO: design/acquire icons + switch (type) { + case CONTENT_HTML: + case CONTENT_TEXTPLAIN: + case CONTENT_CSS: +#if defined(WITH_MNG) || defined(WITH_PNG) + case CONTENT_PNG: +#endif +#ifdef WITH_MNG + case CONTENT_JNG: + case CONTENT_MNG: +#endif +#ifdef WITH_JPEG + case CONTENT_JPEG: +#endif +#ifdef WITH_GIF + case CONTENT_GIF: +#endif +#ifdef WITH_BMP + case CONTENT_BMP: + case CONTENT_ICO: +#endif +#ifdef WITH_SPRITE + case CONTENT_SPRITE: +#endif +#ifdef WITH_DRAW + case CONTENT_DRAW: +#endif +#ifdef WITH_ARTWORKS + case CONTENT_ARTWORKS: +#endif +#ifdef WITH_NS_SVG + case CONTENT_SVG: +#endif + default: + sprintf(buffer, tree_content_icon_name); + break; + } } - |