-rw-r--r-- | noncore/net/mail/accountitem.cpp | 190 | ||||
-rw-r--r-- | noncore/net/mail/accountitem.h | 40 | ||||
-rw-r--r-- | noncore/net/mail/accountview.cpp | 9 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.cpp | 10 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.h | 1 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/libmailwrapper.pro | 6 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/nntpwrapper.cpp | 241 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/nntpwrapper.h | 48 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.cpp | 6 | ||||
-rw-r--r-- | noncore/net/mail/nntpconfigui.ui | 503 |
10 files changed, 842 insertions, 212 deletions
diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp index c8f6ec4..32a96ff 100644 --- a/noncore/net/mail/accountitem.cpp +++ b/noncore/net/mail/accountitem.cpp | |||
@@ -206,12 +206,202 @@ void POP3folderItem::contextMenuSelected(int which) | |||
206 | default: | 206 | default: |
207 | break; | 207 | break; |
208 | } | 208 | } |
209 | } | 209 | } |
210 | 210 | ||
211 | /** | 211 | /** |
212 | * NNTP Account stuff | ||
213 | */ | ||
214 | NNTPviewItem::NNTPviewItem( NNTPaccount *a, AccountView *parent ) | ||
215 | : AccountViewItem( parent ) | ||
216 | { | ||
217 | account = a; | ||
218 | wrapper = AbstractMail::getWrapper( account ); | ||
219 | //FIXME | ||
220 | SETPIX(PIXMAP_POP3FOLDER); | ||
221 | #if 0 | ||
222 | if (!account->getOffline()) | ||
223 | { | ||
224 | setPixmap( 0, ); | ||
225 | } | ||
226 | else | ||
227 | { | ||
228 | setPixmap( 0, PIXMAP_OFFLINE ); | ||
229 | } | ||
230 | #endif | ||
231 | setText( 0, account->getAccountName() ); | ||
232 | setOpen( true ); | ||
233 | } | ||
234 | |||
235 | NNTPviewItem::~NNTPviewItem() | ||
236 | { | ||
237 | delete wrapper; | ||
238 | } | ||
239 | |||
240 | AbstractMail *NNTPviewItem::getWrapper() | ||
241 | { | ||
242 | return wrapper; | ||
243 | } | ||
244 | |||
245 | void NNTPviewItem::refresh( QList<RecMail> & ) | ||
246 | { | ||
247 | refresh(); | ||
248 | } | ||
249 | |||
250 | void NNTPviewItem::refresh() | ||
251 | { | ||
252 | if (account->getOffline()) return; | ||
253 | QList<Folder> *folders = wrapper->listFolders(); | ||
254 | QListViewItem *child = firstChild(); | ||
255 | while ( child ) | ||
256 | { | ||
257 | QListViewItem *tmp = child; | ||
258 | child = child->nextSibling(); | ||
259 | delete tmp; | ||
260 | } | ||
261 | Folder *it; | ||
262 | QListViewItem*item = 0; | ||
263 | for ( it = folders->first(); it; it = folders->next() ) | ||
264 | { | ||
265 | item = new NNTPfolderItem( it, this , item ); | ||
266 | item->setSelectable(it->may_select()); | ||
267 | } | ||
268 | // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
269 | folders->setAutoDelete(false); | ||
270 | delete folders; | ||
271 | } | ||
272 | |||
273 | RecBody NNTPviewItem::fetchBody( const RecMail &mail ) | ||
274 | { | ||
275 | qDebug( "NNTP fetchBody" ); | ||
276 | return wrapper->fetchBody( mail ); | ||
277 | } | ||
278 | |||
279 | QPopupMenu * NNTPviewItem::getContextMenu() | ||
280 | { | ||
281 | QPopupMenu *m = new QPopupMenu(0); | ||
282 | if (m) | ||
283 | { | ||
284 | if (!account->getOffline()) | ||
285 | { | ||
286 | m->insertItem(QObject::tr("Disconnect",contextName),0); | ||
287 | m->insertItem(QObject::tr("Set offline",contextName),1); | ||
288 | } | ||
289 | else | ||
290 | { | ||
291 | m->insertItem(QObject::tr("Set online",contextName),1); | ||
292 | } | ||
293 | } | ||
294 | return m; | ||
295 | } | ||
296 | |||
297 | void NNTPviewItem::disconnect() | ||
298 | { | ||
299 | QListViewItem *child = firstChild(); | ||
300 | while ( child ) | ||
301 | { | ||
302 | QListViewItem *tmp = child; | ||
303 | child = child->nextSibling(); | ||
304 | delete tmp; | ||
305 | } | ||
306 | wrapper->logout(); | ||
307 | } | ||
308 | |||
309 | void NNTPviewItem::setOnOffline() | ||
310 | { | ||
311 | if (!account->getOffline()) | ||
312 | { | ||
313 | disconnect(); | ||
314 | } | ||
315 | account->setOffline(!account->getOffline()); | ||
316 | account->save(); | ||
317 | //FIXME | ||
318 | SETPIX(PIXMAP_POP3FOLDER); | ||
319 | refresh(); | ||
320 | } | ||
321 | |||
322 | void NNTPviewItem::contextMenuSelected(int which) | ||
323 | { | ||
324 | switch (which) | ||
325 | { | ||
326 | case 0: | ||
327 | disconnect(); | ||
328 | break; | ||
329 | case 1: | ||
330 | setOnOffline(); | ||
331 | break; | ||
332 | } | ||
333 | } | ||
334 | |||
335 | NNTPfolderItem::~NNTPfolderItem() | ||
336 | {} | ||
337 | |||
338 | NNTPfolderItem::NNTPfolderItem( Folder *folderInit, NNTPviewItem *parent , QListViewItem*after ) | ||
339 | : AccountViewItem( parent,after ) | ||
340 | { | ||
341 | folder = folderInit; | ||
342 | nntp = parent; | ||
343 | if (folder->getDisplayName().lower()!="inbox") | ||
344 | { | ||
345 | setPixmap( 0, PIXMAP_POP3FOLDER ); | ||
346 | } | ||
347 | else | ||
348 | { | ||
349 | setPixmap( 0, PIXMAP_INBOXFOLDER); | ||
350 | } | ||
351 | setText( 0, folder->getDisplayName() ); | ||
352 | } | ||
353 | |||
354 | void NNTPfolderItem::refresh(QList<RecMail>&target) | ||
355 | { | ||
356 | if (folder->may_select()) | ||
357 | nntp->getWrapper()->listMessages( folder->getName(),target ); | ||
358 | } | ||
359 | |||
360 | RecBody NNTPfolderItem::fetchBody(const RecMail&aMail) | ||
361 | { | ||
362 | return nntp->getWrapper()->fetchBody(aMail); | ||
363 | } | ||
364 | |||
365 | QPopupMenu * NNTPfolderItem::getContextMenu() | ||
366 | { | ||
367 | QPopupMenu *m = new QPopupMenu(0); | ||
368 | if (m) | ||
369 | { | ||
370 | m->insertItem(QObject::tr("Refresh header list",contextName),0); | ||
371 | m->insertItem(QObject::tr("Move/Copie all mails",contextName),1); | ||
372 | } | ||
373 | return m; | ||
374 | } | ||
375 | |||
376 | void NNTPfolderItem::downloadMails() | ||
377 | { | ||
378 | AccountView*bl = nntp->accountView(); | ||
379 | if (!bl) return; | ||
380 | bl->downloadMails(folder,nntp->getWrapper()); | ||
381 | } | ||
382 | |||
383 | void NNTPfolderItem::contextMenuSelected(int which) | ||
384 | { | ||
385 | AccountView * view = (AccountView*)listView(); | ||
386 | switch (which) | ||
387 | { | ||
388 | case 0: | ||
389 | /* must be 'cause pop3 lists are cached */ | ||
390 | nntp->getWrapper()->logout(); | ||
391 | view->refreshCurrent(); | ||
392 | break; | ||
393 | case 1: | ||
394 | downloadMails(); | ||
395 | break; | ||
396 | default: | ||
397 | break; | ||
398 | } | ||
399 | } | ||
400 | |||
401 | /** | ||
212 | * IMAP Account stuff | 402 | * IMAP Account stuff |
213 | */ | 403 | */ |
214 | IMAPviewItem::IMAPviewItem( IMAPaccount *a, AccountView *parent ) | 404 | IMAPviewItem::IMAPviewItem( IMAPaccount *a, AccountView *parent ) |
215 | : AccountViewItem( parent ) | 405 | : AccountViewItem( parent ) |
216 | { | 406 | { |
217 | account = a; | 407 | account = a; |
diff --git a/noncore/net/mail/accountitem.h b/noncore/net/mail/accountitem.h index 99208b6..a138c9b 100644 --- a/noncore/net/mail/accountitem.h +++ b/noncore/net/mail/accountitem.h | |||
@@ -8,12 +8,13 @@ class POP3wrapper; | |||
8 | class RecMail; | 8 | class RecMail; |
9 | class RecBody; | 9 | class RecBody; |
10 | class QPopupMenu; | 10 | class QPopupMenu; |
11 | class Selectstore; | 11 | class Selectstore; |
12 | class AccountView; | 12 | class AccountView; |
13 | class POP3account; | 13 | class POP3account; |
14 | class NNTPaccount; | ||
14 | class IMAPaccount; | 15 | class IMAPaccount; |
15 | class AbstractMail; | 16 | class AbstractMail; |
16 | class Folder; | 17 | class Folder; |
17 | 18 | ||
18 | class AccountViewItem : public QListViewItem | 19 | class AccountViewItem : public QListViewItem |
19 | { | 20 | { |
@@ -73,12 +74,51 @@ public: | |||
73 | 74 | ||
74 | protected: | 75 | protected: |
75 | void downloadMails(); | 76 | void downloadMails(); |
76 | POP3viewItem *pop3; | 77 | POP3viewItem *pop3; |
77 | }; | 78 | }; |
78 | 79 | ||
80 | |||
81 | class NNTPviewItem : public AccountViewItem | ||
82 | { | ||
83 | |||
84 | public: | ||
85 | NNTPviewItem( NNTPaccount *a, AccountView *parent ); | ||
86 | virtual ~NNTPviewItem(); | ||
87 | virtual void refresh( QList<RecMail> &target ); | ||
88 | virtual RecBody fetchBody( const RecMail &mail ); | ||
89 | AbstractMail *getWrapper(); | ||
90 | virtual QPopupMenu * getContextMenu(); | ||
91 | virtual void contextMenuSelected(int); | ||
92 | |||
93 | protected: | ||
94 | NNTPaccount *account; | ||
95 | virtual void refresh(); | ||
96 | AbstractMail *wrapper; | ||
97 | void disconnect(); | ||
98 | void setOnOffline(); | ||
99 | }; | ||
100 | |||
101 | class NNTPfolderItem : public AccountViewItem | ||
102 | { | ||
103 | |||
104 | public: | ||
105 | NNTPfolderItem( Folder *folder, NNTPviewItem *parent , QListViewItem*after ); | ||
106 | virtual ~NNTPfolderItem(); | ||
107 | virtual void refresh(QList<RecMail>&); | ||
108 | virtual RecBody fetchBody(const RecMail&); | ||
109 | virtual QPopupMenu * getContextMenu(); | ||
110 | virtual void contextMenuSelected(int); | ||
111 | |||
112 | protected: | ||
113 | void downloadMails(); | ||
114 | NNTPviewItem *nntp; | ||
115 | }; | ||
116 | |||
117 | |||
118 | |||
79 | class IMAPviewItem : public AccountViewItem | 119 | class IMAPviewItem : public AccountViewItem |
80 | { | 120 | { |
81 | friend class IMAPfolderItem; | 121 | friend class IMAPfolderItem; |
82 | public: | 122 | public: |
83 | IMAPviewItem( IMAPaccount *a, AccountView *parent ); | 123 | IMAPviewItem( IMAPaccount *a, AccountView *parent ); |
84 | virtual ~IMAPviewItem(); | 124 | virtual ~IMAPviewItem(); |
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index 2ddf834..c2185f2 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp | |||
@@ -72,13 +72,20 @@ void AccountView::populate( QList<Account> list ) | |||
72 | { | 72 | { |
73 | POP3account *pop3 = static_cast<POP3account *>(it); | 73 | POP3account *pop3 = static_cast<POP3account *>(it); |
74 | qDebug( "added POP3 " + pop3->getAccountName() ); | 74 | qDebug( "added POP3 " + pop3->getAccountName() ); |
75 | /* must not be hold 'cause it isn't required */ | 75 | /* must not be hold 'cause it isn't required */ |
76 | (void) new POP3viewItem( pop3, this ); | 76 | (void) new POP3viewItem( pop3, this ); |
77 | } | 77 | } |
78 | } | 78 | else if ( it->getType().compare( "NNTP" ) == 0 ) |
79 | { | ||
80 | NNTPaccount *nntp = static_cast<NNTPaccount *>(it); | ||
81 | qDebug( "added NNTP " + nntp->getAccountName() ); | ||
82 | /* must not be hold 'cause it isn't required */ | ||
83 | (void) new NNTPviewItem( nntp, this ); | ||
84 | } | ||
85 | } | ||
79 | } | 86 | } |
80 | 87 | ||
81 | void AccountView::refresh(QListViewItem *item) | 88 | void AccountView::refresh(QListViewItem *item) |
82 | { | 89 | { |
83 | 90 | ||
84 | qDebug("AccountView refresh..."); | 91 | qDebug("AccountView refresh..."); |
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp index 592cd5e..741a8e1 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.cpp +++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp | |||
@@ -1,9 +1,10 @@ | |||
1 | #include "abstractmail.h" | 1 | #include "abstractmail.h" |
2 | #include "imapwrapper.h" | 2 | #include "imapwrapper.h" |
3 | #include "pop3wrapper.h" | 3 | #include "pop3wrapper.h" |
4 | #include "nntpwrapper.h" | ||
4 | #include "mhwrapper.h" | 5 | #include "mhwrapper.h" |
5 | #include "mboxwrapper.h" | 6 | #include "mboxwrapper.h" |
6 | #include "mailtypes.h" | 7 | #include "mailtypes.h" |
7 | 8 | ||
8 | #include <qstring.h> | 9 | #include <qstring.h> |
9 | #include <qfile.h> | 10 | #include <qfile.h> |
@@ -19,12 +20,17 @@ AbstractMail* AbstractMail::getWrapper(IMAPaccount *a) | |||
19 | 20 | ||
20 | AbstractMail* AbstractMail::getWrapper(POP3account *a) | 21 | AbstractMail* AbstractMail::getWrapper(POP3account *a) |
21 | { | 22 | { |
22 | return new POP3wrapper(a); | 23 | return new POP3wrapper(a); |
23 | } | 24 | } |
24 | 25 | ||
26 | AbstractMail* AbstractMail::getWrapper(NNTPaccount *a) | ||
27 | { | ||
28 | return new NNTPwrapper(a); | ||
29 | } | ||
30 | |||
25 | AbstractMail* AbstractMail::getWrapper(const QString&a,const QString&name) | 31 | AbstractMail* AbstractMail::getWrapper(const QString&a,const QString&name) |
26 | { | 32 | { |
27 | return new MHwrapper(a,name); | 33 | return new MHwrapper(a,name); |
28 | } | 34 | } |
29 | 35 | ||
30 | encodedString* AbstractMail::decode_String(const encodedString*text,const QString&enc) | 36 | encodedString* AbstractMail::decode_String(const encodedString*text,const QString&enc) |
@@ -45,26 +51,26 @@ encodedString* AbstractMail::decode_String(const encodedString*text,const QStrin | |||
45 | } else if (enc.lower()=="binary") { | 51 | } else if (enc.lower()=="binary") { |
46 | mimetype = MAILMIME_MECHANISM_BINARY; | 52 | mimetype = MAILMIME_MECHANISM_BINARY; |
47 | } | 53 | } |
48 | 54 | ||
49 | int err = mailmime_part_parse(text->Content(),text->Length(),&index,mimetype, | 55 | int err = mailmime_part_parse(text->Content(),text->Length(),&index,mimetype, |
50 | &result_text,&target_length); | 56 | &result_text,&target_length); |
51 | 57 | ||
52 | encodedString* result = new encodedString(); | 58 | encodedString* result = new encodedString(); |
53 | if (err == MAILIMF_NO_ERROR) { | 59 | if (err == MAILIMF_NO_ERROR) { |
54 | result->setContent(result_text,target_length); | 60 | result->setContent(result_text,target_length); |
55 | } | 61 | } |
56 | qDebug("Decode string finished"); | 62 | qDebug("Decode string finished"); |
57 | return result; | 63 | return result; |
58 | } | 64 | } |
59 | 65 | ||
60 | QString AbstractMail::convert_String(const char*text) | 66 | QString AbstractMail::convert_String(const char*text) |
61 | { | 67 | { |
62 | size_t index = 0; | 68 | size_t index = 0; |
63 | char*res = 0; | 69 | char*res = 0; |
64 | 70 | ||
65 | /* attention - doesn't work with arm systems! */ | 71 | /* attention - doesn't work with arm systems! */ |
66 | int err = mailmime_encoded_phrase_parse("iso-8859-1", | 72 | int err = mailmime_encoded_phrase_parse("iso-8859-1", |
67 | text, strlen(text),&index, "iso-8859-1",&res); | 73 | text, strlen(text),&index, "iso-8859-1",&res); |
68 | if (err != MAILIMF_NO_ERROR) { | 74 | if (err != MAILIMF_NO_ERROR) { |
69 | if (res) free(res); | 75 | if (res) free(res); |
70 | return QString(text); | 76 | return QString(text); |
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.h b/noncore/net/mail/libmailwrapper/abstractmail.h index f93bab4..b6e1538 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.h +++ b/noncore/net/mail/libmailwrapper/abstractmail.h | |||
@@ -46,12 +46,13 @@ public: | |||
46 | */ | 46 | */ |
47 | virtual int createMbox(const QString&,const Folder*parentfolder=0,const QString& delemiter="/",bool getsubfolder=false); | 47 | virtual int createMbox(const QString&,const Folder*parentfolder=0,const QString& delemiter="/",bool getsubfolder=false); |
48 | virtual void logout()=0; | 48 | virtual void logout()=0; |
49 | 49 | ||
50 | static AbstractMail* getWrapper(IMAPaccount *a); | 50 | static AbstractMail* getWrapper(IMAPaccount *a); |
51 | static AbstractMail* getWrapper(POP3account *a); | 51 | static AbstractMail* getWrapper(POP3account *a); |
52 | static AbstractMail* getWrapper(NNTPaccount *a); | ||
52 | /* mbox only! */ | 53 | /* mbox only! */ |
53 | static AbstractMail* getWrapper(const QString&a,const QString&name="Local Folders"); | 54 | static AbstractMail* getWrapper(const QString&a,const QString&name="Local Folders"); |
54 | 55 | ||
55 | static QString defaultLocalfolder(); | 56 | static QString defaultLocalfolder(); |
56 | 57 | ||
57 | virtual const QString&getType()const=0; | 58 | virtual const QString&getType()const=0; |
diff --git a/noncore/net/mail/libmailwrapper/libmailwrapper.pro b/noncore/net/mail/libmailwrapper/libmailwrapper.pro index 71f6cca..8ea04a4 100644 --- a/noncore/net/mail/libmailwrapper/libmailwrapper.pro +++ b/noncore/net/mail/libmailwrapper/libmailwrapper.pro | |||
@@ -10,13 +10,14 @@ HEADERS = mailwrapper.h \ | |||
10 | genericwrapper.h \ | 10 | genericwrapper.h \ |
11 | mboxwrapper.h \ | 11 | mboxwrapper.h \ |
12 | settings.h \ | 12 | settings.h \ |
13 | logindialog.h \ | 13 | logindialog.h \ |
14 | sendmailprogress.h \ | 14 | sendmailprogress.h \ |
15 | statusmail.h \ | 15 | statusmail.h \ |
16 | mhwrapper.h | 16 | mhwrapper.h \ |
17 | nntpwrapper.h | ||
17 | 18 | ||
18 | SOURCES = imapwrapper.cpp \ | 19 | SOURCES = imapwrapper.cpp \ |
19 | mailwrapper.cpp \ | 20 | mailwrapper.cpp \ |
20 | mailtypes.cpp \ | 21 | mailtypes.cpp \ |
21 | pop3wrapper.cpp \ | 22 | pop3wrapper.cpp \ |
22 | abstractmail.cpp \ | 23 | abstractmail.cpp \ |
@@ -24,13 +25,14 @@ SOURCES = imapwrapper.cpp \ | |||
24 | genericwrapper.cpp \ | 25 | genericwrapper.cpp \ |
25 | mboxwrapper.cpp \ | 26 | mboxwrapper.cpp \ |
26 | settings.cpp \ | 27 | settings.cpp \ |
27 | logindialog.cpp \ | 28 | logindialog.cpp \ |
28 | sendmailprogress.cpp \ | 29 | sendmailprogress.cpp \ |
29 | statusmail.cpp \ | 30 | statusmail.cpp \ |
30 | mhwrapper.cpp | 31 | mhwrapper.cpp \ |
32 | nntpwrapper.cpp | ||
31 | 33 | ||
32 | INTERFACES = logindialogui.ui \ | 34 | INTERFACES = logindialogui.ui \ |
33 | sendmailprogressui.ui | 35 | sendmailprogressui.ui |
34 | 36 | ||
35 | 37 | ||
36 | INCLUDEPATH += $(OPIEDIR)/include | 38 | INCLUDEPATH += $(OPIEDIR)/include |
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp new file mode 100644 index 0000000..e73a890 --- a/dev/null +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp | |||
@@ -0,0 +1,241 @@ | |||
1 | #include "nntpwrapper.h" | ||
2 | #include "logindialog.h" | ||
3 | #include "mailtypes.h" | ||
4 | |||
5 | #include <qfile.h> | ||
6 | |||
7 | #include <stdlib.h> | ||
8 | |||
9 | #include <libetpan/libetpan.h> | ||
10 | #include <libetpan/nntpdriver.h> | ||
11 | |||
12 | |||
13 | |||
14 | #define HARD_MSG_SIZE_LIMIT 5242880 | ||
15 | |||
16 | NNTPwrapper::NNTPwrapper( NNTPaccount *a ) | ||
17 | : Genericwrapper() { | ||
18 | account = a; | ||
19 | m_nntp = NULL; | ||
20 | msgTempName = a->getFileName()+"_msg_cache"; | ||
21 | last_msg_id = 0; | ||
22 | } | ||
23 | |||
24 | NNTPwrapper::~NNTPwrapper() { | ||
25 | logout(); | ||
26 | QFile msg_cache(msgTempName); | ||
27 | if (msg_cache.exists()) { | ||
28 | msg_cache.remove(); | ||
29 | } | ||
30 | } | ||
31 | |||
32 | void NNTPwrapper::nntp_progress( size_t current, size_t maximum ) { | ||
33 | qDebug( "NNTP: %i of %i", current, maximum ); | ||
34 | } | ||
35 | |||
36 | |||
37 | RecBody NNTPwrapper::fetchBody( const RecMail &mail ) { | ||
38 | int err = NEWSNNTP_NO_ERROR; | ||
39 | char *message = 0; | ||
40 | size_t length = 0; | ||
41 | |||
42 | login(); | ||
43 | if ( !m_nntp ) { | ||
44 | return RecBody(); | ||
45 | } | ||
46 | |||
47 | RecBody body; | ||
48 | mailmessage * mailmsg; | ||
49 | if (mail.Msgsize()>HARD_MSG_SIZE_LIMIT) { | ||
50 | qDebug("Message to large: %i",mail.Msgsize()); | ||
51 | return body; | ||
52 | } | ||
53 | |||
54 | QFile msg_cache(msgTempName); | ||
55 | |||
56 | cleanMimeCache(); | ||
57 | |||
58 | if (mail.getNumber()!=last_msg_id) { | ||
59 | if (msg_cache.exists()) { | ||
60 | msg_cache.remove(); | ||
61 | } | ||
62 | msg_cache.open(IO_ReadWrite|IO_Truncate); | ||
63 | last_msg_id = mail.getNumber(); | ||
64 | err = mailsession_get_message(m_nntp->sto_session, mail.getNumber(), &mailmsg); | ||
65 | err = mailmessage_fetch(mailmsg,&message,&length); | ||
66 | msg_cache.writeBlock(message,length); | ||
67 | } else { | ||
68 | QString msg=""; | ||
69 | msg_cache.open(IO_ReadOnly); | ||
70 | message = new char[4096]; | ||
71 | memset(message,0,4096); | ||
72 | while (msg_cache.readBlock(message,4095)>0) { | ||
73 | msg+=message; | ||
74 | memset(message,0,4096); | ||
75 | } | ||
76 | delete message; | ||
77 | message = (char*)malloc(msg.length()+1*sizeof(char)); | ||
78 | memset(message,0,msg.length()+1); | ||
79 | memcpy(message,msg.latin1(),msg.length()); | ||
80 | /* transform to libetpan stuff */ | ||
81 | mailmsg = mailmessage_new(); | ||
82 | mailmessage_init(mailmsg, NULL, data_message_driver, 0, strlen(message)); | ||
83 | generic_message_t * msg_data; | ||
84 | msg_data = (generic_message_t *)mailmsg->msg_data; | ||
85 | msg_data->msg_fetched = 1; | ||
86 | msg_data->msg_message = message; | ||
87 | msg_data->msg_length = strlen(message); | ||
88 | } | ||
89 | body = parseMail(mailmsg); | ||
90 | |||
91 | /* clean up */ | ||
92 | if (mailmsg) | ||
93 | mailmessage_free(mailmsg); | ||
94 | if (message) | ||
95 | free(message); | ||
96 | |||
97 | return body; | ||
98 | } | ||
99 | |||
100 | |||
101 | void NNTPwrapper::listMessages(const QString &, QList<RecMail> &target ) | ||
102 | { | ||
103 | login(); | ||
104 | if (!m_nntp) | ||
105 | return; | ||
106 | uint32_t res_messages,res_recent,res_unseen; | ||
107 | mailsession_status_folder(m_nntp->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen); | ||
108 | parseList(target,m_nntp->sto_session,"INBOX"); | ||
109 | } | ||
110 | |||
111 | void NNTPwrapper::login() | ||
112 | { | ||
113 | if (account->getOffline()) | ||
114 | return; | ||
115 | /* we'll hold the line */ | ||
116 | if ( m_nntp != NULL ) | ||
117 | return; | ||
118 | |||
119 | const char *server, *user, *pass; | ||
120 | uint16_t port; | ||
121 | int err = NEWSNNTP_NO_ERROR; | ||
122 | |||
123 | server = account->getServer().latin1(); | ||
124 | port = account->getPort().toUInt(); | ||
125 | |||
126 | if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { | ||
127 | LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true ); | ||
128 | login.show(); | ||
129 | if ( QDialog::Accepted == login.exec() ) { | ||
130 | // ok | ||
131 | user = login.getUser().latin1(); | ||
132 | pass = login.getPassword().latin1(); | ||
133 | } else { | ||
134 | // cancel | ||
135 | qDebug( "NNTP: Login canceled" ); | ||
136 | return; | ||
137 | } | ||
138 | } else { | ||
139 | user = account->getUser().latin1(); | ||
140 | pass = account->getPassword().latin1(); | ||
141 | } | ||
142 | |||
143 | // bool ssl = account->getSSL(); | ||
144 | |||
145 | m_nntp=mailstorage_new(NULL); | ||
146 | |||
147 | int conntypeset = account->ConnectionType(); | ||
148 | int conntype = 0; | ||
149 | if ( conntypeset == 3 ) { | ||
150 | conntype = CONNECTION_TYPE_COMMAND; | ||
151 | } else if ( conntypeset == 2 ) { | ||
152 | conntype = CONNECTION_TYPE_TLS; | ||
153 | } else if ( conntypeset == 1 ) { | ||
154 | conntype = CONNECTION_TYPE_STARTTLS; | ||
155 | } else if ( conntypeset == 0 ) { | ||
156 | conntype = CONNECTION_TYPE_TRY_STARTTLS; | ||
157 | } | ||
158 | |||
159 | nntp_mailstorage_init(m_nntp,(char*)server, port, NULL, conntype, NNTP_AUTH_TYPE_PLAIN, | ||
160 | (char*)user,(char*)pass,0,0,0); | ||
161 | |||
162 | err = mailstorage_connect(m_nntp); | ||
163 | |||
164 | if (err != NEWSNNTP_NO_ERROR) { | ||
165 | qDebug( QString( "FEHLERNUMMER %1" ).arg( err ) ); | ||
166 | // Global::statusMessage(tr("Error initializing folder")); | ||
167 | mailstorage_free(m_nntp); | ||
168 | m_nntp = 0; | ||
169 | } | ||
170 | } | ||
171 | |||
172 | void NNTPwrapper::logout() | ||
173 | { | ||
174 | int err = NEWSNNTP_NO_ERROR; | ||
175 | if ( m_nntp == NULL ) | ||
176 | return; | ||
177 | mailstorage_free(m_nntp); | ||
178 | m_nntp = 0; | ||
179 | } | ||
180 | |||
181 | QList<Folder>* NNTPwrapper::listFolders() { | ||
182 | QList<Folder> * folders = new QList<Folder>(); | ||
183 | folders->setAutoDelete( false ); | ||
184 | clist *result = 0; | ||
185 | |||
186 | // int err = | ||
187 | // if ( err == _NO_ERROR ) { | ||
188 | // current = result->first; | ||
189 | // for ( current=clist_begin(result);current!=NULL;current=clist_next(current)) { | ||
190 | |||
191 | |||
192 | // Folder*inb=new Folder("INBOX","/"); | ||
193 | |||
194 | |||
195 | // folders->append(inb); | ||
196 | return folders; | ||
197 | } | ||
198 | |||
199 | |||
200 | void NNTPwrapper::answeredMail(const RecMail&) {} | ||
201 | |||
202 | void NNTPwrapper::statusFolder(folderStat&target_stat,const QString&) { | ||
203 | login(); | ||
204 | target_stat.message_count = 0; | ||
205 | target_stat.message_unseen = 0; | ||
206 | target_stat.message_recent = 0; | ||
207 | if (!m_nntp) | ||
208 | return; | ||
209 | int r = mailsession_status_folder(m_nntp->sto_session,0,&target_stat.message_count, | ||
210 | &target_stat.message_recent,&target_stat.message_unseen); | ||
211 | } | ||
212 | |||
213 | |||
214 | encodedString* NNTPwrapper::fetchRawBody(const RecMail&mail) { | ||
215 | char*target=0; | ||
216 | size_t length=0; | ||
217 | encodedString*res = 0; | ||
218 | mailmessage * mailmsg = 0; | ||
219 | int err = mailsession_get_message(m_nntp->sto_session, mail.getNumber(), &mailmsg); | ||
220 | err = mailmessage_fetch(mailmsg,&target,&length); | ||
221 | if (mailmsg) | ||
222 | mailmessage_free(mailmsg); | ||
223 | if (target) { | ||
224 | res = new encodedString(target,length); | ||
225 | } | ||
226 | return res; | ||
227 | } | ||
228 | |||
229 | const QString&NNTPwrapper::getType()const { | ||
230 | return account->getType(); | ||
231 | } | ||
232 | |||
233 | const QString&NNTPwrapper::getName()const{ | ||
234 | return account->getAccountName(); | ||
235 | } | ||
236 | |||
237 | void NNTPwrapper::deleteMail(const RecMail&mail) { | ||
238 | } | ||
239 | |||
240 | int NNTPwrapper::deleteAllMail(const Folder*) { | ||
241 | } | ||
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.h b/noncore/net/mail/libmailwrapper/nntpwrapper.h new file mode 100644 index 0000000..e47e68f --- a/dev/null +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.h | |||
@@ -0,0 +1,48 @@ | |||
1 | #ifndef __NNTPWRAPPER | ||
2 | #define __NNTPWRAPPER | ||
3 | |||
4 | #include "mailwrapper.h" | ||
5 | #include "genericwrapper.h" | ||
6 | #include <qstring.h> | ||
7 | #include <libetpan/clist.h> | ||
8 | |||
9 | class encodedString; | ||
10 | struct mailstorage; | ||
11 | struct mailfolder; | ||
12 | |||
13 | class NNTPwrapper : public Genericwrapper | ||
14 | { | ||
15 | |||
16 | Q_OBJECT | ||
17 | |||
18 | public: | ||
19 | NNTPwrapper( NNTPaccount *a ); | ||
20 | virtual ~NNTPwrapper(); | ||
21 | |||
22 | /* mailbox will be ignored */ | ||
23 | virtual void listMessages(const QString & mailbox, QList<RecMail> &target ); | ||
24 | /* should only get the subscribed one */ | ||
25 | virtual QList<Folder>* listFolders(); | ||
26 | /* mailbox will be ignored */ | ||
27 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); | ||
28 | |||
29 | virtual void deleteMail(const RecMail&mail); | ||
30 | virtual void answeredMail(const RecMail&mail); | ||
31 | virtual int deleteAllMail(const Folder*); | ||
32 | |||
33 | virtual RecBody fetchBody( const RecMail &mail ); | ||
34 | virtual encodedString* fetchRawBody(const RecMail&mail); | ||
35 | virtual void logout(); | ||
36 | virtual const QString&getType()const; | ||
37 | virtual const QString&getName()const; | ||
38 | static void nntp_progress( size_t current, size_t maximum ); | ||
39 | |||
40 | protected: | ||
41 | void login(); | ||
42 | NNTPaccount *account; | ||
43 | mailstorage* m_nntp; | ||
44 | |||
45 | |||
46 | }; | ||
47 | |||
48 | #endif | ||
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp index 14c2059..6fab401 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp | |||
@@ -2,13 +2,13 @@ | |||
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() { |
@@ -90,13 +90,13 @@ RecBody POP3wrapper::fetchBody( const RecMail &mail ) { | |||
90 | if (message) | 90 | if (message) |
91 | free(message); | 91 | free(message); |
92 | 92 | ||
93 | return body; | 93 | return body; |
94 | } | 94 | } |
95 | 95 | ||
96 | void POP3wrapper::listMessages(const QString &, QList<RecMail> &target ) | 96 | void POP3wrapper::listMessages(const QString &, QList<RecMail> &target ) |
97 | { | 97 | { |
98 | login(); | 98 | login(); |
99 | if (!m_pop3) | 99 | if (!m_pop3) |
100 | return; | 100 | return; |
101 | uint32_t res_messages,res_recent,res_unseen; | 101 | uint32_t res_messages,res_recent,res_unseen; |
102 | mailsession_status_folder(m_pop3->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen); | 102 | mailsession_status_folder(m_pop3->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen); |
@@ -164,13 +164,13 @@ void POP3wrapper::login() | |||
164 | Global::statusMessage(tr("Error initializing folder")); | 164 | Global::statusMessage(tr("Error initializing folder")); |
165 | mailstorage_free(m_pop3); | 165 | mailstorage_free(m_pop3); |
166 | m_pop3 = 0; | 166 | m_pop3 = 0; |
167 | } | 167 | } |
168 | } | 168 | } |
169 | 169 | ||
170 | void POP3wrapper::logout() | 170 | void POP3wrapper::logout() |
171 | { | 171 | { |
172 | int err = MAILPOP3_NO_ERROR; | 172 | int err = MAILPOP3_NO_ERROR; |
173 | if ( m_pop3 == NULL ) | 173 | if ( m_pop3 == NULL ) |
174 | return; | 174 | return; |
175 | mailstorage_free(m_pop3); | 175 | mailstorage_free(m_pop3); |
176 | m_pop3 = 0; | 176 | m_pop3 = 0; |
diff --git a/noncore/net/mail/nntpconfigui.ui b/noncore/net/mail/nntpconfigui.ui index cc439f4..7769804 100644 --- a/noncore/net/mail/nntpconfigui.ui +++ b/noncore/net/mail/nntpconfigui.ui | |||
@@ -8,246 +8,341 @@ | |||
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>228</width> | 14 | <width>413</width> |
15 | <height>320</height> | 15 | <height>520</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 NNTP</string> | 20 | <string>Configure NNTP</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 | <vbox> |
29 | <property stdset="1"> | 29 | <property stdset="1"> |
30 | <name>margin</name> | 30 | <name>margin</name> |
31 | <number>4</number> | 31 | <number>3</number> |
32 | </property> | 32 | </property> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>spacing</name> | 34 | <name>spacing</name> |
35 | <number>3</number> | 35 | <number>3</number> |
36 | </property> | 36 | </property> |
37 | <widget row="2" column="1" > | 37 | <widget> |
38 | <class>QLineEdit</class> | 38 | <class>QTabWidget</class> |
39 | <property stdset="1"> | ||
40 | <name>name</name> | ||
41 | <cstring>serverLine</cstring> | ||
42 | </property> | ||
43 | </widget> | ||
44 | <widget row="3" column="0" > | ||
45 | <class>QLabel</class> | ||
46 | <property stdset="1"> | ||
47 | <name>name</name> | ||
48 | <cstring>portLabel</cstring> | ||
49 | </property> | ||
50 | <property stdset="1"> | ||
51 | <name>text</name> | ||
52 | <string>Port</string> | ||
53 | </property> | ||
54 | </widget> | ||
55 | <widget row="3" column="1" > | ||
56 | <class>QLineEdit</class> | ||
57 | <property stdset="1"> | ||
58 | <name>name</name> | ||
59 | <cstring>portLine</cstring> | ||
60 | </property> | ||
61 | </widget> | ||
62 | <widget row="0" column="1" > | ||
63 | <class>QLineEdit</class> | ||
64 | <property stdset="1"> | ||
65 | <name>name</name> | ||
66 | <cstring>accountLine</cstring> | ||
67 | </property> | ||
68 | <property> | ||
69 | <name>toolTip</name> | ||
70 | <string>Name of the Account</string> | ||
71 | </property> | ||
72 | </widget> | ||
73 | <widget row="0" column="0" > | ||
74 | <class>QLabel</class> | ||
75 | <property stdset="1"> | ||
76 | <name>name</name> | ||
77 | <cstring>accountLabel</cstring> | ||
78 | </property> | ||
79 | <property stdset="1"> | ||
80 | <name>text</name> | ||
81 | <string>Account</string> | ||
82 | </property> | ||
83 | </widget> | ||
84 | <widget row="2" column="0" > | ||
85 | <class>QLabel</class> | ||
86 | <property stdset="1"> | ||
87 | <name>name</name> | ||
88 | <cstring>serverLabel</cstring> | ||
89 | </property> | ||
90 | <property stdset="1"> | ||
91 | <name>enabled</name> | ||
92 | <bool>true</bool> | ||
93 | </property> | ||
94 | <property stdset="1"> | ||
95 | <name>caption</name> | ||
96 | <string></string> | ||
97 | </property> | ||
98 | <property stdset="1"> | ||
99 | <name>text</name> | ||
100 | <string>Server</string> | ||
101 | </property> | ||
102 | <property> | ||
103 | <name>layoutMargin</name> | ||
104 | </property> | ||
105 | <property> | ||
106 | <name>layoutSpacing</name> | ||
107 | </property> | ||
108 | </widget> | ||
109 | <widget row="1" column="0" rowspan="1" colspan="2" > | ||
110 | <class>Line</class> | ||
111 | <property stdset="1"> | ||
112 | <name>name</name> | ||
113 | <cstring>line1</cstring> | ||
114 | </property> | ||
115 | <property stdset="1"> | ||
116 | <name>caption</name> | ||
117 | <string></string> | ||
118 | </property> | ||
119 | <property stdset="1"> | ||
120 | <name>orientation</name> | ||
121 | <enum>Horizontal</enum> | ||
122 | </property> | ||
123 | <property> | ||
124 | <name>layoutMargin</name> | ||
125 | </property> | ||
126 | <property> | ||
127 | <name>layoutSpacing</name> | ||
128 | </property> | ||
129 | </widget> | ||
130 | <widget row="4" column="1" > | ||
131 | <class>QCheckBox</class> | ||
132 | <property stdset="1"> | ||
133 | <name>name</name> | ||
134 | <cstring>sslBox</cstring> | ||
135 | </property> | ||
136 | <property stdset="1"> | ||
137 | <name>text</name> | ||
138 | <string>Use SSL</string> | ||
139 | </property> | ||
140 | </widget> | ||
141 | <widget row="5" column="0" rowspan="1" colspan="2" > | ||
142 | <class>Line</class> | ||
143 | <property stdset="1"> | 39 | <property stdset="1"> |
144 | <name>name</name> | 40 | <name>name</name> |
145 | <cstring>line2</cstring> | 41 | <cstring>TabWidget2</cstring> |
146 | </property> | ||
147 | <property stdset="1"> | ||
148 | <name>enabled</name> | ||
149 | <bool>true</bool> | ||
150 | </property> | ||
151 | <property stdset="1"> | ||
152 | <name>caption</name> | ||
153 | <string></string> | ||
154 | </property> | ||
155 | <property stdset="1"> | ||
156 | <name>orientation</name> | ||
157 | <enum>Horizontal</enum> | ||
158 | </property> | 42 | </property> |
159 | <property> | 43 | <property> |
160 | <name>layoutMargin</name> | 44 | <name>layoutMargin</name> |
161 | </property> | 45 | </property> |
162 | <property> | 46 | <property> |
163 | <name>layoutSpacing</name> | 47 | <name>layoutSpacing</name> |
164 | </property> | 48 | </property> |
49 | <widget> | ||
50 | <class>QWidget</class> | ||
51 | <property stdset="1"> | ||
52 | <name>name</name> | ||
53 | <cstring>tab</cstring> | ||
54 | </property> | ||
55 | <attribute> | ||
56 | <name>title</name> | ||
57 | <string>Account</string> | ||
58 | </attribute> | ||
59 | <grid> | ||
60 | <property stdset="1"> | ||
61 | <name>margin</name> | ||
62 | <number>3</number> | ||
63 | </property> | ||
64 | <property stdset="1"> | ||
65 | <name>spacing</name> | ||
66 | <number>3</number> | ||
67 | </property> | ||
68 | <widget row="2" column="1" > | ||
69 | <class>QLineEdit</class> | ||
70 | <property stdset="1"> | ||
71 | <name>name</name> | ||
72 | <cstring>serverLine</cstring> | ||
73 | </property> | ||
74 | </widget> | ||
75 | <widget row="3" column="0" > | ||
76 | <class>QLabel</class> | ||
77 | <property stdset="1"> | ||
78 | <name>name</name> | ||
79 | <cstring>portLabel</cstring> | ||
80 | </property> | ||
81 | <property stdset="1"> | ||
82 | <name>text</name> | ||
83 | <string>Port</string> | ||
84 | </property> | ||
85 | </widget> | ||
86 | <widget row="3" column="1" > | ||
87 | <class>QLineEdit</class> | ||
88 | <property stdset="1"> | ||
89 | <name>name</name> | ||
90 | <cstring>portLine</cstring> | ||
91 | </property> | ||
92 | </widget> | ||
93 | <widget row="0" column="1" > | ||
94 | <class>QLineEdit</class> | ||
95 | <property stdset="1"> | ||
96 | <name>name</name> | ||
97 | <cstring>accountLine</cstring> | ||
98 | </property> | ||
99 | <property> | ||
100 | <name>toolTip</name> | ||
101 | <string>Name of the Account</string> | ||
102 | </property> | ||
103 | </widget> | ||
104 | <widget row="0" column="0" > | ||
105 | <class>QLabel</class> | ||
106 | <property stdset="1"> | ||
107 | <name>name</name> | ||
108 | <cstring>accountLabel</cstring> | ||
109 | </property> | ||
110 | <property stdset="1"> | ||
111 | <name>text</name> | ||
112 | <string>Account</string> | ||
113 | </property> | ||
114 | </widget> | ||
115 | <widget row="2" column="0" > | ||
116 | <class>QLabel</class> | ||
117 | <property stdset="1"> | ||
118 | <name>name</name> | ||
119 | <cstring>serverLabel</cstring> | ||
120 | </property> | ||
121 | <property stdset="1"> | ||
122 | <name>enabled</name> | ||
123 | <bool>true</bool> | ||
124 | </property> | ||
125 | <property stdset="1"> | ||
126 | <name>caption</name> | ||
127 | <string></string> | ||
128 | </property> | ||
129 | <property stdset="1"> | ||
130 | <name>text</name> | ||
131 | <string>Server</string> | ||
132 | </property> | ||
133 | <property> | ||
134 | <name>layoutMargin</name> | ||
135 | </property> | ||
136 | <property> | ||
137 | <name>layoutSpacing</name> | ||
138 | </property> | ||
139 | </widget> | ||
140 | <widget row="1" column="0" rowspan="1" colspan="2" > | ||
141 | <class>Line</class> | ||
142 | <property stdset="1"> | ||
143 | <name>name</name> | ||
144 | <cstring>line1</cstring> | ||
145 | </property> | ||
146 | <property stdset="1"> | ||
147 | <name>caption</name> | ||
148 | <string></string> | ||
149 | </property> | ||
150 | <property stdset="1"> | ||
151 | <name>orientation</name> | ||
152 | <enum>Horizontal</enum> | ||
153 | </property> | ||
154 | <property> | ||
155 | <name>layoutMargin</name> | ||
156 | </property> | ||
157 | <property> | ||
158 | <name>layoutSpacing</name> | ||
159 | </property> | ||
160 | </widget> | ||
161 | <widget row="4" column="1" > | ||
162 | <class>QCheckBox</class> | ||
163 | <property stdset="1"> | ||
164 | <name>name</name> | ||
165 | <cstring>sslBox</cstring> | ||
166 | </property> | ||
167 | <property stdset="1"> | ||
168 | <name>text</name> | ||
169 | <string>Use SSL</string> | ||
170 | </property> | ||
171 | </widget> | ||
172 | <widget row="5" column="0" rowspan="2" colspan="2" > | ||
173 | <class>Line</class> | ||
174 | <property stdset="1"> | ||
175 | <name>name</name> | ||
176 | <cstring>line2</cstring> | ||
177 | </property> | ||
178 | <property stdset="1"> | ||
179 | <name>enabled</name> | ||
180 | <bool>true</bool> | ||
181 | </property> | ||
182 | <property stdset="1"> | ||
183 | <name>caption</name> | ||
184 | <string></string> | ||
185 | </property> | ||
186 | <property stdset="1"> | ||
187 | <name>orientation</name> | ||
188 | <enum>Horizontal</enum> | ||
189 | </property> | ||
190 | <property> | ||
191 | <name>layoutMargin</name> | ||
192 | </property> | ||
193 | <property> | ||
194 | <name>layoutSpacing</name> | ||
195 | </property> | ||
196 | </widget> | ||
197 | <widget row="7" column="0" > | ||
198 | <class>QLabel</class> | ||
199 | <property stdset="1"> | ||
200 | <name>name</name> | ||
201 | <cstring>userLabel</cstring> | ||
202 | </property> | ||
203 | <property stdset="1"> | ||
204 | <name>text</name> | ||
205 | <string>User</string> | ||
206 | </property> | ||
207 | </widget> | ||
208 | <widget row="8" column="0" > | ||
209 | <class>QLabel</class> | ||
210 | <property stdset="1"> | ||
211 | <name>name</name> | ||
212 | <cstring>passLabel</cstring> | ||
213 | </property> | ||
214 | <property stdset="1"> | ||
215 | <name>text</name> | ||
216 | <string>Password</string> | ||
217 | </property> | ||
218 | </widget> | ||
219 | <spacer row="9" column="1" > | ||
220 | <property> | ||
221 | <name>name</name> | ||
222 | <cstring>spacer</cstring> | ||
223 | </property> | ||
224 | <property stdset="1"> | ||
225 | <name>orientation</name> | ||
226 | <enum>Vertical</enum> | ||
227 | </property> | ||
228 | <property stdset="1"> | ||
229 | <name>sizeType</name> | ||
230 | <enum>Expanding</enum> | ||
231 | </property> | ||
232 | <property> | ||
233 | <name>sizeHint</name> | ||
234 | <size> | ||
235 | <width>20</width> | ||
236 | <height>20</height> | ||
237 | </size> | ||
238 | </property> | ||
239 | </spacer> | ||
240 | <widget row="6" column="1" > | ||
241 | <class>QCheckBox</class> | ||
242 | <property stdset="1"> | ||
243 | <name>name</name> | ||
244 | <cstring>loginBox</cstring> | ||
245 | </property> | ||
246 | <property stdset="1"> | ||
247 | <name>text</name> | ||
248 | <string>Use Login</string> | ||
249 | </property> | ||
250 | </widget> | ||
251 | <widget row="7" column="1" > | ||
252 | <class>QLineEdit</class> | ||
253 | <property stdset="1"> | ||
254 | <name>name</name> | ||
255 | <cstring>userLine</cstring> | ||
256 | </property> | ||
257 | <property stdset="1"> | ||
258 | <name>enabled</name> | ||
259 | <bool>false</bool> | ||
260 | </property> | ||
261 | </widget> | ||
262 | <widget row="8" column="1" > | ||
263 | <class>QLineEdit</class> | ||
264 | <property stdset="1"> | ||
265 | <name>name</name> | ||
266 | <cstring>passLine</cstring> | ||
267 | </property> | ||
268 | <property stdset="1"> | ||
269 | <name>enabled</name> | ||
270 | <bool>false</bool> | ||
271 | </property> | ||
272 | <property stdset="1"> | ||
273 | <name>echoMode</name> | ||
274 | <enum>Password</enum> | ||
275 | </property> | ||
276 | </widget> | ||
277 | </grid> | ||
278 | </widget> | ||
279 | <widget> | ||
280 | <class>QWidget</class> | ||
281 | <property stdset="1"> | ||
282 | <name>name</name> | ||
283 | <cstring>tab</cstring> | ||
284 | </property> | ||
285 | <attribute> | ||
286 | <name>title</name> | ||
287 | <string>Groups</string> | ||
288 | </attribute> | ||
289 | <vbox> | ||
290 | <property stdset="1"> | ||
291 | <name>margin</name> | ||
292 | <number>3</number> | ||
293 | </property> | ||
294 | <property stdset="1"> | ||
295 | <name>spacing</name> | ||
296 | <number>3</number> | ||
297 | </property> | ||
298 | <widget> | ||
299 | <class>QListView</class> | ||
300 | <property stdset="1"> | ||
301 | <name>name</name> | ||
302 | <cstring>ListViewGroups</cstring> | ||
303 | </property> | ||
304 | </widget> | ||
305 | <widget> | ||
306 | <class>QPushButton</class> | ||
307 | <property stdset="1"> | ||
308 | <name>name</name> | ||
309 | <cstring>GetNGButton</cstring> | ||
310 | </property> | ||
311 | <property stdset="1"> | ||
312 | <name>text</name> | ||
313 | <string>Get newsgroup list from server</string> | ||
314 | </property> | ||
315 | </widget> | ||
316 | </vbox> | ||
317 | </widget> | ||
165 | </widget> | 318 | </widget> |
166 | <widget row="7" column="0" > | 319 | </vbox> |
167 | <class>QLabel</class> | ||
168 | <property stdset="1"> | ||
169 | <name>name</name> | ||
170 | <cstring>userLabel</cstring> | ||
171 | </property> | ||
172 | <property stdset="1"> | ||
173 | <name>text</name> | ||
174 | <string>User</string> | ||
175 | </property> | ||
176 | </widget> | ||
177 | <widget row="8" column="0" > | ||
178 | <class>QLabel</class> | ||
179 | <property stdset="1"> | ||
180 | <name>name</name> | ||
181 | <cstring>passLabel</cstring> | ||
182 | </property> | ||
183 | <property stdset="1"> | ||
184 | <name>text</name> | ||
185 | <string>Password</string> | ||
186 | </property> | ||
187 | </widget> | ||
188 | <spacer row="9" column="1" > | ||
189 | <property> | ||
190 | <name>name</name> | ||
191 | <cstring>spacer</cstring> | ||
192 | </property> | ||
193 | <property stdset="1"> | ||
194 | <name>orientation</name> | ||
195 | <enum>Vertical</enum> | ||
196 | </property> | ||
197 | <property stdset="1"> | ||
198 | <name>sizeType</name> | ||
199 | <enum>Expanding</enum> | ||
200 | </property> | ||
201 | <property> | ||
202 | <name>sizeHint</name> | ||
203 | <size> | ||
204 | <width>20</width> | ||
205 | <height>20</height> | ||
206 | </size> | ||
207 | </property> | ||
208 | </spacer> | ||
209 | <widget row="6" column="1" > | ||
210 | <class>QCheckBox</class> | ||
211 | <property stdset="1"> | ||
212 | <name>name</name> | ||
213 | <cstring>loginBox</cstring> | ||
214 | </property> | ||
215 | <property stdset="1"> | ||
216 | <name>text</name> | ||
217 | <string>Use Login</string> | ||
218 | </property> | ||
219 | </widget> | ||
220 | <widget row="7" column="1" > | ||
221 | <class>QLineEdit</class> | ||
222 | <property stdset="1"> | ||
223 | <name>name</name> | ||
224 | <cstring>userLine</cstring> | ||
225 | </property> | ||
226 | <property stdset="1"> | ||
227 | <name>enabled</name> | ||
228 | <bool>false</bool> | ||
229 | </property> | ||
230 | </widget> | ||
231 | <widget row="8" column="1" > | ||
232 | <class>QLineEdit</class> | ||
233 | <property stdset="1"> | ||
234 | <name>name</name> | ||
235 | <cstring>passLine</cstring> | ||
236 | </property> | ||
237 | <property stdset="1"> | ||
238 | <name>enabled</name> | ||
239 | <bool>false</bool> | ||
240 | </property> | ||
241 | <property stdset="1"> | ||
242 | <name>echoMode</name> | ||
243 | <enum>Password</enum> | ||
244 | </property> | ||
245 | </widget> | ||
246 | </grid> | ||
247 | </widget> | 320 | </widget> |
321 | <customwidgets> | ||
322 | <customwidget> | ||
323 | <class>QListView</class> | ||
324 | <header location="global">qlistview.h</header> | ||
325 | <sizehint> | ||
326 | <width>-1</width> | ||
327 | <height>-1</height> | ||
328 | </sizehint> | ||
329 | <container>0</container> | ||
330 | <sizepolicy> | ||
331 | <hordata>5</hordata> | ||
332 | <verdata>5</verdata> | ||
333 | </sizepolicy> | ||
334 | <pixmap>image0</pixmap> | ||
335 | </customwidget> | ||
336 | </customwidgets> | ||
337 | <images> | ||
338 | <image> | ||
339 | <name>image0</name> | ||
340 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1ddec44f503c0ae2a154410f53d0ed20e2bf6bdb656dd6861dd23d9a66591b0587fd1654235ebded6f0edcd53e419d87ae7b1f4f9b8f906d0bfe012317426a70b07bdc2f3ec77f8ed6b89559061a0343d06a124cc105596482585094bc0ae599b04646c9018926491b2205e140c485cace25755c175d0a967b622ff900b8cc9c7d29af594ea722d589167f813aa852ba07d94b9dce296e883fe7bb163f23896753</data> | ||
341 | </image> | ||
342 | </images> | ||
248 | <tabstops> | 343 | <tabstops> |
249 | <tabstop>accountLine</tabstop> | 344 | <tabstop>accountLine</tabstop> |
250 | <tabstop>serverLine</tabstop> | 345 | <tabstop>serverLine</tabstop> |
251 | <tabstop>portLine</tabstop> | 346 | <tabstop>portLine</tabstop> |
252 | <tabstop>sslBox</tabstop> | 347 | <tabstop>sslBox</tabstop> |
253 | <tabstop>loginBox</tabstop> | 348 | <tabstop>loginBox</tabstop> |