summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-09-12 13:21:09 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-09-12 13:21:04 -0400
commit50fc7d127660788b479d99ec761f086bb8459496 (patch)
treee01a77303d2ecd4c6e50d812381267ca681efb09 /src/modules
parent721eeb994e8d33dd285c1c3f4cd11e71a71e01c5 (diff)
always hide wireless non-wired icons in gadget if wired connection exists
the most common use case when using a wired connection is to not also be using a wireless connection
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/wireless/wireless.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/modules/wireless/wireless.c b/src/modules/wireless/wireless.c
index 141fe69..f631e03 100644
--- a/src/modules/wireless/wireless.c
+++ b/src/modules/wireless/wireless.c
@@ -1228,15 +1228,18 @@ _wireless_gadget_refresh(Instance *inst)
1228 avail++; 1228 avail++;
1229 } 1229 }
1230 } 1230 }
1231 for (type = WIRELESS_SERVICE_TYPE_WIFI; type < WIRELESS_SERVICE_TYPE_LAST; type++) 1231 if (!avail)
1232 { 1232 {
1233 if (!inst->icon[type]) continue; 1233 for (type = WIRELESS_SERVICE_TYPE_WIFI; type < WIRELESS_SERVICE_TYPE_LAST; type++)
1234 if ((wireless_config->disabled_types & (1U << type)) == (1U << type)) continue; 1234 {
1235 if (wireless_type_enabled[type] && (!wireless_network_count[type])) continue; 1235 if (!inst->icon[type]) continue;
1236 1236 if ((wireless_config->disabled_types & (1U << type)) == (1U << type)) continue;
1237 elm_box_pack_end(inst->box, inst->icon[type]); 1237 if (wireless_type_enabled[type] && (!wireless_network_count[type])) continue;
1238 evas_object_show(inst->icon[type]); 1238
1239 avail++; 1239 elm_box_pack_end(inst->box, inst->icon[type]);
1240 evas_object_show(inst->icon[type]);
1241 avail++;
1242 }
1240 } 1243 }
1241 if (!avail) 1244 if (!avail)
1242 { 1245 {