[gnome-system-tools] Fix "Reload config?" dialog shown after creating a group



commit 84c270f9635a361f0b4de5fb92402641daa68840
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Sat Mar 20 20:12:52 2010 +0100

    Fix "Reload config?" dialog shown after creating a group
    
    We need to track 'committed' event on new OobsGroups before adding them to avoid showing this dialog. See commit 6ec2a54, which did the same for users.

 src/users/callbacks.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/users/callbacks.c b/src/users/callbacks.c
index 4f22c07..27d5449 100644
--- a/src/users/callbacks.c
+++ b/src/users/callbacks.c
@@ -208,6 +208,11 @@ on_group_new_clicked (GtkButton *button, gpointer user_data)
 	if (response == GTK_RESPONSE_OK) {
 		group = group_settings_dialog_get_group ();
 		config = OOBS_GROUPS_CONFIG (GST_USERS_TOOL (tool)->groups_config);
+
+		/* We need to know about this group before adding it, else we won't be aware
+		 * that we triggered the commit, and we will show a "Reload config?" dialog. */
+		gst_tool_add_configuration_object (tool, OOBS_OBJECT (group), FALSE);
+
 		result = oobs_groups_config_add_group (config, group);
 
 		if (result == OOBS_RESULT_OK)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]