From 7437d34eb95a4b44499a5f6464f8e81e3865ecf9 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 8 Feb 2018 06:15:10 +0100 Subject: [PATCH] shortcuts: Don't include gtk.h Clean up all shortcuts includes to only include the necessary files while we're at it. --- gtk/gtksearchbar.c | 8 ++++---- gtk/gtksearchbar.h | 3 ++- gtk/gtkshortcutsgroup.c | 7 ++++--- gtk/gtkshortcutsgroup.h | 6 +++++- gtk/gtkshortcutssection.h | 7 +++++-- gtk/gtkshortcutsshortcut.c | 8 ++++++-- gtk/gtkshortcutsshortcut.h | 6 +++++- gtk/gtkshortcutsshortcutprivate.h | 2 ++ gtk/gtkshortcutswindow.c | 21 +++++++++++++++++---- gtk/gtkshortcutswindow.h | 4 ++++ 10 files changed, 54 insertions(+), 18 deletions(-) diff --git a/gtk/gtksearchbar.c b/gtk/gtksearchbar.c index ef1b982b71..690caca8f0 100644 --- a/gtk/gtksearchbar.c +++ b/gtk/gtksearchbar.c @@ -27,14 +27,14 @@ #include "config.h" -#include "gtkentry.h" -#include "gtkbox.h" -#include "gtkcenterbox.h" +#include "gtksearchbar.h" + #include "gtkbutton.h" +#include "gtkcenterbox.h" #include "gtkentryprivate.h" #include "gtkintl.h" #include "gtkprivate.h" -#include "gtksearchbar.h" +#include "gtkrevealer.h" #include "gtksearchentryprivate.h" #include "gtksnapshot.h" diff --git a/gtk/gtksearchbar.h b/gtk/gtksearchbar.h index 68f8542d05..5f94b37155 100644 --- a/gtk/gtksearchbar.h +++ b/gtk/gtksearchbar.h @@ -32,7 +32,8 @@ #error "Only can be included directly." #endif -#include +#include +#include G_BEGIN_DECLS diff --git a/gtk/gtkshortcutsgroup.c b/gtk/gtkshortcutsgroup.c index 8e37665637..60fa41048f 100644 --- a/gtk/gtkshortcutsgroup.c +++ b/gtk/gtkshortcutsgroup.c @@ -20,12 +20,13 @@ #include "gtkshortcutsgroup.h" -#include "gtkshortcutsshortcut.h" +#include "gtkbox.h" +#include "gtkintl.h" #include "gtklabel.h" #include "gtkorientable.h" -#include "gtksizegroup.h" #include "gtkprivate.h" -#include "gtkintl.h" +#include "gtkshortcutsshortcut.h" +#include "gtksizegroup.h" /** * SECTION:gtkshortcutsgroup diff --git a/gtk/gtkshortcutsgroup.h b/gtk/gtkshortcutsgroup.h index 88048e8a91..492b9ffc78 100644 --- a/gtk/gtkshortcutsgroup.h +++ b/gtk/gtkshortcutsgroup.h @@ -19,7 +19,11 @@ #ifndef __GTK_SHORTCUTS_GROUP_H__ #define __GTK_SHORTCUTS_GROUP_H__ -#include +#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) +#error "Only can be included directly." +#endif + +#include G_BEGIN_DECLS diff --git a/gtk/gtkshortcutssection.h b/gtk/gtkshortcutssection.h index 8b7c3bb394..420a0de6f3 100644 --- a/gtk/gtkshortcutssection.h +++ b/gtk/gtkshortcutssection.h @@ -19,8 +19,11 @@ #ifndef __GTK_SHORTCUTS_SECTION_H__ #define __GTK_SHORTCUTS_SECTION_H__ -#include -#include +#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) +#error "Only can be included directly." +#endif + +#include G_BEGIN_DECLS diff --git a/gtk/gtkshortcutsshortcut.c b/gtk/gtkshortcutsshortcut.c index 81db30163f..4a11d296ef 100644 --- a/gtk/gtkshortcutsshortcut.c +++ b/gtk/gtkshortcutsshortcut.c @@ -20,10 +20,14 @@ #include "gtkshortcutsshortcutprivate.h" +#include "gtkimage.h" +#include "gtkintl.h" +#include "gtklabel.h" +#include "gtkprivate.h" #include "gtkshortcutlabel.h" #include "gtkshortcutswindowprivate.h" -#include "gtkprivate.h" -#include "gtkintl.h" +#include "gtksizegroup.h" +#include "gtktypebuiltins.h" /** * SECTION:gtkshortcutsshortcut diff --git a/gtk/gtkshortcutsshortcut.h b/gtk/gtkshortcutsshortcut.h index b8eeeca2c9..dd9e7aaf37 100644 --- a/gtk/gtkshortcutsshortcut.h +++ b/gtk/gtkshortcutsshortcut.h @@ -19,7 +19,11 @@ #ifndef GTK_SHORTCUTS_SHORTCUT_H #define GTK_SHORTCUTS_SHORTCUT_H -#include +#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) +#error "Only can be included directly." +#endif + +#include G_BEGIN_DECLS diff --git a/gtk/gtkshortcutsshortcutprivate.h b/gtk/gtkshortcutsshortcutprivate.h index 5596100173..a20706aa6f 100644 --- a/gtk/gtkshortcutsshortcutprivate.h +++ b/gtk/gtkshortcutsshortcutprivate.h @@ -27,6 +27,8 @@ #include "gtkshortcutsshortcut.h" +#include "gtkwindow.h" + G_BEGIN_DECLS void gtk_shortcuts_shortcut_update_accel (GtkShortcutsShortcut *self, diff --git a/gtk/gtkshortcutswindow.c b/gtk/gtkshortcutswindow.c index 6499c041b9..a173512863 100644 --- a/gtk/gtkshortcutswindow.c +++ b/gtk/gtkshortcutswindow.c @@ -19,15 +19,28 @@ #include "config.h" #include "gtkshortcutswindowprivate.h" + +#include "gtkbindings.h" +#include "gtkbox.h" +#include "gtkgrid.h" +#include "gtkheaderbar.h" +#include "gtkintl.h" +#include "gtklabel.h" +#include "gtklistbox.h" +#include "gtkmenubutton.h" +#include "gtkpopover.h" +#include "gtkprivate.h" #include "gtkscrolledwindow.h" +#include "gtksearchbar.h" +#include "gtksearchentry.h" #include "gtkshortcutssection.h" #include "gtkshortcutsgroup.h" #include "gtkshortcutsshortcutprivate.h" -#include "gtksearchbar.h" -#include "gtksearchentry.h" +#include "gtksizegroup.h" +#include "gtkstack.h" +#include "gtktogglebutton.h" +#include "gtktypebuiltins.h" #include "gtkwidgetprivate.h" -#include "gtkprivate.h" -#include "gtkintl.h" /** * SECTION:gtkshortcutswindow diff --git a/gtk/gtkshortcutswindow.h b/gtk/gtkshortcutswindow.h index f3f5ba44f4..ec30006da1 100644 --- a/gtk/gtkshortcutswindow.h +++ b/gtk/gtkshortcutswindow.h @@ -19,6 +19,10 @@ #ifndef __GTK_SHORTCUTS_WINDOW_H__ #define __GTK_SHORTCUTS_WINDOW_H__ +#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) +#error "Only can be included directly." +#endif + #include G_BEGIN_DECLS