diff options
author | Xan Lopez <xlopez@igalia.com> | 2011-06-24 06:15:43 +0800 |
---|---|---|
committer | Xan Lopez <xlopez@igalia.com> | 2011-06-24 06:15:43 +0800 |
commit | dafc2a996545008a9027f2e894ab784b62464c00 (patch) | |
tree | 01368f0320b43a9a314710a0774afdd997ee70e4 | |
parent | 8415cf6da16201127aadb7853e3969ed824de919 (diff) | |
download | gsoc2013-epiphany-dafc2a996545008a9027f2e894ab784b62464c00.tar gsoc2013-epiphany-dafc2a996545008a9027f2e894ab784b62464c00.tar.gz gsoc2013-epiphany-dafc2a996545008a9027f2e894ab784b62464c00.tar.bz2 gsoc2013-epiphany-dafc2a996545008a9027f2e894ab784b62464c00.tar.lz gsoc2013-epiphany-dafc2a996545008a9027f2e894ab784b62464c00.tar.xz gsoc2013-epiphany-dafc2a996545008a9027f2e894ab784b62464c00.tar.zst gsoc2013-epiphany-dafc2a996545008a9027f2e894ab784b62464c00.zip |
Require NetworkManager
It's not optional in GNOME 3
-rw-r--r-- | configure.ac | 31 | ||||
-rw-r--r-- | src/Makefile.am | 17 | ||||
-rw-r--r-- | src/ephy-shell.c | 19 |
3 files changed, 11 insertions, 56 deletions
diff --git a/configure.ac b/configure.ac index bace3970e..a8753960c 100644 --- a/configure.ac +++ b/configure.ac @@ -93,6 +93,7 @@ WEBKIT_GTK_REQUIRED=1.5.1 LIBSOUP_GNOME_REQUIRED=2.33.1 GNOME_KEYRING_REQUIRED=2.26.0 GSETTINGS_DESKTOP_SCHEMAS_REQUIRED=0.0.1 +NETWORK_MANAGER_REQUIRED=0.8.9997 # Tests @@ -120,7 +121,8 @@ PKG_CHECK_MODULES([DEPENDENCIES], [ webkitgtk-3.0 >= $WEBKIT_GTK_REQUIRED libsoup-gnome-2.4 >= $LIBSOUP_GNOME_REQUIRED gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED - gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED + gsettings-desktop-schemas >= $GSETTINGS_DESKTOP_SCHEMAS_REQUIRED + NetworkManager >= $NETWORK_MANAGER_REQUIRED ]) # **** @@ -304,30 +306,8 @@ fi AM_CONDITIONAL([ENABLE_ZEROCONF],[test "$enable_zeroconf" = "yes"]) -# NetworkManager - -AC_MSG_CHECKING([whether to enable NetworkManager support]) -AC_ARG_ENABLE([network-manager], - AS_HELP_STRING([--enable-network-manager],[Whether to enable automatic network status with NetworkManager (default: disabled)]), - [],[enable_network_manager=no]) -AC_MSG_RESULT([$enable_network_manager]) - -if test "$enable_network_manager" != "no"; then - PKG_CHECK_MODULES(NETWORK_MANAGER, NetworkManager, [have_network_manager=yes],[have_network_manager=no]) - - if test "$enable_network_manager" = "yes" -a "$have_network_manager" = "no"; then - AC_MSG_ERROR([NetworkManager support requested but NetworkManager headers not found]) - elif test "$have_network_manager" = "no"; then - AC_MSG_WARN([NetworkManager headers not found; disabling NetworkManager support]) - fi -fi - -if test "$enable_network_manager" = "yes"; then - AC_PATH_PROG([GDBUS_CODEGEN], [gdbus-codegen]) - AC_DEFINE([ENABLE_NETWORK_MANAGER],[1],[Define for NetworkManager support]) -fi - -AM_CONDITIONAL([ENABLE_NETWORK_MANAGER],[test "$enable_network_manager" = "yes"]) +# GDBus codegen +AC_PATH_PROG([GDBUS_CODEGEN], [gdbus-codegen]) # ************ # Misc defines @@ -456,7 +436,6 @@ Epiphany was configured with the following options: Extra debugging support : $enable_debug Zeroconf bookmarks support : $enable_zeroconf - NetworkManager support : $enable_network_manager GObject introspection : $found_introspection Seed support : $enable_seed NSS support : $enable_nss diff --git a/src/Makefile.am b/src/Makefile.am index 4b095a8b0..a97aa27e7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -113,9 +113,10 @@ libephymain_la_CPPFLAGS = \ $(AM_CPPFLAGS) libephymain_la_CFLAGS = \ - $(DEPENDENCIES_CFLAGS) \ - $(DBUS_CFLAGS) \ - $(WEBKIT_CFLAGS) \ + $(DEPENDENCIES_CFLAGS) \ + $(DBUS_CFLAGS) \ + $(WEBKIT_CFLAGS) \ + $(NETWORK_MANAGER_CFLAGS) \ $(AM_CFLAGS) BUILT_SOURCES = \ @@ -123,7 +124,6 @@ BUILT_SOURCES = \ ephy-dbus-client-bindings.h \ ephy-dbus-server-bindings.h -if ENABLE_NETWORK_MANAGER nodist_libephymain_la_SOURCES += \ ephy-network-manager.c \ ephy-network-manager.h @@ -139,9 +139,6 @@ ephy-network-manager.c ephy-network-manager.h: $(top_srcdir)/data/ephy-network-m --interface-prefix org.freedesktop. \ $< -libephymain_la_CFLAGS += $(NETWORK_MANAGER_CFLAGS) -endif - if ENABLE_SEED NOINST_H_FILES += \ ephy-seed-extension.h \ @@ -186,6 +183,7 @@ epiphany_LDADD = \ $(top_builddir)/lib/egg/libegg.la \ $(DEPENDENCIES_LIBS) \ $(DBUS_LIBS) \ + $(NETWORK_MANAGER_LIBS) \ $(LIBINTL) if HAVE_INTROSPECTION @@ -197,11 +195,6 @@ if ENABLE_SEED epiphany_LDADD += $(SEED_LIBS) endif # ENABLE_SEED -if ENABLE_NETWORK_MANAGER -epiphany_LDADD += \ - $(NETWORK_MANAGER_LIBS) -endif - TYPES_SOURCE = \ ephy-type-builtins.c \ ephy-type-builtins.h diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 7c6f6d6c8..edfd870a2 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -21,6 +21,7 @@ #include "config.h" +#include <NetworkManager.h> #include <string.h> #include <glib/gi18n.h> #include <gtk/gtk.h> @@ -56,11 +57,7 @@ #include "ephy-gui.h" #include "ephy-stock-icons.h" #include "ephy-web-view.h" - -#ifdef ENABLE_NETWORK_MANAGER -#include <NetworkManager.h> #include "ephy-network-manager.h" -#endif #define EPHY_SHELL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_SHELL, EphyShellPrivate)) @@ -73,9 +70,7 @@ struct _EphyShellPrivate EggToolbarsModel *fs_toolbars_model; EphyExtensionsManager *extensions_manager; EphyApplication *application; -#ifdef ENABLE_NETWORK_MANAGER EphyNetworkManager *nm_proxy; -#endif GtkWidget *bme; GtkWidget *history_window; GObject *pdm_dialog; @@ -150,8 +145,6 @@ ephy_shell_new_window_cb (EphyEmbedSingle *single, NULL, NULL, flags, chromemask, is_popup, 0); } -#ifdef ENABLE_NETWORK_MANAGER - static void ephy_shell_sync_network_status (EphyNetworkManager *nm_proxy, NMState state, @@ -169,8 +162,6 @@ ephy_shell_sync_network_status (EphyNetworkManager *nm_proxy, ephy_embed_single_set_network_status (single, net_status); } -#endif /* ENABLE_NETWORK_MANAGER */ - static GObject* impl_get_embed_single (EphyEmbedShell *embed_shell) { @@ -189,13 +180,11 @@ impl_get_embed_single (EphyEmbedShell *embed_shell) priv->embed_single_connected = TRUE; -#ifdef ENABLE_NETWORK_MANAGER /* Now we need the net monitor */ ephy_shell_get_net_monitor (shell); ephy_shell_sync_network_status (priv->nm_proxy, ephy_network_manager_get_state (priv->nm_proxy), shell); -#endif } return embed_single; @@ -296,7 +285,6 @@ ephy_shell_dispose (GObject *object) priv->bookmarks = NULL; } -#ifdef ENABLE_NETWORK_MANAGER if (priv->nm_proxy != NULL) { LOG ("Unref net monitor"); @@ -305,7 +293,6 @@ ephy_shell_dispose (GObject *object) g_object_unref (priv->nm_proxy); priv->nm_proxy = NULL; } -#endif /* ENABLE_NETWORK_MANAGER */ if (priv->application != NULL) { @@ -679,7 +666,6 @@ ephy_shell_get_extensions_manager (EphyShell *es) GObject * ephy_shell_get_net_monitor (EphyShell *shell) { -#ifdef ENABLE_NETWORK_MANAGER EphyShellPrivate *priv = shell->priv; if (priv->nm_proxy == NULL) @@ -695,9 +681,6 @@ ephy_shell_get_net_monitor (EphyShell *shell) } return G_OBJECT (priv->nm_proxy); -#else - return NULL; -#endif /* ENABLE_NETWORK_MANAGER */ } static void |