diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-12-14 06:59:29 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-12-14 06:59:29 +0000 |
commit | 6e466a9e0cf75cf6e4a512fcdb793766f0c45a63 (patch) | |
tree | 78e513f9e9b3288162adf452835d693434fcec5d /src/folderview.c | |
parent | 53d03c4970876ad8387fb3a743a25f4b9cec85e3 (diff) |
added an option to update only INBOX on checking new messages of IMAP4 accounts.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@827 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/folderview.c')
-rw-r--r-- | src/folderview.c | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/src/folderview.c b/src/folderview.c index dc9092d6..43ff7732 100644 --- a/src/folderview.c +++ b/src/folderview.c @@ -920,8 +920,7 @@ void folderview_check_new(Folder *folder) model = GTK_TREE_MODEL(folderview->store); if (folder && !FOLDER_IS_LOCAL(folder)) { - if (!main_window_toggle_online_if_offline - (folderview->mainwin)) + if (!main_window_toggle_online_if_offline(folderview->mainwin)) return; } @@ -956,6 +955,50 @@ void folderview_check_new(Folder *folder) folder_write_list(); } +void folderview_check_new_item(FolderItem *item) +{ + Folder *folder; + FolderView *folderview; + GtkTreeModel *model; + GtkTreeIter iter; + + g_return_if_fail(item != NULL); + g_return_if_fail(item->folder != NULL); + + if (!item->path || item->no_select) + return; + + folderview = (FolderView *)folderview_list->data; + model = GTK_TREE_MODEL(folderview->store); + + folder = item->folder; + + if (!FOLDER_IS_LOCAL(folder)) { + if (!main_window_toggle_online_if_offline(folderview->mainwin)) + return; + } + + if (!gtkut_tree_model_find_by_column_data + (model, &iter, NULL, COL_FOLDER_ITEM, item)) + return; + + inc_lock(); + main_window_lock(folderview->mainwin); + gtk_widget_set_sensitive(folderview->treeview, FALSE); + GTK_EVENTS_FLUSH(); + + folderview_scan_tree_func(folder, item, NULL); + folder_item_scan(item); + folderview_update_row(folderview, &iter); + + gtk_widget_set_sensitive(folderview->treeview, TRUE); + main_window_unlock(folderview->mainwin); + inc_unlock(); + statusbar_pop_all(); + + folder_write_list(); +} + void folderview_check_new_all(void) { GList *list; |