After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780035 - doc: Builder doesn't correctly detect internet status
doc: Builder doesn't correctly detect internet status
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: help
3.23.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-14 14:26 UTC by Jeremy Bicha
Modified: 2017-03-14 21:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
help: use g_network_monitor_can_reach_async() (4.75 KB, patch)
2017-03-14 21:53 UTC, Christian Hergert
committed Details | Review

Description Jeremy Bicha 2017-03-14 14:26:18 UTC
gnome-builder 3.23.92-0ubuntu1
Ubuntu GNOME 17.04

I disabled my Wi-FI so I have no internet access.

I then opened Builder and clicked Help and https://builder.readthedocs.io/ opened in Firefox, but what's supposed to happen is that the locally installed help gets opened instead.

$ nmcli g
STATE                   CONNECTIVITY  WIFI-HW  WIFI      WWAN-HW  WWAN    
connected (local only)  full          enabled  disabled  enabled  enabled

Ubuntu doesn't yet ship NetworkManager's connectivity config by default, but I have enabled it on my computer.
Comment 1 Christian Hergert 2017-03-14 21:29:32 UTC
Is it the case that g_network_monitor_get_network_available() will always return TRUE?

Will g_network_monitor_can_reach_async() work? We could use that to delay opening the URI instead of g_network_monitor_get_network_enabled() I guess.
Comment 2 Christian Hergert 2017-03-14 21:53:04 UTC
Created attachment 347959 [details] [review]
help: use g_network_monitor_can_reach_async()

We cannot rely on g_network_monitor_get_available() being specific enough
to tell us if we can reach builder.readthedocs.io, so use the can-reach
async API instead.
Comment 3 Christian Hergert 2017-03-14 21:53:23 UTC
Attachment 347959 [details] pushed as f1c82a3 - help: use g_network_monitor_can_reach_async()