Skip to content

nmtui: correctly check that connection list is non-empty

Jan Vaclav requested to merge jv/nmtui-ignore-signals into main

Summary

Make it so that the buttons are clickable only if we actually have any available connections to edit or delete.

Purpose

Previously, the "edit" or "delete" buttons were clickable even if there were no available connections, which was not expected and caused an assertion to fail when clicked. This is because the (internal) connections list could contain connections that were later filtered out and not displayed in the final graphical list, but the check did not take this into account.

Checklist

Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:

  • the subject for all commits is concise and explicative
  • the message for all commits explains the reason for the change
  • the source is properly formatted
  • any relevant documentation is up to date
  • you have added unit tests if applicable
  • the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.
Edited by Jan Vaclav

Merge request reports

Loading