summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2006-01-08 01:51:33 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2006-01-08 01:51:33 +0000
commit745deb7a9d4bf26a6339a297c3c06bb12f5cc102 (patch)
tree21fce77c94096ea7a9297a67edde9857492338d4 /gtk
parent5eb7692b8ff2a0b226fa56ee4bb3c2d8f8e98044 (diff)
downloadnetsurf-745deb7a9d4bf26a6339a297c3c06bb12f5cc102.tar.gz
netsurf-745deb7a9d4bf26a6339a297c3c06bb12f5cc102.tar.bz2
[project @ 2006-01-08 01:51:33 by jmb]
Make data file locations user-configurable (no UI for this as yet) Reduce intrusiveness of ncos modifications Fix GTK build Remove Cookies file details from Messages (this data never belonged in there anyway) Make gui_init more robust against memory exhaustion. svn path=/import/netsurf/; revision=2014
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtk_gui.c16
-rw-r--r--gtk/gtk_treeview.c5
2 files changed, 17 insertions, 4 deletions
diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c
index 3c512fddc..b5eaf767b 100644
--- a/gtk/gtk_gui.c
+++ b/gtk/gtk_gui.c
@@ -16,6 +16,7 @@
#include <gtk/gtk.h>
#include "netsurf/content/content.h"
#include "netsurf/content/fetch.h"
+#include "netsurf/content/url_store.h"
#include "netsurf/desktop/401login.h"
#include "netsurf/desktop/browser.h"
#include "netsurf/desktop/gui.h"
@@ -54,6 +55,17 @@ void gui_init(int argc, char** argv)
snprintf(buf, sizeof buf, "%s/.netsurf/Choices", home);
options_read(buf);
+ if (!option_cookie_file) {
+ snprintf(buf, sizeof buf, "%s/.netsurf/Cookies");
+ option_cookie_file = strdup(buf);
+ }
+ if (!option_cookie_jar) {
+ snprintf(buf, sizeof buf, "%s/.netsurf/Cookies");
+ option_cookie_jar = strdup(buf);
+ }
+ if (!option_cookie_file || !option_cookie_jar)
+ die("Failed initialising cookie options");
+
snprintf(buf, sizeof buf, "%s/.netsurf/messages", home);
messages_load(buf);
@@ -62,6 +74,8 @@ void gui_init(int argc, char** argv)
default_stylesheet_url = strdup(buf);
snprintf(buf, sizeof buf, "file:///%s/.netsurf/AdBlock.css", home);
adblock_stylesheet_url = strdup(buf);
+ if (!default_stylesheet_url || !adblock_stylesheet_url)
+ die("Failed duplicating stylesheet strings");
}
@@ -213,7 +227,7 @@ void schedule(int t, void (*callback)(void *p), void *p) {}
void schedule_remove(void (*callback)(void *p), void *p) {}
void schedule_run(void) {}
-void global_history_add(struct gui_window *g) {}
+void global_history_add(struct url_content *data) {}
utf8_convert_ret utf8_to_local_encoding(const char *string, size_t len,
char **result)
diff --git a/gtk/gtk_treeview.c b/gtk/gtk_treeview.c
index c7d04362f..6b9280c5d 100644
--- a/gtk/gtk_treeview.c
+++ b/gtk/gtk_treeview.c
@@ -38,13 +38,12 @@ void tree_redraw_area(struct tree *tree, int x, int y, int width, int height) {
/**
* Draws a line.
*
- * \param tree the tree to draw a line for
* \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
*/
-void tree_draw_line(struct tree *tree, int x, int y, int width, int height) {
+void tree_draw_line(int x, int y, int width, int height) {
}
@@ -83,7 +82,7 @@ void tree_recalculate_node_element(struct node_element *element) {
*
* \param node the node to update
*/
-void tree_update_URL_node(struct node *node) {
+void tree_update_URL_node(struct node *node, struct url_content *data) {
}