[gnome-system-tools] Fix "Reload config?" dialog shown after creating an user
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-system-tools] Fix "Reload config?" dialog shown after creating an user
- Date: Sat, 6 Feb 2010 12:01:19 +0000 (UTC)
commit 6ec2a54f43f53551f2e39c4bab44616b1893721a
Author: Milan Bouchet-Valat <nalimilan club fr>
Date: Sat Feb 6 12:59:28 2010 +0100
Fix "Reload config?" dialog shown after creating an user
We need to track 'committed' event on new OobsUsers before adding them to avoid showing this dialog.
src/users/user-settings.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/users/user-settings.c b/src/users/user-settings.c
index 7c01282..e2c4be6 100644
--- a/src/users/user-settings.c
+++ b/src/users/user-settings.c
@@ -973,6 +973,10 @@ on_user_new (GtkButton *button, gpointer user_data)
profile = gst_user_profiles_get_default_profile (GST_USERS_TOOL (tool)->profiles);
gst_user_profiles_apply (GST_USERS_TOOL (tool)->profiles, profile, user, TRUE);
+ /* We need to know about this user 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 (GST_TOOL (tool), OOBS_OBJECT (user));
+
/* Commit both user and groups config because of possible memberships
* added by the profile. Avoid showing the new user or trying to commit
* group changes if the user has not been created. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]