summaryrefslogtreecommitdiffabout
Side-by-side diff
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
@@ -1298,2 +1298,6 @@
{ "Beam","Beame" },
+{ "Export selected","Exportiere Selektierte" },
+{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
+{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
+{ "Journal/Details...","Journale/Details..." },
{ "","" },
@@ -1305,2 +1309 @@
{ "","" },
-
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index 49049f6..2c0f2d8 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -349,2 +349,3 @@ void IMAPconfig::slotConnectionToggle( int index )
portLine->setText( IMAP_SSL_PORT );
+ CommandEdit->hide();
}
@@ -358,2 +359,3 @@ void IMAPconfig::slotConnectionToggle( int index )
portLine->setText( IMAP_PORT );
+ CommandEdit->hide();
}
@@ -430,2 +432,3 @@ void POP3config::slotConnectionToggle( int index )
portLine->setText( POP3_SSL_PORT );
+ CommandEdit->hide();
}
@@ -439,2 +442,3 @@ void POP3config::slotConnectionToggle( int index )
portLine->setText( POP3_PORT );
+ CommandEdit->hide();
}
@@ -522,8 +526,9 @@ void SMTPconfig::slotConnectionToggle( int index )
{
- // 2 is ssl connection
- if ( index == 2 )
+ // 3 is ssl connection
+ if ( index == 3 )
{
portLine->setText( SMTP_SSL_PORT );
+ CommandEdit->hide();
}
- else if ( index == 3 )
+ else if ( index == 4 )
{
@@ -535,2 +540,3 @@ void SMTPconfig::slotConnectionToggle( int index )
portLine->setText( SMTP_PORT );
+ CommandEdit->hide();
}
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
@@ -246,3 +246,3 @@ void SMTPwrapper::connect_server()
}
- if (try_tls) {
+ if (result && try_tls) {
qDebug("Smpt: Try tls ");
@@ -254,2 +254,4 @@ void SMTPwrapper::connect_server()
err = mailesmtp_ehlo(m_smtp);
+ if ( err != MAILSMTP_NO_ERROR )
+ result = 0;
}
@@ -292,2 +294,6 @@ void SMTPwrapper::connect_server()
}
+ if ( result == 0 ) {
+ mailsmtp_free(m_smtp);
+ m_smtp = 0;
+ }
}
@@ -348,3 +354,7 @@ bool SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later
sendProgress = 0;
- mailmime_free( mimeMail );
+ mailmime_free( mimeMail );
+ if ( m_smtp ) {
+ mailsmtp_free(m_smtp);
+ m_smtp = 0;
+ }
}
@@ -460,2 +470,3 @@ bool SMTPwrapper::flushOutbox() {
}
+
KConfig cfg( locateLocal("config", "kopiemailrc" ) );
@@ -469,3 +480,7 @@ bool SMTPwrapper::flushOutbox() {
wrap->deleteMails(mbox,mailsToRemove);
- delete wrap;
+ delete wrap;
+ if ( m_smtp ) {
+ mailsmtp_free(m_smtp);
+ m_smtp = 0;
+ }
return returnValue;
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 710a9f9..f235705 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -267,8 +267,10 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
mPopupMenu->insertSeparator();
- mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
- i18n("Save selected to file..."),this,
- SLOT(saveToFile()),true);
- mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
- i18n("Save Journal/Description..."),this,
- SLOT(saveDescriptionToFile()),true);
+ QPopupMenu * exportPO = new QPopupMenu ( this );
+ mPopupMenu->insertItem( i18n("Export selected"), exportPO );
+ exportPO->insertItem( i18n("As iCal (ics) file..."),this,
+ SLOT(saveToFile()));
+ exportPO->insertItem( i18n("As vCal (vcs) file..."),this,
+ SLOT(saveToFileVCS()));
+ exportPO->insertItem( i18n("Journal/Details..."),this,
+ SLOT(saveDescriptionToFile()));
// mPopupMenu->insertSeparator();
@@ -608,4 +610,12 @@ void KOListView::saveDescriptionToFile()
}
+void KOListView::saveToFileVCS()
+{
+ writeToFile( false );
+}
void KOListView::saveToFile()
{
+ writeToFile( true );
+}
+void KOListView::writeToFile( bool iCal )
+{
@@ -624,2 +634,12 @@ void KOListView::saveToFile()
QString fn = KOPrefs::instance()->mLastSaveFile;
+ QString extension;
+ if ( iCal ) {
+ if ( fn.right( 4 ).lower() == ".vcs" ) {
+ fn = fn.left( fn.length() -3) + "ics";
+ }
+ } else {
+ if ( fn.right( 4 ).lower() == ".ics" ) {
+ fn = fn.left( fn.length() -3) + "vcs";
+ }
+ }
fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this );
@@ -649,4 +669,9 @@ void KOListView::saveToFile()
}
- ICalFormat format;
- format.save( &cal, fn );
+ if ( iCal ) {
+ ICalFormat format;
+ format.save( &cal, fn );
+ } else {
+ VCalFormat format;
+ format.save( &cal, fn );
+ }
mes = i18n("KO/Pi:Saved %1").arg(fn );
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index c86449d..0d9c525 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -274,2 +274,3 @@ class KOListView : public KOEventView
void saveToFile();
+ void saveToFileVCS();
void saveDescriptionToFile();
@@ -290,2 +291,3 @@ class KOListView : public KOEventView
protected:
+ void writeToFile( bool iCal );
void addEvents(QPtrList<Event> eventList);