[PATCH 4/4] 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);
-- 
1.6.3.3


--=-WTqUhcpzJGUML/4aDgUX
Content-Disposition: attachment; filename*0=0004-Fix-hiding-encrypt-home-folder-option-when-not-suppo.pat; filename*1=ch
Content-Type: text/x-patch; name="0004-Fix-hiding-encrypt-home-folder-option-when-not-suppo.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



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