Added files



Changed files


 beos_bitmap.cpp      |   10 +++
 beos_gui.cpp         |    7 --
 beos_scaffolding.cpp |    1 
 beos_treeview.cpp    |  140 ++++++++++++++++-----------------------------------
 4 files changed, 56 insertions(+), 102 deletions(-)


Index: beos/beos_bitmap.cpp
===================================================================
--- beos/beos_bitmap.cpp        (revision 10834)
+++ beos/beos_bitmap.cpp        (working copy)
@@ -312,6 +312,16 @@
        struct bitmap *bitmap = (struct bitmap *)vbitmap;
 }
 
+int bitmap_get_width(void *vbitmap){
+       struct bitmap *bitmap = (struct bitmap *)vbitmap;
+       return bitmap->primary->Bounds().Width() + 1;
+}
+
+int bitmap_get_height(void *vbitmap){
+       struct bitmap *bitmap = (struct bitmap *)vbitmap;
+       return bitmap->primary->Bounds().Height() + 1;
+}
+
 static BBitmap *
 nsbeos_bitmap_generate_pretile(BBitmap *primary, int repeat_x, int repeat_y)
 {
Index: beos/beos_gui.cpp
===================================================================
--- beos/beos_gui.cpp   (revision 10834)
+++ beos/beos_gui.cpp   (working copy)
@@ -74,7 +74,6 @@
 #include "beos/beos_window.h"
 #include "beos/options.h"
 #include "beos/beos_throbber.h"
-#include "beos/beos_history.h"
 #include "beos/beos_filetype.h"
 //#include "beos/beos_download.h"
 #include "beos/beos_schedule.h"
@@ -641,7 +640,6 @@
        urldb_load(option_url_file);
        urldb_load_cookies(option_cookie_file);
 
-       nsbeos_history_init();
        //nsbeos_download_initialise();
 
        if (!replicated)
@@ -1059,11 +1057,6 @@
        exit(EXIT_FAILURE);
 }
 
-
-void hotlist_visited(hlcache_handle *content)
-{
-}
-
 void gui_cert_verify(const char *url, const struct ssl_cert_info *certs, 
                unsigned long num, nserror (*cb)(bool proceed, void *pw),
                void *cbpw)
Index: beos/beos_treeview.cpp
===================================================================
--- beos/beos_treeview.cpp      (revision 10834)
+++ beos/beos_treeview.cpp      (working copy)
@@ -26,107 +26,59 @@
 extern "C" {
 #include "utils/config.h"
 #include "desktop/tree.h"
+#include "desktop/tree_url_node.h"
 }
 
+const char tree_directory_icon_name[] = "directory.png";
+const char tree_content_icon_name[] = "content.png";
 
-/**
- * Sets the origin variables to the correct values for a specified tree
- *
- * \param tree  the tree to set the origin for
- */
-void tree_initialise_redraw(struct tree *tree) {
-}
 
 
-/**
- * Informs the current window manager that an area requires updating.
- *
- * \param tree   the tree that is requesting a redraw
- * \param x      the x co-ordinate of the redraw area
- * \param y      the y co-ordinate of the redraw area
- * \param width          the width of the redraw area
- * \param height  the height of the redraw area
- */
-void tree_redraw_area(struct tree *tree, int x, int y, int width, int height) {
-}
 
-
 /**
- * Draws a line.
+ * Translates a content_type to the name of a respective icon
  *
- * \param x     the x co-ordinate
- * \param x     the y co-ordinate
- * \param x     the width of the line
- * \param x     the height of the line
+ * \param content_type content type
+ * \param buffer       buffer for the icon name
  */
-void tree_draw_line(int x, int y, int width, int height) {
+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;
+       }
 }
-
-
-/**
- * Draws an element, including any expansion icons
- *
- * \param tree    the tree to draw an element for
- * \param element  the element to draw
- */
-void tree_draw_node_element(struct tree *tree, struct node_element *element) {
-}
-
-
-/**
- * Draws an elements expansion icon
- *
- * \param tree    the tree to draw the expansion for
- * \param element  the element to draw the expansion for
- */
-void tree_draw_node_expansion(struct tree *tree, struct node *node) {
-}
-
-
-/**
- * Recalculates the dimensions of a node element.
- *
- * \param element  the element to recalculate
- */
-void tree_recalculate_node_element(struct node_element *element) {
-}
-
-/**
- * Sets a node element as having a specific sprite.
- *
- * \param node      the node to update
- * \param sprite    the sprite to use
- * \param selected  the expanded sprite name to use
- */
-void tree_set_node_sprite(struct node *node, const char *sprite,
-                const char *expanded) {
-
-}
-
-/**
- * Sets a node element as having a folder sprite
- *
- * \param node  the node to update
- */
-void tree_set_node_sprite_folder(struct node *node) {
-
-}
-
-/**
- * Updates the node details for a URL node.
- * The internal node dimensions are not updated.
- *
- * \param node  the node to update
- */
-void tree_update_URL_node(struct node *node, const char *url,
-               const struct url_data *data) {
-}
-
-
-/**
- * Updates the tree owner following a tree resize
- *
- * \param tree  the tree to update the owner of
- */
-void tree_resized(struct tree *tree) {
-}
Index: beos/beos_scaffolding.cpp
===================================================================
--- beos/beos_scaffolding.cpp   (revision 10834)
+++ beos/beos_scaffolding.cpp   (working copy)
@@ -63,7 +63,6 @@
 #include "beos/beos_options.h"
 //#include "beos/beos_completion.h"
 #include "beos/beos_throbber.h"
-//#include "beos/beos_history.h"
 #include "beos/beos_window.h"
 //#include "beos/beos_schedule.h"
 //#include "beos/beos_download.h"


Conflicted files




Removed files


beos/beos_history.h
beos/beos_history.cpp

Reply via email to