summaryrefslogtreecommitdiffabout
path: root/kmicromail/editaccounts.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/editaccounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/editaccounts.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index 48c3963..8253c91 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -19,6 +19,7 @@
#include <qlistview.h>
#include <qspinbox.h>
#include <klocale.h>
+#include <kfiledialog.h>
#include <libmailwrapper/nntpwrapper.h>
@@ -479,7 +480,13 @@ SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name,
connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) );
fillValues();
-
+ QIconSet icon;
+ //icon = SmallIcon("fileexport");
+ icon = SmallIcon("fileopen");
+ SignaturButton->setText("");
+ SignaturButton->setIconSet (icon ) ;
+ SignaturButton->setMaximumSize ( SignaturButton->sizeHint().height()+4,SignaturButton->sizeHint().height()) ;
+ connect( SignaturButton, SIGNAL( clicked() ), this, SLOT( chooseSig() ) );
connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
ComboBox1->insertItem( "Only if available", 0 );
ComboBox1->insertItem( "Always, Negotiated", 1 );
@@ -488,7 +495,13 @@ SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name,
CommandEdit->hide();
ComboBox1->setCurrentItem( data->ConnectionType() );
}
-
+void SMTPconfig::chooseSig()
+{
+ QString lnk = KFileDialog::getOpenFileName( "", "Choose Signatur File", this );
+ if ( !lnk.isEmpty() ) {
+ SignaturEdit->setText( lnk );
+ }
+}
void SMTPconfig::slotConnectionToggle( int index )
{
// 2 is ssl connection
@@ -516,6 +529,7 @@ void SMTPconfig::fillValues()
loginBox->setChecked( data->getLogin() );
userLine->setText( data->getUser() );
passLine->setText( data->getPassword() );
+ SignaturEdit->setText( data->getSigFile() );
}
void SMTPconfig::accept()
@@ -527,6 +541,7 @@ void SMTPconfig::accept()
data->setLogin( loginBox->isChecked() );
data->setUser( userLine->text() );
data->setPassword( passLine->text() );
+ data->setSigFile( SignaturEdit->text() );
QDialog::accept();
}