[devhelp/wip/swilmet/maintenance] Include first the corresponding header in each .c file



commit 0c87a6050291824d598c49a2ccc061d4fde95e5a
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat May 16 15:21:33 2015 +0200

    Include first the corresponding header in each .c file
    
    See https://wiki.gnome.org/Projects/GTK%2B/BestPractices/GlibIncludes

 src/dh-app.c            |    2 +-
 src/dh-assistant-view.c |    2 +-
 src/dh-assistant.c      |    2 +-
 src/dh-book-manager.c   |    3 ++-
 src/dh-book-tree.c      |    3 ++-
 src/dh-book.c           |    4 ++--
 src/dh-keyword-model.c  |    3 ++-
 src/dh-language.c       |    3 +--
 src/dh-link.c           |    2 +-
 src/dh-parser.c         |    3 ++-
 src/dh-preferences.c    |    2 +-
 src/dh-settings.c       |    2 --
 src/dh-sidebar.c        |    2 +-
 src/dh-util.c           |    3 +--
 src/dh-window.c         |    3 ++-
 15 files changed, 20 insertions(+), 19 deletions(-)
---
diff --git a/src/dh-app.c b/src/dh-app.c
index bd05d56..30af761 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -20,11 +20,11 @@
  */
 
 #include "config.h"
+#include "dh-app.h"
 
 #include <glib/gi18n.h>
 
 #include "devhelp.h"
-#include "dh-app.h"
 #include "dh-preferences.h"
 #include "dh-util.h"
 
diff --git a/src/dh-assistant-view.c b/src/dh-assistant-view.c
index a41e6cd..0ea1098 100644
--- a/src/dh-assistant-view.c
+++ b/src/dh-assistant-view.c
@@ -20,9 +20,9 @@
  */
 
 #include "config.h"
+#include "dh-assistant-view.h"
 #include <string.h>
 #include <glib/gi18n-lib.h>
-#include "dh-assistant-view.h"
 #include "dh-link.h"
 #include "dh-util.h"
 #include "dh-book-manager.h"
diff --git a/src/dh-assistant.c b/src/dh-assistant.c
index 39adef9..b558894 100644
--- a/src/dh-assistant.c
+++ b/src/dh-assistant.c
@@ -17,6 +17,7 @@
  */
 
 #include "config.h"
+#include "dh-assistant.h"
 #include <string.h>
 #include <glib/gi18n-lib.h>
 #include <gdk/gdkkeysyms.h>
@@ -24,7 +25,6 @@
 #include "dh-window.h"
 #include "dh-util.h"
 #include "dh-assistant-view.h"
-#include "dh-assistant.h"
 #include "dh-settings.h"
 
 typedef struct {
diff --git a/src/dh-book-manager.c b/src/dh-book-manager.c
index 20b0317..c0362d3 100644
--- a/src/dh-book-manager.c
+++ b/src/dh-book-manager.c
@@ -21,12 +21,13 @@
  */
 
 #include "config.h"
+#include "dh-book-manager.h"
+
 #include <string.h>
 
 #include "dh-link.h"
 #include "dh-book.h"
 #include "dh-language.h"
-#include "dh-book-manager.h"
 #include "dh-settings.h"
 
 #define NEW_POSSIBLE_BOOK_TIMEOUT_SECS 5
diff --git a/src/dh-book-tree.c b/src/dh-book-tree.c
index c47eee4..a96a9af 100644
--- a/src/dh-book-tree.c
+++ b/src/dh-book-tree.c
@@ -20,11 +20,12 @@
  */
 
 #include "config.h"
+#include "dh-book-tree.h"
+
 #include <string.h>
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 
-#include "dh-book-tree.h"
 #include "dh-book.h"
 
 typedef struct {
diff --git a/src/dh-book.c b/src/dh-book.c
index 1be8bec..89d2014 100644
--- a/src/dh-book.c
+++ b/src/dh-book.c
@@ -20,13 +20,13 @@
  */
 
 #include "config.h"
-#include <string.h>
+#include "dh-book.h"
 
+#include <string.h>
 #include <glib/gi18n.h>
 
 #include "dh-link.h"
 #include "dh-parser.h"
-#include "dh-book.h"
 #include "dh-util.h"
 
 /* Timeout to wait for new events in the book so that
diff --git a/src/dh-keyword-model.c b/src/dh-keyword-model.c
index c46ca15..a17b864 100644
--- a/src/dh-keyword-model.c
+++ b/src/dh-keyword-model.c
@@ -20,12 +20,13 @@
  */
 
 #include "config.h"
+#include "dh-keyword-model.h"
+
 #include <gtk/gtk.h>
 #include <string.h>
 
 #include "dh-link.h"
 #include "dh-book.h"
-#include "dh-keyword-model.h"
 
 typedef struct {
         DhBookManager *book_manager;
diff --git a/src/dh-language.c b/src/dh-language.c
index 8c166de..28f6f09 100644
--- a/src/dh-language.c
+++ b/src/dh-language.c
@@ -17,9 +17,8 @@
  */
 
 #include "config.h"
-#include <string.h>
-
 #include "dh-language.h"
+#include <string.h>
 
 struct _DhLanguage {
         /* Name of the language */
diff --git a/src/dh-link.c b/src/dh-link.c
index 732e5a1..f67788b 100644
--- a/src/dh-link.c
+++ b/src/dh-link.c
@@ -18,10 +18,10 @@
  */
 
 #include "config.h"
+#include "dh-link.h"
 #include <string.h>
 #include <glib-object.h>
 #include <glib/gi18n-lib.h>
-#include "dh-link.h"
 
 struct _DhLink {
         /* FIXME: Those two could exist only for book to save some
diff --git a/src/dh-parser.c b/src/dh-parser.c
index 5736ca1..0b7018c 100644
--- a/src/dh-parser.c
+++ b/src/dh-parser.c
@@ -19,6 +19,8 @@
  */
 
 #include "config.h"
+#include "dh-parser.h"
+
 #include <string.h>
 #include <errno.h>
 #include <zlib.h>
@@ -26,7 +28,6 @@
 
 #include "dh-error.h"
 #include "dh-link.h"
-#include "dh-parser.h"
 
 #define NAMESPACE      "http://www.devhelp.net/book";
 #define BYTES_PER_READ 4096
diff --git a/src/dh-preferences.c b/src/dh-preferences.c
index bc27a6e..4e75655 100644
--- a/src/dh-preferences.c
+++ b/src/dh-preferences.c
@@ -19,10 +19,10 @@
  */
 
 #include "config.h"
+#include "dh-preferences.h"
 #include <gtk/gtk.h>
 #include <string.h>
 #include "dh-util.h"
-#include "dh-preferences.h"
 #include "dh-app.h"
 #include "dh-settings.h"
 
diff --git a/src/dh-settings.c b/src/dh-settings.c
index 1973033..4983ce2 100644
--- a/src/dh-settings.c
+++ b/src/dh-settings.c
@@ -17,8 +17,6 @@
  */
 
 #include "config.h"
-
-
 #include "dh-settings.h"
 
 G_DEFINE_TYPE (DhSettings, dh_settings, G_TYPE_OBJECT);
diff --git a/src/dh-sidebar.c b/src/dh-sidebar.c
index 36045c2..e0e4a25 100644
--- a/src/dh-sidebar.c
+++ b/src/dh-sidebar.c
@@ -21,6 +21,7 @@
  */
 
 #include "config.h"
+#include "dh-sidebar.h"
 
 #include <string.h>
 #include <glib/gi18n-lib.h>
@@ -28,7 +29,6 @@
 #include <gtk/gtk.h>
 
 #include "dh-keyword-model.h"
-#include "dh-sidebar.h"
 #include "dh-util.h"
 #include "dh-book-manager.h"
 #include "dh-book.h"
diff --git a/src/dh-util.c b/src/dh-util.c
index 3fadbf0..4746c00 100644
--- a/src/dh-util.c
+++ b/src/dh-util.c
@@ -18,12 +18,11 @@
  */
 
 #include "config.h"
+#include "dh-util.h"
 #include <string.h>
 #include <stdlib.h>
 #include <gtk/gtk.h>
 #include <math.h>
-#include "dh-util.h"
-
 
 static GtkBuilder *
 get_builder_file (const gchar *filename,
diff --git a/src/dh-window.c b/src/dh-window.c
index 55b31d4..d39aa32 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -19,6 +19,8 @@
  */
 
 #include "config.h"
+#include "dh-window.h"
+
 #include <string.h>
 #include <math.h>
 #include <glib/gi18n-lib.h>
@@ -29,7 +31,6 @@
 #include "dh-book-manager.h"
 #include "dh-book.h"
 #include "dh-sidebar.h"
-#include "dh-window.h"
 #include "dh-util.h"
 #include "dh-enum-types.h"
 #include "dh-settings.h"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]