author | zautrix <zautrix> | 2004-09-11 15:41:30 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-11 15:41:30 (UTC) |
commit | 32f9963a39236d08718a36d5adad2a0c5c4e2602 (patch) (unidiff) | |
tree | 8856a90d505df8dc3afa0d72541f27cb68913a0d /kmicromail/accountview.cpp | |
parent | d7a273f40838f56205c1377ed0bcc5457bd46ea3 (diff) | |
download | kdepimpi-32f9963a39236d08718a36d5adad2a0c5c4e2602.zip kdepimpi-32f9963a39236d08718a36d5adad2a0c5c4e2602.tar.gz kdepimpi-32f9963a39236d08718a36d5adad2a0c5c4e2602.tar.bz2 |
Mail enhancements
-rw-r--r-- | kmicromail/accountview.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp index 85523b1..de8c5bb 100644 --- a/kmicromail/accountview.cpp +++ b/kmicromail/accountview.cpp | |||
@@ -132,48 +132,51 @@ void AccountView::setupFolderselect(Selectstore*sels) | |||
132 | sels->addAccounts(mhAccounts[i]->getWrapper(),sFolders); | 132 | sels->addAccounts(mhAccounts[i]->getWrapper(),sFolders); |
133 | } | 133 | } |
134 | for (i=0; i < imapAccounts.count();++i) | 134 | for (i=0; i < imapAccounts.count();++i) |
135 | { | 135 | { |
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) | 142 | void AccountView::downloadMailsInbox(const FolderP&fromFolder,AbstractMail*fromWrapper) |
143 | { | 143 | { |
144 | #if 0 | ||
144 | AbstractMail*targetMail = 0; | 145 | AbstractMail*targetMail = 0; |
145 | QString targetFolder = ""; | 146 | QString targetFolder = ""; |
146 | Selectstore sels; | 147 | Selectstore sels; |
147 | setupFolderselect(&sels); | 148 | setupFolderselect(&sels); |
148 | if (!sels.exec()) return; | 149 | if (!sels.exec()) return; |
149 | targetMail = sels.currentMail(); | 150 | targetMail = sels.currentMail(); |
150 | targetFolder = sels.currentFolder(); | 151 | targetFolder = sels.currentFolder(); |
151 | if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) || | 152 | if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) || |
152 | targetFolder.isEmpty()) | 153 | targetFolder.isEmpty()) |
153 | { | 154 | { |
154 | return; | 155 | return; |
155 | } | 156 | } |
156 | if (sels.newFolder() && !targetMail->createMbox(targetFolder)) | 157 | if (sels.newFolder() && !targetMail->createMbox(targetFolder)) |
157 | { | 158 | { |
158 | QMessageBox::critical(0,tr("Error creating new Folder"), | 159 | QMessageBox::critical(0,tr("Error creating new Folder"), |
159 | tr("<center>Error while creating<br>new folder - breaking.</center>")); | 160 | tr("<center>Error while creating<br>new folder - breaking.</center>")); |
160 | return; | 161 | return; |
161 | } | 162 | } |
162 | int maxsize = 0; | 163 | int maxsize = 0; |
163 | if ( sels.useSize->isChecked()) | 164 | if ( sels.useSize->isChecked()) |
164 | maxsize = sels.sizeSpinBox->value(); | 165 | maxsize = sels.sizeSpinBox->value(); |
165 | |||
166 | fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails(), maxsize); | 166 | fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails(), maxsize); |
167 | #endif | ||
168 | fromWrapper->downloadNewMails( fromFolder, mhAccounts[0]->getWrapper()); | ||
167 | refreshCurrent(); | 169 | refreshCurrent(); |
170 | |||
168 | } | 171 | } |
169 | 172 | ||
170 | void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrapper) | 173 | void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrapper) |
171 | { | 174 | { |
172 | AbstractMail*targetMail = 0; | 175 | AbstractMail*targetMail = 0; |
173 | QString targetFolder = ""; | 176 | QString targetFolder = ""; |
174 | Selectstore sels; | 177 | Selectstore sels; |
175 | setupFolderselect(&sels); | 178 | setupFolderselect(&sels); |
176 | if (!sels.exec()) return; | 179 | if (!sels.exec()) return; |
177 | targetMail = sels.currentMail(); | 180 | targetMail = sels.currentMail(); |
178 | targetFolder = sels.currentFolder(); | 181 | targetFolder = sels.currentFolder(); |
179 | if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) || | 182 | if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) || |