-rw-r--r-- | kmicromail/accountview.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp index 4ead545..85523b1 100644 --- a/kmicromail/accountview.cpp +++ b/kmicromail/accountview.cpp | |||
@@ -136,12 +136,39 @@ void AccountView::setupFolderselect(Selectstore*sels) | |||
136 | if (imapAccounts[i]->offline()) | 136 | if (imapAccounts[i]->offline()) |
137 | continue; | 137 | continue; |
138 | imapAccounts[i]->refreshFolders(false); | 138 | imapAccounts[i]->refreshFolders(false); |
139 | sels->addAccounts(imapAccounts[i]->getWrapper(),imapAccounts[i]->subFolders()); | 139 | sels->addAccounts(imapAccounts[i]->getWrapper(),imapAccounts[i]->subFolders()); |
140 | } | 140 | } |
141 | } | 141 | } |
142 | void AccountView::downloadMailsInbox(const FolderP&fromFolder,AbstractMail*fromWrapper) | ||
143 | { | ||
144 | AbstractMail*targetMail = 0; | ||
145 | QString targetFolder = ""; | ||
146 | Selectstore sels; | ||
147 | setupFolderselect(&sels); | ||
148 | if (!sels.exec()) return; | ||
149 | targetMail = sels.currentMail(); | ||
150 | targetFolder = sels.currentFolder(); | ||
151 | if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) || | ||
152 | targetFolder.isEmpty()) | ||
153 | { | ||
154 | return; | ||
155 | } | ||
156 | if (sels.newFolder() && !targetMail->createMbox(targetFolder)) | ||
157 | { | ||
158 | QMessageBox::critical(0,tr("Error creating new Folder"), | ||
159 | tr("<center>Error while creating<br>new folder - breaking.</center>")); | ||
160 | return; | ||
161 | } | ||
162 | int maxsize = 0; | ||
163 | if ( sels.useSize->isChecked()) | ||
164 | maxsize = sels.sizeSpinBox->value(); | ||
165 | |||
166 | fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails(), maxsize); | ||
167 | refreshCurrent(); | ||
168 | } | ||
142 | 169 | ||
143 | void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrapper) | 170 | void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrapper) |
144 | { | 171 | { |
145 | AbstractMail*targetMail = 0; | 172 | AbstractMail*targetMail = 0; |
146 | QString targetFolder = ""; | 173 | QString targetFolder = ""; |
147 | Selectstore sels; | 174 | Selectstore sels; |