[gnome-system-tools] Force updating groups when showing groups dialog



commit 005187843d98373b38820e822d175e218a44ec54
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Tue Mar 23 19:31:54 2010 +0100

    Force updating groups when showing groups dialog
    
    Creating/deleting users can lead to groups being created/deleted by platform tools. If we don't force updating configuration, we won't show the changes until restart, which can be confusing. The backends need a proper way of telling the GUI groups config changed.

 src/users/callbacks.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/users/callbacks.c b/src/users/callbacks.c
index 27d5449..f3f5cc3 100644
--- a/src/users/callbacks.c
+++ b/src/users/callbacks.c
@@ -177,6 +177,12 @@ on_manage_groups_clicked (GtkWidget *widget, gpointer user_data)
 	GtkWidget *dialog;
 
 	dialog = gst_dialog_get_widget (tool->main_dialog, "groups_dialog");
+
+	/* Force reloading configuration. This is needed when an user was just
+	 * created/deleted, in which case groups may have changed. */
+	oobs_object_update (GST_USERS_TOOL (tool)->groups_config);
+	gst_users_tool_update_gui (tool);
+
 	gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (tool->main_dialog));
 	while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_HELP);
 	gtk_widget_hide (dialog);



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