From 94df6192e59b7d4c69e2fb43ef2c39db08bb1c39 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 23 Oct 2004 19:32:41 +0000 Subject: compile fixes --- (limited to 'kmicromail/libmailwrapper/mboxwrapper.cpp') diff --git a/kmicromail/libmailwrapper/mboxwrapper.cpp b/kmicromail/libmailwrapper/mboxwrapper.cpp index 39dd156..0cdbae4 100644 --- a/kmicromail/libmailwrapper/mboxwrapper.cpp +++ b/kmicromail/libmailwrapper/mboxwrapper.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include @@ -44,7 +45,7 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList &ta mailfolder_disconnect(folder); mailfolder_free(folder); mailstorage_free(storage); - Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); + Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count())); } QValueList >* MBOXwrapper::listFolders() @@ -143,12 +144,12 @@ int MBOXwrapper::createMbox(const QString&folder,const FolderP&,const QString&,b p+=folder; QFileInfo fi(p); if (fi.exists()) { - Global::statusMessage(tr("Mailbox exists.")); + Global::statusMessage(i18n("Mailbox exists.")); return 0; } mailmbox_folder*f = 0; if (mailmbox_init(p.latin1(),0,1,0,&f) != MAIL_NO_ERROR) { - Global::statusMessage(tr("Error init folder")); + Global::statusMessage(i18n("Error init folder")); return 0; } if (f) mailmbox_done(f); @@ -162,12 +163,12 @@ void MBOXwrapper::storeMessage(const char*msg,size_t length, const QString&folde mailmbox_folder*f = 0; int r = mailmbox_init(p.latin1(),0,1,0,&f); if (r != MAIL_NO_ERROR) { - Global::statusMessage(tr("Error init folder")); + Global::statusMessage(i18n("Error init folder")); return; } r = mailmbox_append_message(f,msg,length); if (r != MAIL_NO_ERROR) { - Global::statusMessage(tr("Error writing to message folder")); + Global::statusMessage(i18n("Error writing to message folder")); } mailmbox_done(f); } @@ -187,21 +188,21 @@ encodedString* MBOXwrapper::fetchRawBody(const RecMailP&mail) folder = mailfolder_new( storage,(char*)p.latin1(),NULL); r = mailfolder_connect(folder); if (r != MAIL_NO_ERROR) { - Global::statusMessage(tr("Error initializing mbox")); + Global::statusMessage(i18n("Error initializing mbox")); mailfolder_free(folder); mailstorage_free(storage); return 0; } r = mailsession_get_message(folder->fld_session, mail->getNumber(), &msg); if (r != MAIL_NO_ERROR) { - Global::statusMessage(tr("Error fetching mail %i").arg(mail->getNumber())); + Global::statusMessage(i18n("Error fetching mail %i").arg(mail->getNumber())); mailfolder_free(folder); mailstorage_free(storage); return 0; } r = mailmessage_fetch(msg,&data,&size); if (r != MAIL_NO_ERROR) { - Global::statusMessage(tr("Error fetching mail %i").arg(mail->getNumber())); + Global::statusMessage(i18n("Error fetching mail %i").arg(mail->getNumber())); mailfolder_free(folder); mailstorage_free(storage); mailmessage_free(msg); @@ -257,14 +258,14 @@ int MBOXwrapper::deleteAllMail(const FolderP&tfolder) mailstorage*storage = mailstorage_new(NULL); int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0); if (r != MAIL_NO_ERROR) { - Global::statusMessage(tr("Error initializing mbox")); + Global::statusMessage(i18n("Error initializing mbox")); res = 0; } if (res) { folder = mailfolder_new( storage,(char*)p.latin1(),NULL); r = mailfolder_connect(folder); if (r != MAIL_NO_ERROR) { - Global::statusMessage(tr("Error initializing mbox")); + Global::statusMessage(i18n("Error initializing mbox")); res = 0; } } @@ -278,7 +279,7 @@ int MBOXwrapper::deleteAllMail(const FolderP&tfolder) for(unsigned int i = 0 ; l!= 0 && res==1 && i < carray_count(l->msg_tab) ; ++i) { r = mailsession_remove_message(folder->fld_session,i+1); if (r != MAIL_NO_ERROR) { - Global::statusMessage(tr("Error deleting mail %1").arg(i+1)); + Global::statusMessage(i18n("Error deleting mail %1").arg(i+1)); res = 0; break; } @@ -295,11 +296,11 @@ int MBOXwrapper::deleteMbox(const FolderP&tfolder) QString p = MBOXPath+"/"+tfolder->getDisplayName(); QFile fi(p); if (!fi.exists()) { - Global::statusMessage(tr("Mailbox doesn't exist.")); + Global::statusMessage(i18n("Mailbox doesn't exist.")); return 0; } if (!fi.remove()) { - Global::statusMessage(tr("Error deleting Mailbox.")); + Global::statusMessage(i18n("Error deleting Mailbox.")); return 0; } return 1; @@ -315,7 +316,7 @@ void MBOXwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) QString p = MBOXPath+"/"+mailbox; QFile fi(p); if (!fi.exists()) { - Global::statusMessage(tr("Mailbox doesn't exist.")); + Global::statusMessage(i18n("Mailbox doesn't exist.")); return; } int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0); -- cgit v0.9.0.2