2005-01-07 Rodrigo Moya <rodrigo@novell.com>
+ * e-categories-config.c (e_categories_config_init): set the "active"
+ property on the GtkTreeViewColumn.
+ (e_categories_dialog_set_categories): process correctly the strings
+ array we get from g_strsplit.
+
+2005-01-07 Rodrigo Moya <rodrigo@novell.com>
+
* e-categories-dialog.c (e_categories_dialog_set_categories): added
missing code to set the widgets to the specificied categories list.
(e_categories_dialog_init): set dialog's title and connect to "toggled"
renderer = gtk_cell_renderer_toggle_new ();
g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (category_toggled_cb), dialog);
- column = gtk_tree_view_column_new_with_attributes ("?", renderer, NULL);
+ column = gtk_tree_view_column_new_with_attributes ("?", renderer,
+ "active", 0, NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (priv->categories_list), column);
renderer = gtk_cell_renderer_text_new ();
arr = g_strsplit (categories, ",", 0);
if (arr) {
- int i;
- for (i = 0; i < G_N_ELEMENTS (arr); i++)
+ int i = 0;
+ while (arr[i] != NULL) {
g_hash_table_insert (priv->selected_categories, g_strdup (arr[i]), g_strdup (arr[i]));
+ i++;
+ }
g_strfreev (arr);
}