summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-07-17 23:01:02 +0000
committerJames Bursa <james@netsurf-browser.org>2003-07-17 23:01:02 +0000
commit5031b80b331ddc58fd24f3fe7a85503320cf9689 (patch)
tree7911bcec2639a026ba6ff4403e6984977a8e5d54 /desktop
parent8bca5444485f4f76f96b8f1f57434afca36cca62 (diff)
downloadnetsurf-5031b80b331ddc58fd24f3fe7a85503320cf9689.tar.gz
netsurf-5031b80b331ddc58fd24f3fe7a85503320cf9689.tar.bz2
[project @ 2003-07-17 23:01:02 by bursa]
Fix 670947, tidy gui code, move some headers. svn path=/import/netsurf/; revision=231
Diffstat (limited to 'desktop')
-rw-r--r--desktop/browser.c26
-rw-r--r--desktop/browser.h4
-rw-r--r--desktop/gui.h6
-rw-r--r--desktop/netsurf.c1
-rw-r--r--desktop/netsurf.h3
5 files changed, 18 insertions, 22 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index ad29e6f38..0782bd6fb 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -6,22 +6,21 @@
* Copyright 2003 James Bursa <bursa@users.sourceforge.net>
*/
+#include <assert.h>
+#include <ctype.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include "curl/curl.h"
+#include "libxml/debugXML.h"
#include "netsurf/content/cache.h"
#include "netsurf/content/fetchcache.h"
#include "netsurf/desktop/browser.h"
-#include "netsurf/riscos/font.h"
#include "netsurf/render/box.h"
+#include "netsurf/render/font.h"
#include "netsurf/utils/log.h"
#include "netsurf/utils/utils.h"
-#include "libxml/uri.h"
-#include "libxml/debugXML.h"
-#include "curl/curl.h"
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <limits.h>
-#include <time.h>
-#include <ctype.h>
static void browser_window_start_throbber(struct browser_window* bw);
static void browser_window_text_selection(struct browser_window* bw,
@@ -187,7 +186,10 @@ void browser_window_destroy(struct browser_window* bw)
content_remove_instance(bw->current_content, bw, 0, 0, 0, &bw->current_content_state);
content_remove_user(bw->current_content, browser_window_callback, bw, 0);
}
-
+ if (bw->loading_content != NULL) {
+ content_remove_user(bw->loading_content, browser_window_callback, bw, 0);
+ }
+/*
if (bw->history != NULL)
{
struct history* current = bw->history;
@@ -209,7 +211,7 @@ void browser_window_destroy(struct browser_window* bw)
xfree(hh);
}
}
-
+*/
xfree(bw->url);
gui_window_destroy(bw->window);
diff --git a/desktop/browser.h b/desktop/browser.h
index 016f2e636..fe664adec 100644
--- a/desktop/browser.h
+++ b/desktop/browser.h
@@ -13,7 +13,6 @@
#include "netsurf/content/content.h"
#include "netsurf/desktop/gui.h"
#include "netsurf/render/box.h"
-#include "netsurf/riscos/font.h"
typedef int browser_window_flags;
#define browser_TOOLBAR ((browser_window_flags) 1)
@@ -30,9 +29,6 @@ typedef int action_buttons;
#define act_BUTTON_ALTERNATIVE ((action_buttons) 1)
#define act_BUTTON_CONTEXT_MENU ((action_buttons) 2)
-
-
-
struct history
{
struct history* earlier;
diff --git a/desktop/gui.h b/desktop/gui.h
index 1a44cf980..6d1ef5045 100644
--- a/desktop/gui.h
+++ b/desktop/gui.h
@@ -12,7 +12,9 @@
typedef enum { GUI_BROWSER_WINDOW } gui_window_type;
typedef enum { SAFE, UNSAFE } gui_safety;
-#include "netsurf/riscos/gui.h"
+struct ro_gui_window;
+typedef struct ro_gui_window gui_window;
+
#include "netsurf/desktop/browser.h"
struct gui_message
@@ -56,6 +58,6 @@ void gui_gadget_combo(struct browser_window* bw, struct gui_gadget* g, unsigned
void gui_edit_textarea(struct browser_window* bw, struct gui_gadget* g);
void gui_edit_textbox(struct browser_window* bw, struct gui_gadget* g);
-void gui_show_choices();
+void gui_show_choices(void);
#endif
diff --git a/desktop/netsurf.c b/desktop/netsurf.c
index aacb657d9..0392d986a 100644
--- a/desktop/netsurf.c
+++ b/desktop/netsurf.c
@@ -16,7 +16,6 @@
#include <stdlib.h>
int netsurf_quit = 0;
-gui_window* netsurf_gui_windows = NULL;
static void netsurf_init(int argc, char** argv);
static void netsurf_exit(void);
diff --git a/desktop/netsurf.h b/desktop/netsurf.h
index dba94927a..67329e164 100644
--- a/desktop/netsurf.h
+++ b/desktop/netsurf.h
@@ -8,9 +8,6 @@
#ifndef _NETSURF_DESKTOP_NETSURF_H_
#define _NETSURF_DESKTOP_NETSURF_H_
-#include "netsurf/desktop/browser.h"
-
-extern gui_window* netsurf_gui_windows;
extern int netsurf_quit;
void netsurf_poll(void);