[devhelp] Better #includes in the app to access the libdevhelp
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] Better #includes in the app to access the libdevhelp
- Date: Sat, 10 Mar 2018 11:39:16 +0000 (UTC)
commit 34e76f0ff7d6b0d015d78e37b20295f03f08debc
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Feb 22 18:31:04 2018 +0100
Better #includes in the app to access the libdevhelp
- For public/installed libdevhelp headers, #include <devhelp/devhelp.h>
only.
- For semi-private/non-installed/problematic libdevhelp headers,
#include "devhelp/dh-something.h".
When the libdevhelp git repo will be created, it will no longer be
possible to #include in the app the non-installed libdevhelp headers.
So the two problematic headers in devhelp/ are:
- dh-setting.h
- dh-util.h
https://bugzilla.gnome.org/show_bug.cgi?id=784351
src/Makefile.am | 2 --
src/dh-app.c | 4 ++--
src/dh-assistant.c | 6 +++---
src/dh-main.c | 5 +----
src/dh-preferences.c | 9 +++------
src/dh-window.c | 8 +++-----
6 files changed, 12 insertions(+), 22 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 1ff953c..5a88700 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,5 @@
AM_CPPFLAGS = \
-I$(top_srcdir) \
- -I$(top_srcdir)/devhelp \
- -I$(top_builddir)/devhelp \
-DG_LOG_DOMAIN=\"Devhelp\" \
$(WARN_CFLAGS)
diff --git a/src/dh-app.c b/src/dh-app.c
index fe809bb..d3b0ee0 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -23,10 +23,10 @@
#include "config.h"
#include "dh-app.h"
#include <glib/gi18n.h>
+#include "devhelp/dh-settings.h"
+#include "devhelp/dh-util.h"
#include "dh-assistant.h"
#include "dh-preferences.h"
-#include "dh-settings.h"
-#include "dh-util.h"
G_DEFINE_TYPE (DhApp, dh_app, GTK_TYPE_APPLICATION);
diff --git a/src/dh-assistant.c b/src/dh-assistant.c
index 78bf6ae..411ca12 100644
--- a/src/dh-assistant.c
+++ b/src/dh-assistant.c
@@ -18,10 +18,10 @@
#include "config.h"
#include "dh-assistant.h"
+#include <devhelp/devhelp.h>
+#include "devhelp/dh-settings.h"
+#include "devhelp/dh-util.h"
#include "dh-window.h"
-#include "dh-util.h"
-#include "dh-assistant-view.h"
-#include "dh-settings.h"
typedef struct {
GtkWidget *view;
diff --git a/src/dh-main.c b/src/dh-main.c
index 5e29c83..2ebdddd 100644
--- a/src/dh-main.c
+++ b/src/dh-main.c
@@ -18,12 +18,9 @@
*/
#include "config.h"
-
#include <locale.h>
#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-
-#include "devhelp.h"
+#include <devhelp/devhelp.h>
#include "dh-app.h"
int
diff --git a/src/dh-preferences.c b/src/dh-preferences.c
index 0568c50..e253e4f 100644
--- a/src/dh-preferences.c
+++ b/src/dh-preferences.c
@@ -20,13 +20,10 @@
#include "config.h"
#include "dh-preferences.h"
-
#include <string.h>
-
-#include "dh-book.h"
-#include "dh-book-manager.h"
-#include "dh-util.h"
-#include "dh-settings.h"
+#include <devhelp/devhelp.h>
+#include "devhelp/dh-settings.h"
+#include "devhelp/dh-util.h"
static GtkWidget *prefs_dialog = NULL;
diff --git a/src/dh-window.c b/src/dh-window.c
index a537bc2..0d7ee61 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -22,13 +22,11 @@
#include "dh-window.h"
#include <glib/gi18n.h>
#include <webkit2/webkit2.h>
-#include "dh-book.h"
-#include "dh-book-manager.h"
-#include "dh-settings.h"
-#include "dh-sidebar.h"
+#include <devhelp/devhelp.h>
+#include "devhelp/dh-settings.h"
+#include "devhelp/dh-util.h"
#include "dh-tab.h"
#include "dh-tab-label.h"
-#include "dh-util.h"
#include "dh-web-view.h"
typedef struct {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]