[gnome-system-tools/gnome-2-28] Set GID combo box range before filling it
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-system-tools/gnome-2-28] Set GID combo box range before filling it
- Date: Wed, 16 Dec 2009 15:15:04 +0000 (UTC)
commit e217e6a7a89872c2080c2e94ad50828303fb2454
Author: Milan Bouchet-Valat <nalimilan club fr>
Date: Fri Nov 6 16:49:33 2009 +0100
Set GID combo box range before filling it
Setting the range after the GID caused it the be set to 0 the first time the dialog was run.
src/users/group-settings.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/users/group-settings.c b/src/users/group-settings.c
index 5d44aad..078d7e5 100644
--- a/src/users/group-settings.c
+++ b/src/users/group-settings.c
@@ -162,6 +162,10 @@ group_settings_dialog_new (OobsGroup *group)
dialog = gst_dialog_get_widget (tool->main_dialog, "group_settings_dialog");
name = oobs_group_get_name (group);
+ /* Set this before setting the GID so that it's not rejected */
+ widget = gst_dialog_get_widget (tool->main_dialog, "group_settings_gid");
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON (widget), 0, G_MAXINT32);
+
if (!name) {
g_object_set_data (G_OBJECT (dialog), "is_new", GINT_TO_POINTER (TRUE));
gtk_window_set_title (GTK_WINDOW (dialog), _("New group"));
@@ -184,9 +188,6 @@ group_settings_dialog_new (OobsGroup *group)
gtk_entry_set_text (GTK_ENTRY (widget), (name) ? name : "");
gtk_widget_set_sensitive (widget, (name == NULL));
- widget = gst_dialog_get_widget (tool->main_dialog, "group_settings_gid");
- gtk_spin_button_set_range (GTK_SPIN_BUTTON (widget), 0, G_MAXINT32);
-
group_members_table_set_from_group (group);
return dialog;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]