From 9c49254abd59b8e3f4ecf2be7477dd62bf399296 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Tue, 2 Apr 2013 20:39:37 -0700 Subject: Only include top level includes from GTK+, GLib and GDK-PixBuf --- src/fe-gtk/about.c | 11 ----------- src/fe-gtk/ascii.c | 6 ------ src/fe-gtk/banlist.c | 13 ------------- src/fe-gtk/chanlist.c | 17 ----------------- src/fe-gtk/chanview-tree.c | 1 - src/fe-gtk/chanview.c | 6 +----- src/fe-gtk/dccgui.c | 16 ---------------- src/fe-gtk/editlist.c | 6 ------ src/fe-gtk/fe-gtk.c | 19 +------------------ src/fe-gtk/fe-gtk.h | 4 +--- src/fe-gtk/fkeys.c | 18 ------------------ src/fe-gtk/gtkutil.c | 19 ------------------- src/fe-gtk/gtkutil.h | 3 +-- src/fe-gtk/ignoregui.c | 16 ---------------- src/fe-gtk/joind.c | 12 ------------ src/fe-gtk/maingui.c | 24 ------------------------ src/fe-gtk/menu.c | 12 ------------ src/fe-gtk/notifygui.c | 14 -------------- src/fe-gtk/pixmaps.c | 2 -- src/fe-gtk/plugin-tray.c | 1 - src/fe-gtk/plugingui.c | 11 ----------- src/fe-gtk/rawlog.c | 5 ----- src/fe-gtk/search.c | 11 ----------- src/fe-gtk/servlistgui.c | 23 ----------------------- src/fe-gtk/setup.c | 26 -------------------------- src/fe-gtk/sexy-marshal.c | 2 +- src/fe-gtk/sexy-marshal.h | 2 +- src/fe-gtk/sexy-spell-entry.h | 2 +- src/fe-gtk/textgui.c | 10 ---------- src/fe-gtk/urlgrab.c | 10 ---------- src/fe-gtk/userlistgui.c | 15 --------------- src/fe-gtk/xtext.c | 6 ------ src/fe-gtk/xtext.h | 2 +- 33 files changed, 8 insertions(+), 337 deletions(-) (limited to 'src/fe-gtk') diff --git a/src/fe-gtk/about.c b/src/fe-gtk/about.c index 54b71053..c47fba4f 100644 --- a/src/fe-gtk/about.c +++ b/src/fe-gtk/about.c @@ -22,17 +22,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #ifdef USE_XLIB #include #endif diff --git a/src/fe-gtk/ascii.c b/src/fe-gtk/ascii.c index ab6ac0ee..56b0198b 100644 --- a/src/fe-gtk/ascii.c +++ b/src/fe-gtk/ascii.c @@ -22,12 +22,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include - #include "../common/hexchat.h" #include "../common/hexchatc.h" #include "gtkutil.h" diff --git a/src/fe-gtk/banlist.c b/src/fe-gtk/banlist.c index 3abd48ac..8c396d14 100644 --- a/src/fe-gtk/banlist.c +++ b/src/fe-gtk/banlist.c @@ -28,19 +28,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "../common/hexchat.h" #include "../common/fe.h" #include "../common/modes.h" diff --git a/src/fe-gtk/chanlist.c b/src/fe-gtk/chanlist.c index c2cc6fcb..47b9f1db 100644 --- a/src/fe-gtk/chanlist.c +++ b/src/fe-gtk/chanlist.c @@ -30,21 +30,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include "../common/hexchat.h" @@ -58,10 +43,8 @@ #include "maingui.h" #include "menu.h" - #include "custom-list.h" - enum { COL_CHANNEL, diff --git a/src/fe-gtk/chanview-tree.c b/src/fe-gtk/chanview-tree.c index 9f626bbe..a7cd7235 100644 --- a/src/fe-gtk/chanview-tree.c +++ b/src/fe-gtk/chanview-tree.c @@ -31,7 +31,6 @@ typedef struct #include "maingui.h" #include -#include static void /* row-activated, when a row is double clicked */ cv_tree_activated_cb (GtkTreeView *view, GtkTreePath *path, diff --git a/src/fe-gtk/chanview.c b/src/fe-gtk/chanview.c index 826ff69c..500ed1e5 100644 --- a/src/fe-gtk/chanview.c +++ b/src/fe-gtk/chanview.c @@ -22,14 +22,10 @@ #include #include -#include - -#include "chanview.h" #include "gtkutil.h" - +#include "chanview.h" /* treeStore columns */ - #define COL_NAME 0 /* (char *) */ #define COL_CHAN 1 /* (chan *) */ #define COL_ATTR 2 /* (PangoAttrList *) */ diff --git a/src/fe-gtk/dccgui.c b/src/fe-gtk/dccgui.c index ffb95218..0fb2e7e5 100644 --- a/src/fe-gtk/dccgui.c +++ b/src/fe-gtk/dccgui.c @@ -28,22 +28,6 @@ #include "../common/inet.h" #include "fe-gtk.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "../common/hexchat.h" #include "../common/hexchatc.h" #include "../common/fe.h" diff --git a/src/fe-gtk/editlist.c b/src/fe-gtk/editlist.c index c1be5b23..4c4c4367 100644 --- a/src/fe-gtk/editlist.c +++ b/src/fe-gtk/editlist.c @@ -31,12 +31,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include - #include "../common/hexchat.h" #include "../common/cfgfiles.h" #include "../common/hexchatc.h" diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index b91ad2bb..355c2ef7 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -22,17 +22,9 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include -#include -#include -#include - #ifdef WIN32 #include +#include #else #include #endif @@ -62,15 +54,6 @@ #ifdef USE_XLIB #include -#include -#endif - -#ifdef USE_GTKSPELL -#include -#endif - -#ifdef WIN32 -#include #endif GdkPixmap *channelwin_pix; diff --git a/src/fe-gtk/fe-gtk.h b/src/fe-gtk/fe-gtk.h index 321e3518..7b4132da 100644 --- a/src/fe-gtk/fe-gtk.h +++ b/src/fe-gtk/fe-gtk.h @@ -48,9 +48,7 @@ # define _(x) (x) #endif -#include -#include -#include +#include #include "banlist.h" #undef gtk_signal_connect diff --git a/src/fe-gtk/fkeys.c b/src/fe-gtk/fkeys.c index 3a937e1a..f35ae466 100644 --- a/src/fe-gtk/fkeys.c +++ b/src/fe-gtk/fkeys.c @@ -32,20 +32,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "../common/hexchat.h" #include "../common/hexchatc.h" #include "../common/cfgfiles.h" @@ -65,10 +51,6 @@ #include "textgui.h" #include "fkeys.h" -#ifdef USE_GTKSPELL -#include -#endif - static void replace_handle (GtkWidget * wid); void key_action_tab_clean (void); diff --git a/src/fe-gtk/gtkutil.c b/src/fe-gtk/gtkutil.c index 3743b5e3..41948e44 100644 --- a/src/fe-gtk/gtkutil.c +++ b/src/fe-gtk/gtkutil.c @@ -26,25 +26,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include "../common/hexchat.h" diff --git a/src/fe-gtk/gtkutil.h b/src/fe-gtk/gtkutil.h index 0c358953..e3f59a29 100644 --- a/src/fe-gtk/gtkutil.h +++ b/src/fe-gtk/gtkutil.h @@ -20,8 +20,7 @@ #ifndef HEXCHAT_GTKUTIL_H #define HEXCHAT_GTKUTIL_H -#include -#include +#include typedef void (*filereqcallback) (void *, char *file); diff --git a/src/fe-gtk/ignoregui.c b/src/fe-gtk/ignoregui.c index 42fbe0c6..ae2dbd94 100644 --- a/src/fe-gtk/ignoregui.c +++ b/src/fe-gtk/ignoregui.c @@ -24,22 +24,6 @@ #include #include "fe-gtk.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - #include "../common/hexchat.h" #include "../common/ignore.h" #include "../common/cfgfiles.h" diff --git a/src/fe-gtk/joind.c b/src/fe-gtk/joind.c index cbc2251f..b58d662a 100644 --- a/src/fe-gtk/joind.c +++ b/src/fe-gtk/joind.c @@ -31,18 +31,6 @@ #include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "../common/hexchat.h" #include "../common/hexchatc.h" #include "../common/server.h" diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 4abb433e..816a93f7 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -21,29 +21,6 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "../common/hexchat.h" #include "../common/fe.h" #include "../common/server.h" @@ -71,7 +48,6 @@ #include "xtext.h" #ifdef USE_GTKSPELL -#include #include #endif diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index f5f6b456..4536e333 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -30,18 +30,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include "../common/hexchat.h" diff --git a/src/fe-gtk/notifygui.c b/src/fe-gtk/notifygui.c index 4d144258..3c3b6a6e 100644 --- a/src/fe-gtk/notifygui.c +++ b/src/fe-gtk/notifygui.c @@ -24,20 +24,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - #include "../common/hexchat.h" #include "../common/notify.h" #include "../common/cfgfiles.h" diff --git a/src/fe-gtk/pixmaps.c b/src/fe-gtk/pixmaps.c index 419ef4c1..bdd74e1e 100644 --- a/src/fe-gtk/pixmaps.c +++ b/src/fe-gtk/pixmaps.c @@ -26,8 +26,6 @@ #include "../common/fe.h" #include -#include -#include #include "../pixmaps/inline_pngs.h" diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c index 033cfaeb..cf9d036b 100644 --- a/src/fe-gtk/plugin-tray.c +++ b/src/fe-gtk/plugin-tray.c @@ -29,7 +29,6 @@ #include "pixmaps.h" #include "maingui.h" #include "menu.h" -#include #ifndef WIN32 #include diff --git a/src/fe-gtk/plugingui.c b/src/fe-gtk/plugingui.c index b2cb95d7..48152d78 100644 --- a/src/fe-gtk/plugingui.c +++ b/src/fe-gtk/plugingui.c @@ -22,17 +22,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include - -#include -#include -#include -#include - #include "../common/hexchat.h" #define PLUGIN_C typedef struct session hexchat_context; diff --git a/src/fe-gtk/rawlog.c b/src/fe-gtk/rawlog.c index 651ca1ec..d0564406 100644 --- a/src/fe-gtk/rawlog.c +++ b/src/fe-gtk/rawlog.c @@ -29,11 +29,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include #include #include "../common/hexchat.h" diff --git a/src/fe-gtk/search.c b/src/fe-gtk/search.c index f2940e70..49c30a14 100644 --- a/src/fe-gtk/search.c +++ b/src/fe-gtk/search.c @@ -22,17 +22,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "../common/hexchat.h" #include "../common/fe.h" #include "../common/util.h" diff --git a/src/fe-gtk/servlistgui.c b/src/fe-gtk/servlistgui.c index b312e8de..774ce1cc 100644 --- a/src/fe-gtk/servlistgui.c +++ b/src/fe-gtk/servlistgui.c @@ -21,29 +21,6 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include "../common/hexchat.h" diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index a51179b6..ac8826cf 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -37,36 +37,10 @@ #include "menu.h" #include "plugin-tray.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef WIN32 #include "../common/fe.h" #endif #ifdef USE_GTKSPELL -#include #include #endif #ifdef USE_LIBSEXY diff --git a/src/fe-gtk/sexy-marshal.c b/src/fe-gtk/sexy-marshal.c index 1704c7b3..363842ca 100644 --- a/src/fe-gtk/sexy-marshal.c +++ b/src/fe-gtk/sexy-marshal.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #ifdef G_ENABLE_DEBUG diff --git a/src/fe-gtk/sexy-marshal.h b/src/fe-gtk/sexy-marshal.h index 0f28605d..aa560767 100644 --- a/src/fe-gtk/sexy-marshal.h +++ b/src/fe-gtk/sexy-marshal.h @@ -19,7 +19,7 @@ #ifndef __sexy_marshal_MARSHAL_H__ #define __sexy_marshal_MARSHAL_H__ -#include +#include G_BEGIN_DECLS diff --git a/src/fe-gtk/sexy-spell-entry.h b/src/fe-gtk/sexy-spell-entry.h index 9278ba8d..1c761235 100644 --- a/src/fe-gtk/sexy-spell-entry.h +++ b/src/fe-gtk/sexy-spell-entry.h @@ -22,7 +22,7 @@ typedef struct _SexySpellEntry SexySpellEntry; typedef struct _SexySpellEntryClass SexySpellEntryClass; typedef struct _SexySpellEntryPriv SexySpellEntryPriv; -#include +#include #define SEXY_TYPE_SPELL_ENTRY (sexy_spell_entry_get_type()) #define SEXY_SPELL_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SEXY_TYPE_SPELL_ENTRY, SexySpellEntry)) diff --git a/src/fe-gtk/textgui.c b/src/fe-gtk/textgui.c index 7e006e69..0bdb4476 100644 --- a/src/fe-gtk/textgui.c +++ b/src/fe-gtk/textgui.c @@ -26,16 +26,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "../common/hexchat.h" #include "../common/hexchatc.h" #include "../common/cfgfiles.h" diff --git a/src/fe-gtk/urlgrab.c b/src/fe-gtk/urlgrab.c index 0e27efdc..be62239e 100644 --- a/src/fe-gtk/urlgrab.c +++ b/src/fe-gtk/urlgrab.c @@ -22,16 +22,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include - -#include -#include -#include -#include - #include "../common/hexchat.h" #include "../common/hexchatc.h" #include "../common/cfgfiles.h" diff --git a/src/fe-gtk/userlistgui.c b/src/fe-gtk/userlistgui.c index 35728c8f..c2f2a462 100644 --- a/src/fe-gtk/userlistgui.c +++ b/src/fe-gtk/userlistgui.c @@ -22,16 +22,6 @@ #include "fe-gtk.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include "../common/hexchat.h" @@ -50,11 +40,6 @@ #include "userlistgui.h" #include "fkeys.h" -#ifdef USE_GTKSPELL -#include -#endif - - enum { COL_PIX=0, // GdkPixbuf * diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 5b85022e..e151524d 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -42,12 +42,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include #ifdef HEXCHAT #ifdef WIN32 diff --git a/src/fe-gtk/xtext.h b/src/fe-gtk/xtext.h index 1ba3483a..8a4b26cf 100644 --- a/src/fe-gtk/xtext.h +++ b/src/fe-gtk/xtext.h @@ -20,7 +20,7 @@ #ifndef HEXCHAT_XTEXT_H #define HEXCHAT_XTEXT_H -#include +#include #ifdef USE_XFT #include #endif -- cgit 1.4.1 From 14b089ef90552109e3c138f48c6bdbcb4bb50766 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Tue, 2 Apr 2013 22:35:42 -0700 Subject: Set up CFLAGS on Unix too --- configure.ac | 4 ++-- src/fe-gtk/Makefile.am | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/fe-gtk') diff --git a/configure.ac b/configure.ac index a4b9f459..8aeacff2 100644 --- a/configure.ac +++ b/configure.ac @@ -191,7 +191,7 @@ if test "$glib" = no; then AC_MSG_ERROR(Cannot find GLib!) fi -COMMON_CFLAGS="$GLIB_CFLAGS" +COMMON_CFLAGS="$GLIB_CFLAGS -DG_DISABLE_SINGLE_INCLUDES" COMMON_LIBS="$GLIB_LIBS" COMMON_LIBS="$COMMON_LIBS -lgmodule-2.0 -lgobject-2.0" @@ -222,7 +222,7 @@ dnl ** GNOME ************************************************************ dnl ********************************************************************* GUI_LIBS="$GUI_LIBS $GTK_LIBS" -GUI_CFLAGS="$GUI_CFLAGS $GTK_CFLAGS" +GUI_CFLAGS="$GUI_CFLAGS $GTK_CFLAGS -DG_DISABLE_CAST_CHECKS -DG_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES" #if test "$gnome" = yes; then # AC_PATH_PROG(pkgconfigpath, pkg-config) diff --git a/src/fe-gtk/Makefile.am b/src/fe-gtk/Makefile.am index 3928b413..8bbad35d 100644 --- a/src/fe-gtk/Makefile.am +++ b/src/fe-gtk/Makefile.am @@ -2,7 +2,7 @@ localedir = $(datadir)/locale bin_PROGRAMS = hexchat -AM_CPPFLAGS = $(GUI_CFLAGS) -DG_DISABLE_CAST_CHECKS -DLOCALEDIR=\"$(localedir)\" +AM_CPPFLAGS = $(GUI_CFLAGS) -DLOCALEDIR=\"$(localedir)\" hexchat_LDADD = ../common/libhexchatcommon.a $(GUI_LIBS) -- cgit 1.4.1