diff options
author | Thomas Haller <thaller@redhat.com> | 2016-10-07 13:48:35 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-10-07 13:54:51 +0200 |
commit | 68dfd862da899a596ca78b4c8c8131b6cef63dca (patch) | |
tree | c4d6131ee01b8d949aba82ff2750e5e0b79f43c1 | |
parent | 839cb9247314eef91a513be0784a97f654487867 (diff) | |
download | network-manager-applet-68dfd862da899a596ca78b4c8c8131b6cef63dca.tar.gz |
nm-c-e: silence initial message about editor initializing
Previously, we would always see:
** Message: Cannot save connection due to error: Editor initializing...
** Message: Connection validates and can be saved
when the editor starts. Hide these messages.
https://bugzilla.gnome.org/show_bug.cgi?id=772548
-rw-r--r-- | src/connection-editor/nm-connection-editor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/connection-editor/nm-connection-editor.c b/src/connection-editor/nm-connection-editor.c index aefe858c..45a95b09 100644 --- a/src/connection-editor/nm-connection-editor.c +++ b/src/connection-editor/nm-connection-editor.c @@ -180,12 +180,12 @@ connection_editor_validate (NMConnectionEditor *editor) { NMSettingConnection *s_con; GSList *iter; - char *validation_error = NULL; + gs_free char *validation_error = NULL; GError *error = NULL; if (!editor_is_initialized (editor)) { validation_error = g_strdup (_("Editor initializing…")); - goto done; + goto done_silent; } s_con = nm_connection_get_setting_connection (editor->connection); @@ -221,12 +221,12 @@ done: g_free (editor->last_validation_error); editor->last_validation_error = g_strdup (validation_error); } + +done_silent: ce_polkit_button_set_validation_error (CE_POLKIT_BUTTON (editor->ok_button), validation_error); gtk_widget_set_sensitive (editor->export_button, !validation_error); update_sensitivity (editor); - - g_free (validation_error); } static void |