Merge lp:~donadigo/wingpanel-indicator-network/ignore-virtual-hardware into lp:~wingpanel-devs/wingpanel-indicator-network/trunk

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Cody Garver
Approved revision: 176
Merged at revision: 178
Proposed branch: lp:~donadigo/wingpanel-indicator-network/ignore-virtual-hardware
Merge into: lp:~wingpanel-devs/wingpanel-indicator-network/trunk
Diff against target: 29 lines (+7/-5)
1 file modified
src/common/Widgets/NMVisualizer.vala (+7/-5)
To merge this branch: bzr merge lp:~donadigo/wingpanel-indicator-network/ignore-virtual-hardware
Reviewer Review Type Date Requested Status
WingPanel Devs Pending
Review via email: mp+300343@code.launchpad.net

Commit message

Do not list devices with iface "vmnet" or "lo"(lp:1579183)

Description of the change

Fixes bug #1579183: "Ignore virtual network hardware".

This branch makes it so that devices with iface of "vmnet" or "lo" will not show in the list, so these virtual devices won't show up in the list.

To post a comment you must log in.
176. By Adam Bieńkowski

Do not add the device to the list if it is vmnet or lo device

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/common/Widgets/NMVisualizer.vala'
2--- src/common/Widgets/NMVisualizer.vala 2016-02-06 20:49:00 +0000
3+++ src/common/Widgets/NMVisualizer.vala 2016-07-21 16:17:32 +0000
4@@ -79,6 +79,11 @@
5 }
6
7 private void device_added_cb (NM.Device device) {
8+ if (device.get_iface ().has_prefix ("vmnet") ||
9+ device.get_iface ().has_prefix ("lo")) {
10+ return;
11+ }
12+
13 WidgetNMInterface? widget_interface = null;
14 #if PLUG_NETWORK
15 WidgetNMInterface? hotspot_interface = null;
16@@ -117,11 +122,8 @@
17 #endif
18
19 update_interfaces_names ();
20-
21-
22- update_all();
23-
24- show_all();
25+ update_all ();
26+ show_all ();
27 }
28
29 void update_all () {

Subscribers

People subscribed via source and target branches