From dafc2a996545008a9027f2e894ab784b62464c00 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Fri, 24 Jun 2011 00:15:43 +0200 Subject: Require NetworkManager It's not optional in GNOME 3 --- src/Makefile.am | 17 +++++------------ src/ephy-shell.c | 19 +------------------ 2 files changed, 6 insertions(+), 30 deletions(-) (limited to 'src') 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 #include #include #include @@ -56,11 +57,7 @@ #include "ephy-gui.h" #include "ephy-stock-icons.h" #include "ephy-web-view.h" - -#ifdef ENABLE_NETWORK_MANAGER -#include #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 -- cgit v1.2.3