set the "active" property on the GtkTreeViewColumn.
authorRodrigo Moya <rodrigo@novell.com>
Fri, 7 Jan 2005 17:01:43 +0000 (17:01 +0000)
committerRodrigo Moya <rodrigo@src.gnome.org>
Fri, 7 Jan 2005 17:01:43 +0000 (17:01 +0000)
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.

libedataserverui/ChangeLog
libedataserverui/e-categories-dialog.c

index 7d4a958..9868d7b 100644 (file)
@@ -1,5 +1,12 @@
 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"
index 6c3721c..12ff586 100644 (file)
@@ -177,7 +177,8 @@ e_categories_dialog_init (ECategoriesDialog *dialog)
 
        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 ();
@@ -253,9 +254,11 @@ e_categories_dialog_set_categories (ECategoriesDialog *dialog, const char *categ
 
        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);
        }