mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
56 lines
1.7 KiB
Diff
56 lines
1.7 KiB
Diff
|
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;
|
||
|
}
|
||
|
|