author | zautrix <zautrix> | 2004-10-22 08:27:03 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-22 08:27:03 (UTC) |
commit | e61ce30fc3f2376d8e9caff421495496344a8359 (patch) (unidiff) | |
tree | e82f8e5a0ecf3f21d246b0f441502cb8ee0e11a7 /kmicromail/opiemail.cpp | |
parent | a0cd6749d41390ea832e2acd814fe117bdd39c37 (diff) | |
download | kdepimpi-e61ce30fc3f2376d8e9caff421495496344a8359.zip kdepimpi-e61ce30fc3f2376d8e9caff421495496344a8359.tar.gz kdepimpi-e61ce30fc3f2376d8e9caff421495496344a8359.tar.bz2 |
added translations
-rw-r--r-- | kmicromail/opiemail.cpp | 41 |
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 @@ | |||
2 | // CHANGED 2004-08-06 Lutz Rogowski | 2 | // CHANGED 2004-08-06 Lutz Rogowski |
3 | 3 | ||
4 | #include "settingsdialog.h" | 4 | #include "settingsdialog.h" |
5 | #include "opiemail.h" | 5 | #include "opiemail.h" |
6 | #include "editaccounts.h" | 6 | #include "editaccounts.h" |
7 | #include "composemail.h" | 7 | #include "composemail.h" |
8 | #include "mailistviewitem.h" | 8 | #include "mailistviewitem.h" |
9 | #include "viewmail.h" | 9 | #include "viewmail.h" |
10 | #include "selectstore.h" | 10 | #include "selectstore.h" |
11 | #include "selectsmtp.h" | 11 | #include "selectsmtp.h" |
12 | #include "accountitem.h" | 12 | #include "accountitem.h" |
13 | #include "koprefsdialog.h" | 13 | #include "koprefsdialog.h" |
14 | #include "klocale.h" | ||
14 | 15 | ||
15 | #include <qmessagebox.h> | 16 | #include <qmessagebox.h> |
16 | #include <qtimer.h> | 17 | #include <qtimer.h> |
17 | #include <libkdepim/externalapphandler.h> | 18 | #include <libkdepim/externalapphandler.h> |
18 | #include <libkdepim/kpimglobalprefs.h> | 19 | #include <libkdepim/kpimglobalprefs.h> |
19 | 20 | ||
20 | #include <qpe/qpeapplication.h> | 21 | #include <qpe/qpeapplication.h> |
21 | #include <libmailwrapper/smtpwrapper.h> | 22 | #include <libmailwrapper/smtpwrapper.h> |
22 | #include <libmailwrapper/mailtypes.h> | 23 | #include <libmailwrapper/mailtypes.h> |
23 | #include <libmailwrapper/abstractmail.h> | 24 | #include <libmailwrapper/abstractmail.h> |
24 | /* OPIE */ | 25 | /* OPIE */ |
25 | //#include <qpe/resource.h> | 26 | //#include <qpe/resource.h> |
@@ -167,48 +168,48 @@ void OpieMail::slotSendQueued() | |||
167 | smtpList.setAutoDelete(false); | 168 | smtpList.setAutoDelete(false); |
168 | Account *it; | 169 | Account *it; |
169 | for ( it = list.first(); it; it = list.next() ) | 170 | for ( it = list.first(); it; it = list.next() ) |
170 | { | 171 | { |
171 | if ( it->getType() == MAILLIB::A_SMTP ) | 172 | if ( it->getType() == MAILLIB::A_SMTP ) |
172 | { | 173 | { |
173 | smtp = static_cast<SMTPaccount *>(it); | 174 | smtp = static_cast<SMTPaccount *>(it); |
174 | smtpList.append(smtp); | 175 | smtpList.append(smtp); |
175 | } | 176 | } |
176 | } | 177 | } |
177 | if (smtpList.count()==0) | 178 | if (smtpList.count()==0) |
178 | { | 179 | { |
179 | QMessageBox::information(0,tr("Info"),tr("Define a smtp account first!\n")); | 180 | QMessageBox::information(0,i18n("Info"),i18n("Define a smtp account first!\n")); |
180 | return; | 181 | return; |
181 | } | 182 | } |
182 | if (smtpList.count()==1) | 183 | if (smtpList.count()==1) |
183 | { | 184 | { |
184 | smtp = smtpList.at(0); | 185 | smtp = smtpList.at(0); |
185 | } | 186 | } |
186 | else | 187 | else |
187 | { | 188 | { |
188 | smtp = 0; | 189 | smtp = 0; |
189 | selectsmtp selsmtp; | 190 | selectsmtp selsmtp; |
190 | selsmtp.setSelectionlist(&smtpList); | 191 | selsmtp.setSelectionlist(&smtpList); |
191 | selsmtp.showMaximized(); | 192 | selsmtp.showMaximized(); |
192 | if ( selsmtp.exec() == QDialog::Accepted ) | 193 | if ( selsmtp.exec() == QDialog::Accepted ) |
193 | { | 194 | { |
194 | smtp = selsmtp.selected_smtp(); | 195 | smtp = selsmtp.selected_smtp(); |
195 | } | 196 | } |
196 | } | 197 | } |
197 | if (smtp) | 198 | if (smtp) |
198 | { | 199 | { |
199 | SMTPwrapper * wrap = new SMTPwrapper(smtp); | 200 | SMTPwrapper * wrap = new SMTPwrapper(smtp); |
200 | if ( wrap->flushOutbox() ) | 201 | if ( wrap->flushOutbox() ) |
201 | { | 202 | { |
202 | QMessageBox::information(0,tr("Info"),tr("Mail queue flushed")); | 203 | QMessageBox::information(0,i18n("Info"),i18n("Mail queue flushed")); |
203 | } | 204 | } |
204 | delete wrap; | 205 | delete wrap; |
205 | } | 206 | } |
206 | } | 207 | } |
207 | 208 | ||
208 | void OpieMail::slotSearchMails() | 209 | void OpieMail::slotSearchMails() |
209 | { | 210 | { |
210 | qDebug("OpieMail::slotSearchMails():not implemented "); | 211 | qDebug("OpieMail::slotSearchMails():not implemented "); |
211 | } | 212 | } |
212 | 213 | ||
213 | void OpieMail::slotEditSettings() | 214 | void OpieMail::slotEditSettings() |
214 | { | 215 | { |
@@ -264,35 +265,35 @@ void OpieMail::slotGetAllMail() | |||
264 | } | 265 | } |
265 | } | 266 | } |
266 | void OpieMail::slotGetMail() | 267 | void OpieMail::slotGetMail() |
267 | { | 268 | { |
268 | QListViewItem * item = folderView->currentItem(); | 269 | QListViewItem * item = folderView->currentItem(); |
269 | if ( ! item ) return; | 270 | if ( ! item ) return; |
270 | ((AccountViewItem *)item)->contextMenuSelected( 101 ); | 271 | ((AccountViewItem *)item)->contextMenuSelected( 101 ); |
271 | } | 272 | } |
272 | void OpieMail::slotDeleteMail() | 273 | void OpieMail::slotDeleteMail() |
273 | { | 274 | { |
274 | if (!mailView->currentItem()) return; | 275 | if (!mailView->currentItem()) return; |
275 | RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); | 276 | RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); |
276 | 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 ) | 277 | 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 ) |
277 | { | 278 | { |
278 | mail->Wrapper()->deleteMail( mail ); | 279 | mail->Wrapper()->deleteMail( mail ); |
279 | folderView->refreshCurrent(); | 280 | folderView->refreshCurrent(); |
280 | } | 281 | } |
281 | } | 282 | } |
282 | void OpieMail::slotDeleteAllMail() | 283 | void OpieMail::slotDeleteAllMail() |
283 | { | 284 | { |
284 | 285 | ||
285 | QValueList<RecMailP> t; | 286 | QValueList<RecMailP> t; |
286 | if ( QMessageBox::warning(this, tr("Delete All Mails"), tr("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) | 287 | if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) |
287 | { | 288 | { |
288 | MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); | 289 | MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); |
289 | while ( item ) { | 290 | while ( item ) { |
290 | if ( item->isSelected() ) { | 291 | if ( item->isSelected() ) { |
291 | t.append( item->data() ); | 292 | t.append( item->data() ); |
292 | } | 293 | } |
293 | item = (MailListViewItem*)item->nextSibling(); | 294 | item = (MailListViewItem*)item->nextSibling(); |
294 | } | 295 | } |
295 | } | 296 | } |
296 | else | 297 | else |
297 | return; | 298 | return; |
298 | if ( t.count() == 0 ) | 299 | if ( t.count() == 0 ) |
@@ -311,40 +312,40 @@ void OpieMail::clearSelection() | |||
311 | 312 | ||
312 | void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) | 313 | void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) |
313 | { | 314 | { |
314 | if (!mailView->currentItem()) return; | 315 | if (!mailView->currentItem()) return; |
315 | MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); | 316 | MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); |
316 | /* just the RIGHT button - or hold on pda */ | 317 | /* just the RIGHT button - or hold on pda */ |
317 | if (button!=2) {return;} | 318 | if (button!=2) {return;} |
318 | if (!item) return; | 319 | if (!item) return; |
319 | QPopupMenu *m = new QPopupMenu(0); | 320 | QPopupMenu *m = new QPopupMenu(0); |
320 | if (m) | 321 | if (m) |
321 | { | 322 | { |
322 | if (mailtype==MAILLIB::A_NNTP) { | 323 | if (mailtype==MAILLIB::A_NNTP) { |
323 | m->insertItem(tr("Read this posting"),this,SLOT(displayMail())); | 324 | m->insertItem(i18n("Read this posting"),this,SLOT(displayMail())); |
324 | m->insertItem(tr("Copy this posting"),this,SLOT(slotMoveCopyMail())); | 325 | m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail())); |
325 | m->insertSeparator(); | 326 | m->insertSeparator(); |
326 | m->insertItem(tr("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail())); | 327 | m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail())); |
327 | m->insertItem(tr("Clear selection"),this,SLOT(clearSelection())); | 328 | m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); |
328 | } else { | 329 | } else { |
329 | if (folderView->currentisDraft()) { | 330 | if (folderView->currentisDraft()) { |
330 | m->insertItem(tr("Edit this mail"),this,SLOT(reEditMail())); | 331 | m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail())); |
331 | } | 332 | } |
332 | m->insertItem(tr("Read this mail"),this,SLOT(displayMail())); | 333 | m->insertItem(i18n("Read this mail"),this,SLOT(displayMail())); |
333 | m->insertItem(tr("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); | 334 | m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); |
334 | m->insertItem(tr("Delete this mail"),this,SLOT(slotDeleteMail())); | 335 | m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); |
335 | m->insertSeparator(); | 336 | m->insertSeparator(); |
336 | m->insertItem(tr("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); | 337 | m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); |
337 | m->insertItem(tr("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); | 338 | m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); |
338 | m->insertItem(tr("Clear selection"),this,SLOT(clearSelection())); | 339 | m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); |
339 | } | 340 | } |
340 | m->setFocus(); | 341 | m->setFocus(); |
341 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); | 342 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); |
342 | delete m; | 343 | delete m; |
343 | } | 344 | } |
344 | } | 345 | } |
345 | 346 | ||
346 | void OpieMail::slotShowFolders( bool show ) | 347 | void OpieMail::slotShowFolders( bool show ) |
347 | { | 348 | { |
348 | if ( show && folderView->isHidden() ) | 349 | if ( show && folderView->isHidden() ) |
349 | { | 350 | { |
350 | folderView->show(); | 351 | folderView->show(); |
@@ -391,41 +392,41 @@ void OpieMail::slotMoveCopyMail() | |||
391 | Selectstore sels; | 392 | Selectstore sels; |
392 | folderView->setupFolderselect(&sels); | 393 | folderView->setupFolderselect(&sels); |
393 | if (!sels.exec()) return; | 394 | if (!sels.exec()) return; |
394 | targetMail = sels.currentMail(); | 395 | targetMail = sels.currentMail(); |
395 | targetFolder = sels.currentFolder(); | 396 | targetFolder = sels.currentFolder(); |
396 | if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) || | 397 | if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) || |
397 | targetFolder.isEmpty()) | 398 | targetFolder.isEmpty()) |
398 | { | 399 | { |
399 | return; | 400 | return; |
400 | } | 401 | } |
401 | if (sels.newFolder() && !targetMail->createMbox(targetFolder)) | 402 | if (sels.newFolder() && !targetMail->createMbox(targetFolder)) |
402 | { | 403 | { |
403 | QMessageBox::critical(0,tr("Error creating new Folder"), | 404 | QMessageBox::critical(0,i18n("Error creating new Folder"), |
404 | tr("<center>Error while creating<br>new folder - breaking.</center>")); | 405 | i18n("<center>Error while creating<br>new folder - breaking.</center>")); |
405 | return; | 406 | return; |
406 | } | 407 | } |
407 | sels.hide(); | 408 | sels.hide(); |
408 | qApp->processEvents(); | 409 | qApp->processEvents(); |
409 | // qDebug("hiding sels "); | 410 | // qDebug("hiding sels "); |
410 | mail->Wrapper()->mvcpMail(mail,targetFolder,targetMail,sels.moveMails()); | 411 | mail->Wrapper()->mvcpMail(mail,targetFolder,targetMail,sels.moveMails()); |
411 | folderView->refreshCurrent(); | 412 | folderView->refreshCurrent(); |
412 | } | 413 | } |
413 | 414 | ||
414 | void OpieMail::slotMoveCopyAllMail() | 415 | void OpieMail::slotMoveCopyAllMail() |
415 | { | 416 | { |
416 | 417 | ||
417 | if (!mailView->currentItem()) return; | 418 | if (!mailView->currentItem()) return; |
418 | QValueList<RecMailP> t; | 419 | QValueList<RecMailP> t; |
419 | // 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 ) | 420 | // 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 ) |
420 | { | 421 | { |
421 | MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); | 422 | MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); |
422 | while ( item ) { | 423 | while ( item ) { |
423 | if ( item->isSelected() ) { | 424 | if ( item->isSelected() ) { |
424 | t.append( item->data() ); | 425 | t.append( item->data() ); |
425 | } | 426 | } |
426 | item = (MailListViewItem*)item->nextSibling(); | 427 | item = (MailListViewItem*)item->nextSibling(); |
427 | } | 428 | } |
428 | } | 429 | } |
429 | // else | 430 | // else |
430 | // return; | 431 | // return; |
431 | if ( t.count() == 0 ) | 432 | if ( t.count() == 0 ) |
@@ -436,26 +437,26 @@ void OpieMail::slotMoveCopyAllMail() | |||
436 | Selectstore sels; | 437 | Selectstore sels; |
437 | folderView->setupFolderselect(&sels); | 438 | folderView->setupFolderselect(&sels); |
438 | if (!sels.exec()) return; | 439 | if (!sels.exec()) return; |
439 | targetMail = sels.currentMail(); | 440 | targetMail = sels.currentMail(); |
440 | targetFolder = sels.currentFolder(); | 441 | targetFolder = sels.currentFolder(); |
441 | if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) || | 442 | if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) || |
442 | targetFolder.isEmpty()) | 443 | targetFolder.isEmpty()) |
443 | { | 444 | { |
444 | return; | 445 | return; |
445 | } | 446 | } |
446 | if (sels.newFolder() && !targetMail->createMbox(targetFolder)) | 447 | if (sels.newFolder() && !targetMail->createMbox(targetFolder)) |
447 | { | 448 | { |
448 | QMessageBox::critical(0,tr("Error creating new Folder"), | 449 | QMessageBox::critical(0,i18n("Error creating new Folder"), |
449 | tr("<center>Error while creating<br>new folder - breaking.</center>")); | 450 | i18n("<center>Error while creating<br>new folder - breaking.</center>")); |
450 | return; | 451 | return; |
451 | } | 452 | } |
452 | sels.hide(); | 453 | sels.hide(); |
453 | qApp->processEvents(); | 454 | qApp->processEvents(); |
454 | //qDebug("hiding sels "); | 455 | //qDebug("hiding sels "); |
455 | mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails()); | 456 | mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails()); |
456 | folderView->refreshCurrent(); | 457 | folderView->refreshCurrent(); |
457 | } | 458 | } |
458 | 459 | ||
459 | void OpieMail::reEditMail() | 460 | void OpieMail::reEditMail() |
460 | { | 461 | { |
461 | if (!mailView->currentItem()) return; | 462 | if (!mailView->currentItem()) return; |