summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2013-10-10 11:29:39 -0500
committerDan Williams <dcbw@redhat.com>2014-01-15 15:10:37 -0600
commit162718f7a4281fe0522b1e63c78a77ecc679f96b (patch)
tree2e3ada1d439a1659a462842092798e8c85072162
parent3ec2965fd2a38f9b450a308e689b3d268cd2353d (diff)
downloadnetwork-manager-applet-162718f7a4281fe0522b1e63c78a77ecc679f96b.tar.gz
editor: populate connection right before saving it
Previously the only way the UI pages could update the connection's settings with the new values from the UI was whenever any widget changed, which required connecting all the widgets to the the ce_page_changed() handler to re-run the validate method, which populated the connection and validated it. Not all widgets need to be validated, especially if the have GtkAdjustments or are GtkToggleButtons, since these already enforce valid values. Re-validating the connection right before saving it allows these widgets to not be hooked up to ce_page_changed() every time they change, but still allows them to push their latest value to the connection/setting right before the changes are saved.
-rw-r--r--src/connection-editor/nm-connection-editor.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/connection-editor/nm-connection-editor.c b/src/connection-editor/nm-connection-editor.c
index a4336907..152cdee0 100644
--- a/src/connection-editor/nm-connection-editor.c
+++ b/src/connection-editor/nm-connection-editor.c
@@ -975,6 +975,9 @@ ok_button_clicked_cb (GtkWidget *widget, gpointer user_data)
if (self->busy)
return;
+ /* Validate one last time to ensure all pages update the connection */
+ connection_editor_validate (self);
+
ok_button_clicked_save_connection (self);
}