diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2006-01-26 05:52:27 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2006-01-26 05:52:27 +0800 |
commit | dd06e70a33a386b716fedd68393885f45a343b68 (patch) | |
tree | 97e77dd243f3d714f0571a62b4db7c53cb17d2aa /embed/mozilla | |
parent | 48828a1977fc21c6fc6d03fa6003a081bf14b017 (diff) | |
download | gsoc2013-epiphany-dd06e70a33a386b716fedd68393885f45a343b68.tar gsoc2013-epiphany-dd06e70a33a386b716fedd68393885f45a343b68.tar.gz gsoc2013-epiphany-dd06e70a33a386b716fedd68393885f45a343b68.tar.bz2 gsoc2013-epiphany-dd06e70a33a386b716fedd68393885f45a343b68.tar.lz gsoc2013-epiphany-dd06e70a33a386b716fedd68393885f45a343b68.tar.xz gsoc2013-epiphany-dd06e70a33a386b716fedd68393885f45a343b68.tar.zst gsoc2013-epiphany-dd06e70a33a386b716fedd68393885f45a343b68.zip |
libnm-glib be-gone! Use NetworkManager directly via DBUS, by importing the
2006-01-25 Christian Persch <chpe@cvs.gnome.org>
* configure.ac:
* data/epiphany.schemas.in:
* embed/mozilla/Makefile.am:
* embed/mozilla/mozilla-embed-single.cpp:
* lib/ephy-prefs.h:
* src/Makefile.am:
* src/ephy-net-monitor.c:
* src/ephy-net-monitor.h:
* src/ephy-shell.c: (ephy_shell_sync_network_status),
(impl_get_embed_single), (ephy_shell_dispose),
(ephy_shell_get_net_monitor), (_ephy_shell_create_instance),
(_ephy_shell_startup):
* src/ephy-shell.h:
libnm-glib be-gone! Use NetworkManager directly via DBUS, by
importing the excellent net-monitor extension directly into
Epiphany. Code by Jean-François Rameau.
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/Makefile.am | 5 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 84 |
2 files changed, 0 insertions, 89 deletions
diff --git a/embed/mozilla/Makefile.am b/embed/mozilla/Makefile.am index 291cbd069..f5504128b 100644 --- a/embed/mozilla/Makefile.am +++ b/embed/mozilla/Makefile.am @@ -148,8 +148,3 @@ libephymozillaembed_la_CXXFLAGS = \ $(GECKO_CFLAGS) \ $(DEPENDENCIES_CFLAGS) \ $(AM_CXXFLAGS) - -if ENABLE_NETWORK_MANAGER -libephymozillaembed_la_CXXFLAGS += \ - $(NETWORK_MANAGER_CFLAGS) -endif diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index 62809590a..4165ff11e 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -105,10 +105,6 @@ #include <stdlib.h> -#ifdef ENABLE_NETWORK_MANAGER -#include <libnm_glib.h> -#endif - #ifdef HAVE_GECKO_1_8 #include <nsIURI.h> #include <nsIStyleSheetService.h> @@ -136,11 +132,6 @@ struct MozillaEmbedSinglePrivate GtkWidget *theme_window; #endif -#ifdef ENABLE_NETWORK_MANAGER - libnm_glib_ctx *nm_context; - guint nm_callback_id; -#endif - #ifdef HAVE_GECKO_1_8 char *user_css_file; guint user_css_enabled_notifier_id; @@ -552,62 +543,6 @@ mozilla_init_observer (MozillaEmbedSingle *single) } } -#ifdef ENABLE_NETWORK_MANAGER - -static void -network_state_cb (libnm_glib_ctx *context, - gpointer data) -{ - EphyEmbedSingle *single = EPHY_EMBED_SINGLE (data); - libnm_glib_state state; - - state = libnm_glib_get_network_state (context); - - LOG ("Network state: %d\n", state); - - switch (state) - { - case LIBNM_NO_DBUS: - case LIBNM_NO_NETWORKMANAGER: - case LIBNM_INVALID_CONTEXT: - /* do nothing */ - break; - case LIBNM_NO_NETWORK_CONNECTION: - ephy_embed_single_set_network_status (single, FALSE); - break; - case LIBNM_ACTIVE_NETWORK_CONNECTION: - ephy_embed_single_set_network_status (single, TRUE); - break; - } -} - -static void -mozilla_init_network_manager (MozillaEmbedSingle *single) -{ - MozillaEmbedSinglePrivate *priv = single->priv; - - priv->nm_context = libnm_glib_init (); - if (priv->nm_context == NULL) - { - g_warning ("Could not initialise NetworkManager, connection status will not be managed!\n"); - return; - } - - priv->nm_callback_id = libnm_glib_register_callback (priv->nm_context, - network_state_cb, - single, NULL); - if (priv->nm_callback_id == 0) - { - libnm_glib_shutdown (priv->nm_context); - priv->nm_context = NULL; - - g_warning ("Could not connect to NetworkManager, connection status will not be managed!\n"); - return; - } -} - -#endif /* ENABLE_NETWORK_MANAGER */ - #ifdef HAVE_GECKO_1_8 static void @@ -837,10 +772,6 @@ impl_init (EphyEmbedSingle *esingle) mozilla_init_observer (single); -#ifdef ENABLE_NETWORK_MANAGER - mozilla_init_network_manager (single); -#endif - #ifdef HAVE_GECKO_1_8 mozilla_stylesheet_init (single); #endif @@ -896,21 +827,6 @@ mozilla_embed_single_dispose (GObject *object) priv->mSingleObserver = nsnull; } -#ifdef ENABLE_NETWORK_MANAGER - if (priv->nm_context != NULL) - { - if (priv->nm_callback_id != 0) - { - libnm_glib_unregister_callback (priv->nm_context, - priv->nm_callback_id); - priv->nm_callback_id = 0; - } - - libnm_glib_shutdown (priv->nm_context); - priv->nm_context = NULL; - } -#endif - parent_class->dispose (object); } |