From 5031b80b331ddc58fd24f3fe7a85503320cf9689 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Thu, 17 Jul 2003 23:01:02 +0000 Subject: [project @ 2003-07-17 23:01:02 by bursa] Fix 670947, tidy gui code, move some headers. svn path=/import/netsurf/; revision=231 --- desktop/browser.c | 26 ++++++++++++++------------ desktop/browser.h | 4 ---- desktop/gui.h | 6 ++++-- desktop/netsurf.c | 1 - desktop/netsurf.h | 3 --- 5 files changed, 18 insertions(+), 22 deletions(-) (limited to 'desktop') 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 */ +#include +#include +#include +#include +#include +#include +#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 -#include -#include -#include -#include -#include 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 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); -- cgit v1.2.3