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
@@ -1293,14 +1293,17 @@
{ "Summary/Loc.","Titel/Ort" },
{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
{ "Week Number","Wochennummer" },
{ "Import","Importiere" },
{ "Export","Exportiere" },
{ "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..." },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
-
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index 49049f6..2c0f2d8 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -344,21 +344,23 @@ IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name,
void IMAPconfig::slotConnectionToggle( int index )
{
if ( index == 2 )
{
portLine->setText( IMAP_SSL_PORT );
+ CommandEdit->hide();
}
else if ( index == 3 )
{
portLine->setText( IMAP_PORT );
CommandEdit->show();
}
else
{
portLine->setText( IMAP_PORT );
+ CommandEdit->hide();
}
}
void IMAPconfig::fillValues()
{
accountLine->setText( data->getAccountName() );
@@ -425,21 +427,23 @@ POP3config::POP3config( POP3account *account, QWidget *parent, const char *name,
void POP3config::slotConnectionToggle( int index )
{
// 2 is ssl connection
if ( index == 2 )
{
portLine->setText( POP3_SSL_PORT );
+ CommandEdit->hide();
}
else if ( index == 3 )
{
portLine->setText( POP3_PORT );
CommandEdit->show();
}
else
{
portLine->setText( POP3_PORT );
+ CommandEdit->hide();
}
}
void POP3config::fillValues()
{
accountLine->setText( data->getAccountName() );
@@ -517,25 +521,27 @@ void SMTPconfig::chooseSig()
if ( !lnk.isEmpty() ) {
SignaturEdit->setText( lnk );
}
}
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 )
{
portLine->setText( SMTP_PORT );
CommandEdit->show();
}
else
{
portLine->setText( SMTP_PORT );
+ CommandEdit->hide();
}
}
void SMTPconfig::fillValues()
{
accountLine->setText( data->getAccountName() );
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
@@ -241,20 +241,22 @@ void SMTPwrapper::connect_server()
if (err != MAILSMTP_NO_ERROR) {
result = 0;
qDebug("Error init SMTP connection ");
failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err));
}
}
- if (try_tls) {
+ if (result && try_tls) {
qDebug("Smpt: Try tls ");
err = start_smtp_tls();
if (err != MAILSMTP_NO_ERROR) {
try_tls = false;
qDebug("no tls ");
} else {
err = mailesmtp_ehlo(m_smtp);
+ if ( err != MAILSMTP_NO_ERROR )
+ result = 0;
}
}
//qDebug("mailesmtp_ehlo %d ",err );
if (!try_tls && force_tls) {
result = 0;
failuretext = i18n("Error init SMTP tls:%1").arg(mailsmtpError(err));
@@ -287,12 +289,16 @@ void SMTPwrapper::connect_server()
} else {
failuretext = i18n("Authentification failed");
result = 0;
}
}
}
+ if ( result == 0 ) {
+ mailsmtp_free(m_smtp);
+ m_smtp = 0;
+ }
}
void SMTPwrapper::disc_server()
{
if (m_smtp) {
mailsmtp_quit( m_smtp );
@@ -343,13 +349,17 @@ bool SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later
sendProgress->setMaxMails(1);
result = smtpSend( mimeMail,later);
; // odebug << "Clean up done" << oendl;
sendProgress->hide();
delete sendProgress;
sendProgress = 0;
- mailmime_free( mimeMail );
+ mailmime_free( mimeMail );
+ if ( m_smtp ) {
+ mailsmtp_free(m_smtp);
+ m_smtp = 0;
+ }
}
return result;
}
int SMTPwrapper::sendQueuedMail(AbstractMail*wrap,const RecMailP&which) {
size_t curTok = 0;
@@ -455,18 +465,23 @@ bool SMTPwrapper::flushOutbox() {
sendProgress->setCurrentMails(mailsToRemove.count());
}
if (reset_user_value) {
m_SmtpAccount->setUser(oldUser);
m_SmtpAccount->setPassword(oldPw);
}
+
KConfig cfg( locateLocal("config", "kopiemailrc" ) );
cfg.setGroup( "Status" );
m_queuedMail = mailsToSend.count();
cfg.writeEntry( "outgoing", m_queuedMail );
emit queuedMails( m_queuedMail );
sendProgress->hide();
delete sendProgress;
sendProgress = 0;
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
@@ -262,18 +262,20 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
i18n("Deselect all"),this,
SLOT(clearSelection()),true);
mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
i18n("Delete all selected"),this,
SLOT(deleteAll()),true);
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();
mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
i18n("Add Categ. to selected..."),this,
SLOT(addCat()),true);
mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
i18n("Set Categ. for selected..."),this,
@@ -603,14 +605,22 @@ void KOListView::saveDescriptionToFile()
mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount );
KOPrefs::instance()->mLastSaveFile = fn;
topLevelWidget()->setCaption(mes);
}
}
}
+void KOListView::saveToFileVCS()
+{
+ writeToFile( false );
+}
void KOListView::saveToFile()
{
+ writeToFile( true );
+}
+void KOListView::writeToFile( bool iCal )
+{
int icount = 0;
QPtrList<Incidence> delSel ;
QListViewItem *item = mListView->firstChild ();
while ( item ) {
if ( item->isSelected() ) {
@@ -619,12 +629,22 @@ void KOListView::saveToFile()
}
item = item->nextSibling();
}
if ( icount ) {
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 );
if ( fn == "" )
return;
QFileInfo info;
info.setFile( fn );
@@ -644,14 +664,19 @@ void KOListView::saveToFile()
cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
Incidence *incidence = delSel.first();
while ( incidence ) {
cal.addIncidence( incidence->clone() );
incidence = delSel.next();
}
- 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 );
KOPrefs::instance()->mLastSaveFile = fn;
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
@@ -269,12 +269,13 @@ class KOListView : public KOEventView
void clear();
void beamDone( Ir *ir );
void showDates();
void hideDates();
void deleteAll();
void saveToFile();
+ void saveToFileVCS();
void saveDescriptionToFile();
void beamSelected();
void updateConfig();
void addCat();
void setCat();
void setAlarm();
@@ -285,12 +286,13 @@ class KOListView : public KOEventView
void popupMenu(QListViewItem *item,const QPoint &,int);
protected slots:
void processSelectionChange(QListViewItem *);
protected:
+ void writeToFile( bool iCal );
void addEvents(QPtrList<Event> eventList);
void addIncidence(Incidence *);
KOListViewItem *getItemForEvent(Event *event);
private:
KOListViewListView *mListView;