fix folderview invisibility of newly subscribed newsgroups
authorPaul Mangan <paul@claws-mail.org>
Mon, 15 Mar 2004 05:49:27 +0000 (05:49 +0000)
committerPaul Mangan <paul@claws-mail.org>
Mon, 15 Mar 2004 05:49:27 +0000 (05:49 +0000)
ChangeLog.claws
configure.ac
src/folderview.c

index 8e30b60..4c31a34 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-15 [paul]      0.9.10claws13
+
+       * folderview.c
+               fix folderview invisibility of newly subscribed
+               newsgroups
+
 2004-03-13 [paul]      0.9.10claws12
 
        * src/compose.c
 2004-03-13 [paul]      0.9.10claws12
 
        * src/compose.c
index 28a0cb2..a7d7c08 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=12
+EXTRA_VERSION=13
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index 5a2b5e6..54e18cb 100644 (file)
@@ -2278,6 +2278,7 @@ static void folderview_new_news_group_cb(FolderView *folderview, guint action,
                                         GtkWidget *widget)
 {
        GtkCTree *ctree = GTK_CTREE(folderview->ctree);
                                         GtkWidget *widget)
 {
        GtkCTree *ctree = GTK_CTREE(folderview->ctree);
+       gchar *text[N_FOLDER_COLS] = {NULL, "0", "0", "0"};
        GtkCTreeNode *servernode, *node;
        Folder *folder;
        FolderItem *item;
        GtkCTreeNode *servernode, *node;
        Folder *folder;
        FolderItem *item;
@@ -2342,11 +2343,20 @@ static void folderview_new_news_group_cb(FolderView *folderview, guint action,
                if (folder_find_child_item_by_name(rootitem, name) != NULL)
                        continue;
 
                if (folder_find_child_item_by_name(rootitem, name) != NULL)
                        continue;
 
+               text[COL_FOLDER] = name;
+               node = gtk_ctree_insert_node(ctree, servernode, NULL, text,
+                                            FOLDER_SPACING,
+                                            folderxpm, folderxpmmask,
+                                            folderopenxpm, folderopenxpmmask,
+                                            FALSE, FALSE);
+               gtk_ctree_expand(ctree, servernode);
+
                newitem = folder_item_new(folder, name, name);
                folder_item_append(rootitem, newitem);
                newitem = folder_item_new(folder, name, name);
                folder_item_append(rootitem, newitem);
-               folderview_append_item(newitem);
+               gtk_ctree_node_set_row_data(ctree, node, newitem);
        }
 
        }
 
+       folderview_sort_folders(folderview, servernode, folder);
        gtk_clist_thaw(GTK_CLIST(ctree));
 
        slist_free_strings(new_subscr);
        gtk_clist_thaw(GTK_CLIST(ctree));
 
        slist_free_strings(new_subscr);