]> git.pld-linux.org Git - packages/liferea.git/blame - liferea-nm09.patch
- added -libnotify-0.7.patch and -nm09.patch
[packages/liferea.git] / liferea-nm09.patch
CommitLineData
c568d202
MB
1Based on http://liferea.git.sourceforge.net/git/gitweb.cgi?p=liferea/liferea;a=commitdiff;h=fc49ae0c9c1add55754ff5731c586b22096fbb06
2
3diff -up liferea-1.6.5/src/update.c.nm09 liferea-1.6.5/src/update.c
4--- liferea-1.6.5/src/update.c.nm09 2011-03-27 10:40:26.045331006 -0700
5+++ liferea-1.6.5/src/update.c 2011-03-27 11:06:53.819481098 -0700
6@@ -589,6 +589,17 @@ update_process_finished_job (updateJobPt
7 }
8
9 #ifdef USE_NM
10+static gboolean
11+is_nm_connected (guint state)
12+{
13+ if (state == 3 || /* NM_STATE_CONNECTED */
14+ state == 50 || /* NM_STATE_CONNECTED_LOCAL */
15+ state == 60 || /* NM_STATE_CONNECTED_SITE */
16+ state == 70) /* NM_STATE_CONNECTED_GLOBAL */
17+ return TRUE;
18+ return FALSE;
19+}
20+
21 static void
22 update_network_monitor (libnm_glib_ctx *ctx, gpointer user_data)
23 {
24@@ -600,10 +611,10 @@ update_network_monitor (libnm_glib_ctx *
25 state = libnm_glib_get_network_state (ctx);
26 online = network_is_online ();
27
28- if (online && state == LIBNM_NO_NETWORK_CONNECTION) {
29+ if (online && !is_nm_connected (state)) {
30 debug0 (DEBUG_UPDATE, "network manager: no network connection -> going offline");
31 network_set_online (FALSE);
32- } else if (!online && state == LIBNM_ACTIVE_NETWORK_CONNECTION) {
33+ } else if (!online && is_nm_connected (state)) {
34 debug0 (DEBUG_UPDATE, "network manager: active connection -> going online");
35 network_set_online (TRUE);
36 }
This page took 0.081811 seconds and 4 git commands to generate.