summaryrefslogtreecommitdiff
path: root/windows
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-10-05 19:14:46 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-10-05 19:14:46 +0000
commit6173bb0e6c3bf51cd463f7bc4f725429d9087b2b (patch)
treede3e013699742960b97ee4a5eda240908d0ea8e6 /windows
parent195c1ea3193f169c6825eca1fc6207e138126e98 (diff)
downloadnetsurf-6173bb0e6c3bf51cd463f7bc4f725429d9087b2b.tar.gz
netsurf-6173bb0e6c3bf51cd463f7bc4f725429d9087b2b.tar.bz2
Merge treeview-redux to trunk
svn path=/trunk/netsurf/; revision=10865
Diffstat (limited to 'windows')
-rw-r--r--windows/history.c41
-rw-r--r--windows/hotlist.c24
-rw-r--r--windows/tree.c83
3 files changed, 47 insertions, 101 deletions
diff --git a/windows/history.c b/windows/history.c
deleted file mode 100644
index b0cf20495..000000000
--- a/windows/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/windows/hotlist.c b/windows/hotlist.c
deleted file mode 100644
index dab18d11c..000000000
--- a/windows/hotlist.c
+++ /dev/null
@@ -1,24 +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"
-#include "content/hlcache.h"
-
-void hotlist_visited(hlcache_handle *content)
-{
-}
diff --git a/windows/tree.c b/windows/tree.c
index e5cb390b5..61e32e0a5 100644
--- a/windows/tree.c
+++ b/windows/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;
+ }
}
-