mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 04:10:14 +01:00
cli/connections: improve sort by active connections
When sorting the active connections, use the same policy as "nmcli" and "nmcli d", not just the connection state. It looks better that way.
This commit is contained in:
parent
13d2d332dd
commit
def03fd7cf
1 changed files with 2 additions and 4 deletions
|
|
@ -1693,12 +1693,10 @@ con_show_get_items_cmp (gconstpointer pa, gconstpointer pb, gpointer user_data)
|
|||
switch (item) {
|
||||
|
||||
case NMC_SORT_ACTIVE:
|
||||
NM_CMP_DIRECT (active_connection_get_state_ord (ac_b),
|
||||
active_connection_get_state_ord (ac_a));
|
||||
NM_CMP_RETURN (nmc_active_connection_cmp (ac_b, ac_a));
|
||||
break;
|
||||
case NMC_SORT_ACTIVE_INV:
|
||||
NM_CMP_DIRECT (active_connection_get_state_ord (ac_a),
|
||||
active_connection_get_state_ord (ac_b));
|
||||
NM_CMP_RETURN (nmc_active_connection_cmp (ac_a, ac_b));
|
||||
break;
|
||||
|
||||
case NMC_SORT_TYPE:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue