summaryrefslogtreecommitdiffabout
path: root/kmicromail/opiemail.cpp
authorzautrix <zautrix>2004-10-22 08:27:03 (UTC)
committer zautrix <zautrix>2004-10-22 08:27:03 (UTC)
commite61ce30fc3f2376d8e9caff421495496344a8359 (patch) (side-by-side diff)
treee82f8e5a0ecf3f21d246b0f441502cb8ee0e11a7 /kmicromail/opiemail.cpp
parenta0cd6749d41390ea832e2acd814fe117bdd39c37 (diff)
downloadkdepimpi-e61ce30fc3f2376d8e9caff421495496344a8359.zip
kdepimpi-e61ce30fc3f2376d8e9caff421495496344a8359.tar.gz
kdepimpi-e61ce30fc3f2376d8e9caff421495496344a8359.tar.bz2
added translations
Diffstat (limited to 'kmicromail/opiemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/opiemail.cpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 164988c..3aa7905 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -2,24 +2,25 @@
// CHANGED 2004-08-06 Lutz Rogowski
#include "settingsdialog.h"
#include "opiemail.h"
#include "editaccounts.h"
#include "composemail.h"
#include "mailistviewitem.h"
#include "viewmail.h"
#include "selectstore.h"
#include "selectsmtp.h"
#include "accountitem.h"
#include "koprefsdialog.h"
+#include "klocale.h"
#include <qmessagebox.h>
#include <qtimer.h>
#include <libkdepim/externalapphandler.h>
#include <libkdepim/kpimglobalprefs.h>
#include <qpe/qpeapplication.h>
#include <libmailwrapper/smtpwrapper.h>
#include <libmailwrapper/mailtypes.h>
#include <libmailwrapper/abstractmail.h>
/* OPIE */
//#include <qpe/resource.h>
@@ -167,48 +168,48 @@ void OpieMail::slotSendQueued()
smtpList.setAutoDelete(false);
Account *it;
for ( it = list.first(); it; it = list.next() )
{
if ( it->getType() == MAILLIB::A_SMTP )
{
smtp = static_cast<SMTPaccount *>(it);
smtpList.append(smtp);
}
}
if (smtpList.count()==0)
{
- QMessageBox::information(0,tr("Info"),tr("Define a smtp account first!\n"));
+ QMessageBox::information(0,i18n("Info"),i18n("Define a smtp account first!\n"));
return;
}
if (smtpList.count()==1)
{
smtp = smtpList.at(0);
}
else
{
smtp = 0;
selectsmtp selsmtp;
selsmtp.setSelectionlist(&smtpList);
selsmtp.showMaximized();
if ( selsmtp.exec() == QDialog::Accepted )
{
smtp = selsmtp.selected_smtp();
}
}
if (smtp)
{
SMTPwrapper * wrap = new SMTPwrapper(smtp);
if ( wrap->flushOutbox() )
{
- QMessageBox::information(0,tr("Info"),tr("Mail queue flushed"));
+ QMessageBox::information(0,i18n("Info"),i18n("Mail queue flushed"));
}
delete wrap;
}
}
void OpieMail::slotSearchMails()
{
qDebug("OpieMail::slotSearchMails():not implemented ");
}
void OpieMail::slotEditSettings()
{
@@ -264,35 +265,35 @@ void OpieMail::slotGetAllMail()
}
}
void OpieMail::slotGetMail()
{
QListViewItem * item = folderView->currentItem();
if ( ! item ) return;
((AccountViewItem *)item)->contextMenuSelected( 101 );
}
void OpieMail::slotDeleteMail()
{
if (!mailView->currentItem()) return;
RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data();
- if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
+ if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
{
mail->Wrapper()->deleteMail( mail );
folderView->refreshCurrent();
}
}
void OpieMail::slotDeleteAllMail()
{
QValueList<RecMailP> t;
- if ( QMessageBox::warning(this, tr("Delete All Mails"), tr("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
+ if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
{
MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
while ( item ) {
if ( item->isSelected() ) {
t.append( item->data() );
}
item = (MailListViewItem*)item->nextSibling();
}
}
else
return;
if ( t.count() == 0 )
@@ -311,40 +312,40 @@ void OpieMail::clearSelection()
void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
{
if (!mailView->currentItem()) return;
MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType();
/* just the RIGHT button - or hold on pda */
if (button!=2) {return;}
if (!item) return;
QPopupMenu *m = new QPopupMenu(0);
if (m)
{
if (mailtype==MAILLIB::A_NNTP) {
- m->insertItem(tr("Read this posting"),this,SLOT(displayMail()));
- m->insertItem(tr("Copy this posting"),this,SLOT(slotMoveCopyMail()));
+ m->insertItem(i18n("Read this posting"),this,SLOT(displayMail()));
+ m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail()));
m->insertSeparator();
- m->insertItem(tr("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail()));
- m->insertItem(tr("Clear selection"),this,SLOT(clearSelection()));
+ m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail()));
+ m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection()));
} else {
if (folderView->currentisDraft()) {
- m->insertItem(tr("Edit this mail"),this,SLOT(reEditMail()));
+ m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail()));
}
- m->insertItem(tr("Read this mail"),this,SLOT(displayMail()));
- m->insertItem(tr("Move/Copy this mail"),this,SLOT(slotMoveCopyMail()));
- m->insertItem(tr("Delete this mail"),this,SLOT(slotDeleteMail()));
+ m->insertItem(i18n("Read this mail"),this,SLOT(displayMail()));
+ m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail()));
+ m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail()));
m->insertSeparator();
- m->insertItem(tr("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail()));
- m->insertItem(tr("Delete all selected mails"),this,SLOT(slotDeleteAllMail()));
- m->insertItem(tr("Clear selection"),this,SLOT(clearSelection()));
+ m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail()));
+ m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail()));
+ m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection()));
}
m->setFocus();
m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) );
delete m;
}
}
void OpieMail::slotShowFolders( bool show )
{
if ( show && folderView->isHidden() )
{
folderView->show();
@@ -391,41 +392,41 @@ void OpieMail::slotMoveCopyMail()
Selectstore sels;
folderView->setupFolderselect(&sels);
if (!sels.exec()) return;
targetMail = sels.currentMail();
targetFolder = sels.currentFolder();
if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) ||
targetFolder.isEmpty())
{
return;
}
if (sels.newFolder() && !targetMail->createMbox(targetFolder))
{
- QMessageBox::critical(0,tr("Error creating new Folder"),
- tr("<center>Error while creating<br>new folder - breaking.</center>"));
+ QMessageBox::critical(0,i18n("Error creating new Folder"),
+ i18n("<center>Error while creating<br>new folder - breaking.</center>"));
return;
}
sels.hide();
qApp->processEvents();
// qDebug("hiding sels ");
mail->Wrapper()->mvcpMail(mail,targetFolder,targetMail,sels.moveMails());
folderView->refreshCurrent();
}
void OpieMail::slotMoveCopyAllMail()
{
if (!mailView->currentItem()) return;
QValueList<RecMailP> t;
- // if ( QMessageBox::warning(this, tr("Move/Copy all selected mails"), tr("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
+ // if ( QMessageBox::warning(this, i18n("Move/Copy all selected mails"), i18n("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
{
MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
while ( item ) {
if ( item->isSelected() ) {
t.append( item->data() );
}
item = (MailListViewItem*)item->nextSibling();
}
}
// else
// return;
if ( t.count() == 0 )
@@ -436,26 +437,26 @@ void OpieMail::slotMoveCopyAllMail()
Selectstore sels;
folderView->setupFolderselect(&sels);
if (!sels.exec()) return;
targetMail = sels.currentMail();
targetFolder = sels.currentFolder();
if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) ||
targetFolder.isEmpty())
{
return;
}
if (sels.newFolder() && !targetMail->createMbox(targetFolder))
{
- QMessageBox::critical(0,tr("Error creating new Folder"),
- tr("<center>Error while creating<br>new folder - breaking.</center>"));
+ QMessageBox::critical(0,i18n("Error creating new Folder"),
+ i18n("<center>Error while creating<br>new folder - breaking.</center>"));
return;
}
sels.hide();
qApp->processEvents();
//qDebug("hiding sels ");
mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails());
folderView->refreshCurrent();
}
void OpieMail::reEditMail()
{
if (!mailView->currentItem()) return;