[network-manager-applet/nma-0-9-8] connection-editor: fix display of vlan parent
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/nma-0-9-8] connection-editor: fix display of vlan parent
- Date: Wed, 11 Sep 2013 14:50:41 +0000 (UTC)
commit 88f5199547696fe6ab6c27c273615ee3d9234259
Author: Dan Winship <danw gnome org>
Date: Wed Sep 11 10:50:12 2013 -0400
connection-editor: fix display of vlan parent
For a VLAN with "parent" set to an ifname, the editor was mistakenly
showing the parent as being whatever entry for that device came
alphabetically first in the popup menu (which I had never noticed
before because I didn't have any ethernet connection names that came
alphabetically before the MAC address of my ethernet card).
Also, fix the parent menu to always list ifname-based parents before
connection-uuid-based parents.
src/connection-editor/page-vlan.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c
index 3e5537b..f2aad11 100644
--- a/src/connection-editor/page-vlan.c
+++ b/src/connection-editor/page-vlan.c
@@ -234,6 +234,10 @@ sort_parents (gconstpointer a, gconstpointer b)
VlanParent *pa = *(VlanParent **)a;
VlanParent *pb = *(VlanParent **)b;
+ if (pa->connection && !pb->connection)
+ return 1;
+ else if (pb->connection && !pa->connection)
+ return -1;
return strcmp (pa->label, pb->label);
}
@@ -402,7 +406,7 @@ populate_ui (CEPageVlan *self)
for (i = 0; priv->parents[i]; i++) {
if (parent_device && parent_device != priv->parents[i]->device)
continue;
- if (parent_connection && parent_connection != priv->parents[i]->connection)
+ if (parent_connection != priv->parents[i]->connection)
continue;
current_parent = priv->parents[i]->label;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]