mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
gio: Fix application of GNetworkMonitor:network-metered patch
The wrong patch from https://bugzilla.gnome.org/show_bug.cgi?id=750282
was applied, causing test failures due to not implementing the property
on GNetworkMonitorBase (plus some other omissions).
Fix that by reverting commit a80e7db1a8
and re-applying the correct patch over the top.
https://bugzilla.gnome.org/show_bug.cgi?id=750282
This commit is contained in:
@@ -499,6 +499,14 @@ watch_connectivity_changed (GNetworkMonitor *monitor,
|
||||
g_print ("Connectivity is %d\n", g_network_monitor_get_connectivity (monitor));
|
||||
}
|
||||
|
||||
static void
|
||||
watch_metered_changed (GNetworkMonitor *monitor,
|
||||
GParamSpec *pspec,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_print ("Metered is %d\n", g_network_monitor_get_network_metered (monitor));
|
||||
}
|
||||
|
||||
static void
|
||||
do_watch_network (void)
|
||||
{
|
||||
@@ -511,8 +519,11 @@ do_watch_network (void)
|
||||
G_CALLBACK (watch_network_changed), NULL);
|
||||
g_signal_connect (monitor, "notify::connectivity",
|
||||
G_CALLBACK (watch_connectivity_changed), NULL);
|
||||
g_signal_connect (monitor, "notify::network-metered",
|
||||
G_CALLBACK (watch_metered_changed), NULL);
|
||||
watch_network_changed (monitor, g_network_monitor_get_network_available (monitor), NULL);
|
||||
watch_connectivity_changed (monitor, NULL, NULL);
|
||||
watch_metered_changed (monitor, NULL, NULL);
|
||||
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
g_main_loop_run (loop);
|
||||
|
Reference in New Issue
Block a user