summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/emailclient.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/mailit/emailclient.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/mailit/emailclient.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp
index 90664bb..8359acf 100644
--- a/noncore/unsupported/mailit/emailclient.cpp
+++ b/noncore/unsupported/mailit/emailclient.cpp
@@ -272,25 +272,25 @@ void EmailClient::enqueMail(const Email &mail)
272 addMail.rawMail.prepend("From: \"" + addMail.from + "\" <" + addMail.fromMail + ">\n"); 272 addMail.rawMail.prepend("From: \"" + addMail.from + "\" <" + addMail.fromMail + ">\n");
273 item = new EmailListItem(outboxView, addMail, false); 273 item = new EmailListItem(outboxView, addMail, false);
274 274
275 mailboxView->setCurrentTab(1); 275 mailboxView->setCurrentTab(1);
276 276
277} 277}
278 278
279void EmailClient::sendQuedMail() 279void EmailClient::sendQuedMail()
280{ 280{
281 int count = 0; 281 int count = 0;
282 282
283 if (accountList.count() == 0) { 283 if (accountList.count() == 0) {
284 QMessageBox::warning(qApp->activeWindow(), "No account selected", "You must create an account", "OK\n"); 284 QMessageBox::warning(qApp->activeWindow(), tr("No account selected"), tr("You must create an account"), "OK\n");
285 return; 285 return;
286 } 286 }
287 //traverse listview, find messages to send 287 //traverse listview, find messages to send
288 if (! sending) { 288 if (! sending) {
289 item = (EmailListItem *) outboxView->firstChild(); 289 item = (EmailListItem *) outboxView->firstChild();
290 if (item != NULL) { 290 if (item != NULL) {
291 while (item != NULL) { 291 while (item != NULL) {
292 quedMessages.append(item->getMail()); 292 quedMessages.append(item->getMail());
293 item = (EmailListItem *) item->nextSibling(); 293 item = (EmailListItem *) item->nextSibling();
294 count++; 294 count++;
295 } 295 }
296 setMailAccount(); 296 setMailAccount();
@@ -312,26 +312,26 @@ void EmailClient::setMailAccount()
312void EmailClient::mailSent() 312void EmailClient::mailSent()
313{ 313{
314 sending = FALSE; 314 sending = FALSE;
315 sendMailButton->setEnabled(TRUE); 315 sendMailButton->setEnabled(TRUE);
316 316
317 quedMessages.clear(); 317 quedMessages.clear();
318 outboxView->clear(); //should be moved to an sentBox 318 outboxView->clear(); //should be moved to an sentBox
319} 319}
320 320
321void EmailClient::getNewMail() { 321void EmailClient::getNewMail() {
322 322
323 if (accountList.count() == 0) { 323 if (accountList.count() == 0) {
324 QMessageBox::warning(qApp->activeWindow(),"No account selected", 324 QMessageBox::warning(qApp->activeWindow(),tr("No account selected"),
325 "You must create an account", "OK\n"); 325 tr("You must create an account"), "OK\n");
326 return; 326 return;
327 } 327 }
328 328
329 setMailAccount(); 329 setMailAccount();
330 330
331 receiving = TRUE; 331 receiving = TRUE;
332 previewingMail = TRUE; 332 previewingMail = TRUE;
333 getMailButton->setEnabled(FALSE); 333 getMailButton->setEnabled(FALSE);
334 cancelButton->setEnabled(TRUE); 334 cancelButton->setEnabled(TRUE);
335 selectAccountMenu->setEnabled(FALSE); 335 selectAccountMenu->setEnabled(FALSE);
336 336
337 status1Label->setText(currentAccount->accountName + " headers"); 337 status1Label->setText(currentAccount->accountName + " headers");
@@ -776,25 +776,25 @@ void EmailClient::saveSettings()
776 mailconf->writeEntry("Accounts",acc_count); 776 mailconf->writeEntry("Accounts",acc_count);
777 mailconf->writeEntry("mailidcount", mailIdCount); 777 mailconf->writeEntry("mailidcount", mailIdCount);
778 mailconf->writeEntry("accountidcount", accountIdCount); 778 mailconf->writeEntry("accountidcount", accountIdCount);
779} 779}
780 780
781void EmailClient::selectAccount(int id) 781void EmailClient::selectAccount(int id)
782{ 782{
783 if (accountList.count() > 0) { 783 if (accountList.count() > 0) {
784 currentAccount = accountList.at(id); 784 currentAccount = accountList.at(id);
785 emit newCaption("Mailit - " + currentAccount->accountName); 785 emit newCaption("Mailit - " + currentAccount->accountName);
786 getNewMail(); 786 getNewMail();
787 } else { 787 } else {
788 emit newCaption("Mailit ! No account defined"); 788 emit newCaption( tr("Mailit ! No account defined") );
789 } 789 }
790} 790}
791 791
792void EmailClient::editAccount(int id) 792void EmailClient::editAccount(int id)
793{ 793{
794 MailAccount *newAccount; 794 MailAccount *newAccount;
795 795
796 editAccountView = new EditAccount(this, "account", TRUE); 796 editAccountView = new EditAccount(this, "account", TRUE);
797 if (id == newAccountId) { //new account 797 if (id == newAccountId) { //new account
798 newAccount = new MailAccount; 798 newAccount = new MailAccount;
799 editAccountView->setAccount(newAccount); 799 editAccountView->setAccount(newAccount);
800 } else { 800 } else {
@@ -816,46 +816,46 @@ void EmailClient::editAccount(int id)
816 } 816 }
817 } 817 }
818 818
819 delete editAccountView; 819 delete editAccountView;
820} 820}
821 821
822void EmailClient::deleteAccount(int id) 822void EmailClient::deleteAccount(int id)
823{ 823{
824 MailAccount *newAccount; 824 MailAccount *newAccount;
825 QString message; 825 QString message;
826 826
827 newAccount = accountList.at(id); 827 newAccount = accountList.at(id);
828 message = "Delete account:\n" + newAccount->accountName; 828 message = tr("Delete account:\n") + newAccount->accountName;
829 switch( QMessageBox::warning( this, "Mailit", message, 829 switch( QMessageBox::warning( this, "Mailit", message,
830 "Yes", "No", 0, 0, 1 ) ) { 830 "Yes", "No", 0, 0, 1 ) ) {
831 831
832 case 0: accountList.remove(id); 832 case 0: accountList.remove(id);
833 updateAccounts(); 833 updateAccounts();
834 break; 834 break;
835 case 1: 835 case 1:
836 break; 836 break;
837 } 837 }
838} 838}
839 839
840void EmailClient::updateAccounts() 840void EmailClient::updateAccounts()
841{ 841{
842 MailAccount *accountPtr; 842 MailAccount *accountPtr;
843 843
844 //rebuild menus, clear all first 844 //rebuild menus, clear all first
845 editAccountMenu->clear(); 845 editAccountMenu->clear();
846 selectAccountMenu->clear(); 846 selectAccountMenu->clear();
847 deleteAccountMenu->clear(); 847 deleteAccountMenu->clear();
848 848
849 newAccountId = editAccountMenu->insertItem("New", this, 849 newAccountId = editAccountMenu->insertItem( tr("New"), this,
850 SLOT(editAccount(int)) ); 850 SLOT(editAccount(int)) );
851 editAccountMenu->insertSeparator(); 851 editAccountMenu->insertSeparator();
852 852
853 idCount = 0; 853 idCount = 0;
854 for (accountPtr = accountList.first(); accountPtr != 0; 854 for (accountPtr = accountList.first(); accountPtr != 0;
855 accountPtr = accountList.next()) { 855 accountPtr = accountList.next()) {
856 856
857 editAccountMenu->insertItem(accountPtr->accountName, 857 editAccountMenu->insertItem(accountPtr->accountName,
858 this, SLOT(editAccount(int)), 0, idCount); 858 this, SLOT(editAccount(int)), 0, idCount);
859 selectAccountMenu->insertItem(accountPtr->accountName, 859 selectAccountMenu->insertItem(accountPtr->accountName,
860 this, SLOT(selectAccount(int)), 0, idCount); 860 this, SLOT(selectAccount(int)), 0, idCount);
861 deleteAccountMenu->insertItem(accountPtr->accountName, 861 deleteAccountMenu->insertItem(accountPtr->accountName,