[recipes] Use --export-dynamic for finding get_type functions



commit 25a90ae69ebee3cddecb1c37466e2caed2db3a45
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Feb 24 17:40:19 2017 -0500

    Use --export-dynamic for finding get_type functions
    
    This is the typical way to do it. For some reason, it fails
    for GrQueryEditor, so help GtkBuilder out by explicitly
    specifying the get_type function for this type.

 configure.ac     |    3 ++-
 src/gr-window.ui |    2 +-
 src/main.c       |   31 -------------------------------
 3 files changed, 3 insertions(+), 33 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index bdb5b98..e3dbae1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,7 +136,8 @@ fi
 dnl ***********************************************************************
 dnl Check for required packages
 dnl ***********************************************************************
-PKG_CHECK_MODULES(RECIPES, [gio-2.0 >= 2.42
+PKG_CHECK_MODULES(RECIPES, [gmodule-2.0
+                            gio-2.0 >= 2.42
                             gtk+-3.0 >= 3.20
                             $AUTOAR_DEP
                             $GSPELL_DEP
diff --git a/src/gr-window.ui b/src/gr-window.ui
index 93d8ac6..39d8ed7 100644
--- a/src/gr-window.ui
+++ b/src/gr-window.ui
@@ -157,7 +157,7 @@
         <property name="visible">1</property>
         <property name="orientation">vertical</property>
         <child>
-          <object class="GrQueryEditor" id="search_bar">
+          <object class="GrQueryEditor" type-func="gr_query_editor_get_type" id="search_bar">
             <property name="visible">1</property>
             <property name="search-mode-enabled" bind-source="search_button" bind-property="active" 
bind-flags="bidirectional"/>
             <signal name="changed" handler="search_changed" swapped="yes"/>
diff --git a/src/main.c b/src/main.c
index 7275d2a..1452ebd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -26,22 +26,6 @@
 #include <libgd/gd.h>
 
 #include "gr-app.h"
-#include "gr-cuisine-page.h"
-#include "gr-cuisines-page.h"
-#include "gr-details-page.h"
-#include "gr-edit-page.h"
-#include "gr-list-page.h"
-#include "gr-query-editor.h"
-#include "gr-recipes-page.h"
-#include "gr-search-page.h"
-#include "gr-shopping-page.h"
-#include "gr-cooking-view.h"
-#include "gr-cooking-page.h"
-#include "gr-timer-widget.h"
-#include "gr-time-widget.h"
-#include "gr-image-viewer.h"
-#include "gr-image-page.h"
-
 
 int
 main (int argc, char *argv[])
@@ -50,21 +34,6 @@ main (int argc, char *argv[])
         int status;
 
         gd_ensure_types ();
-        g_type_ensure (GR_TYPE_COOKING_VIEW);
-        g_type_ensure (GR_TYPE_COOKING_PAGE);
-        g_type_ensure (GR_TYPE_CUISINE_PAGE);
-        g_type_ensure (GR_TYPE_CUISINES_PAGE);
-        g_type_ensure (GR_TYPE_DETAILS_PAGE);
-        g_type_ensure (GR_TYPE_EDIT_PAGE);
-        g_type_ensure (GR_TYPE_IMAGE_VIEWER);
-        g_type_ensure (GR_TYPE_IMAGE_PAGE);
-        g_type_ensure (GR_TYPE_LIST_PAGE);
-        g_type_ensure (GR_TYPE_QUERY_EDITOR);
-        g_type_ensure (GR_TYPE_RECIPES_PAGE);
-        g_type_ensure (GR_TYPE_SEARCH_PAGE);
-        g_type_ensure (GR_TYPE_SHOPPING_PAGE);
-        g_type_ensure (GR_TYPE_TIMER_WIDGET);
-        g_type_ensure (GR_TYPE_TIME_WIDGET);
 
         setlocale (LC_ALL, "");
         bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);


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