[libgd/wip/rishi/main-box: 9/9] build: Add a main-box flag to LIBGD_INIT



commit 64e6afd504fead42431c2b315452f62d65897c07
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Dec 2 11:39:40 2016 +0100

    build: Add a main-box flag to LIBGD_INIT
    
    This includes GdMainBox, and everything under main-icon-box.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774914

 Makefile.am              |   10 ++++++++++
 libgd.m4                 |    7 +++++++
 libgd/gd-types-catalog.c |    8 ++++++++
 libgd/gd.h               |    4 ++++
 4 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 57cd1fa..b81ff6b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -73,6 +73,16 @@ nodist_libgd_la_SOURCES += $(main_icon_box_sources)
 EXTRA_DIST += $(main_icon_box_sources)
 endif
 
+if LIBGD_MAIN_BOX
+main_box_sources =                             \
+       libgd/gd-main-box.c                     \
+       libgd/gd-main-box.h                     \
+       $(NULL)
+
+nodist_libgd_la_SOURCES += $(main_box_sources)
+EXTRA_DIST += $(main_box_sources)
+endif
+
 if LIBGD__VIEW_COMMON
 view_common_sources =                          \
        libgd/gd-main-view-generic.c            \
diff --git a/libgd.m4 b/libgd.m4
index 61b7973..9d01c5f 100644
--- a/libgd.m4
+++ b/libgd.m4
@@ -50,6 +50,13 @@ AC_DEFUN([LIBGD_INIT], [
         AC_DEFINE([LIBGD_GTK_HACKS], [1], [Description])
     ])
 
+    # main-box:
+    AM_CONDITIONAL([LIBGD_MAIN_BOX],[_LIBGD_IF_OPTION_SET([main-box],[true],[false])])
+    _LIBGD_IF_OPTION_SET([main-box],[
+        _LIBGD_SET_OPTION([main-icon-box])
+        AC_DEFINE([LIBGD_MAIN_BOX], [1], [Description])
+    ])
+
     # main-icon-box:
     AM_CONDITIONAL([LIBGD_MAIN_ICON_BOX],[_LIBGD_IF_OPTION_SET([main-icon-box],[true],[false])])
     _LIBGD_IF_OPTION_SET([main-icon-box],[
diff --git a/libgd/gd-types-catalog.c b/libgd/gd-types-catalog.c
index 59d2a4d..7bab544 100644
--- a/libgd/gd-types-catalog.c
+++ b/libgd/gd-types-catalog.c
@@ -34,6 +34,10 @@
 # include "gd-main-icon-box-child.h"
 #endif
 
+#ifdef LIBGD_MAIN_BOX
+# include "gd-main-box.h"
+#endif
+
 #ifdef LIBGD__VIEW_COMMON
 # include "gd-main-view-generic.h"
 # include "gd-styled-text-renderer.h"
@@ -85,6 +89,10 @@ gd_ensure_types (void)
   g_type_ensure (GD_TYPE_MAIN_ICON_BOX_CHILD);
 #endif
 
+#ifdef LIBGD_MAIN_BOX
+  g_type_ensure (GD_TYPE_MAIN_BOX);
+#endif
+
 #ifdef LIBGD__VIEW_COMMON
   g_type_ensure (GD_TYPE_MAIN_VIEW_GENERIC);
   g_type_ensure (GD_TYPE_STYLED_TEXT_RENDERER);
diff --git a/libgd/gd.h b/libgd/gd.h
index e1d82ab..850917a 100644
--- a/libgd/gd.h
+++ b/libgd/gd.h
@@ -46,6 +46,10 @@ G_BEGIN_DECLS
 # include <libgd/gd-main-icon-box-child.h>
 #endif
 
+#ifdef LIBGD_MAIN_BOX
+# include <libgd/gd-main-box.h>
+#endif
+
 #ifdef LIBGD__VIEW_COMMON
 # include <libgd/gd-main-view-generic.h>
 # include <libgd/gd-styled-text-renderer.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]