Commit 03ef4eaa authored by Michael Catanzaro's avatar Michael Catanzaro

json-glib should not be required

It's really only needed for sync, so stop using it unconditionally.
parent 4a7de812
......@@ -108,7 +108,6 @@ PKG_CHECK_MODULES([GNOME_DESKTOP], [gnome-desktop-3.0 >= 2.91.2])
PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= $GTK_REQUIRED])
PKG_CHECK_MODULES([GTK_UNIX_PRINT], [gtk+-unix-print-3.0 >= $GTK_REQUIRED])
PKG_CHECK_MODULES([ICU_UC], [icu-uc >= 4.6])
PKG_CHECK_MODULES([JSON_GLIB], [json-glib-1.0 >= 1.2.0])
PKG_CHECK_MODULES([LIBNOTIFY], [libnotify >= 0.5.1])
PKG_CHECK_MODULES([LIBSECRET], [libsecret-1 >= 0.14])
PKG_CHECK_MODULES([LIBSOUP], [libsoup-2.4 >= 2.48.0])
......@@ -140,7 +139,8 @@ AC_ARG_ENABLE([firefox-sync],
[enable_firefox_sync=no]
)
AS_IF([test "x$enable_firefox_sync" = "xyes"],
[PKG_CHECK_MODULES([HOGWEED], [hogweed >= 3.2])
[PKG_CHECK_MODULES([JSON_GLIB], [json-glib-1.0 >= 1.2.0])
PKG_CHECK_MODULES([HOGWEED], [hogweed >= 3.2])
PKG_CHECK_MODULES([NETTLE], [nettle >= 3.2])
AC_DEFINE([ENABLE_SYNC], [1], [Define if Firefox Sync support is enabled])]
)
......
......@@ -48,6 +48,7 @@ struct _EphyBookmark {
gboolean uploaded;
};
#ifdef ENABLE_SYNC
static JsonSerializableIface *serializable_iface = NULL;
static void json_serializable_iface_init (gpointer g_iface);
......@@ -55,6 +56,9 @@ static void json_serializable_iface_init (gpointer g_iface);
G_DEFINE_TYPE_WITH_CODE (EphyBookmark, ephy_bookmark, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (JSON_TYPE_SERIALIZABLE,
json_serializable_iface_init))
#else
G_DEFINE_TYPE (EphyBookmark, ephy_bookmark, G_TYPE_OBJECT)
#endif
enum {
PROP_0,
......@@ -230,6 +234,7 @@ ephy_bookmark_init (EphyBookmark *self)
#endif
}
#ifdef ENABLE_SYNC
static JsonNode *
ephy_bookmark_json_serializable_serialize_property (JsonSerializable *serializable,
const char *name,
......@@ -303,6 +308,7 @@ json_serializable_iface_init (gpointer g_iface)
iface->serialize_property = ephy_bookmark_json_serializable_serialize_property;
iface->deserialize_property = ephy_bookmark_json_serializable_deserialize_property;
}
#endif
EphyBookmark *
ephy_bookmark_new (const char *url, const char *title, GSequence *tags)
......
......@@ -21,7 +21,10 @@
#pragma once
#include <glib-object.h>
#ifdef ENABLE_SYNC
#include <json-glib/json-glib.h>
#endif
G_BEGIN_DECLS
......
......@@ -47,10 +47,11 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <JavaScriptCore/JavaScript.h>
#include <json-glib/json-glib.h>
#include <string.h>
#ifdef ENABLE_SYNC
#include <json-glib/json-glib.h>
#include "ephy-sync-crypto.h"
#include "ephy-sync-secret.h"
#include "ephy-sync-service.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment