[libgd/gd.msvc: 1/4] gd-margin-container.c: Fix build on Visual Studio
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgd/gd.msvc: 1/4] gd-margin-container.c: Fix build on Visual Studio
- Date: Wed, 11 Aug 2021 08:12:16 +0000 (UTC)
commit 3f44ccd6d2016cdaa3558badc89ed9a80ceb33b8
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Aug 11 15:24:48 2021 +0800
gd-margin-container.c: Fix build on Visual Studio
Move up the declaration of the '_GdMarginContainerPrivate' struct so that
Visual Studio will not complain that the stryct is undefined when we use
'G_DEFINE_TYPE_WITH_CODE (GdMarginContainer...)' with that private struct.
Also stop trying to include config.h since the code has nothing that requires
configuration macros.
libgd/gd-margin-container.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/libgd/gd-margin-container.c b/libgd/gd-margin-container.c
index 20f2046..2fbb332 100644
--- a/libgd/gd-margin-container.c
+++ b/libgd/gd-margin-container.c
@@ -19,15 +19,8 @@
*
*/
-#include "config.h"
-
#include "gd-margin-container.h"
-G_DEFINE_TYPE_WITH_CODE (GdMarginContainer, gd_margin_container, GTK_TYPE_BIN,
- G_ADD_PRIVATE (GdMarginContainer)
- G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE,
- NULL))
-
struct _GdMarginContainerPrivate {
gint min_margin;
gint max_margin;
@@ -35,6 +28,11 @@ struct _GdMarginContainerPrivate {
GtkOrientation orientation;
};
+G_DEFINE_TYPE_WITH_CODE (GdMarginContainer, gd_margin_container, GTK_TYPE_BIN,
+ G_ADD_PRIVATE (GdMarginContainer)
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE,
+ NULL))
+
enum {
PROP_MIN_MARGIN = 1,
PROP_MAX_MARGIN,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]