summaryrefslogtreecommitdiffabout
path: root/kmicromail
Side-by-side diff
Diffstat (limited to 'kmicromail') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/editaccounts.cpp12
-rw-r--r--kmicromail/opiemail.cpp8
-rw-r--r--kmicromail/selectsmtp.cpp2
3 files changed, 16 insertions, 6 deletions
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index 8253c91..f1075c0 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -360,48 +360,54 @@ void IMAPconfig::slotConnectionToggle( int index )
void IMAPconfig::fillValues()
{
accountLine->setText( data->getAccountName() );
serverLine->setText( data->getServer() );
portLine->setText( data->getPort() );
ComboBox1->setCurrentItem( data->ConnectionType() );
userLine->setText( data->getUser() );
passLine->setText( data->getPassword() );
prefixLine->setText(data->getPrefix());
localFolder->setText( data->getLocalFolder() );
int max = data->getMaxMailSize() ;
if ( max ) {
CheckBoxDown->setChecked( true );
SpinBoxDown->setValue ( max );
} else {
CheckBoxDown->setChecked( false );
SpinBoxDown->setValue ( 5 );
}
CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() );
}
void IMAPconfig::accept()
{
+ if ( localFolder->text().contains("/") ||localFolder->text().contains("\\") ) {
+ QMessageBox::information( this, i18n( "Error" ),
+ i18n( "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically." ),
+ i18n( "Ok" ) );
+ return;
+ }
data->setAccountName( accountLine->text() );
data->setServer( serverLine->text() );
data->setPort( portLine->text() );
data->setConnectionType( ComboBox1->currentItem() );
data->setUser( userLine->text() );
data->setPassword( passLine->text() );
data->setPrefix(prefixLine->text());
data->setLocalFolder( localFolder->text() );
data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ;
data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() );
QDialog::accept();
}
/**
* POP3config
*/
POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags )
: POP3configUI( parent, name, modal, flags )
{
data = account;
fillValues();
@@ -433,48 +439,54 @@ void POP3config::slotConnectionToggle( int index )
}
void POP3config::fillValues()
{
accountLine->setText( data->getAccountName() );
serverLine->setText( data->getServer() );
portLine->setText( data->getPort() );
ComboBox1->setCurrentItem( data->ConnectionType() );
userLine->setText( data->getUser() );
passLine->setText( data->getPassword() );
localFolder->setText( data->getLocalFolder() );
int max = data->getMaxMailSize() ;
if ( max ) {
CheckBoxDown->setChecked( true );
SpinBoxDown->setValue ( max );
} else {
CheckBoxDown->setChecked( false );
SpinBoxDown->setValue ( 5 );
}
CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() );
}
void POP3config::accept()
{
+ if ( localFolder->text().contains("/") ||localFolder->text().contains("\\") ) {
+ QMessageBox::information( this, i18n( "Error" ),
+ i18n( "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically." ),
+ i18n( "Ok" ) );
+ return;
+ }
data->setAccountName( accountLine->text() );
data->setServer( serverLine->text() );
data->setPort( portLine->text() );
data->setConnectionType( ComboBox1->currentItem() );
data->setUser( userLine->text() );
data->setPassword( passLine->text() );
data->setLocalFolder( localFolder->text() );
data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ;
data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() );
QDialog::accept();
}
/**
* SMTPconfig
*/
SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags )
: SMTPconfigUI( parent, name, modal, flags )
{
data = account;
connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) );
connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) );
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 197f7ec..b701446 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -184,65 +184,63 @@ void OpieMail::slotComposeMail()
else
slotwriteMail( mPendingName, mPendingEmail );
}
//slotwriteMail(0l,0l);
}
void OpieMail::slotSendQueued()
{
SMTPaccount *smtp = 0;
QList<Account> list = settings->getAccounts();
QList<SMTPaccount> smtpList;
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,i18n("Info"),i18n("Define a smtp account first!\n"));
+ QMessageBox::information(0,i18n("Info"),i18n("Define a smtp\n account first!\n"));
return;
}
- if ( QMessageBox::warning(this, i18n("Sending all mails"), i18n("Do you really want to send\nall queued mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No )
+ if ( QMessageBox::warning(this, i18n("Sending all mails"), i18n("Do you really want to\nsend all queued mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No )
return;
if (smtpList.count()==1)
{
smtp = smtpList.at(0);
}
else
{
smtp = 0;
selectsmtp selsmtp;
selsmtp.setSelectionlist(&smtpList);
-#ifndef DESKTOP_VERSION
- selsmtp.showMaximized();
-#endif
+ selsmtp.resize( selsmtp.sizeHint() );
if ( selsmtp.exec() == QDialog::Accepted )
{
smtp = selsmtp.selected_smtp();
}
}
if (smtp)
{
Global::statusMessage("Sending mails...!");
SMTPwrapper * wrap = new SMTPwrapper(smtp);
if ( wrap->flushOutbox() )
{
Global::statusMessage("Mails sent!");
}
delete wrap;
}
folderView->refreshOutgoing();
}
void OpieMail::slotSearchMails()
{
qDebug("OpieMail::slotSearchMails():not implemented ");
}
diff --git a/kmicromail/selectsmtp.cpp b/kmicromail/selectsmtp.cpp
index ff8b524..10b6d79 100644
--- a/kmicromail/selectsmtp.cpp
+++ b/kmicromail/selectsmtp.cpp
@@ -1,46 +1,46 @@
#include "selectsmtp.h"
#include <libmailwrapper/mailwrapper.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qmessagebox.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qtabwidget.h>
#include <qlistview.h>
#include <klocale.h>
selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, WFlags fl)
: selectstoreui(parent,name,modal,fl)
{
//m_smtpList.setAutoDelete(false);
m_smtpList = 0;
//headlabel->setText(i18n("<center>Select SMTP account to use</center>"));
headlabel->hide();
folderSelection->hide();
folderLabel->hide();
- accountlabel->setText("<center>SMTP Accounts</center>");
+ //accountlabel->setText(i18n("SMTP\nAccount:"));
Line1->hide();
newFoldersel->hide();
newFolderedit->hide();
newFolderLabel->hide();
Line2->hide();
selMove->hide();
m_current_smtp = 0;
setCaption(i18n("Select SMTP Account"));
}
selectsmtp::~selectsmtp()
{
}
void selectsmtp::slotAccountselected(int which)
{
if (!m_smtpList || (unsigned)which>=m_smtpList->count() || which < 0) {
m_current_smtp = 0;
return;
}
m_current_smtp = m_smtpList->at(which);
}
void selectsmtp::setSelectionlist(QList<SMTPaccount>*list)