[Xfce4-commits] [apps/mousepad] 03/05: Improve header include dependencies a little bit

noreply at xfce.org noreply at xfce.org
Tue Jul 15 02:23:14 CEST 2014


This is an automated email from the git hooks/post-receive script.

mbrush pushed a commit to branch master
in repository apps/mousepad.

commit 7b203d8b8cae2a097cab1639a7af63129234112a
Author: Matthew Brush <mbrush at codebrainz.ca>
Date:   Mon Jul 14 16:28:58 2014 -0700

    Improve header include dependencies a little bit
    
    Instead of having everything included in a single header at the start
    of each file, we have each file include what it uses. This makes it
    easier to include other files and get the includes you need and reason
    about the dependencies each file has.
---
 mousepad/mousepad-application.h     |    2 ++
 mousepad/mousepad-dialogs.c         |    3 +++
 mousepad/mousepad-dialogs.h         |    2 ++
 mousepad/mousepad-document.c        |    2 ++
 mousepad/mousepad-encoding-dialog.c |    1 +
 mousepad/mousepad-file.c            |    4 +++-
 mousepad/mousepad-file.h            |    2 ++
 mousepad/mousepad-prefs-dialog.c    |    3 +++
 mousepad/mousepad-print.c           |    1 +
 mousepad/mousepad-private.h         |   15 +++++----------
 mousepad/mousepad-statusbar.h       |    3 +++
 mousepad/mousepad-util.h            |    2 ++
 mousepad/mousepad-view.c            |    3 +++
 mousepad/mousepad-window.c          |    3 +++
 14 files changed, 35 insertions(+), 11 deletions(-)

diff --git a/mousepad/mousepad-application.h b/mousepad/mousepad-application.h
index 2296234..3acffc1 100644
--- a/mousepad/mousepad-application.h
+++ b/mousepad/mousepad-application.h
@@ -17,6 +17,8 @@
 #ifndef __MOUSEPAD_APPLICATION_H__
 #define __MOUSEPAD_APPLICATION_H__
 
+#include <gtk/gtk.h>
+
 G_BEGIN_DECLS
 
 typedef struct _MousepadApplicationClass MousepadApplicationClass;
diff --git a/mousepad/mousepad-dialogs.c b/mousepad/mousepad-dialogs.c
index 5ca8f3f..5ee23f5 100644
--- a/mousepad/mousepad-dialogs.c
+++ b/mousepad/mousepad-dialogs.c
@@ -22,6 +22,9 @@
 #include <mousepad/mousepad-dialogs.h>
 #include <mousepad/mousepad-util.h>
 
+#include <gtksourceview/gtksourcestylescheme.h>
+#include <gtksourceview/gtksourcestyleschememanager.h>
+
 
 
 void
diff --git a/mousepad/mousepad-dialogs.h b/mousepad/mousepad-dialogs.h
index cb01fd0..f059ddc 100644
--- a/mousepad/mousepad-dialogs.h
+++ b/mousepad/mousepad-dialogs.h
@@ -17,6 +17,8 @@
 #ifndef __MOUSEPAD_DIALOGS_H__
 #define __MOUSEPAD_DIALOGS_H__
 
+#include <gtk/gtk.h>
+
 G_BEGIN_DECLS
 
 /* dialog responses */
diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c
index 1eb87cf..62d5989 100644
--- a/mousepad/mousepad-document.c
+++ b/mousepad/mousepad-document.c
@@ -36,6 +36,8 @@
 #include <mousepad/mousepad-view.h>
 #include <mousepad/mousepad-window.h>
 
+#include <gtksourceview/gtksourcebuffer.h>
+
 
 
 #define MOUSEPAD_DOCUMENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MOUSEPAD_TYPE_DOCUMENT, MousepadDocumentPrivate))
diff --git a/mousepad/mousepad-encoding-dialog.c b/mousepad/mousepad-encoding-dialog.c
index d2d331a..922b284 100644
--- a/mousepad/mousepad-encoding-dialog.c
+++ b/mousepad/mousepad-encoding-dialog.c
@@ -30,6 +30,7 @@
 
 #include <glib.h>
 #include <glib/gstdio.h>
+#include <gtksourceview/gtksourceview.h>
 
 
 
diff --git a/mousepad/mousepad-file.c b/mousepad/mousepad-file.c
index 2341c65..596e3b4 100644
--- a/mousepad/mousepad-file.c
+++ b/mousepad/mousepad-file.c
@@ -40,8 +40,10 @@
 #include <mousepad/mousepad-private.h>
 #include <mousepad/mousepad-file.h>
 
-#include <glib.h>
 #include <glib/gstdio.h>
+#include <gtksourceview/gtksourcebuffer.h>
+#include <gtksourceview/gtksourcelanguage.h>
+#include <gtksourceview/gtksourcelanguagemanager.h>
 
 
 
diff --git a/mousepad/mousepad-file.h b/mousepad/mousepad-file.h
index 2b2f519..134a772 100644
--- a/mousepad/mousepad-file.h
+++ b/mousepad/mousepad-file.h
@@ -21,6 +21,8 @@ G_BEGIN_DECLS
 
 #include <mousepad/mousepad-encoding.h>
 
+#include <gtksourceview/gtksourcelanguage.h>
+
 typedef struct _MousepadFileClass  MousepadFileClass;
 typedef struct _MousepadFile       MousepadFile;
 
diff --git a/mousepad/mousepad-prefs-dialog.c b/mousepad/mousepad-prefs-dialog.c
index bdcbc45..dc1eda8 100644
--- a/mousepad/mousepad-prefs-dialog.c
+++ b/mousepad/mousepad-prefs-dialog.c
@@ -23,6 +23,9 @@
 #include <mousepad/mousepad-prefs-dialog-ui.h>
 #include <mousepad/mousepad-settings.h>
 
+#include <gtksourceview/gtksourcestylescheme.h>
+#include <gtksourceview/gtksourcestyleschememanager.h>
+
 
 
 #define WID_NOTEBOOK                        "/prefs/main-notebook"
diff --git a/mousepad/mousepad-print.c b/mousepad/mousepad-print.c
index e298b4f..cb3581b 100644
--- a/mousepad/mousepad-print.c
+++ b/mousepad/mousepad-print.c
@@ -25,6 +25,7 @@
 
 #include <pango/pango.h>
 #include <cairo.h>
+#include <gtksourceview/gtksourceprintcompositor.h>
 
 #define DOCUMENT_SPACING (10)
 
diff --git a/mousepad/mousepad-private.h b/mousepad/mousepad-private.h
index e9f41c2..4bf90a9 100644
--- a/mousepad/mousepad-private.h
+++ b/mousepad/mousepad-private.h
@@ -18,21 +18,16 @@
 #define __MOUSEPAD_PRIVATE_H__
 
 #ifdef NDEBUG
-#define G_DISABLE_CHECKS
-#define G_DISABLE_ASSERT
+# define G_DISABLE_CHECKS
+# define G_DISABLE_ASSERT
 #endif
 
+/* These are the only three headers that can be assumed to always be included
+ * since they are so core to the basic and advanced type system that GLib
+ * provides us and for all the various i18n includes and macros we need. */
 #include <glib.h>
 #include <glib-object.h>
-#include <gtk/gtk.h>
 #include <glib/gi18n.h>
-#include <gio/gio.h>
-#include <gtksourceview/gtksourceview.h>
-#include <gtksourceview/gtksourcestylescheme.h>
-#include <gtksourceview/gtksourcestyleschememanager.h>
-#include <gtksourceview/gtksourcelanguage.h>
-#include <gtksourceview/gtksourcelanguagemanager.h>
-#include <gtksourceview/gtksourceprintcompositor.h>
 
 G_BEGIN_DECLS
 
diff --git a/mousepad/mousepad-statusbar.h b/mousepad/mousepad-statusbar.h
index 3a54c68..a5f1724 100644
--- a/mousepad/mousepad-statusbar.h
+++ b/mousepad/mousepad-statusbar.h
@@ -17,6 +17,9 @@
 #ifndef __MOUSEPAD_STATUSBAR_H__
 #define __MOUSEPAD_STATUSBAR_H__
 
+#include <gtk/gtk.h>
+#include <gtksourceview/gtksourcelanguage.h>
+
 G_BEGIN_DECLS
 
 #define MOUSEPAD_TYPE_STATUSBAR            (mousepad_statusbar_get_type ())
diff --git a/mousepad/mousepad-util.h b/mousepad/mousepad-util.h
index 6a064e2..cc4fc04 100644
--- a/mousepad/mousepad-util.h
+++ b/mousepad/mousepad-util.h
@@ -17,6 +17,8 @@
 #ifndef __MOUSEPAD_UTIL_H__
 #define __MOUSEPAD_UTIL_H__
 
+#include <gtk/gtk.h>
+
 G_BEGIN_DECLS
 
 #define MOUSEPAD_TYPE_SEARCH_FLAGS (mousepad_util_search_flags_get_type ())
diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c
index 90d6a56..3ba671a 100644
--- a/mousepad/mousepad-view.c
+++ b/mousepad/mousepad-view.c
@@ -28,6 +28,9 @@
 #include <mousepad/mousepad-view.h>
 
 #include <gdk/gdkkeysyms.h>
+#include <gtksourceview/gtksourceview.h>
+#include <gtksourceview/gtksourcestylescheme.h>
+#include <gtksourceview/gtksourcestyleschememanager.h>
 
 
 
diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c
index 206324c..0b3bd8a 100644
--- a/mousepad/mousepad-window.c
+++ b/mousepad/mousepad-window.c
@@ -47,6 +47,9 @@
 #include <mousepad/mousepad-window-ui.h>
 
 #include <glib/gstdio.h>
+#include <gtksourceview/gtksourcelanguage.h>
+#include <gtksourceview/gtksourcelanguagemanager.h>
+#include <gtksourceview/gtksourcebuffer.h>
 
 
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list