mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-24 23:00:40 +01:00
nmtui: emit warning for unreachable gateways
This commit is contained in:
parent
4bd025d95f
commit
b95efd3b61
1 changed files with 8 additions and 1 deletions
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include "nmt-editor.h"
|
||||
|
||||
#include "libnm-core-aux-intern/nm-libnm-core-utils.h"
|
||||
#include "nm-utils.h"
|
||||
|
||||
#include "nmtui.h"
|
||||
|
|
@ -153,10 +154,16 @@ save_connection_and_exit(NmtNewtButton *button, gpointer user_data)
|
|||
NmtEditor *editor = user_data;
|
||||
NmtEditorPrivate *priv = NMT_EDITOR_GET_PRIVATE(editor);
|
||||
NmtSyncOp op;
|
||||
GError *error = NULL;
|
||||
GError *error = NULL;
|
||||
gs_free char *gw_warning = NULL;
|
||||
|
||||
nm_connection_replace_settings_from_connection(priv->orig_connection, priv->edit_connection);
|
||||
|
||||
gw_warning = nm_connection_get_unreachable_gateways_warning(priv->orig_connection, TRUE);
|
||||
if (gw_warning) {
|
||||
nmt_newt_message_dialog(_("Warning: %s"), gw_warning);
|
||||
}
|
||||
|
||||
nmt_sync_op_init(&op);
|
||||
if (NM_IS_REMOTE_CONNECTION(priv->orig_connection)) {
|
||||
nm_remote_connection_commit_changes_async(NM_REMOTE_CONNECTION(priv->orig_connection),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue