summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/connman/connman-gnome/0001-Monitor-the-Manager-s-State-property.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/connman/connman-gnome/0001-Monitor-the-Manager-s-State-property.patch')
-rw-r--r--meta/recipes-connectivity/connman/connman-gnome/0001-Monitor-the-Manager-s-State-property.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/connman/connman-gnome/0001-Monitor-the-Manager-s-State-property.patch b/meta/recipes-connectivity/connman/connman-gnome/0001-Monitor-the-Manager-s-State-property.patch
new file mode 100644
index 0000000000..20cbb30c1c
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-gnome/0001-Monitor-the-Manager-s-State-property.patch
@@ -0,0 +1,48 @@
1From 56d307993c0a661c73fcdd72b1392c3719a0c297 Mon Sep 17 00:00:00 2001
2Message-Id: <56d307993c0a661c73fcdd72b1392c3719a0c297.1334369310.git.paul.eggleton@linux.intel.com>
3In-Reply-To: <cover.1334369310.git.paul.eggleton@linux.intel.com>
4References: <cover.1334369310.git.paul.eggleton@linux.intel.com>
5From: Joshua Lock <josh@linux.intel.com>
6Date: Tue, 10 Apr 2012 17:54:56 -0700
7Subject: [PATCH 1/6] Monitor the Manager's State property
8
9Monitor the Manager's State property and update global_ready
10appropriately when it changes.
11
12Without this change using the applet with connman 0.79 and
13starting the applet after the daemon no status icon is shown.
14
15With this change this icon displays an appropriate state when
16the applet launches.
17
18Upstream-Status: Submitted
19
20Signed-off-by: Joshua Lock <josh@linux.intel.com>
21---
22 applet/main.c | 10 ++++++++++
23 1 files changed, 10 insertions(+), 0 deletions(-)
24
25diff --git a/applet/main.c b/applet/main.c
26index 224e2fd..68a77b1 100644
27--- a/applet/main.c
28+++ b/applet/main.c
29@@ -111,6 +111,16 @@ static void manager_property_changed(DBusGProxy *proxy, const char *property,
30 iterate_list, &path);
31 update_service(proxy, path);
32 g_free(path);
33+ } else if (g_str_equal(property, "State") == TRUE) {
34+ const gchar *state = g_value_get_string(value);
35+
36+ if (g_strcmp0(state, "ready") == 0 || g_strcmp0(state, "online") == 0) {
37+ global_ready = TRUE;
38+ status_ready(global_strength);
39+ } else {
40+ global_ready = FALSE;
41+ status_offline();
42+ }
43 }
44 }
45
46--
471.7.5.4
48