[gnome-system-tools] Fix user profiles combo by creating its model (removes warnings)
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-system-tools] Fix user profiles combo by creating its model (removes warnings)
- Date: Sun, 16 Aug 2009 18:53:34 +0000 (UTC)
commit 5b67ae4ab94a0ab21c0268a06b4607bba585e698
Author: Milan Bouchet-Valat <nalimilan club fr>
Date: Sun Aug 16 20:50:34 2009 +0200
Fix user profiles combo by creating its model (removes warnings)
For some reason, the GtkListStore for the user_settings_profile_menu GtkComboBox was no longer created on start, which made it stay empty and print many warnings.
src/users/table.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/users/table.c b/src/users/table.c
index 736f76e..6174b45 100644
--- a/src/users/table.c
+++ b/src/users/table.c
@@ -111,6 +111,16 @@ setup_shells_combo (GstUsersTool *tool)
gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (combo), 0);
}
+static void
+setup_profiles_combo (void)
+{
+ GtkWidget *combo = gst_dialog_get_widget (tool->main_dialog, "user_settings_profile_menu");
+ GtkTreeModel *model = GTK_TREE_MODEL (gtk_list_store_new (1, G_TYPE_STRING));
+
+ gtk_combo_box_set_model (GTK_COMBO_BOX (combo), model);
+ g_object_unref (model);
+}
+
void
table_populate_profiles (GstUsersTool *tool,
GList *names)
@@ -172,6 +182,7 @@ create_tables (GstUsersTool *tool)
create_group_members_table ();
/* not strictly tables, but uses a model */
+ setup_profiles_combo ();
setup_groups_combo ();
setup_shells_combo (tool);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]