[gnome-system-tools] Bug 529228 – Set the group name when finished creating a new group
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-system-tools] Bug 529228 – Set the group name when finished creating a new group
- Date: Sun, 26 Jul 2009 20:26:52 +0000 (UTC)
commit 6a5cd519dfd9b95b419ab737c19bf87cd0c5124f
Author: James Westby <james westby canonical com>
Date: Sun Jul 26 22:24:43 2009 +0200
Bug 529228 â?? Set the group name when finished creating a new group
The chosen group name was not retrieved from the dialog. This made it impossible to create groups at all.
src/users/callbacks.c | 2 +-
src/users/group-settings.c | 16 ++++++++++++++++
src/users/group-settings.h | 1 +
3 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/src/users/callbacks.c b/src/users/callbacks.c
index db954f8..218310e 100644
--- a/src/users/callbacks.c
+++ b/src/users/callbacks.c
@@ -407,7 +407,7 @@ on_group_new_clicked (GtkButton *button, gpointer user_data)
response = group_settings_dialog_run (dialog, group);
if (response == GTK_RESPONSE_OK) {
- group_settings_dialog_get_data (group);
+ group = group_settings_dialog_get_group ();
config = OOBS_GROUPS_CONFIG (GST_USERS_TOOL (tool)->groups_config);
groups_list = oobs_groups_config_get_groups (config);
diff --git a/src/users/group-settings.c b/src/users/group-settings.c
index bb83447..b4386a4 100644
--- a/src/users/group-settings.c
+++ b/src/users/group-settings.c
@@ -341,3 +341,19 @@ group_settings_dialog_get_data (OobsGroup *group)
group_members_table_save (group);
}
+
+OobsGroup *
+group_settings_dialog_get_group (void)
+{
+ GtkWidget *widget;
+ OobsGroup *group;
+
+ widget = gst_dialog_get_widget (tool->main_dialog, "group_settings_name");
+ group = oobs_group_new(gtk_entry_get_text (GTK_ENTRY (widget)));
+ widget = gst_dialog_get_widget (tool->main_dialog, "group_settings_gid");
+ oobs_group_set_gid (group, gtk_spin_button_get_value (GTK_SPIN_BUTTON (widget)));
+
+ group_members_table_save (group);
+
+ return group;
+}
diff --git a/src/users/group-settings.h b/src/users/group-settings.h
index 38e7740..67be7dd 100644
--- a/src/users/group-settings.h
+++ b/src/users/group-settings.h
@@ -37,6 +37,7 @@ gint group_settings_dialog_run (GtkWidget *dialog,
gid_t group_settings_find_new_gid (void);
void group_settings_dialog_get_data (OobsGroup *group);
+OobsGroup * group_settings_dialog_get_group (void);
#endif /* __GROUP_SETTINGS_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]