-gint news_scan_group(Folder *folder, FolderItem *item)
-{
- NNTPSession *session;
- gint num = 0, first = 0, last = 0;
- gint ok;
-
- g_return_val_if_fail(folder != NULL, -1);
- g_return_val_if_fail(item != NULL, -1);
-
- session = news_session_get(folder);
- if (!session) return -1;
-
- ok = news_select_group(session, item->path, &num, &first, &last);
- if (ok != NN_SUCCESS) {
- log_warning("can't set group: %s\n", item->path);
- return -1;
- }
-
- if (num == 0) {
- item->new_msgs = item->unread_msgs = item->total_msgs = item->last_num = 0;
- return 0;
- }
-
-/*
- path = folder_item_get_path(item);
- if (path && is_dir_exist(path)) {
- procmsg_get_mark_sum(path, &new, &unread, &total, &min, &max,
- first);
- }
- g_free(path);
-
- if (max < first || last < min)
- new = unread = total = num;
- else {
- if (min < first)
- min = first;
-
- if (last < max)
- max = last;
- else if (max < last) {
- new += last - max;
- unread += last - max;
- }
-
- if (new > num) new = num;
- if (unread > num) unread = num;
- }
-
- item->new = new;
- item->unread = unread;
- item->total = num;
- item->last_num = last;
-*/
- return 0;
-}
-