aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphySingle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/EphySingle.cpp')
-rw-r--r--embed/mozilla/EphySingle.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/embed/mozilla/EphySingle.cpp b/embed/mozilla/EphySingle.cpp
index 0d920900a..3a3948de0 100644
--- a/embed/mozilla/EphySingle.cpp
+++ b/embed/mozilla/EphySingle.cpp
@@ -45,6 +45,7 @@ NS_IMPL_ISUPPORTS1(EphySingle, nsIObserver)
EphySingle::EphySingle()
: mOwner(nsnull)
+, mIsOnline(PR_TRUE) /* nsIOService doesn't send an initial notification, assume we start on-line */
{
LOG ("EphySingle ctor");
}
@@ -233,11 +234,9 @@ NS_IMETHODIMP EphySingle::Observe(nsISupports *aSubject,
else if (strcmp (aTopic, "network:offline-status-changed") == 0)
{
/* aData is either (PRUnichar[]) "offline" or "online" */
- gboolean offline;
+ mIsOnline = (aData && aData[0] == 'o' && aData[1] == 'n');
- offline = (aData[1] == 'f');
-
- g_signal_emit_by_name (mOwner, "network-status", offline);
+ g_object_notify (G_OBJECT (mOwner), "network-status");
}
else
{