summarylogtreecommitdiffstats
path: root/fix-build-without-gconf.patch
blob: f8735a3aced12e479ac8a9044d5951ffb4d5a245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
diff -Naur agave-0.4.7.orig/src/gcs-conf.cc agave-0.4.7/src/gcs-conf.cc
--- agave-0.4.7.orig/src/gcs-conf.cc	2008-02-26 04:07:02.000000000 +0100
+++ agave-0.4.7/src/gcs-conf.cc	2018-09-05 13:00:23.733940123 +0200
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "gcs-conf.h"
 #include "core/gcs-color.h"
+#include <glibmm.h>
 #ifdef HAVE_GCONFMM
 #include <gconfmm/client.h>
 #include <gconfmm/value.h>
@@ -36,6 +37,7 @@
     // gconf recommends storing enumerations as strings rather than integers
     // since it's more robust against changes in enumeration order and is more
     // human-readable.  This is a helper for gconf_string_to_enum and vice versa
+#ifdef HAVE_GCONFMM
     static GConfEnumStringPair schemetype_lookup_table[] = 
     {
         { SCHEME_COMPLEMENTS, "COMPLEMENTS" },
@@ -59,6 +61,7 @@
             operator double() { return get_float(); }
             operator float() { return get_float(); }
     };
+#endif // HAVE_GCONFMM
 
     const Glib::ustring Conf::APP_DIR = "/apps/agave";
 
@@ -128,8 +131,10 @@
 
     void Conf::set_last_scheme_type(tSchemeType t)
     {
+#ifdef HAVE_GCONFMM
         Glib::ustring schemetype_string = gconf_enum_to_string(schemetype_lookup_table, t);
         set_value(KEY_LAST_SCHEME_TYPE, schemetype_string);
+#endif // HAVE_GCONFMM
     }
 
 
@@ -137,12 +142,16 @@
     {
         Glib::ustring scheme_type;
         tSchemeType t;
+#ifdef HAVE_GCONFMM
         if (!get_value(KEY_LAST_SCHEME_TYPE, scheme_type) ||
                 !gconf_string_to_enum(schemetype_lookup_table,
                     scheme_type.c_str(), reinterpret_cast<int*>(&t)))
         {
+#endif // HAVE_GCONFMM
             t = SCHEME_TRIADS;
+#ifdef HAVE_GCONFMM
         }
+#endif // HAVE_GCONFMM
         return t;
     }