Commit 039d243c authored by Robert Roth's avatar Robert Roth

Follow GLib/GTK+ best practices for the order of includes

Refactored includes to follow the glib best practices:
* config.h (if required)
* own module header file
* system header files
* required headers from current project

https://bugzilla.gnome.org/show_bug.cgi?id=735887
parent cb7ca4f1
......@@ -24,6 +24,7 @@
#endif
#include "gedit-app-activatable.h"
#include "gedit-app.h"
/**
......
......@@ -21,12 +21,13 @@
*/
#include "gedit-app-osx.h"
#include <gedit/gedit-dirs.h>
#include <gedit/gedit-debug.h>
#include <gdk/gdkquartz.h>
#include <string.h>
#include <glib/gi18n.h>
#include "gedit-dirs.h"
#include "gedit-debug.h"
#include "gedit-commands.h"
#include "gedit-recent.h"
......
......@@ -22,6 +22,8 @@
#include <config.h>
#endif
#include "gedit-app.h"
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
......@@ -35,7 +37,6 @@
#include <girepository.h>
#endif
#include "gedit-app.h"
#include "gedit-commands.h"
#include "gedit-notebook.h"
#include "gedit-debug.h"
......
......@@ -22,9 +22,10 @@
#include <config.h>
#endif
#include "gedit-close-confirmation-dialog.h"
#include <glib/gi18n.h>
#include "gedit-close-confirmation-dialog.h"
#include <gedit/gedit-app.h>
#include <gedit/gedit-utils.h>
#include <gedit/gedit-window.h>
......
......@@ -24,9 +24,10 @@
#include <config.h>
#endif
#include "gedit-commands.h"
#include <gtk/gtk.h>
#include "gedit-commands.h"
#include "gedit-window.h"
#include "gedit-notebook.h"
#include "gedit-multi-notebook.h"
......
......@@ -24,9 +24,10 @@
#include <config.h>
#endif
#include "gedit-commands.h"
#include <gtk/gtk.h>
#include "gedit-commands.h"
#include "gedit-window.h"
#include "gedit-debug.h"
#include "gedit-view.h"
......
......@@ -24,10 +24,11 @@
#include <config.h>
#endif
#include "gedit-commands.h"
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include "gedit-commands.h"
#include "gedit-window.h"
#include "gedit-tab.h"
#include "gedit-debug.h"
......
......@@ -24,11 +24,12 @@
#include <config.h>
#endif
#include "gedit-commands.h"
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include "gedit-commands.h"
#include "gedit-window.h"
#include "gedit-window-private.h"
#include "gedit-notebook.h"
......
......@@ -24,10 +24,11 @@
#include <config.h>
#endif
#include "gedit-commands.h"
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include "gedit-commands.h"
#include "gedit-debug.h"
#include "gedit-app.h"
#include "gedit-dirs.h"
......
......@@ -25,11 +25,12 @@
#include <config.h>
#endif
#include "gedit-commands.h"
#include <string.h>
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
#include "gedit-commands.h"
#include "gedit-debug.h"
#include "gedit-statusbar.h"
#include "gedit-view-frame.h"
......
......@@ -24,9 +24,10 @@
#include <config.h>
#endif
#include "gedit-commands.h"
#include <gtk/gtk.h>
#include "gedit-commands.h"
#include "gedit-debug.h"
#include "gedit-window.h"
#include "gedit-highlight-mode-dialog.h"
......
......@@ -24,9 +24,10 @@
#include <config.h>
#endif
#include <stdio.h>
#include "gedit-debug.h"
#include <stdio.h>
#define ENABLE_PROFILING
#ifdef ENABLE_PROFILING
......
......@@ -25,10 +25,11 @@
#include <config.h>
#endif
#include "gedit-document.h"
#include <string.h>
#include <glib/gi18n.h>
#include "gedit-document.h"
#include "gedit-settings.h"
#include "gedit-debug.h"
#include "gedit-utils.h"
......
......@@ -22,9 +22,10 @@
#include <config.h>
#endif
#include "gedit-documents-panel.h"
#include <glib/gi18n.h>
#include "gedit-documents-panel.h"
#include "gedit-debug.h"
#include "gedit-document.h"
#include "gedit-multi-notebook.h"
......
......@@ -19,11 +19,12 @@
*/
#include "gedit-encoding-items.h"
#include "gedit-settings.h"
#include "gedit-utils.h"
#include <glib/gi18n.h>
#include "gedit-settings.h"
#include "gedit-utils.h"
struct _GeditEncodingItem
{
const GtkSourceEncoding *encoding;
......
......@@ -26,11 +26,12 @@
#include <config.h>
#endif
#include "gedit-file-chooser-dialog-gtk.h"
#include <string.h>
#include <glib/gi18n.h>
#include "gedit-file-chooser-dialog-gtk.h"
#include "gedit-encodings-combo-box.h"
#include "gedit-debug.h"
#include "gedit-enum-types.h"
......
......@@ -22,11 +22,12 @@
#include <config.h>
#endif
#include "gedit-file-chooser-dialog-osx.h"
#import <Cocoa/Cocoa.h>
#include <gdk/gdkquartz.h>
#include <glib/gi18n.h>
#include "gedit-file-chooser-dialog-osx.h"
#include "gedit-encoding-items.h"
#include "gedit-encodings-dialog.h"
#include "gedit-utils.h"
......
......@@ -18,9 +18,10 @@
* along with gedit. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gtk/gtk.h>
#include "gedit-highlight-mode-dialog.h"
#include <gtk/gtk.h>
struct _GeditHighlightModeDialogPrivate
{
GeditHighlightModeSelector *selector;
......
......@@ -18,10 +18,11 @@
* along with gedit. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gedit-highlight-mode-selector.h"
#include <gdk/gdkkeysyms.h>
#include <glib/gi18n.h>
#include <string.h>
#include "gedit-highlight-mode-selector.h"
enum
{
......
......@@ -22,12 +22,12 @@
#include <config.h>
#endif
#include "gedit-history-entry.h"
#include <string.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include "gedit-history-entry.h"
enum {
PROP_0,
PROP_HISTORY_ID,
......
......@@ -21,6 +21,7 @@
#ifndef __GEDIT_HISTORY_ENTRY_H__
#define __GEDIT_HISTORY_ENTRY_H__
#include <gtk/gtk.h>
G_BEGIN_DECLS
......
......@@ -26,17 +26,18 @@
#include <config.h>
#endif
#include "gedit-io-error-info-bar.h"
#include <errno.h>
#include <string.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <gedit/gedit-encodings-combo-box.h>
#include "gedit-settings.h"
#include "gedit-utils.h"
#include "gedit-document.h"
#include "gedit-io-error-info-bar.h"
#include <gedit/gedit-encodings-combo-box.h>
#define MAX_URI_IN_DIALOG_LENGTH 50
......
......@@ -18,8 +18,8 @@
* along with gedit. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gedit-menu-extension.h"
#include <string.h>
static guint last_merge_id = 0;
......
......@@ -22,10 +22,11 @@
#include <config.h>
#endif
#include "gedit-menu-stack-switcher.h"
#include <glib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include "gedit-menu-stack-switcher.h"
struct _GeditMenuStackSwitcherPrivate
{
......
......@@ -21,12 +21,13 @@
*/
#include "gedit-message-bus.h"
#include "gedit-marshal.h"
#include <string.h>
#include <stdarg.h>
#include <gobject/gvaluecollector.h>
#include "gedit-marshal.h"
/**
* GeditMessageCallback:
* @bus: the #GeditMessageBus on which the message was sent
......
......@@ -19,11 +19,14 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "gedit-metadata-manager.h"
#include <stdlib.h>
#include <libxml/xmlreader.h>
#include "gedit-debug.h"
#include "gedit-dirs.h"
#include "gedit-metadata-manager.h"
/*
#define GEDIT_METADATA_VERBOSE_DEBUG 1
......
......@@ -21,6 +21,7 @@
*/
#include "gedit-multi-notebook.h"
#include "gedit-enum-types.h"
#include "gedit-marshal.h"
#include "gedit-settings.h"
......
......@@ -18,11 +18,13 @@
* along with gedit. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gedit-notebook-popup-menu.h"
#include <glib/gi18n.h>
#include "gedit-app.h"
#include "gedit-commands.h"
#include "gedit-multi-notebook.h"
#include "gedit-notebook-popup-menu.h"
struct _GeditNotebookPopupMenuPrivate
{
......
......@@ -22,10 +22,11 @@
#include <config.h>
#endif
#include "gedit-notebook-stack-switcher.h"
#include <glib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include "gedit-notebook-stack-switcher.h"
/*
* This widget is a rather ugly kludge: it uses a GtkNotebook full of empty
......
......@@ -31,11 +31,12 @@
#include <config.h>
#endif
#include "gedit-notebook.h"
#include <glib-object.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include "gedit-notebook.h"
#include "gedit-tab.h"
#include "gedit-tab-label.h"
#include "gedit-window.h"
......
......@@ -18,13 +18,14 @@
* along with gedit. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gedit-open-document-selector.h"
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
#include "gedit-open-document-selector.h"
#include "gedit-recent.h"
#include "gedit-utils.h"
#include "gedit-window.h"
......
......@@ -23,12 +23,13 @@
#include <config.h>
#endif
#include "gedit-plugins-engine.h"
#include <string.h>
#include <glib/gi18n.h>
#include <girepository.h>
#include "gedit-plugins-engine.h"
#include "gedit-debug.h"
#include "gedit-app.h"
#include "gedit-dirs.h"
......
......@@ -23,6 +23,8 @@
#include <config.h>
#endif
#include "gedit-preferences-dialog.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
......@@ -32,7 +34,6 @@
#include <gtksourceview/gtksource.h>
#include <libpeas-gtk/peas-gtk.h>
#include "gedit-preferences-dialog.h"
#include "gedit-utils.h"
#include "gedit-debug.h"
#include "gedit-document.h"
......
......@@ -23,10 +23,11 @@
#include <config.h>
#endif
#include "gedit-print-job.h"
#include <glib/gi18n.h>
#include <gtksourceview/gtksource.h>
#include "gedit-print-job.h"
#include "gedit-debug.h"
#include "gedit-print-preview.h"
#include "gedit-marshal.h"
......
......@@ -21,6 +21,8 @@
#include <config.h>
#endif
#include "gedit-print-preview.h"
#include <math.h>
#include <stdlib.h>
#include <glib/gi18n.h>
......@@ -29,8 +31,6 @@
#include <cairo-pdf.h>
#include "gedit-print-preview.h"
#define PRINTER_DPI (72.)
#define TOOLTIP_THRESHOLD 20
......
......@@ -22,12 +22,12 @@
#include <config.h>
#endif
#include "gedit-progress-info-bar.h"
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include "gedit-progress-info-bar.h"
enum {
PROP_0,
PROP_HAS_CANCEL_BUTTON
......
......@@ -20,11 +20,12 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "gedit-recent.h"
#include <gtk/gtk.h>
#include <gedit/gedit-document.h>
#include <string.h>
#include "gedit-recent.h"
#include "gedit-settings.h"
void
......
......@@ -23,11 +23,12 @@
#include <config.h>
#endif
#include "gedit-replace-dialog.h"
#include <string.h>
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
#include "gedit-replace-dialog.h"
#include "gedit-history-entry.h"
#include "gedit-document.h"
......
......@@ -25,12 +25,14 @@
#include <config.h>
#endif
#include "gedit-settings.h"
#include <string.h>
#include <gtksourceview/gtksource.h>
#include "gedit-app.h"
#include "gedit-view.h"
#include "gedit-window.h"
#include "gedit-settings.h"
#define GEDIT_SETTINGS_LOCKDOWN_COMMAND_LINE "disable-command-line"
#define GEDIT_SETTINGS_LOCKDOWN_PRINTING "disable-printing"
......
......@@ -22,10 +22,12 @@
#include <config.h>
#endif
#include "gedit-statusbar.h"
#include <string.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include "gedit-statusbar.h"
#include "gedit-app.h"
#include "gedit-status-menu-button.h"
......
......@@ -22,9 +22,11 @@
#include <config.h>
#endif
#include "gedit-tab-label.h"
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include "gedit-tab-label.h"
#include "gedit-small-button.h"
/* Signals */
......
......@@ -23,10 +23,11 @@
#include <config.h>
#endif
#include "gedit-tab.h"
#include <stdlib.h>
#include <glib/gi18n.h>
#include "gedit-tab.h"
#include "gedit-app.h"
#include "gedit-recent.h"
#include "gedit-utils.h"
......
......@@ -24,6 +24,8 @@
#include <config.h>
#endif
#include "gedit-utils.h"
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
......@@ -36,11 +38,6 @@
#include <glib/gstdio.h>
#include <gio/gio.h>
#include "gedit-utils.h"
#include "gedit-document.h"
#include "gedit-debug.h"
/* For the workspace/viewport stuff */
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
......@@ -54,6 +51,9 @@
#include <sys/stat.h>
#endif
#include "gedit-document.h"
#include "gedit-debug.h"
static void
widget_get_origin (GtkWidget *widget,
gint *x,
......
......@@ -23,6 +23,7 @@
#endif
#include "gedit-view-activatable.h"
#include "gedit-view.h"
/**
......
......@@ -26,17 +26,18 @@
#endif
#include "gedit-view-frame.h"
#include "gedit-window.h"
#include "gedit-view-holder.h"
#include "gedit-debug.h"
#include "gedit-utils.h"
#include "libgd/gd.h"
#include <gtksourceview/gtksource.h>
#include <gdk/gdkkeysyms.h>
#include <glib/gi18n.h>
#include <stdlib.h>
#include "gedit-window.h"
#include "gedit-view-holder.h"
#include "gedit-debug.h"
#include "gedit-utils.h"
#include "libgd/gd.h"
#define FLUSH_TIMEOUT_DURATION 30 /* in seconds */
#define SEARCH_POPUP_MARGIN 12
......
......@@ -24,15 +24,14 @@
#include <config.h>
#endif
#include "gedit-view.h"
#include <string.h>
#include <stdlib.h>
#include <gdk/gdkkeysyms.h>
#include <libpeas/peas-extension-set.h>
#include <glib/gi18n.h>
#include "gedit-view.h"
#include "gedit-view-activatable.h"
#include "gedit-plugins-engine.h"
#include "gedit-debug.h"
......
......@@ -23,9 +23,11 @@
#endif
#include "gedit-window-activatable.h"
#include "gedit-window.h"
#include <string.h>
#include "gedit-window.h"
/**
* SECTION:gedit-window-activatable
* @short_description: Interface for activatable extensions on windows
......
......@@ -22,6 +22,8 @@
#include <config.h>
#endif
#include "gedit-window.h"
#include <time.h>
#include <sys/types.h>
#include <string.h>
......@@ -29,7 +31,6 @@
#include <glib/gi18n.h>
#include <libpeas/peas-extension-set.h>
#include "gedit-window.h"
#include "gedit-window-private.h"
#include "gedit-app.h"
#include "gedit-recent.h"
......
......@@ -22,11 +22,6 @@
#include <config.h>
#endif
#include <glib.h>
#include <locale.h>
#include <libintl.h>
#include "gedit-dirs.h"
#include "gedit-app.h"
#ifdef OS_OSX
#include "gedit-app-osx.h"
......@@ -38,6 +33,11 @@
#endif
#endif
#include <glib.h>
#include <locale.h>
#include <libintl.h>
#include "gedit-dirs.h"
#include "gedit-debug.h"
#ifdef G_OS_WIN32
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment