[network-manager-applet/dcbw/dcb: 3/4] editor: populate connection right before saving it
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/dcbw/dcb: 3/4] editor: populate connection right before saving it
- Date: Fri, 18 Oct 2013 19:46:51 +0000 (UTC)
commit 703b8540703249d428a70b86d0b30c5f1392655e
Author: Dan Williams <dcbw redhat com>
Date: Thu Oct 10 11:29:39 2013 -0500
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.
src/connection-editor/nm-connection-editor.c | 3 +++
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 3024244..2752b00 100644
--- a/src/connection-editor/nm-connection-editor.c
+++ b/src/connection-editor/nm-connection-editor.c
@@ -1019,6 +1019,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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]