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



commit 7bdcd22bef5b1e513a7664869eb26436195bfe1e
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Dec 1 19:30:00 2016 +0100

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

 Makefile.am              |   12 ++++++++++++
 libgd.m4                 |    8 ++++++++
 libgd/gd-types-catalog.c |   10 ++++++++++
 libgd/gd.h               |    5 +++++
 4 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index f8530b3..57cd1fa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -61,6 +61,18 @@ nodist_libgd_la_SOURCES += $(box_common_sources)
 EXTRA_DIST += $(box_common_sources)
 endif
 
+if LIBGD_MAIN_ICON_BOX
+main_icon_box_sources =                                \
+       libgd/gd-main-icon-box.c                \
+       libgd/gd-main-icon-box.h                \
+       libgd/gd-main-icon-box-child.c          \
+       libgd/gd-main-icon-box-child.h          \
+       $(NULL)
+
+nodist_libgd_la_SOURCES += $(main_icon_box_sources)
+EXTRA_DIST += $(main_icon_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 3463797..f901223 100644
--- a/libgd.m4
+++ b/libgd.m4
@@ -50,6 +50,14 @@ AC_DEFUN([LIBGD_INIT], [
         AC_DEFINE([LIBGD_GTK_HACKS], [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],[
+        _LIBGD_SET_OPTION([_box-common])
+        _LIBGD_SET_OPTION([gtk-hacks])
+        AC_DEFINE([LIBGD_MAIN_ICON_BOX], [1], [Description])
+    ])
+
     # main-view:
     AM_CONDITIONAL([LIBGD_MAIN_VIEW],[_LIBGD_IF_OPTION_SET([main-view],[true],[false])])
     _LIBGD_IF_OPTION_SET([main-view],[
diff --git a/libgd/gd-types-catalog.c b/libgd/gd-types-catalog.c
index 9959a61..59d2a4d 100644
--- a/libgd/gd-types-catalog.c
+++ b/libgd/gd-types-catalog.c
@@ -29,6 +29,11 @@
 # include "gd-main-box-item.h"
 #endif
 
+#ifdef LIBGD_MAIN_ICON_BOX
+# include "gd-main-icon-box.h"
+# include "gd-main-icon-box-child.h"
+#endif
+
 #ifdef LIBGD__VIEW_COMMON
 # include "gd-main-view-generic.h"
 # include "gd-styled-text-renderer.h"
@@ -75,6 +80,11 @@ gd_ensure_types (void)
   g_type_ensure (GD_TYPE_MAIN_BOX_ITEM);
 #endif
 
+#ifdef LIBGD_MAIN_ICON_BOX
+  g_type_ensure (GD_TYPE_MAIN_ICON_BOX);
+  g_type_ensure (GD_TYPE_MAIN_ICON_BOX_CHILD);
+#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 6725abc..e1d82ab 100644
--- a/libgd/gd.h
+++ b/libgd/gd.h
@@ -41,6 +41,11 @@ G_BEGIN_DECLS
 # include <libgd/gd-main-box-item.h>
 #endif
 
+#ifdef LIBGD_MAIN_ICON_BOX
+# include <libgd/gd-main-icon-box.h>
+# include <libgd/gd-main-icon-box-child.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]