aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.c
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-03-14 21:37:22 +0800
committerXan Lopez <xan@igalia.com>2012-03-14 21:37:22 +0800
commit990372e738219a8effebe2eb41e5ffe26b931fa7 (patch)
treec6af14dd6d94b15cc26440fc658e66fcb3122c1c /src/ephy-shell.c
parent08956cf8cd8040f8500c40b646a52b6f03ae5275 (diff)
downloadgsoc2013-epiphany-990372e738219a8effebe2eb41e5ffe26b931fa7.tar
gsoc2013-epiphany-990372e738219a8effebe2eb41e5ffe26b931fa7.tar.gz
gsoc2013-epiphany-990372e738219a8effebe2eb41e5ffe26b931fa7.tar.bz2
gsoc2013-epiphany-990372e738219a8effebe2eb41e5ffe26b931fa7.tar.lz
gsoc2013-epiphany-990372e738219a8effebe2eb41e5ffe26b931fa7.tar.xz
gsoc2013-epiphany-990372e738219a8effebe2eb41e5ffe26b931fa7.tar.zst
gsoc2013-epiphany-990372e738219a8effebe2eb41e5ffe26b931fa7.zip
Don't go to EphyEmbedSingle just to get the network status
The new GNetworkMonitor class is really a good enough abstraction, don't overdo it.
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r--src/ephy-shell.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index a6648a356..6964cefb4 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -550,21 +550,6 @@ ephy_shell_new_window_cb (EphyEmbedSingle *single,
NULL, NULL, flags, chromemask, is_popup, 0);
}
-static void
-ephy_shell_sync_network_status (GNetworkMonitor *monitor,
- gboolean available,
- EphyShell *shell)
-{
- EphyShellPrivate *priv = shell->priv;
- EphyEmbedSingle *single;
-
- if (!priv->embed_single_connected) return;
-
- single = EPHY_EMBED_SINGLE (ephy_embed_shell_get_embed_single (EPHY_EMBED_SHELL (shell)));
-
- ephy_embed_single_set_network_status (single, available);
-}
-
static GObject*
impl_get_embed_single (EphyEmbedShell *embed_shell)
{
@@ -581,13 +566,6 @@ impl_get_embed_single (EphyEmbedShell *embed_shell)
shell, G_CONNECT_AFTER);
priv->embed_single_connected = TRUE;
-
- /* Now we need the net monitor */
- if (ephy_shell_get_net_monitor (shell)) {
- ephy_shell_sync_network_status (priv->network_monitor,
- g_network_monitor_get_network_available (priv->network_monitor),
- shell);
- }
}
return embed_single;
@@ -666,8 +644,6 @@ ephy_shell_dispose (GObject *object)
if (priv->network_monitor != NULL) {
LOG ("Unref net monitor ");
- g_signal_handlers_disconnect_by_func
- (priv->network_monitor, G_CALLBACK (ephy_shell_sync_network_status), shell);
g_object_unref (priv->network_monitor);
priv->network_monitor = NULL;
}
@@ -972,11 +948,8 @@ ephy_shell_get_net_monitor (EphyShell *shell)
{
EphyShellPrivate *priv = shell->priv;
- if (priv->network_monitor == NULL) {
+ if (priv->network_monitor == NULL)
priv->network_monitor = g_network_monitor_get_default ();
- g_signal_connect (priv->network_monitor, "network-changed",
- G_CALLBACK (ephy_shell_sync_network_status), shell);
- }
return G_OBJECT (priv->network_monitor);
}