]> git.pld-linux.org Git - packages/liferea.git/commitdiff
- support for NM 0.9
authorMarcin Banasiak <marcin.banasiak@gmail.com>
Thu, 7 Apr 2011 12:59:15 +0000 (12:59 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    liferea-nm09.patch -> 1.1

liferea-nm09.patch [new file with mode: 0644]

diff --git a/liferea-nm09.patch b/liferea-nm09.patch
new file mode 100644 (file)
index 0000000..15933c1
--- /dev/null
@@ -0,0 +1,36 @@
+Based on http://liferea.git.sourceforge.net/git/gitweb.cgi?p=liferea/liferea;a=commitdiff;h=fc49ae0c9c1add55754ff5731c586b22096fbb06
+
+diff -up liferea-1.6.5/src/update.c.nm09 liferea-1.6.5/src/update.c
+--- liferea-1.6.5/src/update.c.nm09    2011-03-27 10:40:26.045331006 -0700
++++ liferea-1.6.5/src/update.c 2011-03-27 11:06:53.819481098 -0700
+@@ -589,6 +589,17 @@ update_process_finished_job (updateJobPt
+ }
+ #ifdef USE_NM
++static gboolean
++is_nm_connected (guint state)
++{
++      if (state == 3 ||  /* NM_STATE_CONNECTED */
++           state == 50 || /* NM_STATE_CONNECTED_LOCAL */
++           state == 60 || /* NM_STATE_CONNECTED_SITE */
++           state == 70)   /* NM_STATE_CONNECTED_GLOBAL */
++               return TRUE;
++      return FALSE;
++}
++
+ static void
+ update_network_monitor (libnm_glib_ctx *ctx, gpointer user_data)
+ {
+@@ -600,10 +611,10 @@ update_network_monitor (libnm_glib_ctx *
+       state = libnm_glib_get_network_state (ctx);
+       online = network_is_online ();
+-      if (online && state == LIBNM_NO_NETWORK_CONNECTION) {
++      if (online && !is_nm_connected (state)) {
+               debug0 (DEBUG_UPDATE, "network manager: no network connection -> going offline");
+               network_set_online (FALSE);
+-      } else if (!online && state == LIBNM_ACTIVE_NETWORK_CONNECTION) {
++      } else if (!online && is_nm_connected (state)) {
+               debug0 (DEBUG_UPDATE, "network manager: active connection -> going online");
+               network_set_online (TRUE);
+       }
This page took 0.037109 seconds and 4 git commands to generate.