-rw-r--r-- | noncore/net/mail/editaccounts.cpp | 22 | ||||
-rw-r--r-- | noncore/net/mail/editaccounts.h | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.cpp | 137 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.cpp | 7 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.h | 5 | ||||
-rw-r--r-- | noncore/net/mail/pop3configui.ui | 494 |
6 files changed, 452 insertions, 215 deletions
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp index de36e0d..439b619 100644 --- a/noncore/net/mail/editaccounts.cpp +++ b/noncore/net/mail/editaccounts.cpp | |||
@@ -303,52 +303,62 @@ void IMAPconfig::accept() | |||
303 | } | 303 | } |
304 | 304 | ||
305 | /** | 305 | /** |
306 | * POP3config | 306 | * POP3config |
307 | */ | 307 | */ |
308 | 308 | ||
309 | POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 309 | POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
310 | : POP3configUI( parent, name, modal, flags ) | 310 | : POP3configUI( parent, name, modal, flags ) |
311 | { | 311 | { |
312 | data = account; | 312 | data = account; |
313 | fillValues(); | 313 | fillValues(); |
314 | 314 | ||
315 | connect( sslBox, SIGNAL( toggled( bool ) ), SLOT( slotSSL( bool ) ) ); | 315 | connect( ComboBox1, SIGNAL( activated( int ) ), SLOT( slotConnectionToggle( int ) ) ); |
316 | ComboBox1->insertItem( "Only if available", 0 ); | ||
317 | ComboBox1->insertItem( "Always, Negotiated", 1 ); | ||
318 | ComboBox1->insertItem( "Connect on secure port", 2 ); | ||
319 | ComboBox1->insertItem( "Run command instead", 3 ); | ||
320 | CommandEdit->hide(); | ||
321 | ComboBox1->setCurrentItem( data->ConnectionType() ); | ||
316 | } | 322 | } |
317 | 323 | ||
318 | void POP3config::slotSSL( bool enabled ) | 324 | void POP3config::slotConnectionToggle( int index ) |
319 | { | 325 | { |
320 | if ( enabled ) { | 326 | // 2 is ssl connection |
321 | portLine->setText( POP3_SSL_PORT ); | 327 | if ( index == 2 ) { |
328 | portLine->setText( POP3_SSL_PORT ); | ||
329 | } else if ( index == 3 ) { | ||
330 | portLine->setText( POP3_PORT ); | ||
331 | CommandEdit->show(); | ||
322 | } else { | 332 | } else { |
323 | portLine->setText( POP3_PORT ); | 333 | portLine->setText( POP3_PORT ); |
324 | } | 334 | } |
325 | } | 335 | } |
326 | 336 | ||
327 | void POP3config::fillValues() | 337 | void POP3config::fillValues() |
328 | { | 338 | { |
329 | accountLine->setText( data->getAccountName() ); | 339 | accountLine->setText( data->getAccountName() ); |
330 | serverLine->setText( data->getServer() ); | 340 | serverLine->setText( data->getServer() ); |
331 | portLine->setText( data->getPort() ); | 341 | portLine->setText( data->getPort() ); |
332 | sslBox->setChecked( data->getSSL() ); | 342 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
333 | userLine->setText( data->getUser() ); | 343 | userLine->setText( data->getUser() ); |
334 | passLine->setText( data->getPassword() ); | 344 | passLine->setText( data->getPassword() ); |
335 | } | 345 | } |
336 | 346 | ||
337 | void POP3config::accept() | 347 | void POP3config::accept() |
338 | { | 348 | { |
339 | data->setAccountName( accountLine->text() ); | 349 | data->setAccountName( accountLine->text() ); |
340 | data->setServer( serverLine->text() ); | 350 | data->setServer( serverLine->text() ); |
341 | data->setPort( portLine->text() ); | 351 | data->setPort( portLine->text() ); |
342 | data->setSSL( sslBox->isChecked() ); | 352 | data->setConnectionType( ComboBox1->currentItem() ); |
343 | data->setUser( userLine->text() ); | 353 | data->setUser( userLine->text() ); |
344 | data->setPassword( passLine->text() ); | 354 | data->setPassword( passLine->text() ); |
345 | 355 | ||
346 | QDialog::accept(); | 356 | QDialog::accept(); |
347 | } | 357 | } |
348 | 358 | ||
349 | /** | 359 | /** |
350 | * SMTPconfig | 360 | * SMTPconfig |
351 | */ | 361 | */ |
352 | 362 | ||
353 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 363 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
354 | : SMTPconfigUI( parent, name, modal, flags ) | 364 | : SMTPconfigUI( parent, name, modal, flags ) |
diff --git a/noncore/net/mail/editaccounts.h b/noncore/net/mail/editaccounts.h index 6022eef..fb4be71 100644 --- a/noncore/net/mail/editaccounts.h +++ b/noncore/net/mail/editaccounts.h | |||
@@ -89,25 +89,25 @@ private: | |||
89 | 89 | ||
90 | class POP3config : public POP3configUI | 90 | class POP3config : public POP3configUI |
91 | { | 91 | { |
92 | Q_OBJECT | 92 | Q_OBJECT |
93 | 93 | ||
94 | public: | 94 | public: |
95 | POP3config( POP3account *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); | 95 | POP3config( POP3account *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); |
96 | 96 | ||
97 | public slots: | 97 | public slots: |
98 | void fillValues(); | 98 | void fillValues(); |
99 | 99 | ||
100 | protected slots: | 100 | protected slots: |
101 | void slotSSL( bool enabled ); | 101 | void slotConnectionToggle( int index ); |
102 | void accept(); | 102 | void accept(); |
103 | 103 | ||
104 | private: | 104 | private: |
105 | POP3account *data; | 105 | POP3account *data; |
106 | 106 | ||
107 | }; | 107 | }; |
108 | 108 | ||
109 | class SMTPconfig : public SMTPconfigUI | 109 | class SMTPconfig : public SMTPconfigUI |
110 | { | 110 | { |
111 | Q_OBJECT | 111 | Q_OBJECT |
112 | 112 | ||
113 | public: | 113 | public: |
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp index 67bde38..f5eca4a 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp | |||
@@ -2,49 +2,45 @@ | |||
2 | #include "pop3wrapper.h" | 2 | #include "pop3wrapper.h" |
3 | #include "mailtypes.h" | 3 | #include "mailtypes.h" |
4 | #include "logindialog.h" | 4 | #include "logindialog.h" |
5 | #include <libetpan/libetpan.h> | 5 | #include <libetpan/libetpan.h> |
6 | #include <qpe/global.h> | 6 | #include <qpe/global.h> |
7 | #include <qfile.h> | 7 | #include <qfile.h> |
8 | #include <qstring.h> | 8 | #include <qstring.h> |
9 | 9 | ||
10 | /* we don't fetch messages larger than 5 MB */ | 10 | /* we don't fetch messages larger than 5 MB */ |
11 | #define HARD_MSG_SIZE_LIMIT 5242880 | 11 | #define HARD_MSG_SIZE_LIMIT 5242880 |
12 | 12 | ||
13 | POP3wrapper::POP3wrapper( POP3account *a ) | 13 | POP3wrapper::POP3wrapper( POP3account *a ) |
14 | : Genericwrapper() | 14 | : Genericwrapper() { |
15 | { | ||
16 | account = a; | 15 | account = a; |
17 | m_pop3 = NULL; | 16 | m_pop3 = NULL; |
18 | m_folder = NULL; | 17 | m_folder = NULL; |
19 | msgTempName = a->getFileName()+"_msg_cache"; | 18 | msgTempName = a->getFileName()+"_msg_cache"; |
20 | last_msg_id = 0; | 19 | last_msg_id = 0; |
21 | } | 20 | } |
22 | 21 | ||
23 | POP3wrapper::~POP3wrapper() | 22 | POP3wrapper::~POP3wrapper() { |
24 | { | ||
25 | logout(); | 23 | logout(); |
26 | QFile msg_cache(msgTempName); | 24 | QFile msg_cache(msgTempName); |
27 | if (msg_cache.exists()) { | 25 | if (msg_cache.exists()) { |
28 | msg_cache.remove(); | 26 | msg_cache.remove(); |
29 | } | 27 | } |
30 | } | 28 | } |
31 | 29 | ||
32 | void POP3wrapper::pop3_progress( size_t current, size_t maximum ) | 30 | void POP3wrapper::pop3_progress( size_t current, size_t maximum ) { |
33 | { | ||
34 | qDebug( "POP3: %i of %i", current, maximum ); | 31 | qDebug( "POP3: %i of %i", current, maximum ); |
35 | } | 32 | } |
36 | 33 | ||
37 | RecBody POP3wrapper::fetchBody( const RecMail &mail ) | 34 | RecBody POP3wrapper::fetchBody( const RecMail &mail ) { |
38 | { | ||
39 | int err = MAILPOP3_NO_ERROR; | 35 | int err = MAILPOP3_NO_ERROR; |
40 | char *message = 0; | 36 | char *message = 0; |
41 | size_t length = 0; | 37 | size_t length = 0; |
42 | 38 | ||
43 | login(); | 39 | login(); |
44 | if ( !m_pop3 ) { | 40 | if ( !m_pop3 ) { |
45 | return RecBody(); | 41 | return RecBody(); |
46 | } | 42 | } |
47 | 43 | ||
48 | RecBody body; | 44 | RecBody body; |
49 | mailmessage * mailmsg; | 45 | mailmessage * mailmsg; |
50 | if (mail.Msgsize()>HARD_MSG_SIZE_LIMIT) { | 46 | if (mail.Msgsize()>HARD_MSG_SIZE_LIMIT) { |
@@ -81,177 +77,190 @@ RecBody POP3wrapper::fetchBody( const RecMail &mail ) | |||
81 | /* transform to libetpan stuff */ | 77 | /* transform to libetpan stuff */ |
82 | mailmsg = mailmessage_new(); | 78 | mailmsg = mailmessage_new(); |
83 | mailmessage_init(mailmsg, NULL, data_message_driver, 0, strlen(message)); | 79 | mailmessage_init(mailmsg, NULL, data_message_driver, 0, strlen(message)); |
84 | generic_message_t * msg_data; | 80 | generic_message_t * msg_data; |
85 | msg_data = (generic_message_t *)mailmsg->msg_data; | 81 | msg_data = (generic_message_t *)mailmsg->msg_data; |
86 | msg_data->msg_fetched = 1; | 82 | msg_data->msg_fetched = 1; |
87 | msg_data->msg_message = message; | 83 | msg_data->msg_message = message; |
88 | msg_data->msg_length = strlen(message); | 84 | msg_data->msg_length = strlen(message); |
89 | } | 85 | } |
90 | body = parseMail(mailmsg); | 86 | body = parseMail(mailmsg); |
91 | 87 | ||
92 | /* clean up */ | 88 | /* clean up */ |
93 | if (mailmsg) mailmessage_free(mailmsg); | 89 | if (mailmsg) |
94 | if (message) free(message); | 90 | mailmessage_free(mailmsg); |
91 | if (message) | ||
92 | free(message); | ||
95 | 93 | ||
96 | return body; | 94 | return body; |
97 | } | 95 | } |
98 | 96 | ||
99 | void POP3wrapper::listMessages(const QString &, QList<RecMail> &target ) | 97 | void POP3wrapper::listMessages(const QString &, QList<RecMail> &target ) { |
100 | { | ||
101 | login(); | 98 | login(); |
102 | if (!m_pop3) return; | 99 | if (!m_pop3) |
100 | return; | ||
103 | uint32_t res_messages,res_recent,res_unseen; | 101 | uint32_t res_messages,res_recent,res_unseen; |
104 | mailsession_status_folder(m_folder->fld_session,"INBOX",&res_messages,&res_recent,&res_unseen); | 102 | mailsession_status_folder(m_folder->fld_session,"INBOX",&res_messages,&res_recent,&res_unseen); |
105 | parseList(target,m_folder->fld_session,"INBOX"); | 103 | parseList(target,m_folder->fld_session,"INBOX"); |
106 | Global::statusMessage( tr("Mailbox contains %1 mail(s)").arg(res_messages)); | 104 | Global::statusMessage( tr("Mailbox contains %1 mail(s)").arg(res_messages)); |
107 | } | 105 | } |
108 | 106 | ||
109 | void POP3wrapper::login() | 107 | void POP3wrapper::login() { |
110 | { | 108 | if (account->getOffline()) |
111 | if (account->getOffline()) return; | 109 | return; |
112 | /* we'll hold the line */ | 110 | /* we'll hold the line */ |
113 | if ( m_pop3 != NULL ) return; | 111 | if ( m_pop3 != NULL ) |
112 | return; | ||
114 | 113 | ||
115 | const char *server, *user, *pass; | 114 | const char *server, *user, *pass; |
116 | uint16_t port; | 115 | uint16_t port; |
117 | int err = MAILPOP3_NO_ERROR; | 116 | int err = MAILPOP3_NO_ERROR; |
118 | 117 | ||
119 | server = account->getServer().latin1(); | 118 | server = account->getServer().latin1(); |
120 | port = account->getPort().toUInt(); | 119 | port = account->getPort().toUInt(); |
121 | 120 | ||
122 | if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { | 121 | if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { |
123 | LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true ); | 122 | LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true ); |
124 | login.show(); | 123 | login.show(); |
125 | if ( QDialog::Accepted == login.exec() ) { | 124 | if ( QDialog::Accepted == login.exec() ) { |
126 | // ok | 125 | // ok |
127 | user = login.getUser().latin1(); | 126 | user = login.getUser().latin1(); |
128 | pass = login.getPassword().latin1(); | 127 | pass = login.getPassword().latin1(); |
129 | } else { | 128 | } else { |
130 | // cancel | 129 | // cancel |
131 | qDebug( "POP3: Login canceled" ); | 130 | qDebug( "POP3: Login canceled" ); |
132 | return; | 131 | return; |
133 | } | 132 | } |
134 | } else { | 133 | } else { |
135 | user = account->getUser().latin1(); | 134 | user = account->getUser().latin1(); |
136 | pass = account->getPassword().latin1(); | 135 | pass = account->getPassword().latin1(); |
137 | } | 136 | } |
138 | 137 | ||
139 | bool ssl = account->getSSL(); | 138 | // bool ssl = account->getSSL(); |
140 | 139 | ||
141 | m_pop3=mailstorage_new(NULL); | 140 | m_pop3=mailstorage_new(NULL); |
142 | int conntype = (ssl?CONNECTION_TYPE_TLS:CONNECTION_TYPE_PLAIN); | 141 | |
143 | 142 | int conntypeset = account->ConnectionType(); | |
144 | pop3_mailstorage_init(m_pop3,(char*)server,port,NULL,conntype,POP3_AUTH_TYPE_PLAIN, | 143 | int conntype = 0; |
145 | (char*)user,(char*)pass,0,0,0); | 144 | if ( conntypeset == 3 ) { |
145 | conntype = CONNECTION_TYPE_COMMAND; | ||
146 | } else if ( conntypeset == 2 ) { | ||
147 | conntype = CONNECTION_TYPE_TLS; | ||
148 | } else if ( conntypeset == 1 ) { | ||
149 | conntype = CONNECTION_TYPE_STARTTLS; | ||
150 | } else if ( conntypeset == 0 ) { | ||
151 | conntype = CONNECTION_TYPE_TRY_STARTTLS; | ||
152 | } | ||
153 | |||
154 | //(ssl?CONNECTION_TYPE_TLS:CONNECTION_TYPE_PLAIN); | ||
155 | |||
156 | pop3_mailstorage_init(m_pop3,(char*)server, port, NULL, conntype, POP3_AUTH_TYPE_PLAIN, | ||
157 | (char*)user,(char*)pass,0,0,0); | ||
158 | |||
159 | |||
146 | 160 | ||
147 | m_folder = mailfolder_new(m_pop3, NULL, NULL); | 161 | m_folder = mailfolder_new(m_pop3, NULL, NULL); |
148 | 162 | ||
149 | if (m_folder==0) { | 163 | if (m_folder==0) { |
150 | Global::statusMessage(tr("Error initializing folder")); | 164 | Global::statusMessage(tr("Error initializing folder")); |
151 | mailstorage_free(m_pop3); | 165 | mailstorage_free(m_pop3); |
152 | m_pop3 = NULL; | 166 | m_pop3 = NULL; |
153 | return; | 167 | return; |
154 | } | 168 | } |
155 | err = mailfolder_connect(m_folder); | 169 | err = mailfolder_connect(m_folder); |
156 | if (err != MAIL_NO_ERROR) { | 170 | if (err != MAIL_NO_ERROR) { |
157 | qDebug( QString( "FEHLERNUMMER %1" ).arg( err ) ); | 171 | qDebug( QString( "FEHLERNUMMER %1" ).arg( err ) ); |
158 | Global::statusMessage(tr("Error initializing folder")); | 172 | Global::statusMessage(tr("Error initializing folder")); |
159 | mailfolder_free(m_folder); | 173 | mailfolder_free(m_folder); |
160 | m_folder = 0; | 174 | m_folder = 0; |
161 | mailstorage_free(m_pop3); | 175 | mailstorage_free(m_pop3); |
162 | m_pop3 = 0; | 176 | m_pop3 = 0; |
163 | } | 177 | } |
164 | } | 178 | } |
165 | 179 | ||
166 | void POP3wrapper::logout() | 180 | void POP3wrapper::logout() { |
167 | { | ||
168 | int err = MAILPOP3_NO_ERROR; | 181 | int err = MAILPOP3_NO_ERROR; |
169 | if ( m_pop3 == NULL ) return; | 182 | if ( m_pop3 == NULL ) |
183 | return; | ||
170 | mailfolder_free(m_folder); | 184 | mailfolder_free(m_folder); |
171 | m_folder = 0; | 185 | m_folder = 0; |
172 | mailstorage_free(m_pop3); | 186 | mailstorage_free(m_pop3); |
173 | m_pop3 = 0; | 187 | m_pop3 = 0; |
174 | } | 188 | } |
175 | 189 | ||
176 | 190 | ||
177 | QList<Folder>* POP3wrapper::listFolders() | 191 | QList<Folder>* POP3wrapper::listFolders() { |
178 | { | ||
179 | QList<Folder> * folders = new QList<Folder>(); | 192 | QList<Folder> * folders = new QList<Folder>(); |
180 | folders->setAutoDelete( false ); | 193 | folders->setAutoDelete( false ); |
181 | Folder*inb=new Folder("INBOX","/"); | 194 | Folder*inb=new Folder("INBOX","/"); |
182 | folders->append(inb); | 195 | folders->append(inb); |
183 | return folders; | 196 | return folders; |
184 | } | 197 | } |
185 | 198 | ||
186 | void POP3wrapper::deleteMail(const RecMail&mail) | 199 | void POP3wrapper::deleteMail(const RecMail&mail) { |
187 | { | ||
188 | login(); | 200 | login(); |
189 | if (!m_pop3) return; | 201 | if (!m_pop3) |
202 | return; | ||
190 | int err = mailsession_remove_message(m_folder->fld_session,mail.getNumber()); | 203 | int err = mailsession_remove_message(m_folder->fld_session,mail.getNumber()); |
191 | if (err != MAIL_NO_ERROR) { | 204 | if (err != MAIL_NO_ERROR) { |
192 | Global::statusMessage(tr("error deleting mail")); | 205 | Global::statusMessage(tr("error deleting mail")); |
193 | } | 206 | } |
194 | } | 207 | } |
195 | 208 | ||
196 | void POP3wrapper::answeredMail(const RecMail&) | 209 | void POP3wrapper::answeredMail(const RecMail&) {} |
197 | { | ||
198 | } | ||
199 | 210 | ||
200 | int POP3wrapper::deleteAllMail(const Folder*) | 211 | int POP3wrapper::deleteAllMail(const Folder*) { |
201 | { | ||
202 | login(); | 212 | login(); |
203 | if (!m_pop3) return 0; | 213 | if (!m_pop3) |
214 | return 0; | ||
204 | int res = 1; | 215 | int res = 1; |
205 | 216 | ||
206 | uint32_t result = 0; | 217 | uint32_t result = 0; |
207 | int err = mailsession_messages_number(m_folder->fld_session,NULL,&result); | 218 | int err = mailsession_messages_number(m_folder->fld_session,NULL,&result); |
208 | if (err != MAIL_NO_ERROR) { | 219 | if (err != MAIL_NO_ERROR) { |
209 | Global::statusMessage(tr("Error getting folder info")); | 220 | Global::statusMessage(tr("Error getting folder info")); |
210 | return 0; | 221 | return 0; |
211 | } | 222 | } |
212 | for (unsigned int i = 0; i < result; ++i) { | 223 | for (unsigned int i = 0; i < result; ++i) { |
213 | err = mailsession_remove_message(m_folder->fld_session,i+1); | 224 | err = mailsession_remove_message(m_folder->fld_session,i+1); |
214 | if (err != MAIL_NO_ERROR) { | 225 | if (err != MAIL_NO_ERROR) { |
215 | Global::statusMessage(tr("Error deleting mail %1").arg(i+1)); | 226 | Global::statusMessage(tr("Error deleting mail %1").arg(i+1)); |
216 | res=0; | 227 | res=0; |
217 | } | 228 | } |
218 | break; | 229 | break; |
219 | } | 230 | } |
220 | return res; | 231 | return res; |
221 | } | 232 | } |
222 | 233 | ||
223 | void POP3wrapper::statusFolder(folderStat&target_stat,const QString&) | 234 | void POP3wrapper::statusFolder(folderStat&target_stat,const QString&) { |
224 | { | ||
225 | login(); | 235 | login(); |
226 | target_stat.message_count = 0; | 236 | target_stat.message_count = 0; |
227 | target_stat.message_unseen = 0; | 237 | target_stat.message_unseen = 0; |
228 | target_stat.message_recent = 0; | 238 | target_stat.message_recent = 0; |
229 | if (!m_pop3) return; | 239 | if (!m_pop3) |
240 | return; | ||
230 | int r = mailsession_status_folder(m_folder->fld_session,0,&target_stat.message_count, | 241 | int r = mailsession_status_folder(m_folder->fld_session,0,&target_stat.message_count, |
231 | &target_stat.message_recent,&target_stat.message_unseen); | 242 | &target_stat.message_recent,&target_stat.message_unseen); |
232 | } | 243 | } |
233 | 244 | ||
234 | encodedString* POP3wrapper::fetchRawBody(const RecMail&mail) | 245 | encodedString* POP3wrapper::fetchRawBody(const RecMail&mail) { |
235 | { | ||
236 | char*target=0; | 246 | char*target=0; |
237 | size_t length=0; | 247 | size_t length=0; |
238 | encodedString*res = 0; | 248 | encodedString*res = 0; |
239 | mailmessage * mailmsg = 0; | 249 | mailmessage * mailmsg = 0; |
240 | int err = mailsession_get_message(m_folder->fld_session, mail.getNumber(), &mailmsg); | 250 | int err = mailsession_get_message(m_folder->fld_session, mail.getNumber(), &mailmsg); |
241 | err = mailmessage_fetch(mailmsg,&target,&length); | 251 | err = mailmessage_fetch(mailmsg,&target,&length); |
242 | if (mailmsg) mailmessage_free(mailmsg); | 252 | if (mailmsg) |
253 | mailmessage_free(mailmsg); | ||
243 | if (target) { | 254 | if (target) { |
244 | res = new encodedString(target,length); | 255 | res = new encodedString(target,length); |
245 | } | 256 | } |
246 | return res; | 257 | return res; |
247 | } | 258 | } |
248 | 259 | ||
249 | const QString&POP3wrapper::getType()const | 260 | const QString&POP3wrapper::getType()const { |
250 | { | ||
251 | return account->getType(); | 261 | return account->getType(); |
252 | } | 262 | } |
253 | 263 | ||
254 | const QString&POP3wrapper::getName()const | 264 | const QString&POP3wrapper::getName()const { |
255 | { | ||
256 | return account->getAccountName(); | 265 | return account->getAccountName(); |
257 | } | 266 | } |
diff --git a/noncore/net/mail/libmailwrapper/settings.cpp b/noncore/net/mail/libmailwrapper/settings.cpp index 02a80a3..83e51e3 100644 --- a/noncore/net/mail/libmailwrapper/settings.cpp +++ b/noncore/net/mail/libmailwrapper/settings.cpp | |||
@@ -99,48 +99,51 @@ void Settings::readAccounts() | |||
99 | Account *it; | 99 | Account *it; |
100 | 100 | ||
101 | for ( it = accounts.first(); it; it = accounts.next() ) { | 101 | for ( it = accounts.first(); it; it = accounts.next() ) { |
102 | it->read(); | 102 | it->read(); |
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||
106 | Account::Account() | 106 | Account::Account() |
107 | { | 107 | { |
108 | accountName = "changeMe"; | 108 | accountName = "changeMe"; |
109 | type = "changeMe"; | 109 | type = "changeMe"; |
110 | ssl = false; | 110 | ssl = false; |
111 | connectionType = 1; | ||
111 | } | 112 | } |
112 | 113 | ||
113 | void Account::remove() | 114 | void Account::remove() |
114 | { | 115 | { |
115 | QFile file( getFileName() ); | 116 | QFile file( getFileName() ); |
116 | file.remove(); | 117 | file.remove(); |
117 | } | 118 | } |
118 | 119 | ||
119 | IMAPaccount::IMAPaccount() | 120 | IMAPaccount::IMAPaccount() |
120 | : Account() | 121 | : Account() |
121 | { | 122 | { |
122 | file = IMAPaccount::getUniqueFileName(); | 123 | file = IMAPaccount::getUniqueFileName(); |
123 | accountName = "New IMAP Account"; | 124 | accountName = "New IMAP Account"; |
124 | ssl = false; | 125 | ssl = false; |
126 | connectionType = 1; | ||
125 | type = "IMAP"; | 127 | type = "IMAP"; |
126 | port = IMAP_PORT; | 128 | port = IMAP_PORT; |
127 | } | 129 | } |
128 | 130 | ||
129 | IMAPaccount::IMAPaccount( QString filename ) | 131 | IMAPaccount::IMAPaccount( QString filename ) |
130 | : Account() | 132 | : Account() |
131 | { | 133 | { |
132 | file = filename; | 134 | file = filename; |
133 | accountName = "New IMAP Account"; | 135 | accountName = "New IMAP Account"; |
134 | ssl = false; | 136 | ssl = false; |
137 | connectionType = 1; | ||
135 | type = "IMAP"; | 138 | type = "IMAP"; |
136 | port = IMAP_PORT; | 139 | port = IMAP_PORT; |
137 | } | 140 | } |
138 | 141 | ||
139 | QString IMAPaccount::getUniqueFileName() | 142 | QString IMAPaccount::getUniqueFileName() |
140 | { | 143 | { |
141 | int num = 0; | 144 | int num = 0; |
142 | QString unique; | 145 | QString unique; |
143 | 146 | ||
144 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); | 147 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); |
145 | 148 | ||
146 | QStringList imap = dir.entryList( "imap-*" ); | 149 | QStringList imap = dir.entryList( "imap-*" ); |
@@ -194,34 +197,36 @@ void IMAPaccount::save() | |||
194 | 197 | ||
195 | QString IMAPaccount::getFileName() | 198 | QString IMAPaccount::getFileName() |
196 | { | 199 | { |
197 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/imap-" + file; | 200 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/imap-" + file; |
198 | } | 201 | } |
199 | 202 | ||
200 | POP3account::POP3account() | 203 | POP3account::POP3account() |
201 | : Account() | 204 | : Account() |
202 | { | 205 | { |
203 | file = POP3account::getUniqueFileName(); | 206 | file = POP3account::getUniqueFileName(); |
204 | accountName = "New POP3 Account"; | 207 | accountName = "New POP3 Account"; |
205 | ssl = false; | 208 | ssl = false; |
209 | connectionType = 1; | ||
206 | type = "POP3"; | 210 | type = "POP3"; |
207 | port = POP3_PORT; | 211 | port = POP3_PORT; |
208 | } | 212 | } |
209 | 213 | ||
210 | POP3account::POP3account( QString filename ) | 214 | POP3account::POP3account( QString filename ) |
211 | : Account() | 215 | : Account() |
212 | { | 216 | { |
213 | file = filename; | 217 | file = filename; |
214 | accountName = "New POP3 Account"; | 218 | accountName = "New POP3 Account"; |
215 | ssl = false; | 219 | ssl = false; |
220 | connectionType = 1; | ||
216 | type = "POP3"; | 221 | type = "POP3"; |
217 | port = POP3_PORT; | 222 | port = POP3_PORT; |
218 | } | 223 | } |
219 | 224 | ||
220 | QString POP3account::getUniqueFileName() | 225 | QString POP3account::getUniqueFileName() |
221 | { | 226 | { |
222 | int num = 0; | 227 | int num = 0; |
223 | QString unique; | 228 | QString unique; |
224 | 229 | ||
225 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); | 230 | QDir dir( (QString) getenv( "HOME" ) + "/Applications/opiemail" ); |
226 | 231 | ||
227 | QStringList imap = dir.entryList( "pop3-*" ); | 232 | QStringList imap = dir.entryList( "pop3-*" ); |
@@ -231,41 +236,43 @@ QString POP3account::getUniqueFileName() | |||
231 | 236 | ||
232 | return unique; | 237 | return unique; |
233 | } | 238 | } |
234 | 239 | ||
235 | void POP3account::read() | 240 | void POP3account::read() |
236 | { | 241 | { |
237 | Config *conf = new Config( getFileName(), Config::File ); | 242 | Config *conf = new Config( getFileName(), Config::File ); |
238 | conf->setGroup( "POP3 Account" ); | 243 | conf->setGroup( "POP3 Account" ); |
239 | accountName = conf->readEntry( "Account" ); | 244 | accountName = conf->readEntry( "Account" ); |
240 | server = conf->readEntry( "Server" ); | 245 | server = conf->readEntry( "Server" ); |
241 | port = conf->readEntry( "Port" ); | 246 | port = conf->readEntry( "Port" ); |
242 | ssl = conf->readBoolEntry( "SSL" ); | 247 | ssl = conf->readBoolEntry( "SSL" ); |
248 | connectionType = conf->readNumEntry( "ConnectionType" ); | ||
243 | user = conf->readEntry( "User" ); | 249 | user = conf->readEntry( "User" ); |
244 | password = conf->readEntryCrypt( "Password" ); | 250 | password = conf->readEntryCrypt( "Password" ); |
245 | offline = conf->readBoolEntry("Offline",false); | 251 | offline = conf->readBoolEntry("Offline",false); |
246 | delete conf; | 252 | delete conf; |
247 | } | 253 | } |
248 | 254 | ||
249 | void POP3account::save() | 255 | void POP3account::save() |
250 | { | 256 | { |
251 | qDebug( "saving " + getFileName() ); | 257 | qDebug( "saving " + getFileName() ); |
252 | Settings::checkDirectory(); | 258 | Settings::checkDirectory(); |
253 | 259 | ||
254 | Config *conf = new Config( getFileName(), Config::File ); | 260 | Config *conf = new Config( getFileName(), Config::File ); |
255 | conf->setGroup( "POP3 Account" ); | 261 | conf->setGroup( "POP3 Account" ); |
256 | conf->writeEntry( "Account", accountName ); | 262 | conf->writeEntry( "Account", accountName ); |
257 | conf->writeEntry( "Server", server ); | 263 | conf->writeEntry( "Server", server ); |
258 | conf->writeEntry( "Port", port ); | 264 | conf->writeEntry( "Port", port ); |
259 | conf->writeEntry( "SSL", ssl ); | 265 | conf->writeEntry( "SSL", ssl ); |
266 | conf->writeEntry( "ConnectionType", connectionType ); | ||
260 | conf->writeEntry( "User", user ); | 267 | conf->writeEntry( "User", user ); |
261 | conf->writeEntryCrypt( "Password", password ); | 268 | conf->writeEntryCrypt( "Password", password ); |
262 | conf->writeEntry( "Offline",offline); | 269 | conf->writeEntry( "Offline",offline); |
263 | conf->write(); | 270 | conf->write(); |
264 | delete conf; | 271 | delete conf; |
265 | } | 272 | } |
266 | 273 | ||
267 | 274 | ||
268 | QString POP3account::getFileName() | 275 | QString POP3account::getFileName() |
269 | { | 276 | { |
270 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/pop3-" + file; | 277 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/pop3-" + file; |
271 | } | 278 | } |
diff --git a/noncore/net/mail/libmailwrapper/settings.h b/noncore/net/mail/libmailwrapper/settings.h index 2104997..8d7df92 100644 --- a/noncore/net/mail/libmailwrapper/settings.h +++ b/noncore/net/mail/libmailwrapper/settings.h | |||
@@ -22,34 +22,39 @@ public: | |||
22 | void setPort(const QString&str) { port = str; } | 22 | void setPort(const QString&str) { port = str; } |
23 | const QString&getPort()const{ return port; } | 23 | const QString&getPort()const{ return port; } |
24 | 24 | ||
25 | void setUser(const QString&str){ user = str; } | 25 | void setUser(const QString&str){ user = str; } |
26 | const QString&getUser()const{ return user; } | 26 | const QString&getUser()const{ return user; } |
27 | 27 | ||
28 | void setPassword(const QString&str) { password = str; } | 28 | void setPassword(const QString&str) { password = str; } |
29 | const QString&getPassword()const { return password; } | 29 | const QString&getPassword()const { return password; } |
30 | 30 | ||
31 | void setSSL( bool b ) { ssl = b; } | 31 | void setSSL( bool b ) { ssl = b; } |
32 | bool getSSL() { return ssl; } | 32 | bool getSSL() { return ssl; } |
33 | 33 | ||
34 | void setConnectionType( int x ) { connectionType = x; } | ||
35 | int ConnectionType() { return connectionType; } | ||
36 | |||
37 | |||
34 | void setOffline(bool b) {offline = b;} | 38 | void setOffline(bool b) {offline = b;} |
35 | bool getOffline()const{return offline;} | 39 | bool getOffline()const{return offline;} |
36 | 40 | ||
37 | virtual QString getFileName() { return accountName; } | 41 | virtual QString getFileName() { return accountName; } |
38 | virtual void read() { qDebug( "base reading..." ); } | 42 | virtual void read() { qDebug( "base reading..." ); } |
39 | virtual void save() { qDebug( "base saving..." ); } | 43 | virtual void save() { qDebug( "base saving..." ); } |
40 | 44 | ||
41 | protected: | 45 | protected: |
42 | QString accountName, type, server, port, user, password; | 46 | QString accountName, type, server, port, user, password; |
43 | bool ssl; | 47 | bool ssl; |
48 | int connectionType; | ||
44 | bool offline; | 49 | bool offline; |
45 | }; | 50 | }; |
46 | 51 | ||
47 | class IMAPaccount : public Account | 52 | class IMAPaccount : public Account |
48 | { | 53 | { |
49 | 54 | ||
50 | public: | 55 | public: |
51 | IMAPaccount(); | 56 | IMAPaccount(); |
52 | IMAPaccount( QString filename ); | 57 | IMAPaccount( QString filename ); |
53 | 58 | ||
54 | static QString getUniqueFileName(); | 59 | static QString getUniqueFileName(); |
55 | 60 | ||
diff --git a/noncore/net/mail/pop3configui.ui b/noncore/net/mail/pop3configui.ui index 8fdb4ba..95cbdc2 100644 --- a/noncore/net/mail/pop3configui.ui +++ b/noncore/net/mail/pop3configui.ui | |||
@@ -2,198 +2,404 @@ | |||
2 | <class>POP3configUI</class> | 2 | <class>POP3configUI</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QDialog</class> | 4 | <class>QDialog</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>POP3configUI</cstring> | 7 | <cstring>POP3configUI</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>236</width> | 14 | <width>232</width> |
15 | <height>320</height> | 15 | <height>320</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>Configure POP3</string> | 20 | <string>Configure POP3</string> |
21 | </property> | 21 | </property> |
22 | <property> | 22 | <property> |
23 | <name>layoutMargin</name> | 23 | <name>layoutMargin</name> |
24 | </property> | 24 | </property> |
25 | <property> | 25 | <property> |
26 | <name>layoutSpacing</name> | 26 | <name>layoutSpacing</name> |
27 | </property> | 27 | </property> |
28 | <grid> | 28 | <widget> |
29 | <class>QLayoutWidget</class> | ||
29 | <property stdset="1"> | 30 | <property stdset="1"> |
30 | <name>margin</name> | 31 | <name>name</name> |
31 | <number>4</number> | 32 | <cstring>Layout12</cstring> |
32 | </property> | 33 | </property> |
33 | <property stdset="1"> | 34 | <property stdset="1"> |
34 | <name>spacing</name> | 35 | <name>geometry</name> |
35 | <number>3</number> | 36 | <rect> |
37 | <x>3</x> | ||
38 | <y>3</y> | ||
39 | <width>226</width> | ||
40 | <height>32</height> | ||
41 | </rect> | ||
36 | </property> | 42 | </property> |
37 | <widget row="6" column="1" > | 43 | <hbox> |
38 | <class>QLineEdit</class> | ||
39 | <property stdset="1"> | 44 | <property stdset="1"> |
40 | <name>name</name> | 45 | <name>margin</name> |
41 | <cstring>userLine</cstring> | 46 | <number>0</number> |
42 | </property> | 47 | </property> |
43 | </widget> | ||
44 | <widget row="7" column="0" > | ||
45 | <class>QLabel</class> | ||
46 | <property stdset="1"> | 48 | <property stdset="1"> |
47 | <name>name</name> | 49 | <name>spacing</name> |
48 | <cstring>passLabel</cstring> | 50 | <number>6</number> |
49 | </property> | ||
50 | <property stdset="1"> | ||
51 | <name>text</name> | ||
52 | <string>Password</string> | ||
53 | </property> | ||
54 | </widget> | ||
55 | <widget row="7" column="1" > | ||
56 | <class>QLineEdit</class> | ||
57 | <property stdset="1"> | ||
58 | <name>name</name> | ||
59 | <cstring>passLine</cstring> | ||
60 | </property> | ||
61 | <property stdset="1"> | ||
62 | <name>echoMode</name> | ||
63 | <enum>Password</enum> | ||
64 | </property> | ||
65 | </widget> | ||
66 | <widget row="3" column="1" > | ||
67 | <class>QLineEdit</class> | ||
68 | <property stdset="1"> | ||
69 | <name>name</name> | ||
70 | <cstring>portLine</cstring> | ||
71 | </property> | ||
72 | </widget> | ||
73 | <widget row="2" column="1" > | ||
74 | <class>QLineEdit</class> | ||
75 | <property stdset="1"> | ||
76 | <name>name</name> | ||
77 | <cstring>serverLine</cstring> | ||
78 | </property> | ||
79 | </widget> | ||
80 | <widget row="2" column="0" > | ||
81 | <class>QLabel</class> | ||
82 | <property stdset="1"> | ||
83 | <name>name</name> | ||
84 | <cstring>serverLabel</cstring> | ||
85 | </property> | ||
86 | <property stdset="1"> | ||
87 | <name>text</name> | ||
88 | <string>Server</string> | ||
89 | </property> | ||
90 | </widget> | ||
91 | <widget row="4" column="1" > | ||
92 | <class>QCheckBox</class> | ||
93 | <property stdset="1"> | ||
94 | <name>name</name> | ||
95 | <cstring>sslBox</cstring> | ||
96 | </property> | ||
97 | <property stdset="1"> | ||
98 | <name>text</name> | ||
99 | <string>Use SSL</string> | ||
100 | </property> | ||
101 | </widget> | ||
102 | <widget row="3" column="0" > | ||
103 | <class>QLabel</class> | ||
104 | <property stdset="1"> | ||
105 | <name>name</name> | ||
106 | <cstring>portLabel</cstring> | ||
107 | </property> | ||
108 | <property stdset="1"> | ||
109 | <name>text</name> | ||
110 | <string>Port</string> | ||
111 | </property> | ||
112 | </widget> | ||
113 | <widget row="6" column="0" > | ||
114 | <class>QLabel</class> | ||
115 | <property stdset="1"> | ||
116 | <name>name</name> | ||
117 | <cstring>userLabel</cstring> | ||
118 | </property> | ||
119 | <property stdset="1"> | ||
120 | <name>text</name> | ||
121 | <string>User</string> | ||
122 | </property> | ||
123 | </widget> | ||
124 | <spacer row="8" column="1" > | ||
125 | <property> | ||
126 | <name>name</name> | ||
127 | <cstring>spacer</cstring> | ||
128 | </property> | ||
129 | <property stdset="1"> | ||
130 | <name>orientation</name> | ||
131 | <enum>Vertical</enum> | ||
132 | </property> | ||
133 | <property stdset="1"> | ||
134 | <name>sizeType</name> | ||
135 | <enum>Expanding</enum> | ||
136 | </property> | ||
137 | <property> | ||
138 | <name>sizeHint</name> | ||
139 | <size> | ||
140 | <width>20</width> | ||
141 | <height>20</height> | ||
142 | </size> | ||
143 | </property> | ||
144 | </spacer> | ||
145 | <widget row="5" column="0" rowspan="1" colspan="2" > | ||
146 | <class>Line</class> | ||
147 | <property stdset="1"> | ||
148 | <name>name</name> | ||
149 | <cstring>line2</cstring> | ||
150 | </property> | 51 | </property> |
52 | <widget> | ||
53 | <class>QLabel</class> | ||
54 | <property stdset="1"> | ||
55 | <name>name</name> | ||
56 | <cstring>accountLabel</cstring> | ||
57 | </property> | ||
58 | <property stdset="1"> | ||
59 | <name>text</name> | ||
60 | <string>Account</string> | ||
61 | </property> | ||
62 | </widget> | ||
63 | <widget> | ||
64 | <class>QLineEdit</class> | ||
65 | <property stdset="1"> | ||
66 | <name>name</name> | ||
67 | <cstring>accountLine</cstring> | ||
68 | </property> | ||
69 | <property> | ||
70 | <name>toolTip</name> | ||
71 | <string>Name of the Account</string> | ||
72 | </property> | ||
73 | </widget> | ||
74 | </hbox> | ||
75 | </widget> | ||
76 | <widget> | ||
77 | <class>Line</class> | ||
78 | <property stdset="1"> | ||
79 | <name>name</name> | ||
80 | <cstring>line1</cstring> | ||
81 | </property> | ||
82 | <property stdset="1"> | ||
83 | <name>geometry</name> | ||
84 | <rect> | ||
85 | <x>3</x> | ||
86 | <y>38</y> | ||
87 | <width>226</width> | ||
88 | <height>16</height> | ||
89 | </rect> | ||
90 | </property> | ||
91 | <property stdset="1"> | ||
92 | <name>orientation</name> | ||
93 | <enum>Horizontal</enum> | ||
94 | </property> | ||
95 | </widget> | ||
96 | <widget> | ||
97 | <class>QLayoutWidget</class> | ||
98 | <property stdset="1"> | ||
99 | <name>name</name> | ||
100 | <cstring>Layout11</cstring> | ||
101 | </property> | ||
102 | <property stdset="1"> | ||
103 | <name>geometry</name> | ||
104 | <rect> | ||
105 | <x>3</x> | ||
106 | <y>44</y> | ||
107 | <width>226</width> | ||
108 | <height>70</height> | ||
109 | </rect> | ||
110 | </property> | ||
111 | <hbox> | ||
151 | <property stdset="1"> | 112 | <property stdset="1"> |
152 | <name>orientation</name> | 113 | <name>margin</name> |
153 | <enum>Horizontal</enum> | 114 | <number>0</number> |
154 | </property> | 115 | </property> |
155 | </widget> | ||
156 | <widget row="0" column="0" > | ||
157 | <class>QLabel</class> | ||
158 | <property stdset="1"> | 116 | <property stdset="1"> |
159 | <name>name</name> | 117 | <name>spacing</name> |
160 | <cstring>accountLabel</cstring> | 118 | <number>6</number> |
161 | </property> | 119 | </property> |
120 | <widget> | ||
121 | <class>QLayoutWidget</class> | ||
122 | <property stdset="1"> | ||
123 | <name>name</name> | ||
124 | <cstring>Layout9</cstring> | ||
125 | </property> | ||
126 | <vbox> | ||
127 | <property stdset="1"> | ||
128 | <name>margin</name> | ||
129 | <number>0</number> | ||
130 | </property> | ||
131 | <property stdset="1"> | ||
132 | <name>spacing</name> | ||
133 | <number>6</number> | ||
134 | </property> | ||
135 | <widget> | ||
136 | <class>QLabel</class> | ||
137 | <property stdset="1"> | ||
138 | <name>name</name> | ||
139 | <cstring>serverLabel</cstring> | ||
140 | </property> | ||
141 | <property stdset="1"> | ||
142 | <name>text</name> | ||
143 | <string>Server</string> | ||
144 | </property> | ||
145 | </widget> | ||
146 | <widget> | ||
147 | <class>QLabel</class> | ||
148 | <property stdset="1"> | ||
149 | <name>name</name> | ||
150 | <cstring>portLabel</cstring> | ||
151 | </property> | ||
152 | <property stdset="1"> | ||
153 | <name>text</name> | ||
154 | <string>Port</string> | ||
155 | </property> | ||
156 | </widget> | ||
157 | </vbox> | ||
158 | </widget> | ||
159 | <widget> | ||
160 | <class>QLayoutWidget</class> | ||
161 | <property stdset="1"> | ||
162 | <name>name</name> | ||
163 | <cstring>Layout10</cstring> | ||
164 | </property> | ||
165 | <vbox> | ||
166 | <property stdset="1"> | ||
167 | <name>margin</name> | ||
168 | <number>0</number> | ||
169 | </property> | ||
170 | <property stdset="1"> | ||
171 | <name>spacing</name> | ||
172 | <number>6</number> | ||
173 | </property> | ||
174 | <widget> | ||
175 | <class>QLineEdit</class> | ||
176 | <property stdset="1"> | ||
177 | <name>name</name> | ||
178 | <cstring>serverLine</cstring> | ||
179 | </property> | ||
180 | </widget> | ||
181 | <widget> | ||
182 | <class>QLineEdit</class> | ||
183 | <property stdset="1"> | ||
184 | <name>name</name> | ||
185 | <cstring>portLine</cstring> | ||
186 | </property> | ||
187 | </widget> | ||
188 | </vbox> | ||
189 | </widget> | ||
190 | </hbox> | ||
191 | </widget> | ||
192 | <widget> | ||
193 | <class>QLayoutWidget</class> | ||
194 | <property stdset="1"> | ||
195 | <name>name</name> | ||
196 | <cstring>Layout13</cstring> | ||
197 | </property> | ||
198 | <property stdset="1"> | ||
199 | <name>geometry</name> | ||
200 | <rect> | ||
201 | <x>3</x> | ||
202 | <y>117</y> | ||
203 | <width>226</width> | ||
204 | <height>64</height> | ||
205 | </rect> | ||
206 | </property> | ||
207 | <vbox> | ||
162 | <property stdset="1"> | 208 | <property stdset="1"> |
163 | <name>text</name> | 209 | <name>margin</name> |
164 | <string>Account</string> | 210 | <number>0</number> |
165 | </property> | 211 | </property> |
166 | </widget> | ||
167 | <widget row="0" column="1" > | ||
168 | <class>QLineEdit</class> | ||
169 | <property stdset="1"> | 212 | <property stdset="1"> |
170 | <name>name</name> | 213 | <name>spacing</name> |
171 | <cstring>accountLine</cstring> | 214 | <number>6</number> |
172 | </property> | 215 | </property> |
173 | <property> | 216 | <widget> |
174 | <name>toolTip</name> | 217 | <class>QLabel</class> |
175 | <string>Name of the Account</string> | 218 | <property stdset="1"> |
176 | </property> | 219 | <name>name</name> |
177 | </widget> | 220 | <cstring>TextLabel1</cstring> |
178 | <widget row="1" column="0" rowspan="1" colspan="2" > | 221 | </property> |
179 | <class>Line</class> | 222 | <property stdset="1"> |
223 | <name>text</name> | ||
224 | <string>Use secure sockets:</string> | ||
225 | </property> | ||
226 | </widget> | ||
227 | <widget> | ||
228 | <class>QComboBox</class> | ||
229 | <property stdset="1"> | ||
230 | <name>name</name> | ||
231 | <cstring>ComboBox1</cstring> | ||
232 | </property> | ||
233 | </widget> | ||
234 | </vbox> | ||
235 | </widget> | ||
236 | <widget> | ||
237 | <class>QLayoutWidget</class> | ||
238 | <property stdset="1"> | ||
239 | <name>name</name> | ||
240 | <cstring>Layout6</cstring> | ||
241 | </property> | ||
242 | <property stdset="1"> | ||
243 | <name>geometry</name> | ||
244 | <rect> | ||
245 | <x>3</x> | ||
246 | <y>223</y> | ||
247 | <width>226</width> | ||
248 | <height>70</height> | ||
249 | </rect> | ||
250 | </property> | ||
251 | <hbox> | ||
180 | <property stdset="1"> | 252 | <property stdset="1"> |
181 | <name>name</name> | 253 | <name>margin</name> |
182 | <cstring>line1</cstring> | 254 | <number>0</number> |
183 | </property> | 255 | </property> |
184 | <property stdset="1"> | 256 | <property stdset="1"> |
185 | <name>orientation</name> | 257 | <name>spacing</name> |
186 | <enum>Horizontal</enum> | 258 | <number>6</number> |
187 | </property> | 259 | </property> |
188 | </widget> | 260 | <widget> |
189 | </grid> | 261 | <class>QLayoutWidget</class> |
262 | <property stdset="1"> | ||
263 | <name>name</name> | ||
264 | <cstring>Layout4</cstring> | ||
265 | </property> | ||
266 | <vbox> | ||
267 | <property stdset="1"> | ||
268 | <name>margin</name> | ||
269 | <number>0</number> | ||
270 | </property> | ||
271 | <property stdset="1"> | ||
272 | <name>spacing</name> | ||
273 | <number>6</number> | ||
274 | </property> | ||
275 | <widget> | ||
276 | <class>QLabel</class> | ||
277 | <property stdset="1"> | ||
278 | <name>name</name> | ||
279 | <cstring>userLabel</cstring> | ||
280 | </property> | ||
281 | <property stdset="1"> | ||
282 | <name>text</name> | ||
283 | <string>User</string> | ||
284 | </property> | ||
285 | </widget> | ||
286 | <widget> | ||
287 | <class>QLabel</class> | ||
288 | <property stdset="1"> | ||
289 | <name>name</name> | ||
290 | <cstring>passLabel</cstring> | ||
291 | </property> | ||
292 | <property stdset="1"> | ||
293 | <name>text</name> | ||
294 | <string>Password</string> | ||
295 | </property> | ||
296 | </widget> | ||
297 | </vbox> | ||
298 | </widget> | ||
299 | <widget> | ||
300 | <class>QLayoutWidget</class> | ||
301 | <property stdset="1"> | ||
302 | <name>name</name> | ||
303 | <cstring>Layout5</cstring> | ||
304 | </property> | ||
305 | <vbox> | ||
306 | <property stdset="1"> | ||
307 | <name>margin</name> | ||
308 | <number>0</number> | ||
309 | </property> | ||
310 | <property stdset="1"> | ||
311 | <name>spacing</name> | ||
312 | <number>6</number> | ||
313 | </property> | ||
314 | <widget> | ||
315 | <class>QLineEdit</class> | ||
316 | <property stdset="1"> | ||
317 | <name>name</name> | ||
318 | <cstring>userLine</cstring> | ||
319 | </property> | ||
320 | </widget> | ||
321 | <widget> | ||
322 | <class>QLineEdit</class> | ||
323 | <property stdset="1"> | ||
324 | <name>name</name> | ||
325 | <cstring>passLine</cstring> | ||
326 | </property> | ||
327 | <property stdset="1"> | ||
328 | <name>echoMode</name> | ||
329 | <enum>Password</enum> | ||
330 | </property> | ||
331 | </widget> | ||
332 | </vbox> | ||
333 | </widget> | ||
334 | </hbox> | ||
335 | </widget> | ||
336 | <spacer> | ||
337 | <property> | ||
338 | <name>name</name> | ||
339 | <cstring>spacer</cstring> | ||
340 | </property> | ||
341 | <property stdset="1"> | ||
342 | <name>orientation</name> | ||
343 | <enum>Vertical</enum> | ||
344 | </property> | ||
345 | <property stdset="1"> | ||
346 | <name>sizeType</name> | ||
347 | <enum>Expanding</enum> | ||
348 | </property> | ||
349 | <property> | ||
350 | <name>sizeHint</name> | ||
351 | <size> | ||
352 | <width>20</width> | ||
353 | <height>20</height> | ||
354 | </size> | ||
355 | </property> | ||
356 | </spacer> | ||
357 | <widget> | ||
358 | <class>QLineEdit</class> | ||
359 | <property stdset="1"> | ||
360 | <name>name</name> | ||
361 | <cstring>CommandEdit</cstring> | ||
362 | </property> | ||
363 | <property stdset="1"> | ||
364 | <name>geometry</name> | ||
365 | <rect> | ||
366 | <x>0</x> | ||
367 | <y>180</y> | ||
368 | <width>226</width> | ||
369 | <height>30</height> | ||
370 | </rect> | ||
371 | </property> | ||
372 | <property stdset="1"> | ||
373 | <name>text</name> | ||
374 | <string>ssh $SERVER exec imapd</string> | ||
375 | </property> | ||
376 | </widget> | ||
377 | <widget> | ||
378 | <class>Line</class> | ||
379 | <property stdset="1"> | ||
380 | <name>name</name> | ||
381 | <cstring>line2</cstring> | ||
382 | </property> | ||
383 | <property stdset="1"> | ||
384 | <name>geometry</name> | ||
385 | <rect> | ||
386 | <x>3</x> | ||
387 | <y>204</y> | ||
388 | <width>226</width> | ||
389 | <height>16</height> | ||
390 | </rect> | ||
391 | </property> | ||
392 | <property stdset="1"> | ||
393 | <name>orientation</name> | ||
394 | <enum>Horizontal</enum> | ||
395 | </property> | ||
396 | </widget> | ||
190 | </widget> | 397 | </widget> |
191 | <tabstops> | 398 | <tabstops> |
192 | <tabstop>accountLine</tabstop> | 399 | <tabstop>accountLine</tabstop> |
193 | <tabstop>serverLine</tabstop> | 400 | <tabstop>serverLine</tabstop> |
194 | <tabstop>portLine</tabstop> | 401 | <tabstop>portLine</tabstop> |
195 | <tabstop>sslBox</tabstop> | ||
196 | <tabstop>userLine</tabstop> | 402 | <tabstop>userLine</tabstop> |
197 | <tabstop>passLine</tabstop> | 403 | <tabstop>passLine</tabstop> |
198 | </tabstops> | 404 | </tabstops> |
199 | </UI> | 405 | </UI> |