From de09dc8efdfdb4ce27c85733cfec139a52d70776 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 12 Apr 2015 20:26:53 +0100 Subject: [PATCH] clean up gtk gui header usage and includes --- gtk/about.c | 2 +- gtk/cookies.c | 5 +++-- gtk/download.c | 1 - gtk/fetch.c | 2 ++ gtk/gui.h | 8 ++------ gtk/history.c | 2 +- gtk/hotlist.c | 2 +- gtk/preferences.c | 1 + gtk/tabs.c | 1 - 9 files changed, 11 insertions(+), 13 deletions(-) diff --git a/gtk/about.c b/gtk/about.c index dcc151f51..b2f5a52cd 100644 --- a/gtk/about.c +++ b/gtk/about.c @@ -27,11 +27,11 @@ #include "utils/utils.h" #include "utils/messages.h" #include "utils/nsoption.h" +#include "utils/nsurl.h" #include "desktop/browser.h" #include "desktop/version.h" #include "gtk/compat.h" -#include "gtk/gui.h" #include "gtk/about.h" #define ABOUT_RESPONSE_ID_LICENCE 1 diff --git a/gtk/cookies.c b/gtk/cookies.c index 3251e17fb..ee7238746 100644 --- a/gtk/cookies.c +++ b/gtk/cookies.c @@ -20,13 +20,14 @@ * Cookies (implementation). */ +#include +#include "utils/log.h" #include "desktop/cookie_manager.h" #include "desktop/plotters.h" #include "desktop/tree.h" #include "desktop/textinput.h" -#include "utils/log.h" -#include "gtk/gui.h" + #include "gtk/cookies.h" #include "gtk/plotters.h" #include "gtk/scaffolding.h" diff --git a/gtk/download.c b/gtk/download.c index 8f7916608..74b49f69c 100644 --- a/gtk/download.c +++ b/gtk/download.c @@ -31,7 +31,6 @@ #include "desktop/download.h" #include "desktop/gui_download.h" -#include "gtk/gui.h" #include "gtk/scaffolding.h" #include "gtk/download.h" #include "gtk/window.h" diff --git a/gtk/fetch.c b/gtk/fetch.c index 817e9c9ee..f56e99d81 100644 --- a/gtk/fetch.c +++ b/gtk/fetch.c @@ -24,11 +24,13 @@ #include #include #include +#include #include "utils/hashtable.h" #include "utils/log.h" #include "utils/filepath.h" #include "utils/file.h" +#include "utils/nsurl.h" #include "desktop/gui_fetch.h" #include "gtk/gui.h" diff --git a/gtk/gui.h b/gtk/gui.h index 26f51eebf..63832f87a 100644 --- a/gtk/gui.h +++ b/gtk/gui.h @@ -19,11 +19,7 @@ #ifndef GTK_GUI_H #define GTK_GUI_H -#include -#include -#include - -#include "utils/nsurl.h" +struct nsurl; /** glade file paths. */ struct glade_file_location_s { @@ -70,7 +66,7 @@ extern char **respaths; uint32_t gtk_gui_gdkkey_to_nskey(GdkEventKey *eventkey); /** login window request. */ -extern void gui_401login_open(nsurl *url, const char *realm, nserror (*cb)(bool proceed, void *pw), void *cbpw); +extern void gui_401login_open(struct nsurl *url, const char *realm, nserror (*cb)(bool proceed, void *pw), void *cbpw); /** set when no windows remain open. */ extern bool nsgtk_complete; diff --git a/gtk/history.c b/gtk/history.c index e24794b66..9a507ef1f 100644 --- a/gtk/history.c +++ b/gtk/history.c @@ -17,6 +17,7 @@ * along with this program. If not, see . */ +#include #include "utils/log.h" #include "utils/utils.h" @@ -25,7 +26,6 @@ #include "desktop/tree.h" #include "desktop/textinput.h" -#include "gtk/gui.h" #include "gtk/history.h" #include "gtk/plotters.h" #include "gtk/scaffolding.h" diff --git a/gtk/hotlist.c b/gtk/hotlist.c index 551a2d09d..3f2515ec8 100644 --- a/gtk/hotlist.c +++ b/gtk/hotlist.c @@ -17,6 +17,7 @@ */ #include +#include #include "utils/log.h" #include "utils/nsoption.h" @@ -24,7 +25,6 @@ #include "desktop/plotters.h" #include "desktop/tree.h" -#include "gtk/gui.h" #include "gtk/hotlist.h" #include "gtk/plotters.h" #include "gtk/scaffolding.h" diff --git a/gtk/preferences.c b/gtk/preferences.c index ec09fe766..446732651 100644 --- a/gtk/preferences.c +++ b/gtk/preferences.c @@ -25,6 +25,7 @@ #include "utils/nsoption.h" #include "utils/file.h" #include "utils/log.h" +#include "utils/nsurl.h" #include "desktop/browser.h" #include "desktop/searchweb.h" diff --git a/gtk/tabs.c b/gtk/tabs.c index f892fa638..c50c11400 100644 --- a/gtk/tabs.c +++ b/gtk/tabs.c @@ -28,7 +28,6 @@ #include "gtk/compat.h" #include "gtk/window.h" -#include "gtk/gui.h" #include "gtk/search.h" #include "gtk/tabs.h"