[evolution-data-server] Correct libedataserverui4 main header file
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Correct libedataserverui4 main header file
- Date: Thu, 23 Jun 2022 16:27:37 +0000 (UTC)
commit 28b26e6dda6af889ba7b2f44be385ee0d870dcff
Author: Milan Crha <mcrha redhat com>
Date: Thu Jun 23 18:23:19 2022 +0200
Correct libedataserverui4 main header file
The libedataserverui.h includes files from libedataserverui/, while
the gtk4 version should include files from the libedataserverui4/.
Rename the file to libedataserverui4.h at the same time, making
the main include libedataserverui4/libedataserverui4.h .
src/libedataserverui/CMakeLists.txt | 26 +++++++++++++---
src/libedataserverui/e-buffer-tagger.h | 12 +++++---
src/libedataserverui/e-cell-renderer-color.h | 12 +++++---
.../e-credentials-prompter-impl-oauth2.h | 13 +++++---
.../e-credentials-prompter-impl-password.h | 13 +++++---
src/libedataserverui/e-credentials-prompter-impl.h | 13 +++++---
src/libedataserverui/e-credentials-prompter.h | 12 +++++---
src/libedataserverui/e-reminders-widget.c | 1 -
src/libedataserverui/e-reminders-widget.h | 13 +++++---
src/libedataserverui/e-trust-prompt.h | 12 +++++---
src/libedataserverui/e-webdav-discover-widget.h | 13 ++++----
src/libedataserverui/libedataserverui.h | 35 ----------------------
src/libedataserverui/libedataserverui.h.in | 35 ++++++++++++++++++++++
13 files changed, 133 insertions(+), 77 deletions(-)
---
diff --git a/src/libedataserverui/CMakeLists.txt b/src/libedataserverui/CMakeLists.txt
index e417b1acb..0eaa9c278 100644
--- a/src/libedataserverui/CMakeLists.txt
+++ b/src/libedataserverui/CMakeLists.txt
@@ -4,6 +4,12 @@ set(UI_VERSION)
set(UI_API_VERSION ${API_VERSION})
add_pkgconfig_file(libedataserverui.pc.in libedataserverui-${UI_API_VERSION}.pc)
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/libedataserverui.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libedataserverui${UI_VERSION}.h
+ @ONLY
+)
+
set(SOURCES
e-buffer-tagger.c
e-cell-renderer-color.c
@@ -19,7 +25,7 @@ set(SOURCES
)
set(HEADERS
- libedataserverui.h
+ ${CMAKE_CURRENT_BINARY_DIR}/libedataserverui${UI_VERSION}.h
e-buffer-tagger.h
e-cell-renderer-color.h
e-credentials-prompter.h
@@ -138,7 +144,7 @@ gir_add_introspection_simple(
EDataServerUI
libedataserverui
${UI_API_VERSION}
- "libedataserverui/libedataserverui.h"
+ "libedataserverui${UI_VERSION}/libedataserverui${UI_VERSION}.h"
gir_identifies_prefixes
gir_includes
gir_cflags
@@ -157,6 +163,12 @@ set(UI_VERSION 4)
set(UI_API_VERSION ${LIBEDATASERVERUI4_API_VERSION})
add_pkgconfig_file(libedataserverui.pc.in libedataserverui${UI_VERSION}-${UI_API_VERSION}.pc)
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/libedataserverui.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libedataserverui${UI_VERSION}.h
+ @ONLY
+)
+
set(SOURCES
e-buffer-tagger.c
e-cell-renderer-color.c
@@ -172,7 +184,7 @@ set(SOURCES
)
set(HEADERS
- libedataserverui.h
+ ${CMAKE_CURRENT_BINARY_DIR}/libedataserverui${UI_VERSION}.h
e-buffer-tagger.h
e-cell-renderer-color.h
e-credentials-prompter.h
@@ -261,6 +273,11 @@ install(FILES ${HEADERS}
DESTINATION ${privincludedir}/libedataserverui${UI_VERSION}
)
+# create libedataserverui4/... in the build dir, thus .gir can find it
+file(COPY ${HEADERS}
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/libedataserverui${UI_VERSION}/
+)
+
set(gir_sources ${SOURCES} ${HEADERS})
set(gir_identifies_prefixes E)
set(gir_includes GObject-2.0 Gio-2.0 Gtk-4.0 Soup-3.0)
@@ -268,6 +285,7 @@ set(gir_cflags
-DLIBEDATASERVERUI_COMPILATION
-I${CMAKE_BINARY_DIR}/src/calendar
-I${CMAKE_SOURCE_DIR}/src/calendar
+ -I${CMAKE_CURRENT_BINARY_DIR}
)
set(gir_libdirs
${CMAKE_BINARY_DIR}/src/private
@@ -291,7 +309,7 @@ gir_add_introspection_simple(
EDataServerUI${UI_VERSION}
libedataserverui${UI_VERSION}
${UI_API_VERSION}
- "libedataserverui${UI_VERSION}/libedataserverui.h"
+ "libedataserverui${UI_VERSION}/libedataserverui${UI_VERSION}.h"
gir_identifies_prefixes
gir_includes
gir_cflags
diff --git a/src/libedataserverui/e-buffer-tagger.h b/src/libedataserverui/e-buffer-tagger.h
index c6cf386ac..7e36ef043 100644
--- a/src/libedataserverui/e-buffer-tagger.h
+++ b/src/libedataserverui/e-buffer-tagger.h
@@ -18,15 +18,19 @@
*
*/
-#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
-#error "Only <libedataserverui/libedataserverui.h> should be included directly."
-#endif
-
#ifndef E_BUFFER_TAGGER_H
#define E_BUFFER_TAGGER_H
#include <gtk/gtk.h>
+#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
+#if GTK_CHECK_VERSION(4, 0, 0)
+#error "Only <libedataserverui4/libedataserverui4.h> should be included directly."
+#else
+#error "Only <libedataserverui/libedataserverui.h> should be included directly."
+#endif
+#endif
+
G_BEGIN_DECLS
void e_buffer_tagger_connect (GtkTextView *textview);
diff --git a/src/libedataserverui/e-cell-renderer-color.h b/src/libedataserverui/e-cell-renderer-color.h
index 705bb7660..5730017cf 100644
--- a/src/libedataserverui/e-cell-renderer-color.h
+++ b/src/libedataserverui/e-cell-renderer-color.h
@@ -16,15 +16,19 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
-#error "Only <libedataserverui/libedataserverui.h> should be included directly."
-#endif
-
#ifndef E_CELL_RENDERER_COLOR_H
#define E_CELL_RENDERER_COLOR_H
#include <gtk/gtk.h>
+#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
+#if GTK_CHECK_VERSION(4, 0, 0)
+#error "Only <libedataserverui4/libedataserverui4.h> should be included directly."
+#else
+#error "Only <libedataserverui/libedataserverui.h> should be included directly."
+#endif
+#endif
+
/* Standard GObject macros */
#define E_TYPE_CELL_RENDERER_COLOR \
(e_cell_renderer_color_get_type ())
diff --git a/src/libedataserverui/e-credentials-prompter-impl-oauth2.h
b/src/libedataserverui/e-credentials-prompter-impl-oauth2.h
index 81a831666..7ed96570b 100644
--- a/src/libedataserverui/e-credentials-prompter-impl-oauth2.h
+++ b/src/libedataserverui/e-credentials-prompter-impl-oauth2.h
@@ -16,15 +16,20 @@
*
*/
-#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
-#error "Only <libedataserverui/libedataserverui.h> should be included directly."
-#endif
-
#ifndef E_CREDENTIALS_PROMPTER_IMPL_OAUTH2_H
#define E_CREDENTIALS_PROMPTER_IMPL_OAUTH2_H
#include <glib.h>
#include <glib-object.h>
+#include <gtk/gtk.h>
+
+#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
+#if GTK_CHECK_VERSION(4, 0, 0)
+#error "Only <libedataserverui4/libedataserverui4.h> should be included directly."
+#else
+#error "Only <libedataserverui/libedataserverui.h> should be included directly."
+#endif
+#endif
#include <libedataserverui/e-credentials-prompter-impl.h>
diff --git a/src/libedataserverui/e-credentials-prompter-impl-password.h
b/src/libedataserverui/e-credentials-prompter-impl-password.h
index 5eda8445f..22cbd70e6 100644
--- a/src/libedataserverui/e-credentials-prompter-impl-password.h
+++ b/src/libedataserverui/e-credentials-prompter-impl-password.h
@@ -15,15 +15,20 @@
*
*/
-#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
-#error "Only <libedataserverui/libedataserverui.h> should be included directly."
-#endif
-
#ifndef E_CREDENTIALS_PROMPTER_IMPL_PASSWORD_H
#define E_CREDENTIALS_PROMPTER_IMPL_PASSWORD_H
#include <glib.h>
#include <glib-object.h>
+#include <gtk/gtk.h>
+
+#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
+#if GTK_CHECK_VERSION(4, 0, 0)
+#error "Only <libedataserverui4/libedataserverui4.h> should be included directly."
+#else
+#error "Only <libedataserverui/libedataserverui.h> should be included directly."
+#endif
+#endif
#include <libedataserverui/e-credentials-prompter-impl.h>
diff --git a/src/libedataserverui/e-credentials-prompter-impl.h
b/src/libedataserverui/e-credentials-prompter-impl.h
index 3726dd43b..186c0ff7e 100644
--- a/src/libedataserverui/e-credentials-prompter-impl.h
+++ b/src/libedataserverui/e-credentials-prompter-impl.h
@@ -15,15 +15,20 @@
*
*/
-#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
-#error "Only <libedataserverui/libedataserverui.h> should be included directly."
-#endif
-
#ifndef E_CREDENTIALS_PROMPTER_IMPL_H
#define E_CREDENTIALS_PROMPTER_IMPL_H
#include <glib.h>
#include <glib-object.h>
+#include <gtk/gtk.h>
+
+#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
+#if GTK_CHECK_VERSION(4, 0, 0)
+#error "Only <libedataserverui4/libedataserverui4.h> should be included directly."
+#else
+#error "Only <libedataserverui/libedataserverui.h> should be included directly."
+#endif
+#endif
#include <libedataserver/libedataserver.h>
diff --git a/src/libedataserverui/e-credentials-prompter.h b/src/libedataserverui/e-credentials-prompter.h
index 7750e24d7..2e98b899d 100644
--- a/src/libedataserverui/e-credentials-prompter.h
+++ b/src/libedataserverui/e-credentials-prompter.h
@@ -15,10 +15,6 @@
*
*/
-#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
-#error "Only <libedataserverui/libedataserverui.h> should be included directly."
-#endif
-
#ifndef E_CREDENTIALS_PROMPTER_H
#define E_CREDENTIALS_PROMPTER_H
@@ -28,6 +24,14 @@
#include <gtk/gtk.h>
+#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
+#if GTK_CHECK_VERSION(4, 0, 0)
+#error "Only <libedataserverui4/libedataserverui4.h> should be included directly."
+#else
+#error "Only <libedataserverui/libedataserverui.h> should be included directly."
+#endif
+#endif
+
#include <libedataserver/libedataserver.h>
#include <libedataserverui/e-credentials-prompter-impl.h>
diff --git a/src/libedataserverui/e-reminders-widget.c b/src/libedataserverui/e-reminders-widget.c
index 2fb8960f2..c0c1aeacc 100644
--- a/src/libedataserverui/e-reminders-widget.c
+++ b/src/libedataserverui/e-reminders-widget.c
@@ -17,7 +17,6 @@
/**
* SECTION: e-reminders-widget
- * @include: libedataserverui/libedataserverui.h
* @short_description: An #ERemindersWidget to work with past reminders
*
* The #ERemindersWidget is a widget which does common tasks on past reminders
diff --git a/src/libedataserverui/e-reminders-widget.h b/src/libedataserverui/e-reminders-widget.h
index d63f4fce6..600cb03f3 100644
--- a/src/libedataserverui/e-reminders-widget.h
+++ b/src/libedataserverui/e-reminders-widget.h
@@ -15,14 +15,19 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
-#error "Only <libedataserverui/libedataserverui.h> should be included directly."
-#endif
-
#ifndef E_REMINDERS_WIDGET_H
#define E_REMINDERS_WIDGET_H
#include <gtk/gtk.h>
+
+#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
+#if GTK_CHECK_VERSION(4, 0, 0)
+#error "Only <libedataserverui4/libedataserverui4.h> should be included directly."
+#else
+#error "Only <libedataserverui/libedataserverui.h> should be included directly."
+#endif
+#endif
+
#include <libecal/libecal.h>
/* Standard GObject macros */
diff --git a/src/libedataserverui/e-trust-prompt.h b/src/libedataserverui/e-trust-prompt.h
index 657775e17..09a4a4b90 100644
--- a/src/libedataserverui/e-trust-prompt.h
+++ b/src/libedataserverui/e-trust-prompt.h
@@ -15,10 +15,6 @@
*
*/
-#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
-#error "Only <libedataserverui/libedataserverui.h> should be included directly."
-#endif
-
#ifndef E_TRUST_PROMPT_H
#define E_TRUST_PROMPT_H
@@ -27,6 +23,14 @@
#include <gtk/gtk.h>
+#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
+#if GTK_CHECK_VERSION(4, 0, 0)
+#error "Only <libedataserverui4/libedataserverui4.h> should be included directly."
+#else
+#error "Only <libedataserverui/libedataserverui.h> should be included directly."
+#endif
+#endif
+
#include <libedataserver/libedataserver.h>
G_BEGIN_DECLS
diff --git a/src/libedataserverui/e-webdav-discover-widget.h b/src/libedataserverui/e-webdav-discover-widget.h
index 5e91e9501..42fc81ec0 100644
--- a/src/libedataserverui/e-webdav-discover-widget.h
+++ b/src/libedataserverui/e-webdav-discover-widget.h
@@ -15,17 +15,20 @@
*
*/
-#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
-#error "Only <libedataserverui/libedataserverui.h> should be included directly."
-#endif
-
#ifndef E_WEBDAV_DISCOVER_WIDGET_H
#define E_WEBDAV_DISCOVER_WIDGET_H
#include <gio/gio.h>
-
#include <gtk/gtk.h>
+#if !defined (__LIBEDATASERVERUI_H_INSIDE__) && !defined (LIBEDATASERVERUI_COMPILATION)
+#if GTK_CHECK_VERSION(4, 0, 0)
+#error "Only <libedataserverui4/libedataserverui4.h> should be included directly."
+#else
+#error "Only <libedataserverui/libedataserverui.h> should be included directly."
+#endif
+#endif
+
#include <libedataserver/libedataserver.h>
#include <libedataserverui/e-credentials-prompter.h>
diff --git a/src/libedataserverui/libedataserverui.h.in b/src/libedataserverui/libedataserverui.h.in
new file mode 100644
index 000000000..53a793cee
--- /dev/null
+++ b/src/libedataserverui/libedataserverui.h.in
@@ -0,0 +1,35 @@
+/*
+ * libedataserverui@UI_VERSION@.h
+ *
+ * This library is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef LIBEDATASERVERUI@UI_VERSION@_H
+#define LIBEDATASERVERUI@UI_VERSION@_H
+
+#define __LIBEDATASERVERUI_H_INSIDE__
+
+#include <libedataserverui@UI_VERSION@/e-buffer-tagger.h>
+#include <libedataserverui@UI_VERSION@/e-cell-renderer-color.h>
+#include <libedataserverui@UI_VERSION@/e-credentials-prompter.h>
+#include <libedataserverui@UI_VERSION@/e-credentials-prompter-impl.h>
+#include <libedataserverui@UI_VERSION@/e-credentials-prompter-impl-oauth2.h>
+#include <libedataserverui@UI_VERSION@/e-credentials-prompter-impl-password.h>
+#include <libedataserverui@UI_VERSION@/e-reminders-widget.h>
+#include <libedataserverui@UI_VERSION@/e-trust-prompt.h>
+#include <libedataserverui@UI_VERSION@/e-webdav-discover-widget.h>
+
+#undef __LIBEDATASERVERUI_H_INSIDE__
+
+#endif /* LIBEDATASERVERUI@UI_VERSION@_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]