[gtk+] Only include the necessary headers in GtkPlacesViewRow
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Only include the necessary headers in GtkPlacesViewRow
- Date: Tue, 10 Nov 2015 14:17:28 +0000 (UTC)
commit d589170754af9620feabb0e598b626116470557f
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Nov 10 13:49:11 2015 +0000
Only include the necessary headers in GtkPlacesViewRow
When compiling inside GTK we also use the GTK_COMPILATION guard, as the
GtkPlacesView and GtkPlacesViewRow widgets are shared with Nautilus.
gtk/gtkplacesviewrow.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkplacesviewrow.c b/gtk/gtkplacesviewrow.c
index 3466053..e8ac7a8 100644
--- a/gtk/gtkplacesviewrow.c
+++ b/gtk/gtkplacesviewrow.c
@@ -19,11 +19,24 @@
#include "config.h"
#include <gio/gio.h>
-#include <gtk/gtk.h>
-#include "gtkintl.h"
#include "gtkplacesviewrowprivate.h"
+
+/* As this widget is shared with Nautilus, we use this guard to
+ * ensure that internally we only include the files that we need
+ * instead of including gtk.h
+ */
+#ifdef GTK_COMPILATION
+#include "gtkbutton.h"
+#include "gtkeventbox.h"
+#include "gtkimage.h"
+#include "gtkintl.h"
+#include "gtklabel.h"
+#include "gtkspinner.h"
#include "gtktypebuiltins.h"
+#else
+#include <gtk/gtk.h>
+#endif
struct _GtkPlacesViewRow
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]