[grilo/0.2.x] build: Require a newer GLib version
- From: Juan A. Suárez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo/0.2.x] build: Require a newer GLib version
- Date: Sat, 19 Dec 2015 11:25:44 +0000 (UTC)
commit db20f6f4a4e793ddcb45b7a7e534e90d9c18c537
Author: Bastien Nocera <hadess hadess net>
Date: Tue Sep 22 17:37:10 2015 +0200
build: Require a newer GLib version
And always build the NetworkMonitor support for networked sources.
configure.ac | 7 +------
src/grl-registry.c | 16 ----------------
2 files changed, 1 insertions(+), 22 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 86ec31a..e408bed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,7 +115,7 @@ AC_DEFINE_UNQUOTED(GRL_PLUGINS_DIR, "$GRL_PLUGINS_DIR", [Plugins directory])
PKG_CHECK_MODULES(DEPS, glib-2.0 >= 2.34 \
gobject-2.0 \
gmodule-2.0 \
- gio-2.0 \
+ gio-2.0 >= 2.44\
libxml-2.0)
@@ -124,11 +124,6 @@ GLIB_MKENUMS=`pkg-config --variable=glib_mkenums glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
AC_SUBST(GLIB_MKENUMS)
-PKG_CHECK_MODULES(GIO_WITH_NM, gio-2.0 >= 2.43.1, [has_gio_with_netmon=yes], [has_gio_with_netmon=false])
-if test "x$has_gio_with_netmon" = "xyes"; then
- AC_DEFINE(HAVE_GIO_WITH_NETMON, 1, [GNetworkConnectivityMonitor available])
-fi
-
# ----------------------------------------------------------
# UI Tool
# ----------------------------------------------------------
diff --git a/src/grl-registry.c b/src/grl-registry.c
index b9cce83..3948c02 100644
--- a/src/grl-registry.c
+++ b/src/grl-registry.c
@@ -65,16 +65,10 @@ GRL_LOG_DOMAIN(registry_log_domain);
#define LOCAL_NET_TAG "net:local"
#define INTERNET_NET_TAG "net:internet"
-#ifdef HAVE_GIO_WITH_NETMON
#define SET_INVISIBLE_SOURCE(src, val) \
g_object_set_data(G_OBJECT(src), "invisible", GINT_TO_POINTER(val))
#define SOURCE_IS_INVISIBLE(src) \
GPOINTER_TO_INT(g_object_get_data(G_OBJECT(src), "invisible"))
-#else
-#define SET_INVISIBLE_SOURCE(src, val)
-#define SOURCE_IS_INVISIBLE(src) \
- FALSE
-#endif /* HAVE_GIO_WITH_NETMON */
#define GRL_REGISTRY_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE((object), \
@@ -99,9 +93,7 @@ struct _GrlRegistryPrivate {
GSList *allowed_plugins;
gboolean all_plugins_preloaded;
struct KeyIDHandler key_id_handler;
-#ifdef HAVE_GIO_WITH_NETMON
GNetworkMonitor *netmon;
-#endif
};
static void grl_registry_setup_ranks (GrlRegistry *registry);
@@ -207,7 +199,6 @@ grl_registry_class_init (GrlRegistryClass *klass)
G_TYPE_NONE, 1, G_TYPE_STRING);
}
-#ifdef HAVE_GIO_WITH_NETMON
static void
get_connectivity (GrlRegistry *registry,
GNetworkConnectivity *connectivity,
@@ -299,7 +290,6 @@ network_changed_cb (GObject *gobject,
}
}
}
-#endif /* HAVE_GIO_WITH_NETMON */
static void
grl_registry_init (GrlRegistry *registry)
@@ -317,13 +307,11 @@ grl_registry_init (GrlRegistry *registry)
registry->priv->system_keys =
g_hash_table_new_full (g_str_hash, g_str_equal, NULL, (GDestroyNotify) g_param_spec_unref);
-#ifdef HAVE_GIO_WITH_NETMON
registry->priv->netmon = g_network_monitor_get_default ();
g_signal_connect (G_OBJECT (registry->priv->netmon), "notify::connectivity",
G_CALLBACK (network_changed_cb), registry);
g_signal_connect (G_OBJECT (registry->priv->netmon), "notify::network-available",
G_CALLBACK (network_changed_cb), registry);
-#endif
key_id_handler_init (®istry->priv->key_id_handler);
@@ -338,7 +326,6 @@ configs_free (GList *configs)
g_list_free_full (configs, g_object_unref);
}
-#ifdef HAVE_GIO_WITH_NETMON
static void
update_source_visibility (GrlRegistry *registry,
GrlSource *source)
@@ -383,7 +370,6 @@ update_source_visibility (GrlRegistry *registry,
}
}
}
-#endif /* HAVE_GIO_WITH_NETMON */
static void
config_source_rank (GrlRegistry *registry,
@@ -1140,10 +1126,8 @@ grl_registry_register_source (GrlRegistry *registry,
/* Set source rank */
set_source_rank (registry, source);
-#ifdef HAVE_GIO_WITH_NETMON
/* Update whether it should be invisible */
update_source_visibility (registry, source);
-#endif
if (!SOURCE_IS_INVISIBLE(source))
g_signal_emit (registry, registry_signals[SIG_SOURCE_ADDED], 0, source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]