summaryrefslogtreecommitdiffabout
path: root/kmicromail
Unidiff
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/composemail.cpp21
-rw-r--r--kmicromail/composemail.h1
-rw-r--r--kmicromail/composemailui.ui74
-rw-r--r--kmicromail/editaccounts.cpp19
-rw-r--r--kmicromail/editaccounts.h1
-rw-r--r--kmicromail/libmailwrapper/settings.cpp46
-rw-r--r--kmicromail/libmailwrapper/settings.h6
-rw-r--r--kmicromail/main.cpp2
-rw-r--r--kmicromail/mainwindow.cpp2
-rw-r--r--kmicromail/smtpconfigui.ui97
10 files changed, 178 insertions, 91 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 976e309..ed8a2ee 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -104,114 +104,123 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo
104 attList->addColumn( i18n( "Size" ) ); 104 attList->addColumn( i18n( "Size" ) );
105 QList<Account> accounts = settings->getAccounts(); 105 QList<Account> accounts = settings->getAccounts();
106 106
107 if ( QApplication::desktop()->width() < 320 ) 107 if ( QApplication::desktop()->width() < 320 )
108 smtpAccountBox->setMaximumWidth( 80 ); 108 smtpAccountBox->setMaximumWidth( 80 );
109 Account *it; 109 Account *it;
110 for ( it = accounts.first(); it; it = accounts.next() ) { 110 for ( it = accounts.first(); it; it = accounts.next() ) {
111 if ( it->getType()==MAILLIB::A_SMTP ) { 111 if ( it->getType()==MAILLIB::A_SMTP ) {
112 SMTPaccount *smtp = static_cast<SMTPaccount *>(it); 112 SMTPaccount *smtp = static_cast<SMTPaccount *>(it);
113 smtpAccountBox->insertItem( smtp->getAccountName() ); 113 smtpAccountBox->insertItem( smtp->getAccountName() );
114 smtpAccounts.append( smtp ); 114 smtpAccounts.append( smtp );
115 } 115 }
116 } 116 }
117 connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); 117 connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) );
118 connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); 118 connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) );
119 connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); 119 connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) );
120 connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); 120 connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) );
121 connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); 121 connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) );
122 connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); 122 connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) );
123 connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); 123 connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) );
124 mMail = 0; 124 mMail = 0;
125 warnAttach = true; 125 warnAttach = true;
126 QIconSet icon; 126 QIconSet icon;
127 //icon = SmallIcon("fileexport"); 127 //icon = SmallIcon("fileexport");
128 icon = SmallIcon("filesave"); 128 icon = SmallIcon("filesave");
129 SaveButton->setIconSet (icon ) ; 129 SaveButton->setIconSet (icon ) ;
130 if ( QApplication::desktop()->width() < 320 ) { 130 if ( QApplication::desktop()->width() < 320 ) {
131 SaveButton->setText ("") ; 131 SaveButton->setText ("") ;
132 SaveButton->setMaximumSize ( SaveButton->sizeHint().height(),SaveButton->sizeHint().height()) ; 132 SaveButton->setMaximumSize ( SaveButton->sizeHint().height(),SaveButton->sizeHint().height()) ;
133 } 133 }
134 else 134 else
135 SaveButton->setText (i18n("Save")); 135 SaveButton->setText (i18n("Save"));
136#ifndef DESKTOP_VERSION 136#ifndef DESKTOP_VERSION
137 QPEApplication::setStylusOperation( message, QPEApplication::RightOnHold ); 137 QPEApplication::setStylusOperation( message, QPEApplication::RightOnHold );
138 QPEApplication::setStylusOperation( senderNameEdit, QPEApplication::RightOnHold ); 138 QPEApplication::setStylusOperation( senderNameEdit, QPEApplication::RightOnHold );
139 QPEApplication::setStylusOperation( subjectLine, QPEApplication::RightOnHold ); 139 QPEApplication::setStylusOperation( subjectLine, QPEApplication::RightOnHold );
140#endif 140#endif
141 message->setFont ( KOPrefs::instance()->mComposeFont ); 141 message->setFont ( KOPrefs::instance()->mComposeFont );
142 message->setWordWrap (QMultiLineEdit::WidgetWidth); 142 message->setWordWrap (QMultiLineEdit::WidgetWidth);
143 if ( smtpAccounts.count() > 0 ) { 143 if ( smtpAccounts.count() > 0 ) {
144 fillValues( smtpAccountBox->currentItem() ); 144 fillValues( smtpAccountBox->currentItem() );
145 } else { 145 } else {
146 QMessageBox::information( 0, i18n( "Problem" ), 146 QMessageBox::information( 0, i18n( "Problem" ),
147 i18n( "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n" ), 147 i18n( "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n" ),
148 i18n( "Ok" ) ); 148 i18n( "Ok" ) );
149 return; 149 return;
150 } 150 }
151 connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); 151 connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) );
152 152 connect( SaveSigButton, SIGNAL( clicked() ), SLOT( saveSig()) );
153 if ( smtpAccountBox->count())
154 fillValues(0);
153 155
154} 156}
155 157
156void ComposeMail::fillSettings() 158void ComposeMail::fillSettings()
157{ 159{
158 if ( QApplication::desktop()->width() < 320 ) 160 if ( QApplication::desktop()->width() < 320 )
159 fromBox->setMaximumWidth( 100 ); 161 fromBox->setMaximumWidth( 100 );
160 QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail); 162 QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail);
161 QStringList::ConstIterator sit = mailList.begin(); 163 QStringList::ConstIterator sit = mailList.begin();
162 int pref = 0; 164 int pref = 0;
163 for (;sit!=mailList.end();++sit) { 165 for (;sit!=mailList.end();++sit) {
164 fromBox->insertItem((*sit)); 166 fromBox->insertItem((*sit));
165 } 167 }
166 senderNameEdit->setText(KOPrefs::instance()->mName); 168 senderNameEdit->setText(KOPrefs::instance()->mName);
167} 169}
168 170void ComposeMail::saveSig()
169 171{
172 if ( smtpAccountBox->count()) {
173 int cur = smtpAccountBox->currentItem ();
174 SMTPaccount *smtp = smtpAccounts.at( cur );
175 if ( smtp )
176 smtp->setSignature( sigMultiLine->text());
177 }
178}
170void ComposeMail::saveAsDraft() 179void ComposeMail::saveAsDraft()
171{ 180{
172 181
173 Opie::Core::OSmartPointer<Mail> mail= new Mail(); 182 Opie::Core::OSmartPointer<Mail> mail= new Mail();
174 mail->setMail(fromBox->currentText()); 183 mail->setMail(fromBox->currentText());
175 mail->setTo( toLine->text() ); 184 mail->setTo( toLine->text() );
176 mail->setName(senderNameEdit->text()); 185 mail->setName(senderNameEdit->text());
177 mail->setCC( ccLine->text() ); 186 mail->setCC( ccLine->text() );
178 mail->setBCC( bccLine->text() ); 187 mail->setBCC( bccLine->text() );
179 mail->setReply( replyLine->text() ); 188 mail->setReply( replyLine->text() );
180 mail->setSubject( subjectLine->text() ); 189 mail->setSubject( subjectLine->text() );
181 if (!m_replyid.isEmpty()) { 190 if (!m_replyid.isEmpty()) {
182 QStringList ids; 191 QStringList ids;
183 ids.append(m_replyid); 192 ids.append(m_replyid);
184 mail->setInreply(ids); 193 mail->setInreply(ids);
185 } 194 }
186 QString txt = message->text(); 195 QString txt = message->text();
187 if ( !sigMultiLine->text().isEmpty() ) { 196 if ( !sigMultiLine->text().isEmpty() ) {
188 txt.append( "\n--\n" ); 197 txt.append( "\n--\n" );
189 txt.append( sigMultiLine->text() ); 198 txt.append( sigMultiLine->text() );
190 } 199 }
191 mail->setMessage( txt ); 200 mail->setMessage( txt );
192 mail->setCharset (mEncoding); 201 mail->setCharset (mEncoding);
193 /* only use the default drafts folder name! */ 202 /* only use the default drafts folder name! */
194 Storemail wrapper(AbstractMail::draftFolder()); 203 Storemail wrapper(AbstractMail::draftFolder());
195 wrapper.storeMail(mail); 204 wrapper.storeMail(mail);
196 205
197 AttachViewItem *it = (AttachViewItem *) attList->firstChild(); 206 AttachViewItem *it = (AttachViewItem *) attList->firstChild();
198 /* attachments we will ignore! */ 207 /* attachments we will ignore! */
199 if ( it != 0 ) { 208 if ( it != 0 ) {
200 if ( warnAttach ) 209 if ( warnAttach )
201 QMessageBox::warning(0,i18n("Store message"), 210 QMessageBox::warning(0,i18n("Store message"),
202 i18n("<center>Attachments will not be stored in \"Draft\" folder</center>")); 211 i18n("<center>Attachments will not be stored in \"Draft\" folder</center>"));
203 warnAttach = false; 212 warnAttach = false;
204 } 213 }
205 setStatus( i18n("Mail saved as draft!") ); 214 setStatus( i18n("Mail saved as draft!") );
206} 215}
207void ComposeMail::clearStatus() 216void ComposeMail::clearStatus()
208{ 217{
209 topLevelWidget()->setCaption( i18n("Compose mail") ); 218 topLevelWidget()->setCaption( i18n("Compose mail") );
210} 219}
211void ComposeMail::setStatus( QString status ) 220void ComposeMail::setStatus( QString status )
212{ 221{
213 topLevelWidget()->setCaption( status ); 222 topLevelWidget()->setCaption( status );
214 QTimer::singleShot ( 10000, this, SLOT( clearStatus() ) ) ; 223 QTimer::singleShot ( 10000, this, SLOT( clearStatus() ) ) ;
215} 224}
216void ComposeMail::pickAddress( ) 225void ComposeMail::pickAddress( )
217{ 226{
@@ -293,114 +302,116 @@ void ComposeMail::insertAttendees(const QString& uid,const QStringList& nameLis
293 } 302 }
294} 303}
295 304
296void ComposeMail::setTo( const QString & to ) 305void ComposeMail::setTo( const QString & to )
297{ 306{
298 toLine->setText( to ); 307 toLine->setText( to );
299} 308}
300 309
301void ComposeMail::setSubject( const QString & subject ) 310void ComposeMail::setSubject( const QString & subject )
302{ 311{
303 subjectLine->setText( subject ); 312 subjectLine->setText( subject );
304} 313}
305 314
306void ComposeMail::setInReplyTo( const QString & messageId ) 315void ComposeMail::setInReplyTo( const QString & messageId )
307{ 316{
308 m_replyid = messageId; 317 m_replyid = messageId;
309} 318}
310 319
311void ComposeMail::setMessage( const QString & text ) 320void ComposeMail::setMessage( const QString & text )
312{ 321{
313 message->setText( text ); 322 message->setText( text );
314} 323}
315 324
316 325
317void ComposeMail::pickAddressTo() 326void ComposeMail::pickAddressTo()
318{ 327{
319 mPickLineEdit = toLine; 328 mPickLineEdit = toLine;
320 pickAddress( ); 329 pickAddress( );
321} 330}
322 331
323void ComposeMail::pickAddressCC() 332void ComposeMail::pickAddressCC()
324{ 333{
325 mPickLineEdit = ccLine; 334 mPickLineEdit = ccLine;
326 pickAddress( ); 335 pickAddress( );
327} 336}
328 337
329void ComposeMail::pickAddressBCC() 338void ComposeMail::pickAddressBCC()
330{ 339{
331 mPickLineEdit = bccLine; 340 mPickLineEdit = bccLine;
332 pickAddress( ); 341 pickAddress( );
333} 342}
334 343
335void ComposeMail::pickAddressReply() 344void ComposeMail::pickAddressReply()
336{ 345{
337 mPickLineEdit = replyLine; 346 mPickLineEdit = replyLine;
338 pickAddress( ); 347 pickAddress( );
339} 348}
340 349
341void ComposeMail::fillValues( int ) 350void ComposeMail::fillValues( int current )
342{ 351{
343#if 0 352#if 0
344 SMTPaccount *smtp = smtpAccounts.at( current ); 353 SMTPaccount *smtp = smtpAccounts.at( current );
345 ccLine->clear(); 354 ccLine->clear();
346 if ( smtp->getUseCC() ) { 355 if ( smtp->getUseCC() ) {
347 ccLine->setText( smtp->getCC() ); 356 ccLine->setText( smtp->getCC() );
348 } 357 }
349 bccLine->clear(); 358 bccLine->clear();
350 if ( smtp->getUseBCC() ) { 359 if ( smtp->getUseBCC() ) {
351 bccLine->setText( smtp->getBCC() ); 360 bccLine->setText( smtp->getBCC() );
352 } 361 }
353 replyLine->clear(); 362 replyLine->clear();
354 if ( smtp->getUseReply() ) { 363 if ( smtp->getUseReply() ) {
355 replyLine->setText( smtp->getReply() ); 364 replyLine->setText( smtp->getReply() );
356 } 365 }
357 sigMultiLine->setText( smtp->getSignature() );
358#endif 366#endif
367 SMTPaccount *smtp = smtpAccounts.at( current );
368 if ( smtp )
369 sigMultiLine->setText( smtp->getSignature() );
359} 370}
360 371
361void ComposeMail::slotAdjustColumns() 372void ComposeMail::slotAdjustColumns()
362{ 373{
363 int currPage = tabWidget->currentPageIndex(); 374 int currPage = tabWidget->currentPageIndex();
364 375
365 tabWidget->showPage( attachTab ); 376 tabWidget->showPage( attachTab );
366 attList->setColumnWidth( 0, attList->visibleWidth() - 80 ); 377 attList->setColumnWidth( 0, attList->visibleWidth() - 80 );
367 attList->setColumnWidth( 1, 80 ); 378 attList->setColumnWidth( 1, 80 );
368 379
369 tabWidget->setCurrentPage( currPage ); 380 tabWidget->setCurrentPage( currPage );
370} 381}
371 382
372void ComposeMail::addAttachment() 383void ComposeMail::addAttachment()
373{ 384{
374 QString lnk = KFileDialog::getOpenFileName( "", "Add Attachment", this ); 385 QString lnk = KFileDialog::getOpenFileName( "", "Add Attachment", this );
375 if ( !lnk.isEmpty() ) { 386 if ( !lnk.isEmpty() ) {
376 Attachment *att = new Attachment( lnk ); 387 Attachment *att = new Attachment( lnk );
377 (void) new AttachViewItem( attList, att ); 388 (void) new AttachViewItem( attList, att );
378 } 389 }
379} 390}
380 391
381void ComposeMail::removeAttachment() 392void ComposeMail::removeAttachment()
382{ 393{
383 if ( !attList->currentItem() ) { 394 if ( !attList->currentItem() ) {
384 QMessageBox::information( this, i18n( "Error" ), 395 QMessageBox::information( this, i18n( "Error" ),
385 i18n( "<p>Please select a File.</p>" ), 396 i18n( "<p>Please select a File.</p>" ),
386 i18n( "Ok" ) ); 397 i18n( "Ok" ) );
387 } else { 398 } else {
388 attList->takeItem( attList->currentItem() ); 399 attList->takeItem( attList->currentItem() );
389 } 400 }
390} 401}
391 402
392void ComposeMail::accept() 403void ComposeMail::accept()
393{ 404{
394 if ( smtpAccountBox->count() == 0 ) { 405 if ( smtpAccountBox->count() == 0 ) {
395 406
396 reject(); 407 reject();
397 return; 408 return;
398 } 409 }
399 410
400 if (! checkBoxLater->isChecked() ) { 411 if (! checkBoxLater->isChecked() ) {
401 int yesno = QMessageBox::warning(0,i18n("Stop editing message"), 412 int yesno = QMessageBox::warning(0,i18n("Stop editing message"),
402 i18n("Send this message?"), 413 i18n("Send this message?"),
403 i18n("Yes"), 414 i18n("Yes"),
404 i18n("Cancel")); 415 i18n("Cancel"));
405 416
406 if (yesno == 1) { 417 if (yesno == 1) {
diff --git a/kmicromail/composemail.h b/kmicromail/composemail.h
index a7fa41c..966ac3e 100644
--- a/kmicromail/composemail.h
+++ b/kmicromail/composemail.h
@@ -23,71 +23,72 @@ public:
23 23
24protected: 24protected:
25 QString selectedNames; 25 QString selectedNames;
26 void accept(); 26 void accept();
27 27
28}; 28};
29#endif 29#endif
30class RecMail; 30class RecMail;
31 31
32class ComposeMail : public ComposeMailUI 32class ComposeMail : public ComposeMailUI
33{ 33{
34 Q_OBJECT 34 Q_OBJECT
35 35
36public: 36public:
37 37
38 ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false ); 38 ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false );
39 virtual ~ComposeMail(); 39 virtual ~ComposeMail();
40 40
41 void reEditMail(const Opie::Core::OSmartPointer<RecMail>&current); 41 void reEditMail(const Opie::Core::OSmartPointer<RecMail>&current);
42 42
43public slots: 43public slots:
44 void slotAdjustColumns(); 44 void slotAdjustColumns();
45 45
46 void setTo( const QString & to ); 46 void setTo( const QString & to );
47 void setSubject( const QString & subject ); 47 void setSubject( const QString & subject );
48 void setInReplyTo( const QString & messageId ); 48 void setInReplyTo( const QString & messageId );
49 void setMessage( const QString & text ); 49 void setMessage( const QString & text );
50 void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist); 50 void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist);
51 void setCharset(const QString&); 51 void setCharset(const QString&);
52 52
53 53
54protected slots: 54protected slots:
55 void accept(); 55 void accept();
56 void reject(); 56 void reject();
57 57
58private slots: 58private slots:
59 void fillValues( int current ); 59 void fillValues( int current );
60 void fillSettings(); 60 void fillSettings();
61 void pickAddress(); 61 void pickAddress();
62 void pickAddressTo(); 62 void pickAddressTo();
63 void pickAddressCC(); 63 void pickAddressCC();
64 void pickAddressBCC(); 64 void pickAddressBCC();
65 void pickAddressReply(); 65 void pickAddressReply();
66 void saveAsDraft(); 66 void saveAsDraft();
67 void addAttachment(); 67 void addAttachment();
68 void removeAttachment(); 68 void removeAttachment();
69 void clearStatus(); 69 void clearStatus();
70 void setStatus( QString ); 70 void setStatus( QString );
71 void saveSig();
71 72
72protected: 73protected:
73 QLineEdit* mPickLineEdit; 74 QLineEdit* mPickLineEdit;
74 Opie::Core::OSmartPointer<Mail> mMail; 75 Opie::Core::OSmartPointer<Mail> mMail;
75 Settings *settings; 76 Settings *settings;
76 QList<SMTPaccount> smtpAccounts; 77 QList<SMTPaccount> smtpAccounts;
77 QString m_replyid; 78 QString m_replyid;
78 QString mEncoding; 79 QString mEncoding;
79 bool warnAttach; 80 bool warnAttach;
80}; 81};
81 82
82class AttachViewItem : public QListViewItem 83class AttachViewItem : public QListViewItem
83{ 84{
84public: 85public:
85 AttachViewItem( QListView *parent, Attachment *att ); 86 AttachViewItem( QListView *parent, Attachment *att );
86 Attachment *getAttachment() { return attachment; } 87 Attachment *getAttachment() { return attachment; }
87 88
88private: 89private:
89 Attachment *attachment; 90 Attachment *attachment;
90 91
91}; 92};
92 93
93#endif 94#endif
diff --git a/kmicromail/composemailui.ui b/kmicromail/composemailui.ui
index 610907c..23f47d3 100644
--- a/kmicromail/composemailui.ui
+++ b/kmicromail/composemailui.ui
@@ -1,64 +1,64 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>ComposeMailUI</class> 2<class>ComposeMailUI</class>
3<include location="local">tr.h</include> 3<include location="local">tr.h</include>
4<widget> 4<widget>
5 <class>QDialog</class> 5 <class>QDialog</class>
6 <property stdset="1"> 6 <property stdset="1">
7 <name>name</name> 7 <name>name</name>
8 <cstring>ComposeMailUI</cstring> 8 <cstring>ComposeMailUI</cstring>
9 </property> 9 </property>
10 <property stdset="1"> 10 <property stdset="1">
11 <name>geometry</name> 11 <name>geometry</name>
12 <rect> 12 <rect>
13 <x>0</x> 13 <x>0</x>
14 <y>0</y> 14 <y>0</y>
15 <width>579</width> 15 <width>275</width>
16 <height>476</height> 16 <height>382</height>
17 </rect> 17 </rect>
18 </property> 18 </property>
19 <property stdset="1"> 19 <property stdset="1">
20 <name>sizePolicy</name> 20 <name>sizePolicy</name>
21 <sizepolicy> 21 <sizepolicy>
22 <hsizetype>7</hsizetype> 22 <hsizetype>7</hsizetype>
23 <vsizetype>7</vsizetype> 23 <vsizetype>7</vsizetype>
24 </sizepolicy> 24 </sizepolicy>
25 </property> 25 </property>
26 <property stdset="1"> 26 <property stdset="1">
27 <name>caption</name> 27 <name>caption</name>
28 <string>Compose Message</string> 28 <string>Compose Message</string>
29 </property> 29 </property>
30 <property> 30 <property>
31 <name>layoutMargin</name> 31 <name>layoutMargin</name>
32 </property> 32 </property>
33 <property> 33 <property>
34 <name>layoutSpacing</name> 34 <name>layoutSpacing</name>
35 </property> 35 </property>
36 <vbox> 36 <vbox>
37 <property stdset="1"> 37 <property stdset="1">
38 <name>margin</name> 38 <name>margin</name>
39 <number>0</number> 39 <number>0</number>
40 </property> 40 </property>
41 <property stdset="1"> 41 <property stdset="1">
42 <name>spacing</name> 42 <name>spacing</name>
43 <number>0</number> 43 <number>0</number>
44 </property> 44 </property>
45 <widget> 45 <widget>
46 <class>QLayoutWidget</class> 46 <class>QLayoutWidget</class>
47 <property stdset="1"> 47 <property stdset="1">
48 <name>name</name> 48 <name>name</name>
49 <cstring>Layout4</cstring> 49 <cstring>Layout4</cstring>
50 </property> 50 </property>
51 <property> 51 <property>
52 <name>layoutSpacing</name> 52 <name>layoutSpacing</name>
53 </property> 53 </property>
54 <vbox> 54 <vbox>
55 <property stdset="1"> 55 <property stdset="1">
56 <name>margin</name> 56 <name>margin</name>
57 <number>0</number> 57 <number>0</number>
58 </property> 58 </property>
59 <property stdset="1"> 59 <property stdset="1">
60 <name>spacing</name> 60 <name>spacing</name>
61 <number>0</number> 61 <number>0</number>
62 </property> 62 </property>
63 <widget> 63 <widget>
64 <class>QLayoutWidget</class> 64 <class>QLayoutWidget</class>
@@ -286,193 +286,183 @@
286 </property> 286 </property>
287 </widget> 287 </widget>
288 <widget row="0" column="0" > 288 <widget row="0" column="0" >
289 <class>QLabel</class> 289 <class>QLabel</class>
290 <property stdset="1"> 290 <property stdset="1">
291 <name>name</name> 291 <name>name</name>
292 <cstring>fromLabel</cstring> 292 <cstring>fromLabel</cstring>
293 </property> 293 </property>
294 <property stdset="1"> 294 <property stdset="1">
295 <name>text</name> 295 <name>text</name>
296 <string>From</string> 296 <string>From</string>
297 </property> 297 </property>
298 </widget> 298 </widget>
299 <widget row="1" column="0" > 299 <widget row="1" column="0" >
300 <class>QPushButton</class> 300 <class>QPushButton</class>
301 <property stdset="1"> 301 <property stdset="1">
302 <name>name</name> 302 <name>name</name>
303 <cstring>toButton</cstring> 303 <cstring>toButton</cstring>
304 </property> 304 </property>
305 <property stdset="1"> 305 <property stdset="1">
306 <name>text</name> 306 <name>text</name>
307 <string>To</string> 307 <string>To</string>
308 </property> 308 </property>
309 </widget> 309 </widget>
310 </grid> 310 </grid>
311 </widget> 311 </widget>
312 <widget> 312 <widget>
313 <class>QMultiLineEdit</class> 313 <class>QMultiLineEdit</class>
314 <property stdset="1"> 314 <property stdset="1">
315 <name>name</name> 315 <name>name</name>
316 <cstring>message</cstring> 316 <cstring>message</cstring>
317 </property> 317 </property>
318 </widget> 318 </widget>
319 </vbox> 319 </vbox>
320 </widget> 320 </widget>
321 <widget> 321 <widget>
322 <class>QWidget</class> 322 <class>QWidget</class>
323 <property stdset="1"> 323 <property stdset="1">
324 <name>name</name> 324 <name>name</name>
325 <cstring>optionsTab</cstring> 325 <cstring>optionsTab</cstring>
326 </property> 326 </property>
327 <attribute> 327 <attribute>
328 <name>title</name> 328 <name>title</name>
329 <string>Options</string> 329 <string>Options</string>
330 </attribute> 330 </attribute>
331 <grid> 331 <grid>
332 <property stdset="1"> 332 <property stdset="1">
333 <name>margin</name> 333 <name>margin</name>
334 <number>3</number> 334 <number>2</number>
335 </property> 335 </property>
336 <property stdset="1"> 336 <property stdset="1">
337 <name>spacing</name> 337 <name>spacing</name>
338 <number>3</number> 338 <number>2</number>
339 </property> 339 </property>
340 <widget row="3" column="0" > 340 <widget row="1" column="0" >
341 <class>QPushButton</class>
342 <property stdset="1">
343 <name>name</name>
344 <cstring>replyButton</cstring>
345 </property>
346 <property stdset="1">
347 <name>text</name>
348 <string>Reply-To</string>
349 </property>
350 </widget>
351 <widget row="2" column="0" >
352 <class>QPushButton</class> 341 <class>QPushButton</class>
353 <property stdset="1"> 342 <property stdset="1">
354 <name>name</name> 343 <name>name</name>
355 <cstring>bccButton</cstring> 344 <cstring>bccButton</cstring>
356 </property> 345 </property>
357 <property stdset="1"> 346 <property stdset="1">
358 <name>text</name> 347 <name>text</name>
359 <string>BCC</string> 348 <string>BCC</string>
360 </property> 349 </property>
361 </widget> 350 </widget>
362 <widget row="1" column="1" > 351 <widget row="0" column="1" >
363 <class>QLineEdit</class> 352 <class>QLineEdit</class>
364 <property stdset="1"> 353 <property stdset="1">
365 <name>name</name> 354 <name>name</name>
366 <cstring>ccLine</cstring> 355 <cstring>ccLine</cstring>
367 </property> 356 </property>
368 </widget> 357 </widget>
369 <widget row="2" column="1" > 358 <widget row="1" column="1" >
370 <class>QLineEdit</class> 359 <class>QLineEdit</class>
371 <property stdset="1"> 360 <property stdset="1">
372 <name>name</name> 361 <name>name</name>
373 <cstring>bccLine</cstring> 362 <cstring>bccLine</cstring>
374 </property> 363 </property>
375 </widget> 364 </widget>
376 <widget row="3" column="1" > 365 <widget row="2" column="1" >
377 <class>QLineEdit</class> 366 <class>QLineEdit</class>
378 <property stdset="1"> 367 <property stdset="1">
379 <name>name</name> 368 <name>name</name>
380 <cstring>replyLine</cstring> 369 <cstring>replyLine</cstring>
381 </property> 370 </property>
382 </widget> 371 </widget>
383 <widget row="6" column="0" rowspan="1" colspan="2" > 372 <widget row="4" column="0" rowspan="1" colspan="2" >
384 <class>QMultiLineEdit</class> 373 <class>QMultiLineEdit</class>
385 <property stdset="1"> 374 <property stdset="1">
386 <name>name</name> 375 <name>name</name>
387 <cstring>sigMultiLine</cstring> 376 <cstring>sigMultiLine</cstring>
388 </property> 377 </property>
389 </widget> 378 </widget>
390 <widget row="5" column="0" > 379 <widget row="0" column="0" >
391 <class>QLabel</class> 380 <class>QPushButton</class>
392 <property stdset="1"> 381 <property stdset="1">
393 <name>name</name> 382 <name>name</name>
394 <cstring>sigLabel</cstring> 383 <cstring>ccButton</cstring>
395 </property> 384 </property>
396 <property stdset="1"> 385 <property stdset="1">
397 <name>text</name> 386 <name>text</name>
398 <string>Signature</string> 387 <string>CC</string>
399 </property> 388 </property>
400 </widget> 389 </widget>
401 <spacer row="4" column="0" > 390 <widget row="3" column="1" >
402 <property> 391 <class>QPushButton</class>
392 <property stdset="1">
403 <name>name</name> 393 <name>name</name>
404 <cstring>Spacer3</cstring> 394 <cstring>SaveSigButton</cstring>
405 </property> 395 </property>
406 <property stdset="1"> 396 <property stdset="1">
407 <name>orientation</name> 397 <name>text</name>
408 <enum>Vertical</enum> 398 <string>Save signature</string>
409 </property> 399 </property>
400 </widget>
401 <widget row="2" column="0" >
402 <class>QPushButton</class>
410 <property stdset="1"> 403 <property stdset="1">
411 <name>sizeType</name> 404 <name>name</name>
412 <enum>Expanding</enum> 405 <cstring>replyButton</cstring>
413 </property> 406 </property>
414 <property> 407 <property stdset="1">
415 <name>sizeHint</name> 408 <name>text</name>
416 <size> 409 <string>Reply-To</string>
417 <width>20</width>
418 <height>20</height>
419 </size>
420 </property> 410 </property>
421 </spacer> 411 </widget>
422 <widget row="1" column="0" > 412 <widget row="3" column="0" >
423 <class>QPushButton</class> 413 <class>QLabel</class>
424 <property stdset="1"> 414 <property stdset="1">
425 <name>name</name> 415 <name>name</name>
426 <cstring>ccButton</cstring> 416 <cstring>sigLabel</cstring>
427 </property> 417 </property>
428 <property stdset="1"> 418 <property stdset="1">
429 <name>text</name> 419 <name>text</name>
430 <string>CC</string> 420 <string>Signature</string>
431 </property> 421 </property>
432 </widget> 422 </widget>
433 </grid> 423 </grid>
434 </widget> 424 </widget>
435 <widget> 425 <widget>
436 <class>QWidget</class> 426 <class>QWidget</class>
437 <property stdset="1"> 427 <property stdset="1">
438 <name>name</name> 428 <name>name</name>
439 <cstring>attachTab</cstring> 429 <cstring>attachTab</cstring>
440 </property> 430 </property>
441 <attribute> 431 <attribute>
442 <name>title</name> 432 <name>title</name>
443 <string>Attachment</string> 433 <string>Attachment</string>
444 </attribute> 434 </attribute>
445 <grid> 435 <grid>
446 <property stdset="1"> 436 <property stdset="1">
447 <name>margin</name> 437 <name>margin</name>
448 <number>3</number> 438 <number>3</number>
449 </property> 439 </property>
450 <property stdset="1"> 440 <property stdset="1">
451 <name>spacing</name> 441 <name>spacing</name>
452 <number>3</number> 442 <number>3</number>
453 </property> 443 </property>
454 <widget row="0" column="0" rowspan="1" colspan="3" > 444 <widget row="0" column="0" rowspan="1" colspan="3" >
455 <class>QListView</class> 445 <class>QListView</class>
456 <property stdset="1"> 446 <property stdset="1">
457 <name>name</name> 447 <name>name</name>
458 <cstring>attList</cstring> 448 <cstring>attList</cstring>
459 </property> 449 </property>
460 <property stdset="1"> 450 <property stdset="1">
461 <name>selectionMode</name> 451 <name>selectionMode</name>
462 <enum>Single</enum> 452 <enum>Single</enum>
463 </property> 453 </property>
464 <property stdset="1"> 454 <property stdset="1">
465 <name>allColumnsShowFocus</name> 455 <name>allColumnsShowFocus</name>
466 <bool>true</bool> 456 <bool>true</bool>
467 </property> 457 </property>
468 <property stdset="1"> 458 <property stdset="1">
469 <name>showSortIndicator</name> 459 <name>showSortIndicator</name>
470 <bool>true</bool> 460 <bool>true</bool>
471 </property> 461 </property>
472 </widget> 462 </widget>
473 <widget row="1" column="2" > 463 <widget row="1" column="2" >
474 <class>QPushButton</class> 464 <class>QPushButton</class>
475 <property stdset="1"> 465 <property stdset="1">
476 <name>name</name> 466 <name>name</name>
477 <cstring>deleteButton</cstring> 467 <cstring>deleteButton</cstring>
478 </property> 468 </property>
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index 48c3963..8253c91 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -1,69 +1,70 @@
1 1
2#include <qdialog.h> 2#include <qdialog.h>
3#include "kapplication.h" 3#include "kapplication.h"
4#include "defines.h" 4#include "defines.h"
5#include "editaccounts.h" 5#include "editaccounts.h"
6/* OPIE */ 6/* OPIE */
7#include <qpe/qpeapplication.h> 7#include <qpe/qpeapplication.h>
8 8
9/* QT */ 9/* QT */
10#include <qstringlist.h> 10#include <qstringlist.h>
11 11
12#include <qcombobox.h> 12#include <qcombobox.h>
13#include <qcheckbox.h> 13#include <qcheckbox.h>
14#include <qmessagebox.h> 14#include <qmessagebox.h>
15#include <qpushbutton.h> 15#include <qpushbutton.h>
16#include <qlineedit.h> 16#include <qlineedit.h>
17#include <qlabel.h> 17#include <qlabel.h>
18#include <qtabwidget.h> 18#include <qtabwidget.h>
19#include <qlistview.h> 19#include <qlistview.h>
20#include <qspinbox.h> 20#include <qspinbox.h>
21#include <klocale.h> 21#include <klocale.h>
22#include <kfiledialog.h>
22 23
23#include <libmailwrapper/nntpwrapper.h> 24#include <libmailwrapper/nntpwrapper.h>
24 25
25using namespace Opie::Core; 26using namespace Opie::Core;
26 27
27AccountListItem::AccountListItem( QListView *parent, Account *a) 28AccountListItem::AccountListItem( QListView *parent, Account *a)
28 : QListViewItem( parent ) 29 : QListViewItem( parent )
29{ 30{
30 account = a; 31 account = a;
31 setText( 0, account->getAccountName() ); 32 setText( 0, account->getAccountName() );
32 QString ttext = ""; 33 QString ttext = "";
33 switch (account->getType()) { 34 switch (account->getType()) {
34 case MAILLIB::A_NNTP: 35 case MAILLIB::A_NNTP:
35 ttext="NNTP"; 36 ttext="NNTP";
36 break; 37 break;
37 case MAILLIB::A_POP3: 38 case MAILLIB::A_POP3:
38 ttext = "POP3"; 39 ttext = "POP3";
39 break; 40 break;
40 case MAILLIB::A_IMAP: 41 case MAILLIB::A_IMAP:
41 ttext = "IMAP"; 42 ttext = "IMAP";
42 break; 43 break;
43 case MAILLIB::A_SMTP: 44 case MAILLIB::A_SMTP:
44 ttext = "SMTP"; 45 ttext = "SMTP";
45 break; 46 break;
46 default: 47 default:
47 ttext = "UNKNOWN"; 48 ttext = "UNKNOWN";
48 break; 49 break;
49 } 50 }
50 setText( 1, ttext); 51 setText( 1, ttext);
51} 52}
52 53
53EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) 54EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags )
54 : EditAccountsUI( parent, name, modal, flags ) 55 : EditAccountsUI( parent, name, modal, flags )
55{ 56{
56 settings = s; 57 settings = s;
57 58
58 mailList->addColumn( i18n( "Account" ) ); 59 mailList->addColumn( i18n( "Account" ) );
59 mailList->addColumn( i18n( "Type" ) ); 60 mailList->addColumn( i18n( "Type" ) );
60 61
61 newsList->addColumn( i18n( "Account" ) ); 62 newsList->addColumn( i18n( "Account" ) );
62 63
63 connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) ); 64 connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) );
64 connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) ); 65 connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) );
65 connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) ); 66 connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) );
66 connect( newNews, SIGNAL( clicked() ), SLOT( slotNewNews() ) ); 67 connect( newNews, SIGNAL( clicked() ), SLOT( slotNewNews() ) );
67 connect( editNews, SIGNAL( clicked() ), SLOT( slotEditNews() ) ); 68 connect( editNews, SIGNAL( clicked() ), SLOT( slotEditNews() ) );
68 connect( deleteNews, SIGNAL( clicked() ), SLOT( slotDeleteNews() ) ); 69 connect( deleteNews, SIGNAL( clicked() ), SLOT( slotDeleteNews() ) );
69 70
@@ -434,144 +435,158 @@ void POP3config::slotConnectionToggle( int index )
434void POP3config::fillValues() 435void POP3config::fillValues()
435{ 436{
436 accountLine->setText( data->getAccountName() ); 437 accountLine->setText( data->getAccountName() );
437 serverLine->setText( data->getServer() ); 438 serverLine->setText( data->getServer() );
438 portLine->setText( data->getPort() ); 439 portLine->setText( data->getPort() );
439 ComboBox1->setCurrentItem( data->ConnectionType() ); 440 ComboBox1->setCurrentItem( data->ConnectionType() );
440 userLine->setText( data->getUser() ); 441 userLine->setText( data->getUser() );
441 passLine->setText( data->getPassword() ); 442 passLine->setText( data->getPassword() );
442 localFolder->setText( data->getLocalFolder() ); 443 localFolder->setText( data->getLocalFolder() );
443 int max = data->getMaxMailSize() ; 444 int max = data->getMaxMailSize() ;
444 if ( max ) { 445 if ( max ) {
445 CheckBoxDown->setChecked( true ); 446 CheckBoxDown->setChecked( true );
446 SpinBoxDown->setValue ( max ); 447 SpinBoxDown->setValue ( max );
447 } else { 448 } else {
448 CheckBoxDown->setChecked( false ); 449 CheckBoxDown->setChecked( false );
449 SpinBoxDown->setValue ( 5 ); 450 SpinBoxDown->setValue ( 5 );
450 } 451 }
451 CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() ); 452 CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() );
452} 453}
453 454
454void POP3config::accept() 455void POP3config::accept()
455{ 456{
456 data->setAccountName( accountLine->text() ); 457 data->setAccountName( accountLine->text() );
457 data->setServer( serverLine->text() ); 458 data->setServer( serverLine->text() );
458 data->setPort( portLine->text() ); 459 data->setPort( portLine->text() );
459 data->setConnectionType( ComboBox1->currentItem() ); 460 data->setConnectionType( ComboBox1->currentItem() );
460 data->setUser( userLine->text() ); 461 data->setUser( userLine->text() );
461 data->setPassword( passLine->text() ); 462 data->setPassword( passLine->text() );
462 data->setLocalFolder( localFolder->text() ); 463 data->setLocalFolder( localFolder->text() );
463 data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; 464 data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ;
464 data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); 465 data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() );
465 466
466 QDialog::accept(); 467 QDialog::accept();
467} 468}
468 469
469/** 470/**
470 * SMTPconfig 471 * SMTPconfig
471 */ 472 */
472 473
473SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 474SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags )
474 : SMTPconfigUI( parent, name, modal, flags ) 475 : SMTPconfigUI( parent, name, modal, flags )
475{ 476{
476 data = account; 477 data = account;
477 478
478 connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); 479 connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) );
479 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); 480 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) );
480 481
481 fillValues(); 482 fillValues();
482 483 QIconSet icon;
484 //icon = SmallIcon("fileexport");
485 icon = SmallIcon("fileopen");
486 SignaturButton->setText("");
487 SignaturButton->setIconSet (icon ) ;
488 SignaturButton->setMaximumSize ( SignaturButton->sizeHint().height()+4,SignaturButton->sizeHint().height()) ;
489 connect( SignaturButton, SIGNAL( clicked() ), this, SLOT( chooseSig() ) );
483 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); 490 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
484 ComboBox1->insertItem( "Only if available", 0 ); 491 ComboBox1->insertItem( "Only if available", 0 );
485 ComboBox1->insertItem( "Always, Negotiated", 1 ); 492 ComboBox1->insertItem( "Always, Negotiated", 1 );
486 ComboBox1->insertItem( "Connect on secure port", 2 ); 493 ComboBox1->insertItem( "Connect on secure port", 2 );
487 ComboBox1->insertItem( "Run command instead", 3 ); 494 ComboBox1->insertItem( "Run command instead", 3 );
488 CommandEdit->hide(); 495 CommandEdit->hide();
489 ComboBox1->setCurrentItem( data->ConnectionType() ); 496 ComboBox1->setCurrentItem( data->ConnectionType() );
490} 497}
491 498void SMTPconfig::chooseSig()
499{
500 QString lnk = KFileDialog::getOpenFileName( "", "Choose Signatur File", this );
501 if ( !lnk.isEmpty() ) {
502 SignaturEdit->setText( lnk );
503 }
504}
492void SMTPconfig::slotConnectionToggle( int index ) 505void SMTPconfig::slotConnectionToggle( int index )
493{ 506{
494 // 2 is ssl connection 507 // 2 is ssl connection
495 if ( index == 2 ) 508 if ( index == 2 )
496 { 509 {
497 portLine->setText( SMTP_SSL_PORT ); 510 portLine->setText( SMTP_SSL_PORT );
498 } 511 }
499 else if ( index == 3 ) 512 else if ( index == 3 )
500 { 513 {
501 portLine->setText( SMTP_PORT ); 514 portLine->setText( SMTP_PORT );
502 CommandEdit->show(); 515 CommandEdit->show();
503 } 516 }
504 else 517 else
505 { 518 {
506 portLine->setText( SMTP_PORT ); 519 portLine->setText( SMTP_PORT );
507 } 520 }
508} 521}
509 522
510void SMTPconfig::fillValues() 523void SMTPconfig::fillValues()
511{ 524{
512 accountLine->setText( data->getAccountName() ); 525 accountLine->setText( data->getAccountName() );
513 serverLine->setText( data->getServer() ); 526 serverLine->setText( data->getServer() );
514 portLine->setText( data->getPort() ); 527 portLine->setText( data->getPort() );
515 ComboBox1->setCurrentItem( data->ConnectionType() ); 528 ComboBox1->setCurrentItem( data->ConnectionType() );
516 loginBox->setChecked( data->getLogin() ); 529 loginBox->setChecked( data->getLogin() );
517 userLine->setText( data->getUser() ); 530 userLine->setText( data->getUser() );
518 passLine->setText( data->getPassword() ); 531 passLine->setText( data->getPassword() );
532 SignaturEdit->setText( data->getSigFile() );
519} 533}
520 534
521void SMTPconfig::accept() 535void SMTPconfig::accept()
522{ 536{
523 data->setAccountName( accountLine->text() ); 537 data->setAccountName( accountLine->text() );
524 data->setServer( serverLine->text() ); 538 data->setServer( serverLine->text() );
525 data->setPort( portLine->text() ); 539 data->setPort( portLine->text() );
526 data->setConnectionType( ComboBox1->currentItem() ); 540 data->setConnectionType( ComboBox1->currentItem() );
527 data->setLogin( loginBox->isChecked() ); 541 data->setLogin( loginBox->isChecked() );
528 data->setUser( userLine->text() ); 542 data->setUser( userLine->text() );
529 data->setPassword( passLine->text() ); 543 data->setPassword( passLine->text() );
544 data->setSigFile( SignaturEdit->text() );
530 545
531 QDialog::accept(); 546 QDialog::accept();
532} 547}
533 548
534/** 549/**
535 * NNTPconfig 550 * NNTPconfig
536 */ 551 */
537 552
538NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 553NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags )
539 : NNTPconfigUI( parent, name, modal, flags ) 554 : NNTPconfigUI( parent, name, modal, flags )
540{ 555{
541 data = account; 556 data = account;
542 557
543 connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); 558 connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) );
544 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); 559 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) );
545 connect( GetNGButton, SIGNAL( clicked() ), this, SLOT( slotGetNG() ) ); 560 connect( GetNGButton, SIGNAL( clicked() ), this, SLOT( slotGetNG() ) );
546 connect( ShowSubcribed, SIGNAL( clicked() ), this, SLOT( slotShowSub() ) ); 561 connect( ShowSubcribed, SIGNAL( clicked() ), this, SLOT( slotShowSub() ) );
547 connect( FilterButton, SIGNAL( clicked() ), this, SLOT( slotShowFilter() ) ); 562 connect( FilterButton, SIGNAL( clicked() ), this, SLOT( slotShowFilter() ) );
548 fillValues(); 563 fillValues();
549 564
550 connect( sslBox, SIGNAL( toggled(bool) ), SLOT( slotSSL(bool) ) ); 565 connect( sslBox, SIGNAL( toggled(bool) ), SLOT( slotSSL(bool) ) );
551} 566}
552 567
553void NNTPconfig::slotShowSub() 568void NNTPconfig::slotShowSub()
554{ 569{
555 save(); 570 save();
556 data->save(); 571 data->save();
557 ListViewGroups->clear(); 572 ListViewGroups->clear();
558 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { 573 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) {
559 QCheckListItem *item; 574 QCheckListItem *item;
560 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); 575 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox );
561 item->setOn( true ); 576 item->setOn( true );
562 } 577 }
563 topLevelWidget()->setCaption( i18n("%1 groups subscribed").arg( subscribedGroups.count())); 578 topLevelWidget()->setCaption( i18n("%1 groups subscribed").arg( subscribedGroups.count()));
564} 579}
565void NNTPconfig::slotShowFilter() 580void NNTPconfig::slotShowFilter()
566{ 581{
567 save(); 582 save();
568 data->save(); 583 data->save();
569 ListViewGroups->clear(); 584 ListViewGroups->clear();
570 int count = 0; 585 int count = 0;
571 for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) { 586 for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) {
572 QCheckListItem *item; 587 QCheckListItem *item;
573 if ( GroupFilter->text().isEmpty() || (*it).find( GroupFilter->text() ) >= 0 ) { 588 if ( GroupFilter->text().isEmpty() || (*it).find( GroupFilter->text() ) >= 0 ) {
574 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); 589 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox );
575 ++count; 590 ++count;
576 if ( subscribedGroups.contains( (*it) ) >= 1 ) { 591 if ( subscribedGroups.contains( (*it) ) >= 1 ) {
577 item->setOn( true ); 592 item->setOn( true );
diff --git a/kmicromail/editaccounts.h b/kmicromail/editaccounts.h
index 6cf842e..465780c 100644
--- a/kmicromail/editaccounts.h
+++ b/kmicromail/editaccounts.h
@@ -76,81 +76,82 @@ class IMAPconfig : public IMAPconfigUI
76 76
77public: 77public:
78 IMAPconfig( IMAPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 78 IMAPconfig( IMAPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
79 79
80public slots: 80public slots:
81 void fillValues(); 81 void fillValues();
82 82
83protected slots: 83protected slots:
84 void slotConnectionToggle( int index ); 84 void slotConnectionToggle( int index );
85 void accept(); 85 void accept();
86 86
87private: 87private:
88 IMAPaccount *data; 88 IMAPaccount *data;
89 89
90}; 90};
91 91
92class POP3config : public POP3configUI 92class POP3config : public POP3configUI
93{ 93{
94 Q_OBJECT 94 Q_OBJECT
95 95
96public: 96public:
97 POP3config( POP3account *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 97 POP3config( POP3account *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
98 98
99public slots: 99public slots:
100 void fillValues(); 100 void fillValues();
101 101
102protected slots: 102protected slots:
103 void slotConnectionToggle( int index ); 103 void slotConnectionToggle( int index );
104 void accept(); 104 void accept();
105 105
106private: 106private:
107 POP3account *data; 107 POP3account *data;
108 108
109}; 109};
110 110
111class SMTPconfig : public SMTPconfigUI 111class SMTPconfig : public SMTPconfigUI
112{ 112{
113 Q_OBJECT 113 Q_OBJECT
114 114
115public: 115public:
116 SMTPconfig( SMTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 116 SMTPconfig( SMTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
117 117
118public slots: 118public slots:
119 void fillValues(); 119 void fillValues();
120 120
121protected slots: 121protected slots:
122 void slotConnectionToggle( int index ); 122 void slotConnectionToggle( int index );
123 void accept(); 123 void accept();
124 void chooseSig();
124 125
125private: 126private:
126 SMTPaccount *data; 127 SMTPaccount *data;
127 128
128}; 129};
129 130
130class NNTPconfig : public NNTPconfigUI 131class NNTPconfig : public NNTPconfigUI
131{ 132{
132 Q_OBJECT 133 Q_OBJECT
133 134
134public: 135public:
135 NNTPconfig( NNTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 136 NNTPconfig( NNTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
136 137
137public slots: 138public slots:
138 void fillValues(); 139 void fillValues();
139 140
140protected slots: 141protected slots:
141 void slotSSL( bool enabled ); 142 void slotSSL( bool enabled );
142 void accept(); 143 void accept();
143 void slotGetNG(); 144 void slotGetNG();
144 void slotShowSub(); 145 void slotShowSub();
145 void slotShowFilter(); 146 void slotShowFilter();
146 147
147private: 148private:
148 QStringList subscribedGroups; 149 QStringList subscribedGroups;
149 QStringList allGroups; 150 QStringList allGroups;
150 void save(); 151 void save();
151 NNTPaccount *data; 152 NNTPaccount *data;
152 clist* list; 153 clist* list;
153 154
154}; 155};
155 156
156#endif 157#endif
diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp
index 19093b1..8f909f9 100644
--- a/kmicromail/libmailwrapper/settings.cpp
+++ b/kmicromail/libmailwrapper/settings.cpp
@@ -1,51 +1,55 @@
1#include <stdlib.h> 1#include <stdlib.h>
2#include <qdir.h> 2#include <qdir.h>
3 3
4#include <qtextcodec.h>
5#include <qtextstream.h>
6#include <qfile.h>
7
4//#include <opie2/odebug.h> 8//#include <opie2/odebug.h>
5#include <kconfig.h> 9#include <kconfig.h>
6 10
7#include <kstandarddirs.h> 11#include <kstandarddirs.h>
8#include "settings.h" 12#include "settings.h"
9//#include "defines.h" 13//#include "defines.h"
10 14
11#define IMAP_PORT "143" 15#define IMAP_PORT "143"
12#define IMAP_SSL_PORT "993" 16#define IMAP_SSL_PORT "993"
13#define SMTP_PORT "25" 17#define SMTP_PORT "25"
14#define SMTP_SSL_PORT "465" 18#define SMTP_SSL_PORT "465"
15#define POP3_PORT "110" 19#define POP3_PORT "110"
16#define POP3_SSL_PORT "995" 20#define POP3_SSL_PORT "995"
17#define NNTP_PORT "119" 21#define NNTP_PORT "119"
18#define NNTP_SSL_PORT "563" 22#define NNTP_SSL_PORT "563"
19 23
20 24
21Settings::Settings() 25Settings::Settings()
22 : QObject() 26 : QObject()
23{ 27{
24 accounts.setAutoDelete( true ); ; 28 accounts.setAutoDelete( true ); ;
25 updateAccounts(); 29 updateAccounts();
26 //qDebug("++++++++++++++++++new settings "); 30 //qDebug("++++++++++++++++++new settings ");
27} 31}
28 32
29void Settings::checkDirectory() 33void Settings::checkDirectory()
30{ 34{
31 return; 35 return;
32 locateLocal("data", "kopiemail" ); 36 locateLocal("data", "kopiemail" );
33 /* 37 /*
34 if ( !QDir( (QString) getenv( "HOME" ) + "/Applications/opiemail/" ).exists() ) { 38 if ( !QDir( (QString) getenv( "HOME" ) + "/Applications/opiemail/" ).exists() ) {
35 system( "mkdir -p $HOME/Applications/opiemail" ); 39 system( "mkdir -p $HOME/Applications/opiemail" );
36 qDebug("$HOME/Applications/opiemail created "); 40 qDebug("$HOME/Applications/opiemail created ");
37 } 41 }
38 */ 42 */
39} 43}
40 44
41QList<Account> Settings::getAccounts() 45QList<Account> Settings::getAccounts()
42{ 46{
43 return accounts; 47 return accounts;
44} 48}
45 49
46void Settings::addAccount( Account *account ) 50void Settings::addAccount( Account *account )
47{ 51{
48 accounts.append( account ); 52 accounts.append( account );
49} 53}
50 54
51void Settings::delAccount( Account *account ) 55void Settings::delAccount( Account *account )
@@ -321,140 +325,180 @@ void POP3account::save()
321 conf->writeEntry( "ConnectionType", connectionType ); 325 conf->writeEntry( "ConnectionType", connectionType );
322 conf->writeEntry( "User", user ); 326 conf->writeEntry( "User", user );
323 //conf->writeEntryCrypt( "Password", password ); 327 //conf->writeEntryCrypt( "Password", password );
324 conf->writeEntry( "FolderHistory",getPasswordList() ); 328 conf->writeEntry( "FolderHistory",getPasswordList() );
325 conf->writeEntry( "Offline",offline); 329 conf->writeEntry( "Offline",offline);
326 conf->writeEntry( "LocalFolder", localFolder ); 330 conf->writeEntry( "LocalFolder", localFolder );
327 conf->writeEntry( "MaxSize", maxMailSize ); 331 conf->writeEntry( "MaxSize", maxMailSize );
328 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); 332 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
329 int lf = dt.secsTo ( lastFetch ); 333 int lf = dt.secsTo ( lastFetch );
330 conf->writeEntry( "LastFetch", lf ); 334 conf->writeEntry( "LastFetch", lf );
331 conf->writeEntry( "LeaveOnServer", leaveOnServer); 335 conf->writeEntry( "LeaveOnServer", leaveOnServer);
332 conf->sync(); 336 conf->sync();
333 delete conf; 337 delete conf;
334} 338}
335 339
336 340
337QString POP3account::getFileName() 341QString POP3account::getFileName()
338{ 342{
339 return locateLocal("data", "kopiemail" ) +"/pop3-" + file; 343 return locateLocal("data", "kopiemail" ) +"/pop3-" + file;
340} 344}
341 345
342SMTPaccount::SMTPaccount() 346SMTPaccount::SMTPaccount()
343 : Account() 347 : Account()
344{ 348{
345 file = SMTPaccount::getUniqueFileName(); 349 file = SMTPaccount::getUniqueFileName();
346 accountName = "New SMTP Account"; 350 accountName = "New SMTP Account";
347 ssl = false; 351 ssl = false;
348 connectionType = 1; 352 connectionType = 1;
349 login = false; 353 login = false;
350 useCC = false; 354 useCC = false;
351 useBCC = false; 355 useBCC = false;
352 useReply = false; 356 useReply = false;
353 type = MAILLIB::A_SMTP; 357 type = MAILLIB::A_SMTP;
354 port = SMTP_PORT; 358 port = SMTP_PORT;
355} 359}
356 360
357SMTPaccount::SMTPaccount( QString filename ) 361SMTPaccount::SMTPaccount( QString filename )
358 : Account() 362 : Account()
359{ 363{
360 file = filename; 364 file = filename;
361 accountName = "New SMTP Account"; 365 accountName = "New SMTP Account";
362 ssl = false; 366 ssl = false;
363 connectionType = 1; 367 connectionType = 1;
364 login = false; 368 login = false;
365 type = MAILLIB::A_SMTP; 369 type = MAILLIB::A_SMTP;
366 port = SMTP_PORT; 370 port = SMTP_PORT;
367} 371}
368 372
373QString SMTPaccount::getSignature()
374{
375 QFileInfo fi ( signature );
376 if ( ! fi.exists() )
377 return QString();
378
379 QFile file( signature );
380 if (!file.open( IO_ReadOnly ) ) {
381 return QString();
382
383 }
384 QTextStream ts( &file );
385 ts.setCodec( QTextCodec::codecForName("utf8") );
386 QString text = ts.read();
387 file.close();
388
389 return text;
390
391}
392void SMTPaccount::setSignature( QString b )
393{
394
395 QFileInfo fi ( signature );
396 if ( ! fi.exists() ) {
397 QString filedir( locateLocal("data", "kopiemail" ) );
398 signature = filedir+ "/" + getAccountName() +".sig";
399 qDebug("new sig %s ", signature.latin1());
400 save();
401 }
402 QFile fileIn( signature );
403 if (!fileIn.open( IO_WriteOnly ) ) {
404 qDebug("OM: Cannot write signature file %s ", signature.latin1() );
405 return ;
406 }
407 QTextStream tsIn( &fileIn );
408 tsIn.setCodec( QTextCodec::codecForName("utf8") );
409 tsIn << b ;
410 fileIn.close();
411}
369QString SMTPaccount::getUniqueFileName() 412QString SMTPaccount::getUniqueFileName()
370{ 413{
371 int num = 0; 414 int num = 0;
372 QString unique; 415 QString unique;
373 416
374 QDir dir( locateLocal("data", "kopiemail" ) ); 417 QDir dir( locateLocal("data", "kopiemail" ) );
375 418
376 QStringList imap = dir.entryList( "smtp-*" ); 419 QStringList imap = dir.entryList( "smtp-*" );
377 do { 420 do {
378 unique.setNum( num++ ); 421 unique.setNum( num++ );
379 } while ( imap.contains( "smtp-" + unique ) > 0 ); 422 } while ( imap.contains( "smtp-" + unique ) > 0 );
380 423
381 return unique; 424 return unique;
382} 425}
383 426
384void SMTPaccount::read() 427void SMTPaccount::read()
385{ 428{
386 KConfig *conf = new KConfig( getFileName() ); 429 KConfig *conf = new KConfig( getFileName() );
387 conf->setGroup( "SMTP Account" ); 430 conf->setGroup( "SMTP Account" );
388 accountName = conf->readEntry( "Account" ); 431 accountName = conf->readEntry( "Account" );
389 server = conf->readEntry( "Server" ); 432 server = conf->readEntry( "Server" );
390 port = conf->readEntry( "Port" ); 433 port = conf->readEntry( "Port" );
391 ssl = conf->readBoolEntry( "SSL" ); 434 ssl = conf->readBoolEntry( "SSL" );
392 connectionType = conf->readNumEntry( "ConnectionType" ); 435 connectionType = conf->readNumEntry( "ConnectionType" );
393 login = conf->readBoolEntry( "Login" ); 436 login = conf->readBoolEntry( "Login" );
394 user = conf->readEntry( "User" ); 437 user = conf->readEntry( "User" );
395 //password = conf->readEntryCrypt( "Password" ); 438 signature = conf->readEntry( "SigFile" );
396 setPasswordList( conf->readListEntry( "FolderHistory")); 439 setPasswordList( conf->readListEntry( "FolderHistory"));
397 delete conf; 440 delete conf;
398} 441}
399 442
400void SMTPaccount::save() 443void SMTPaccount::save()
401{ 444{
402 Settings::checkDirectory(); 445 Settings::checkDirectory();
403 446
404 KConfig *conf = new KConfig( getFileName() ); 447 KConfig *conf = new KConfig( getFileName() );
405 conf->setGroup( "SMTP Account" ); 448 conf->setGroup( "SMTP Account" );
406 conf->writeEntry( "Account", accountName ); 449 conf->writeEntry( "Account", accountName );
407 conf->writeEntry( "Server", server ); 450 conf->writeEntry( "Server", server );
408 conf->writeEntry( "Port", port ); 451 conf->writeEntry( "Port", port );
409 conf->writeEntry( "SSL", ssl ); 452 conf->writeEntry( "SSL", ssl );
410 conf->writeEntry( "ConnectionType", connectionType ); 453 conf->writeEntry( "ConnectionType", connectionType );
411 conf->writeEntry( "Login", login ); 454 conf->writeEntry( "Login", login );
412 conf->writeEntry( "User", user ); 455 conf->writeEntry( "User", user );
456 conf->writeEntry( "SigFile", signature );
413 //conf->writeEntryCrypt( "Password", password ); 457 //conf->writeEntryCrypt( "Password", password );
414 conf->writeEntry( "FolderHistory",getPasswordList() ); 458 conf->writeEntry( "FolderHistory",getPasswordList() );
415 conf->sync(); 459 conf->sync();
416 delete conf; 460 delete conf;
417} 461}
418 462
419 463
420QString SMTPaccount::getFileName() 464QString SMTPaccount::getFileName()
421{ 465{
422 return locateLocal("data", "kopiemail" ) +"/smtp-" + file; 466 return locateLocal("data", "kopiemail" ) +"/smtp-" + file;
423} 467}
424 468
425NNTPaccount::NNTPaccount() 469NNTPaccount::NNTPaccount()
426 : Account() 470 : Account()
427{ 471{
428 file = NNTPaccount::getUniqueFileName(); 472 file = NNTPaccount::getUniqueFileName();
429 accountName = "New NNTP Account"; 473 accountName = "New NNTP Account";
430 ssl = false; 474 ssl = false;
431 login = false; 475 login = false;
432 type = MAILLIB::A_NNTP; 476 type = MAILLIB::A_NNTP;
433 port = NNTP_PORT; 477 port = NNTP_PORT;
434} 478}
435 479
436NNTPaccount::NNTPaccount( QString filename ) 480NNTPaccount::NNTPaccount( QString filename )
437 : Account() 481 : Account()
438{ 482{
439 file = filename; 483 file = filename;
440 accountName = "New NNTP Account"; 484 accountName = "New NNTP Account";
441 ssl = false; 485 ssl = false;
442 login = false; 486 login = false;
443 type = MAILLIB::A_NNTP; 487 type = MAILLIB::A_NNTP;
444 port = NNTP_PORT; 488 port = NNTP_PORT;
445} 489}
446 490
447QString NNTPaccount::getUniqueFileName() 491QString NNTPaccount::getUniqueFileName()
448{ 492{
449 int num = 0; 493 int num = 0;
450 QString unique; 494 QString unique;
451 495
452 QDir dir( locateLocal("data", "kopiemail" ) ); 496 QDir dir( locateLocal("data", "kopiemail" ) );
453 497
454 QStringList imap = dir.entryList( "nntp-*" ); 498 QStringList imap = dir.entryList( "nntp-*" );
455 do { 499 do {
456 unique.setNum( num++ ); 500 unique.setNum( num++ );
457 } while ( imap.contains( "nntp-" + unique ) > 0 ); 501 } while ( imap.contains( "nntp-" + unique ) > 0 );
458 502
459 return unique; 503 return unique;
460} 504}
diff --git a/kmicromail/libmailwrapper/settings.h b/kmicromail/libmailwrapper/settings.h
index c996fe0..a6e95fe 100644
--- a/kmicromail/libmailwrapper/settings.h
+++ b/kmicromail/libmailwrapper/settings.h
@@ -82,96 +82,102 @@ public:
82 static QString getUniqueFileName(); 82 static QString getUniqueFileName();
83 83
84 virtual void read(); 84 virtual void read();
85 virtual void save(); 85 virtual void save();
86 virtual QString getFileName(); 86 virtual QString getFileName();
87 87
88 void setPrefix(const QString&str) {prefix=str;} 88 void setPrefix(const QString&str) {prefix=str;}
89 const QString&getPrefix()const{return prefix;} 89 const QString&getPrefix()const{return prefix;}
90 90
91private: 91private:
92 QString file,prefix; 92 QString file,prefix;
93 93
94}; 94};
95 95
96class POP3account : public Account 96class POP3account : public Account
97{ 97{
98 98
99public: 99public:
100 POP3account(); 100 POP3account();
101 POP3account( QString filename ); 101 POP3account( QString filename );
102 102
103 static QString getUniqueFileName(); 103 static QString getUniqueFileName();
104 104
105 virtual void read(); 105 virtual void read();
106 virtual void save(); 106 virtual void save();
107 virtual QString getFileName(); 107 virtual QString getFileName();
108 108
109private: 109private:
110 QString file; 110 QString file;
111 111
112}; 112};
113 113
114class SMTPaccount : public Account 114class SMTPaccount : public Account
115{ 115{
116 116
117public: 117public:
118 SMTPaccount(); 118 SMTPaccount();
119 SMTPaccount( QString filename ); 119 SMTPaccount( QString filename );
120 120
121 static QString getUniqueFileName(); 121 static QString getUniqueFileName();
122 122
123 virtual void read(); 123 virtual void read();
124 virtual void save(); 124 virtual void save();
125 virtual QString getFileName(); 125 virtual QString getFileName();
126 126
127 void setLogin( bool b ) { login = b; } 127 void setLogin( bool b ) { login = b; }
128 bool getLogin() { return login; } 128 bool getLogin() { return login; }
129 129
130 void setSigFile( QString b ) { signature = b; }
131 QString getSigFile() { return signature; }
132
133 QString getSignature();
134 void setSignature( QString b );
135
130private: 136private:
131 QString file, name, mail, org, cc, bcc, reply, signature; 137 QString file, name, mail, org, cc, bcc, reply, signature;
132 bool useCC, useBCC, useReply, login; 138 bool useCC, useBCC, useReply, login;
133 139
134}; 140};
135 141
136class NNTPaccount : public Account 142class NNTPaccount : public Account
137{ 143{
138 144
139public: 145public:
140 NNTPaccount(); 146 NNTPaccount();
141 NNTPaccount( QString filename ); 147 NNTPaccount( QString filename );
142 148
143 static QString getUniqueFileName(); 149 static QString getUniqueFileName();
144 150
145 virtual void read(); 151 virtual void read();
146 virtual void save(); 152 virtual void save();
147 virtual QString getFileName(); 153 virtual QString getFileName();
148 154
149 void setLogin( bool b ) { login = b; } 155 void setLogin( bool b ) { login = b; }
150 bool getLogin() { return login; } 156 bool getLogin() { return login; }
151 157
152 void setGroups( QStringList list ) { subscribedGroups = list; } 158 void setGroups( QStringList list ) { subscribedGroups = list; }
153 QStringList getGroups() { return subscribedGroups; } 159 QStringList getGroups() { return subscribedGroups; }
154 160
155private: 161private:
156 QString file; 162 QString file;
157 bool login; 163 bool login;
158 QStringList subscribedGroups; 164 QStringList subscribedGroups;
159 165
160}; 166};
161 167
162class Settings : public QObject 168class Settings : public QObject
163{ 169{
164 Q_OBJECT 170 Q_OBJECT
165 171
166public: 172public:
167 Settings(); 173 Settings();
168 //~Settings(){qDebug("-------------------settings "); }; 174 //~Settings(){qDebug("-------------------settings "); };
169 QList<Account> getAccounts(); 175 QList<Account> getAccounts();
170 void addAccount(Account *account); 176 void addAccount(Account *account);
171 void delAccount(Account *account); 177 void delAccount(Account *account);
172 void saveAccounts(); 178 void saveAccounts();
173 void readAccounts(); 179 void readAccounts();
174 static void checkDirectory(); 180 static void checkDirectory();
175 181
176private: 182private:
177 void updateAccounts(); 183 void updateAccounts();
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp
index 006390c..1789da0 100644
--- a/kmicromail/main.cpp
+++ b/kmicromail/main.cpp
@@ -1,67 +1,67 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2 2
3 3
4#ifndef DESKTOP_VERSION 4#ifndef DESKTOP_VERSION
5#include <qpe/qpeapplication.h> 5#include <qpe/qpeapplication.h>
6#include <libkdepim/externalapphandler.h> 6#include <libkdepim/externalapphandler.h>
7#include <stdlib.h> 7#include <stdlib.h>
8#else 8#else
9#include <qapplication.h> 9#include <qapplication.h>
10#include <qstring.h> 10#include <qstring.h>
11#include <qwindowsstyle.h> 11#include <qwindowsstyle.h>
12#include <qplatinumstyle.h> 12#include <qplatinumstyle.h>
13#include <qsgistyle.h> 13#include <qsgistyle.h>
14#endif 14#endif
15#include "opiemail.h" 15#include "opiemail.h"
16#include <qdir.h> 16#include <qdir.h>
17#include <kstandarddirs.h> 17#include <kstandarddirs.h>
18#include <kglobal.h> 18#include <kglobal.h>
19#include <stdio.h> 19#include <stdio.h>
20#include "mainwindow.h" 20#include "mainwindow.h"
21#include "koprefs.h" 21#include "koprefs.h"
22#include <libkdepim/kpimglobalprefs.h> 22#include <libkdepim/kpimglobalprefs.h>
23void dumpMissing(); 23void dumpMissing();
24//using namespace Opie::Core; 24//using namespace Opie::Core;
25int main( int argc, char **argv ) { 25int main( int argc, char **argv ) {
26 26
27#ifndef DESKTOP_VERSION 27#ifndef DESKTOP_VERSION
28 QPEApplication a( argc, argv ); 28 QPEApplication a( argc, argv );
29 a.setKeepRunning (); 29 a.setKeepRunning ();
30#else 30#else
31 QApplication a( argc, argv ); 31 QApplication a( argc, argv );
32 QApplication::setStyle( new QPlatinumStyle ()); 32 QApplication::setStyle( new QPlatinumStyle ());
33#endif 33#endif
34 a.setFont( KOPrefs::instance()->mAppFont ); 34 a.setFont( KOPrefs::instance()->mAppFont );
35 KGlobal::setAppName( "kopiemail" ); 35 KGlobal::setAppName( "kopiemail" );
36 QString fileName ; 36 QString fileName ;
37#ifndef DESKTOP_VERSION 37#ifndef DESKTOP_VERSION
38 fileName = getenv("QPEDIR"); 38 fileName = getenv("QPEDIR");
39 if ( QApplication::desktop()->width() > 320 ) 39 if ( QApplication::desktop()->width() > 320 )
40 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/icons22/"); 40 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/icons22/");
41 else 41 else
42 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/"); 42 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/");
43#else 43#else
44 fileName = qApp->applicationDirPath () + "/kdepim/kopiemail/"; 44 fileName = qApp->applicationDirPath () + "/kdepim/kopiemail/icons22/";
45 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 45 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
46#endif 46#endif
47 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kopiemail"))); 47 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kopiemail")));
48 KPimGlobalPrefs::instance()->setGlobalConfig(); 48 KPimGlobalPrefs::instance()->setGlobalConfig();
49 OpieMail mw; 49 OpieMail mw;
50#ifndef DESKTOP_VERSION 50#ifndef DESKTOP_VERSION
51 //qDebug("CONNECT "); 51 //qDebug("CONNECT ");
52 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); 52 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& )));
53 // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 53 // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
54 a.showMainWidget(&mw ); 54 a.showMainWidget(&mw );
55#else 55#else
56 a.setMainWidget(&mw ); 56 a.setMainWidget(&mw );
57 mw.show(); 57 mw.show();
58 //m.resize( 800, 600 ); 58 //m.resize( 800, 600 );
59 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); 59 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
60#endif 60#endif
61 int rv = a.exec(); 61 int rv = a.exec();
62 dumpMissing(); 62 dumpMissing();
63 63
64 KPimGlobalPrefs::instance()->writeConfig(); 64 KPimGlobalPrefs::instance()->writeConfig();
65 return rv; 65 return rv;
66 66
67} 67}
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 0794e00..4c58909 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -190,96 +190,98 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
190 SLOT( mailLeftClicked(QListViewItem*) ) ); 190 SLOT( mailLeftClicked(QListViewItem*) ) );
191 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 191 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
192 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); 192 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
193 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), 193 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
194 this,SLOT(refreshMailView(const QValueList<RecMailP>&))); 194 this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
195 195
196 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, 196 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this,
197 SLOT( setInfoFields(QListViewItem*) ) ); 197 SLOT( setInfoFields(QListViewItem*) ) );
198 198
199 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); 199 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
200 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); 200 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
201// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); 201// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
202 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 202 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
203 //mailView->setMultiSelection ( true ); 203 //mailView->setMultiSelection ( true );
204 mailView->setSelectionMode( QListView::Extended ); 204 mailView->setSelectionMode( QListView::Extended );
205 QValueList<int> list; 205 QValueList<int> list;
206 int fw = 100; 206 int fw = 100;
207 if ( QApplication::desktop()->width() > 320 ) 207 if ( QApplication::desktop()->width() > 320 )
208 fw = 50; 208 fw = 50;
209 list.append( fw ); 209 list.append( fw );
210 list.append( 100 ); 210 list.append( 100 );
211 split->setSizes( list ); 211 split->setSizes( list );
212 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); 212 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
213 mailView->setShowSortIndicator ( true ); 213 mailView->setShowSortIndicator ( true );
214 QLabel *spacer = new QLabel( toolBar ); 214 QLabel *spacer = new QLabel( toolBar );
215 spacer->setBackgroundMode( QWidget::PaletteButton ); 215 spacer->setBackgroundMode( QWidget::PaletteButton );
216 toolBar->setStretchableWidget( spacer ); 216 toolBar->setStretchableWidget( spacer );
217 217
218 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); 218 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
219 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); 219 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
220 if ( QApplication::desktop()->width() > 320 ) 220 if ( QApplication::desktop()->width() > 320 )
221 closeMail->addTo(toolBar); 221 closeMail->addTo(toolBar);
222 closeMail->addTo(mailMenu); 222 closeMail->addTo(mailMenu);
223 223
224 224
225 QPopupMenu* helpMenu = new QPopupMenu( menuBar ); 225 QPopupMenu* helpMenu = new QPopupMenu( menuBar );
226 menuBar->insertItem( i18n( "Help" ), helpMenu ); 226 menuBar->insertItem( i18n( "Help" ), helpMenu );
227 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); 227 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this);
228 connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); 228 connect( li, SIGNAL( activated() ), SLOT( showAbout()) );
229 li->addTo(helpMenu); 229 li->addTo(helpMenu);
230 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); 230 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this);
231 connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); 231 connect( li, SIGNAL( activated() ), SLOT( showLicence()) );
232 li->addTo(helpMenu); 232 li->addTo(helpMenu);
233 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); 233 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this);
234 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); 234 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) );
235 li->addTo(helpMenu); 235 li->addTo(helpMenu);
236 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) ); 236 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) );
237 slotSetCodec( KOPrefs::instance()->mCurrentCodec ); 237 slotSetCodec( KOPrefs::instance()->mCurrentCodec );
238 menuBar->setMaximumWidth( menuBar->sizeHint().width());
239 //menuBar->setMaximumSize( menuBar->sizeHint());
238#ifdef DESKTOP_VERSION 240#ifdef DESKTOP_VERSION
239 resize ( 640, 480 ); 241 resize ( 640, 480 );
240#endif 242#endif
241} 243}
242 244
243MainWindow::~MainWindow() 245MainWindow::~MainWindow()
244{ 246{
245} 247}
246 248
247void MainWindow::setInfoFields(QListViewItem* item ) 249void MainWindow::setInfoFields(QListViewItem* item )
248{ 250{
249 if ( item == 0) { 251 if ( item == 0) {
250 if ( subLE ) subLE->setText(""); 252 if ( subLE ) subLE->setText("");
251 if ( fromLE ) fromLE->setText(""); 253 if ( fromLE ) fromLE->setText("");
252 if ( toLE ) toLE->setText(""); 254 if ( toLE ) toLE->setText("");
253 return; 255 return;
254 } 256 }
255 RecMailP mail = ((MailListViewItem*)item)->data(); 257 RecMailP mail = ((MailListViewItem*)item)->data();
256 if ( subLE ) subLE->setText(mail->getSubject()); 258 if ( subLE ) subLE->setText(mail->getSubject());
257 if ( fromLE ) fromLE->setText(mail->getFrom()); 259 if ( fromLE ) fromLE->setText(mail->getFrom());
258 if ( toLE ) toLE->setText(mail->To().join(";" )); 260 if ( toLE ) toLE->setText(mail->To().join(";" ));
259 if ( subLE ) subLE->setCursorPosition(0); 261 if ( subLE ) subLE->setCursorPosition(0);
260 if ( fromLE ) fromLE->setCursorPosition(0); 262 if ( fromLE ) fromLE->setCursorPosition(0);
261 if ( toLE ) toLE->setCursorPosition(0); 263 if ( toLE ) toLE->setCursorPosition(0);
262 264
263} 265}
264void MainWindow::slotSetCodec( int codec ) 266void MainWindow::slotSetCodec( int codec )
265{ 267{
266 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false ); 268 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false );
267 //qDebug("codec %d ", codec); 269 //qDebug("codec %d ", codec);
268 KOPrefs::instance()->mCurrentCodec = codec; 270 KOPrefs::instance()->mCurrentCodec = codec;
269 KOPrefs::instance()->isDirty = true; 271 KOPrefs::instance()->isDirty = true;
270 QString name; 272 QString name;
271 switch ( codec ) { 273 switch ( codec ) {
272 case 0: 274 case 0:
273 name = "iso-8859-1"; 275 name = "iso-8859-1";
274 break; 276 break;
275 case 1: 277 case 1:
276 name = "iso-8859-5"; 278 name = "iso-8859-5";
277 break; 279 break;
278 case 2: 280 case 2:
279 name = "iso-8859-15"; 281 name = "iso-8859-15";
280 break; 282 break;
281 case 3: 283 case 3:
282 name = "big-5"; 284 name = "big-5";
283 break; 285 break;
284 case 4: 286 case 4:
285 name = "utf-8"; 287 name = "utf-8";
diff --git a/kmicromail/smtpconfigui.ui b/kmicromail/smtpconfigui.ui
index ae0a49a..aae6f12 100644
--- a/kmicromail/smtpconfigui.ui
+++ b/kmicromail/smtpconfigui.ui
@@ -1,126 +1,108 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>SMTPconfigUI</class> 2<class>SMTPconfigUI</class>
3<include location="local">tr.h</include> 3<include location="local">tr.h</include>
4<widget> 4<widget>
5 <class>QDialog</class> 5 <class>QDialog</class>
6 <property stdset="1"> 6 <property stdset="1">
7 <name>name</name> 7 <name>name</name>
8 <cstring>SMTPconfigUI</cstring> 8 <cstring>SMTPconfigUI</cstring>
9 </property> 9 </property>
10 <property stdset="1"> 10 <property stdset="1">
11 <name>geometry</name> 11 <name>geometry</name>
12 <rect> 12 <rect>
13 <x>0</x> 13 <x>0</x>
14 <y>0</y> 14 <y>0</y>
15 <width>331</width> 15 <width>266</width>
16 <height>426</height> 16 <height>365</height>
17 </rect> 17 </rect>
18 </property> 18 </property>
19 <property stdset="1"> 19 <property stdset="1">
20 <name>caption</name> 20 <name>caption</name>
21 <string>Configure SMTP</string> 21 <string>Configure SMTP</string>
22 </property> 22 </property>
23 <property> 23 <property>
24 <name>layoutMargin</name> 24 <name>layoutMargin</name>
25 </property> 25 </property>
26 <property> 26 <property>
27 <name>layoutSpacing</name> 27 <name>layoutSpacing</name>
28 </property> 28 </property>
29 <vbox> 29 <vbox>
30 <property stdset="1"> 30 <property stdset="1">
31 <name>margin</name> 31 <name>margin</name>
32 <number>3</number> 32 <number>5</number>
33 </property> 33 </property>
34 <property stdset="1"> 34 <property stdset="1">
35 <name>spacing</name> 35 <name>spacing</name>
36 <number>3</number> 36 <number>2</number>
37 </property> 37 </property>
38 <widget> 38 <widget>
39 <class>QLabel</class> 39 <class>QLabel</class>
40 <property stdset="1"> 40 <property stdset="1">
41 <name>name</name> 41 <name>name</name>
42 <cstring>accountLabel</cstring> 42 <cstring>accountLabel</cstring>
43 </property> 43 </property>
44 <property stdset="1"> 44 <property stdset="1">
45 <name>text</name> 45 <name>text</name>
46 <string>Account</string> 46 <string>Account</string>
47 </property> 47 </property>
48 </widget> 48 </widget>
49 <widget> 49 <widget>
50 <class>QLineEdit</class> 50 <class>QLineEdit</class>
51 <property stdset="1"> 51 <property stdset="1">
52 <name>name</name> 52 <name>name</name>
53 <cstring>accountLine</cstring> 53 <cstring>accountLine</cstring>
54 </property> 54 </property>
55 <property> 55 <property>
56 <name>toolTip</name> 56 <name>toolTip</name>
57 <string>Name of the Account</string> 57 <string>Name of the Account</string>
58 </property> 58 </property>
59 </widget> 59 </widget>
60 <widget> 60 <widget>
61 <class>Line</class>
62 <property stdset="1">
63 <name>name</name>
64 <cstring>line1</cstring>
65 </property>
66 <property stdset="1">
67 <name>sizePolicy</name>
68 <sizepolicy>
69 <hsizetype>1</hsizetype>
70 <vsizetype>0</vsizetype>
71 </sizepolicy>
72 </property>
73 <property stdset="1">
74 <name>orientation</name>
75 <enum>Horizontal</enum>
76 </property>
77 </widget>
78 <widget>
79 <class>QLayoutWidget</class> 61 <class>QLayoutWidget</class>
80 <property stdset="1"> 62 <property stdset="1">
81 <name>name</name> 63 <name>name</name>
82 <cstring>Layout20</cstring> 64 <cstring>Layout20</cstring>
83 </property> 65 </property>
84 <hbox> 66 <hbox>
85 <property stdset="1"> 67 <property stdset="1">
86 <name>margin</name> 68 <name>margin</name>
87 <number>0</number> 69 <number>0</number>
88 </property> 70 </property>
89 <property stdset="1"> 71 <property stdset="1">
90 <name>spacing</name> 72 <name>spacing</name>
91 <number>6</number> 73 <number>6</number>
92 </property> 74 </property>
93 <widget> 75 <widget>
94 <class>QLayoutWidget</class> 76 <class>QLayoutWidget</class>
95 <property stdset="1"> 77 <property stdset="1">
96 <name>name</name> 78 <name>name</name>
97 <cstring>Layout18</cstring> 79 <cstring>Layout18</cstring>
98 </property> 80 </property>
99 <vbox> 81 <vbox>
100 <property stdset="1"> 82 <property stdset="1">
101 <name>margin</name> 83 <name>margin</name>
102 <number>0</number> 84 <number>0</number>
103 </property> 85 </property>
104 <property stdset="1"> 86 <property stdset="1">
105 <name>spacing</name> 87 <name>spacing</name>
106 <number>6</number> 88 <number>6</number>
107 </property> 89 </property>
108 <widget> 90 <widget>
109 <class>QLabel</class> 91 <class>QLabel</class>
110 <property stdset="1"> 92 <property stdset="1">
111 <name>name</name> 93 <name>name</name>
112 <cstring>serverLabel</cstring> 94 <cstring>serverLabel</cstring>
113 </property> 95 </property>
114 <property stdset="1"> 96 <property stdset="1">
115 <name>text</name> 97 <name>text</name>
116 <string>Server</string> 98 <string>Server</string>
117 </property> 99 </property>
118 </widget> 100 </widget>
119 <widget> 101 <widget>
120 <class>QLabel</class> 102 <class>QLabel</class>
121 <property stdset="1"> 103 <property stdset="1">
122 <name>name</name> 104 <name>name</name>
123 <cstring>portLabel</cstring> 105 <cstring>portLabel</cstring>
124 </property> 106 </property>
125 <property stdset="1"> 107 <property stdset="1">
126 <name>text</name> 108 <name>text</name>
@@ -155,114 +137,96 @@
155 <string>Name of the SMTP Server</string> 137 <string>Name of the SMTP Server</string>
156 </property> 138 </property>
157 </widget> 139 </widget>
158 <widget> 140 <widget>
159 <class>QLineEdit</class> 141 <class>QLineEdit</class>
160 <property stdset="1"> 142 <property stdset="1">
161 <name>name</name> 143 <name>name</name>
162 <cstring>portLine</cstring> 144 <cstring>portLine</cstring>
163 </property> 145 </property>
164 <property> 146 <property>
165 <name>toolTip</name> 147 <name>toolTip</name>
166 <string>Port of the SMTP Server</string> 148 <string>Port of the SMTP Server</string>
167 </property> 149 </property>
168 </widget> 150 </widget>
169 </vbox> 151 </vbox>
170 </widget> 152 </widget>
171 </hbox> 153 </hbox>
172 </widget> 154 </widget>
173 <widget> 155 <widget>
174 <class>QLabel</class> 156 <class>QLabel</class>
175 <property stdset="1"> 157 <property stdset="1">
176 <name>name</name> 158 <name>name</name>
177 <cstring>TextLabel1</cstring> 159 <cstring>TextLabel1</cstring>
178 </property> 160 </property>
179 <property stdset="1"> 161 <property stdset="1">
180 <name>text</name> 162 <name>text</name>
181 <string>Use secure sockets:</string> 163 <string>Use secure sockets:</string>
182 </property> 164 </property>
183 </widget> 165 </widget>
184 <widget> 166 <widget>
185 <class>QComboBox</class> 167 <class>QComboBox</class>
186 <property stdset="1"> 168 <property stdset="1">
187 <name>name</name> 169 <name>name</name>
188 <cstring>ComboBox1</cstring> 170 <cstring>ComboBox1</cstring>
189 </property> 171 </property>
190 </widget> 172 </widget>
191 <widget> 173 <widget>
192 <class>QLineEdit</class> 174 <class>QLineEdit</class>
193 <property stdset="1"> 175 <property stdset="1">
194 <name>name</name> 176 <name>name</name>
195 <cstring>CommandEdit</cstring> 177 <cstring>CommandEdit</cstring>
196 </property> 178 </property>
197 <property stdset="1"> 179 <property stdset="1">
198 <name>text</name> 180 <name>text</name>
199 <string>ssh $SERVER exec</string> 181 <string>ssh $SERVER exec</string>
200 </property> 182 </property>
201 </widget> 183 </widget>
202 <widget> 184 <widget>
203 <class>Line</class>
204 <property stdset="1">
205 <name>name</name>
206 <cstring>line2</cstring>
207 </property>
208 <property stdset="1">
209 <name>sizePolicy</name>
210 <sizepolicy>
211 <hsizetype>1</hsizetype>
212 <vsizetype>0</vsizetype>
213 </sizepolicy>
214 </property>
215 <property stdset="1">
216 <name>orientation</name>
217 <enum>Horizontal</enum>
218 </property>
219 </widget>
220 <widget>
221 <class>QCheckBox</class> 185 <class>QCheckBox</class>
222 <property stdset="1"> 186 <property stdset="1">
223 <name>name</name> 187 <name>name</name>
224 <cstring>loginBox</cstring> 188 <cstring>loginBox</cstring>
225 </property> 189 </property>
226 <property stdset="1"> 190 <property stdset="1">
227 <name>text</name> 191 <name>text</name>
228 <string>Use Login</string> 192 <string>Use Login</string>
229 </property> 193 </property>
230 </widget> 194 </widget>
231 <widget> 195 <widget>
232 <class>QLayoutWidget</class> 196 <class>QLayoutWidget</class>
233 <property stdset="1"> 197 <property stdset="1">
234 <name>name</name> 198 <name>name</name>
235 <cstring>Layout17</cstring> 199 <cstring>Layout17</cstring>
236 </property> 200 </property>
237 <hbox> 201 <hbox>
238 <property stdset="1"> 202 <property stdset="1">
239 <name>margin</name> 203 <name>margin</name>
240 <number>0</number> 204 <number>0</number>
241 </property> 205 </property>
242 <property stdset="1"> 206 <property stdset="1">
243 <name>spacing</name> 207 <name>spacing</name>
244 <number>6</number> 208 <number>6</number>
245 </property> 209 </property>
246 <widget> 210 <widget>
247 <class>QLayoutWidget</class> 211 <class>QLayoutWidget</class>
248 <property stdset="1"> 212 <property stdset="1">
249 <name>name</name> 213 <name>name</name>
250 <cstring>Layout15</cstring> 214 <cstring>Layout15</cstring>
251 </property> 215 </property>
252 <vbox> 216 <vbox>
253 <property stdset="1"> 217 <property stdset="1">
254 <name>margin</name> 218 <name>margin</name>
255 <number>0</number> 219 <number>0</number>
256 </property> 220 </property>
257 <property stdset="1"> 221 <property stdset="1">
258 <name>spacing</name> 222 <name>spacing</name>
259 <number>6</number> 223 <number>6</number>
260 </property> 224 </property>
261 <widget> 225 <widget>
262 <class>QLabel</class> 226 <class>QLabel</class>
263 <property stdset="1"> 227 <property stdset="1">
264 <name>name</name> 228 <name>name</name>
265 <cstring>userLabel</cstring> 229 <cstring>userLabel</cstring>
266 </property> 230 </property>
267 <property stdset="1"> 231 <property stdset="1">
268 <name>text</name> 232 <name>text</name>
@@ -282,80 +246,133 @@
282 </widget> 246 </widget>
283 </vbox> 247 </vbox>
284 </widget> 248 </widget>
285 <widget> 249 <widget>
286 <class>QLayoutWidget</class> 250 <class>QLayoutWidget</class>
287 <property stdset="1"> 251 <property stdset="1">
288 <name>name</name> 252 <name>name</name>
289 <cstring>Layout16</cstring> 253 <cstring>Layout16</cstring>
290 </property> 254 </property>
291 <vbox> 255 <vbox>
292 <property stdset="1"> 256 <property stdset="1">
293 <name>margin</name> 257 <name>margin</name>
294 <number>0</number> 258 <number>0</number>
295 </property> 259 </property>
296 <property stdset="1"> 260 <property stdset="1">
297 <name>spacing</name> 261 <name>spacing</name>
298 <number>6</number> 262 <number>6</number>
299 </property> 263 </property>
300 <widget> 264 <widget>
301 <class>QLineEdit</class> 265 <class>QLineEdit</class>
302 <property stdset="1"> 266 <property stdset="1">
303 <name>name</name> 267 <name>name</name>
304 <cstring>userLine</cstring> 268 <cstring>userLine</cstring>
305 </property> 269 </property>
306 <property stdset="1"> 270 <property stdset="1">
307 <name>enabled</name> 271 <name>enabled</name>
308 <bool>false</bool> 272 <bool>false</bool>
309 </property> 273 </property>
310 </widget> 274 </widget>
311 <widget> 275 <widget>
312 <class>QLineEdit</class> 276 <class>QLineEdit</class>
313 <property stdset="1"> 277 <property stdset="1">
314 <name>name</name> 278 <name>name</name>
315 <cstring>passLine</cstring> 279 <cstring>passLine</cstring>
316 </property> 280 </property>
317 <property stdset="1"> 281 <property stdset="1">
318 <name>enabled</name> 282 <name>enabled</name>
319 <bool>false</bool> 283 <bool>false</bool>
320 </property> 284 </property>
321 <property stdset="1"> 285 <property stdset="1">
322 <name>echoMode</name> 286 <name>echoMode</name>
323 <enum>Password</enum> 287 <enum>Password</enum>
324 </property> 288 </property>
325 </widget> 289 </widget>
326 </vbox> 290 </vbox>
327 </widget> 291 </widget>
328 </hbox> 292 </hbox>
329 </widget> 293 </widget>
294 <widget>
295 <class>QLayoutWidget</class>
296 <property stdset="1">
297 <name>name</name>
298 <cstring>Layout7</cstring>
299 </property>
300 <hbox>
301 <property stdset="1">
302 <name>margin</name>
303 <number>0</number>
304 </property>
305 <property stdset="1">
306 <name>spacing</name>
307 <number>6</number>
308 </property>
309 <widget>
310 <class>QLabel</class>
311 <property stdset="1">
312 <name>name</name>
313 <cstring>TextLabel1_2</cstring>
314 </property>
315 <property stdset="1">
316 <name>text</name>
317 <string>Signatur File</string>
318 </property>
319 </widget>
320 <widget>
321 <class>QLineEdit</class>
322 <property stdset="1">
323 <name>name</name>
324 <cstring>SignaturEdit</cstring>
325 </property>
326 </widget>
327 <widget>
328 <class>QPushButton</class>
329 <property stdset="1">
330 <name>name</name>
331 <cstring>SignaturButton</cstring>
332 </property>
333 <property stdset="1">
334 <name>sizePolicy</name>
335 <sizepolicy>
336 <hsizetype>1</hsizetype>
337 <vsizetype>1</vsizetype>
338 </sizepolicy>
339 </property>
340 <property stdset="1">
341 <name>text</name>
342 <string>F</string>
343 </property>
344 </widget>
345 </hbox>
346 </widget>
330 <spacer> 347 <spacer>
331 <property> 348 <property>
332 <name>name</name> 349 <name>name</name>
333 <cstring>spacer</cstring> 350 <cstring>spacer</cstring>
334 </property> 351 </property>
335 <property stdset="1"> 352 <property stdset="1">
336 <name>orientation</name> 353 <name>orientation</name>
337 <enum>Vertical</enum> 354 <enum>Vertical</enum>
338 </property> 355 </property>
339 <property stdset="1"> 356 <property stdset="1">
340 <name>sizeType</name> 357 <name>sizeType</name>
341 <enum>Expanding</enum> 358 <enum>Expanding</enum>
342 </property> 359 </property>
343 <property> 360 <property>
344 <name>sizeHint</name> 361 <name>sizeHint</name>
345 <size> 362 <size>
346 <width>20</width> 363 <width>20</width>
347 <height>20</height> 364 <height>20</height>
348 </size> 365 </size>
349 </property> 366 </property>
350 </spacer> 367 </spacer>
351 </vbox> 368 </vbox>
352</widget> 369</widget>
353<tabstops> 370<tabstops>
354 <tabstop>accountLine</tabstop> 371 <tabstop>accountLine</tabstop>
355 <tabstop>serverLine</tabstop> 372 <tabstop>serverLine</tabstop>
356 <tabstop>portLine</tabstop> 373 <tabstop>portLine</tabstop>
357 <tabstop>loginBox</tabstop> 374 <tabstop>loginBox</tabstop>
358 <tabstop>userLine</tabstop> 375 <tabstop>userLine</tabstop>
359 <tabstop>passLine</tabstop> 376 <tabstop>passLine</tabstop>
360</tabstops> 377</tabstops>
361</UI> 378</UI>