summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt5
-rw-r--r--kmicromail/editaccounts.cpp12
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp21
-rw-r--r--korganizer/kolistview.cpp41
-rw-r--r--korganizer/kolistview.h2
5 files changed, 66 insertions, 15 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 246ab3d..2084d0d 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1296,6 +1296,10 @@
1296{ "Import","Importiere" }, 1296{ "Import","Importiere" },
1297{ "Export","Exportiere" }, 1297{ "Export","Exportiere" },
1298{ "Beam","Beame" }, 1298{ "Beam","Beame" },
1299{ "Export selected","Exportiere Selektierte" },
1300{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
1301{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
1302{ "Journal/Details...","Journale/Details..." },
1299{ "","" }, 1303{ "","" },
1300{ "","" }, 1304{ "","" },
1301{ "","" }, 1305{ "","" },
@@ -1303,4 +1307,3 @@
1303{ "","" }, 1307{ "","" },
1304{ "","" }, 1308{ "","" },
1305{ "","" }, 1309{ "","" },
1306
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index 49049f6..2c0f2d8 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -347,6 +347,7 @@ void IMAPconfig::slotConnectionToggle( int index )
347 if ( index == 2 ) 347 if ( index == 2 )
348 { 348 {
349 portLine->setText( IMAP_SSL_PORT ); 349 portLine->setText( IMAP_SSL_PORT );
350 CommandEdit->hide();
350 } 351 }
351 else if ( index == 3 ) 352 else if ( index == 3 )
352 { 353 {
@@ -356,6 +357,7 @@ void IMAPconfig::slotConnectionToggle( int index )
356 else 357 else
357 { 358 {
358 portLine->setText( IMAP_PORT ); 359 portLine->setText( IMAP_PORT );
360 CommandEdit->hide();
359 } 361 }
360} 362}
361 363
@@ -428,6 +430,7 @@ void POP3config::slotConnectionToggle( int index )
428 if ( index == 2 ) 430 if ( index == 2 )
429 { 431 {
430 portLine->setText( POP3_SSL_PORT ); 432 portLine->setText( POP3_SSL_PORT );
433 CommandEdit->hide();
431 } 434 }
432 else if ( index == 3 ) 435 else if ( index == 3 )
433 { 436 {
@@ -437,6 +440,7 @@ void POP3config::slotConnectionToggle( int index )
437 else 440 else
438 { 441 {
439 portLine->setText( POP3_PORT ); 442 portLine->setText( POP3_PORT );
443 CommandEdit->hide();
440 } 444 }
441} 445}
442 446
@@ -520,12 +524,13 @@ void SMTPconfig::chooseSig()
520} 524}
521void SMTPconfig::slotConnectionToggle( int index ) 525void SMTPconfig::slotConnectionToggle( int index )
522{ 526{
523 // 2 is ssl connection 527 // 3 is ssl connection
524 if ( index == 2 ) 528 if ( index == 3 )
525 { 529 {
526 portLine->setText( SMTP_SSL_PORT ); 530 portLine->setText( SMTP_SSL_PORT );
531 CommandEdit->hide();
527 } 532 }
528 else if ( index == 3 ) 533 else if ( index == 4 )
529 { 534 {
530 portLine->setText( SMTP_PORT ); 535 portLine->setText( SMTP_PORT );
531 CommandEdit->show(); 536 CommandEdit->show();
@@ -533,6 +538,7 @@ void SMTPconfig::slotConnectionToggle( int index )
533 else 538 else
534 { 539 {
535 portLine->setText( SMTP_PORT ); 540 portLine->setText( SMTP_PORT );
541 CommandEdit->hide();
536 } 542 }
537} 543}
538 544
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp
index 872a460..845c71c 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.cpp
+++ b/kmicromail/libmailwrapper/smtpwrapper.cpp
@@ -244,7 +244,7 @@ void SMTPwrapper::connect_server()
244 failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err)); 244 failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err));
245 } 245 }
246 } 246 }
247 if (try_tls) { 247 if (result && try_tls) {
248 qDebug("Smpt: Try tls "); 248 qDebug("Smpt: Try tls ");
249 err = start_smtp_tls(); 249 err = start_smtp_tls();
250 if (err != MAILSMTP_NO_ERROR) { 250 if (err != MAILSMTP_NO_ERROR) {
@@ -252,6 +252,8 @@ void SMTPwrapper::connect_server()
252 qDebug("no tls "); 252 qDebug("no tls ");
253 } else { 253 } else {
254 err = mailesmtp_ehlo(m_smtp); 254 err = mailesmtp_ehlo(m_smtp);
255 if ( err != MAILSMTP_NO_ERROR )
256 result = 0;
255 } 257 }
256 } 258 }
257 //qDebug("mailesmtp_ehlo %d ",err ); 259 //qDebug("mailesmtp_ehlo %d ",err );
@@ -290,6 +292,10 @@ void SMTPwrapper::connect_server()
290 } 292 }
291 } 293 }
292 } 294 }
295 if ( result == 0 ) {
296 mailsmtp_free(m_smtp);
297 m_smtp = 0;
298 }
293} 299}
294 300
295void SMTPwrapper::disc_server() 301void SMTPwrapper::disc_server()
@@ -346,7 +352,11 @@ bool SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later
346 sendProgress->hide(); 352 sendProgress->hide();
347 delete sendProgress; 353 delete sendProgress;
348 sendProgress = 0; 354 sendProgress = 0;
349 mailmime_free( mimeMail ); 355 mailmime_free( mimeMail );
356 if ( m_smtp ) {
357 mailsmtp_free(m_smtp);
358 m_smtp = 0;
359 }
350 } 360 }
351 return result; 361 return result;
352} 362}
@@ -458,6 +468,7 @@ bool SMTPwrapper::flushOutbox() {
458 m_SmtpAccount->setUser(oldUser); 468 m_SmtpAccount->setUser(oldUser);
459 m_SmtpAccount->setPassword(oldPw); 469 m_SmtpAccount->setPassword(oldPw);
460 } 470 }
471
461 KConfig cfg( locateLocal("config", "kopiemailrc" ) ); 472 KConfig cfg( locateLocal("config", "kopiemailrc" ) );
462 cfg.setGroup( "Status" ); 473 cfg.setGroup( "Status" );
463 m_queuedMail = mailsToSend.count(); 474 m_queuedMail = mailsToSend.count();
@@ -467,6 +478,10 @@ bool SMTPwrapper::flushOutbox() {
467 delete sendProgress; 478 delete sendProgress;
468 sendProgress = 0; 479 sendProgress = 0;
469 wrap->deleteMails(mbox,mailsToRemove); 480 wrap->deleteMails(mbox,mailsToRemove);
470 delete wrap; 481 delete wrap;
482 if ( m_smtp ) {
483 mailsmtp_free(m_smtp);
484 m_smtp = 0;
485 }
471 return returnValue; 486 return returnValue;
472} 487}
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 710a9f9..f235705 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -265,12 +265,14 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
265 i18n("Delete all selected"),this, 265 i18n("Delete all selected"),this,
266 SLOT(deleteAll()),true); 266 SLOT(deleteAll()),true);
267 mPopupMenu->insertSeparator(); 267 mPopupMenu->insertSeparator();
268 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 268 QPopupMenu * exportPO = new QPopupMenu ( this );
269 i18n("Save selected to file..."),this, 269 mPopupMenu->insertItem( i18n("Export selected"), exportPO );
270 SLOT(saveToFile()),true); 270 exportPO->insertItem( i18n("As iCal (ics) file..."),this,
271 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 271 SLOT(saveToFile()));
272 i18n("Save Journal/Description..."),this, 272 exportPO->insertItem( i18n("As vCal (vcs) file..."),this,
273 SLOT(saveDescriptionToFile()),true); 273 SLOT(saveToFileVCS()));
274 exportPO->insertItem( i18n("Journal/Details..."),this,
275 SLOT(saveDescriptionToFile()));
274 // mPopupMenu->insertSeparator(); 276 // mPopupMenu->insertSeparator();
275 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 277 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
276 i18n("Add Categ. to selected..."),this, 278 i18n("Add Categ. to selected..."),this,
@@ -606,8 +608,16 @@ void KOListView::saveDescriptionToFile()
606 } 608 }
607 } 609 }
608} 610}
611void KOListView::saveToFileVCS()
612{
613 writeToFile( false );
614}
609void KOListView::saveToFile() 615void KOListView::saveToFile()
610{ 616{
617 writeToFile( true );
618}
619void KOListView::writeToFile( bool iCal )
620{
611 621
612 int icount = 0; 622 int icount = 0;
613 QPtrList<Incidence> delSel ; 623 QPtrList<Incidence> delSel ;
@@ -622,6 +632,16 @@ void KOListView::saveToFile()
622 } 632 }
623 if ( icount ) { 633 if ( icount ) {
624 QString fn = KOPrefs::instance()->mLastSaveFile; 634 QString fn = KOPrefs::instance()->mLastSaveFile;
635 QString extension;
636 if ( iCal ) {
637 if ( fn.right( 4 ).lower() == ".vcs" ) {
638 fn = fn.left( fn.length() -3) + "ics";
639 }
640 } else {
641 if ( fn.right( 4 ).lower() == ".ics" ) {
642 fn = fn.left( fn.length() -3) + "vcs";
643 }
644 }
625 fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); 645 fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this );
626 646
627 if ( fn == "" ) 647 if ( fn == "" )
@@ -647,8 +667,13 @@ void KOListView::saveToFile()
647 cal.addIncidence( incidence->clone() ); 667 cal.addIncidence( incidence->clone() );
648 incidence = delSel.next(); 668 incidence = delSel.next();
649 } 669 }
650 ICalFormat format; 670 if ( iCal ) {
651 format.save( &cal, fn ); 671 ICalFormat format;
672 format.save( &cal, fn );
673 } else {
674 VCalFormat format;
675 format.save( &cal, fn );
676 }
652 mes = i18n("KO/Pi:Saved %1").arg(fn ); 677 mes = i18n("KO/Pi:Saved %1").arg(fn );
653 KOPrefs::instance()->mLastSaveFile = fn; 678 KOPrefs::instance()->mLastSaveFile = fn;
654 topLevelWidget()->setCaption(mes); 679 topLevelWidget()->setCaption(mes);
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index c86449d..0d9c525 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -272,6 +272,7 @@ class KOListView : public KOEventView
272 void hideDates(); 272 void hideDates();
273 void deleteAll(); 273 void deleteAll();
274 void saveToFile(); 274 void saveToFile();
275 void saveToFileVCS();
275 void saveDescriptionToFile(); 276 void saveDescriptionToFile();
276 void beamSelected(); 277 void beamSelected();
277 void updateConfig(); 278 void updateConfig();
@@ -288,6 +289,7 @@ class KOListView : public KOEventView
288 void processSelectionChange(QListViewItem *); 289 void processSelectionChange(QListViewItem *);
289 290
290 protected: 291 protected:
292 void writeToFile( bool iCal );
291 void addEvents(QPtrList<Event> eventList); 293 void addEvents(QPtrList<Event> eventList);
292 void addIncidence(Incidence *); 294 void addIncidence(Incidence *);
293 KOListViewItem *getItemForEvent(Event *event); 295 KOListViewItem *getItemForEvent(Event *event);