author | alwin <alwin> | 2004-10-24 00:55:14 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-10-24 00:55:14 (UTC) |
commit | 9755bc969d17fc683791abc5c6fbd50fa3112486 (patch) (unidiff) | |
tree | 0fdcf7b52b2f4627dd3efcd7330b116c4d9c4d98 /noncore/net | |
parent | 12eed25c7f18285f0e342d49fd3c41eb4b14e151 (diff) | |
download | opie-9755bc969d17fc683791abc5c6fbd50fa3112486.zip opie-9755bc969d17fc683791abc5c6fbd50fa3112486.tar.gz opie-9755bc969d17fc683791abc5c6fbd50fa3112486.tar.bz2 |
new options for pop3 accounts
KATE eated a lot of last spaces in files
some tryouts
-rw-r--r-- | noncore/net/mail/accountview.cpp | 31 | ||||
-rw-r--r-- | noncore/net/mail/editaccounts.cpp | 28 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/genericwrapper.cpp | 13 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 86 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mhwrapper.cpp | 60 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.cpp | 21 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.h | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.cpp | 47 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.h | 7 | ||||
-rw-r--r-- | noncore/net/mail/pop3configui.ui | 68 |
10 files changed, 238 insertions, 125 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index 662e555..0fe8475 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp | |||
@@ -62,37 +62,32 @@ void AccountView::populate( QList<Account> list ) | |||
62 | 62 | ||
63 | mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this)); | 63 | mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this)); |
64 | 64 | ||
65 | Account *it; | 65 | Account *it; |
66 | for ( it = list.first(); it; it = list.next() ) | 66 | for ( it = list.first(); it; it = list.next() ) { |
67 | { | 67 | if ( it->getType() == MAILLIB::A_IMAP ) { |
68 | if ( it->getType() == MAILLIB::A_IMAP ) | ||
69 | { | ||
70 | IMAPaccount *imap = static_cast<IMAPaccount *>(it); | 68 | IMAPaccount *imap = static_cast<IMAPaccount *>(it); |
71 | odebug << "added IMAP " + imap->getAccountName() << oendl; | 69 | odebug << "added IMAP " + imap->getAccountName() << oendl; |
72 | imapAccounts.append(new IMAPviewItem( imap, this )); | 70 | imapAccounts.append(new IMAPviewItem( imap, this )); |
73 | } | 71 | } else if ( it->getType() == MAILLIB::A_POP3 ) { |
74 | else if ( it->getType() == MAILLIB::A_POP3 ) | ||
75 | { | ||
76 | POP3account *pop3 = static_cast<POP3account *>(it); | 72 | POP3account *pop3 = static_cast<POP3account *>(it); |
77 | odebug << "added POP3 " + pop3->getAccountName() << oendl; | 73 | odebug << "added POP3 " + pop3->getAccountName() << oendl; |
78 | /* must not be hold 'cause it isn't required */ | 74 | /* must not be hold 'cause it isn't required */ |
79 | (void) new POP3viewItem( pop3, this ); | 75 | (void) new POP3viewItem( pop3, this ); |
80 | } | 76 | } else if ( it->getType() == MAILLIB::A_NNTP ) { |
81 | else if ( it->getType() == MAILLIB::A_NNTP ) | ||
82 | { | ||
83 | NNTPaccount *nntp = static_cast<NNTPaccount *>(it); | 77 | NNTPaccount *nntp = static_cast<NNTPaccount *>(it); |
84 | odebug << "added NNTP " + nntp->getAccountName() << oendl; | 78 | odebug << "added NNTP " + nntp->getAccountName() << oendl; |
85 | /* must not be hold 'cause it isn't required */ | 79 | /* must not be hold 'cause it isn't required */ |
86 | (void) new NNTPviewItem( nntp, this ); | 80 | (void) new NNTPviewItem( nntp, this ); |
87 | } | 81 | } else if ( it->getType() == MAILLIB::A_MH ) { |
88 | } | 82 | } |
83 | } | ||
89 | } | 84 | } |
90 | 85 | ||
91 | void AccountView::refresh(QListViewItem *item) | 86 | void AccountView::refresh(QListViewItem *item) |
92 | { | 87 | { |
93 | 88 | ||
94 | odebug << "AccountView refresh..." << oendl; | 89 | odebug << "AccountView refresh..." << oendl; |
95 | if ( item ) | 90 | if ( item ) |
96 | { | 91 | { |
97 | m_currentItem = item; | 92 | m_currentItem = item; |
98 | QValueList<RecMailP> headerlist; | 93 | QValueList<RecMailP> headerlist; |
@@ -163,10 +158,10 @@ void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrappe | |||
163 | QMessageBox::critical(0,tr("Error creating new Folder"), | 158 | QMessageBox::critical(0,tr("Error creating new Folder"), |
164 | tr("<center>Error while creating<br>new folder - breaking.</center>")); | 159 | tr("<center>Error while creating<br>new folder - breaking.</center>")); |
165 | return; | 160 | return; |
166 | } | 161 | } |
167 | odebug << "Targetfolder: " << targetFolder.latin1() << "" << oendl; | 162 | odebug << "Targetfolder: " << targetFolder.latin1() << "" << oendl; |
168 | odebug << "Fromfolder: " << fromFolder->getName().latin1() << "" << oendl; | 163 | odebug << "Fromfolder: " << fromFolder->getName().latin1() << "" << oendl; |
169 | fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails()); | 164 | fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails()); |
170 | refreshCurrent(); | 165 | refreshCurrent(); |
171 | } | 166 | } |
172 | 167 | ||
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp index b0ce57d..b7c137d 100644 --- a/noncore/net/mail/editaccounts.cpp +++ b/noncore/net/mail/editaccounts.cpp | |||
@@ -42,9 +42,9 @@ AccountListItem::AccountListItem( QListView *parent, Account *a) | |||
42 | 42 | ||
43 | EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) | 43 | EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) |
44 | : EditAccountsUI( parent, name, modal, flags ) | 44 | : EditAccountsUI( parent, name, modal, flags ) |
45 | { | 45 | { |
46 | odebug << "New Account Configuration Widget" << oendl; | 46 | odebug << "New Account Configuration Widget" << oendl; |
47 | settings = s; | 47 | settings = s; |
48 | 48 | ||
49 | mailList->addColumn( tr( "Account" ) ); | 49 | mailList->addColumn( tr( "Account" ) ); |
50 | mailList->addColumn( tr( "Type" ) ); | 50 | mailList->addColumn( tr( "Type" ) ); |
@@ -82,9 +82,9 @@ void EditAccounts::slotFillLists() | |||
82 | } | 82 | } |
83 | 83 | ||
84 | void EditAccounts::slotNewMail() | 84 | void EditAccounts::slotNewMail() |
85 | { | 85 | { |
86 | odebug << "New Mail Account" << oendl; | 86 | odebug << "New Mail Account" << oendl; |
87 | QString *selection = new QString(); | 87 | QString *selection = new QString(); |
88 | SelectMailType selType( selection, this, 0, true ); | 88 | SelectMailType selType( selection, this, 0, true ); |
89 | selType.show(); | 89 | selType.show(); |
90 | if ( QDialog::Accepted == selType.exec() ) | 90 | if ( QDialog::Accepted == selType.exec() ) |
@@ -96,9 +96,9 @@ void EditAccounts::slotNewMail() | |||
96 | void EditAccounts::slotNewAccount( const QString &type ) | 96 | void EditAccounts::slotNewAccount( const QString &type ) |
97 | { | 97 | { |
98 | if ( type.compare( "IMAP" ) == 0 ) | 98 | if ( type.compare( "IMAP" ) == 0 ) |
99 | { | 99 | { |
100 | odebug << "-> config IMAP" << oendl; | 100 | odebug << "-> config IMAP" << oendl; |
101 | IMAPaccount *account = new IMAPaccount(); | 101 | IMAPaccount *account = new IMAPaccount(); |
102 | IMAPconfig imap( account, this, 0, true ); | 102 | IMAPconfig imap( account, this, 0, true ); |
103 | if ( QDialog::Accepted == QPEApplication::execDialog( &imap ) ) | 103 | if ( QDialog::Accepted == QPEApplication::execDialog( &imap ) ) |
104 | { | 104 | { |
@@ -112,9 +112,9 @@ void EditAccounts::slotNewAccount( const QString &type ) | |||
112 | } | 112 | } |
113 | } | 113 | } |
114 | else if ( type.compare( "POP3" ) == 0 ) | 114 | else if ( type.compare( "POP3" ) == 0 ) |
115 | { | 115 | { |
116 | odebug << "-> config POP3" << oendl; | 116 | odebug << "-> config POP3" << oendl; |
117 | POP3account *account = new POP3account(); | 117 | POP3account *account = new POP3account(); |
118 | POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); | 118 | POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); |
119 | if ( QDialog::Accepted == QPEApplication::execDialog( &pop3 ) ) | 119 | if ( QDialog::Accepted == QPEApplication::execDialog( &pop3 ) ) |
120 | { | 120 | { |
@@ -128,9 +128,9 @@ void EditAccounts::slotNewAccount( const QString &type ) | |||
128 | } | 128 | } |
129 | } | 129 | } |
130 | else if ( type.compare( "SMTP" ) == 0 ) | 130 | else if ( type.compare( "SMTP" ) == 0 ) |
131 | { | 131 | { |
132 | odebug << "-> config SMTP" << oendl; | 132 | odebug << "-> config SMTP" << oendl; |
133 | SMTPaccount *account = new SMTPaccount(); | 133 | SMTPaccount *account = new SMTPaccount(); |
134 | SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); | 134 | SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); |
135 | if ( QDialog::Accepted == QPEApplication::execDialog( &smtp ) ) | 135 | if ( QDialog::Accepted == QPEApplication::execDialog( &smtp ) ) |
136 | { | 136 | { |
@@ -145,9 +145,9 @@ void EditAccounts::slotNewAccount( const QString &type ) | |||
145 | } | 145 | } |
146 | } | 146 | } |
147 | else if ( type.compare( "NNTP" ) == 0 ) | 147 | else if ( type.compare( "NNTP" ) == 0 ) |
148 | { | 148 | { |
149 | odebug << "-> config NNTP" << oendl; | 149 | odebug << "-> config NNTP" << oendl; |
150 | NNTPaccount *account = new NNTPaccount(); | 150 | NNTPaccount *account = new NNTPaccount(); |
151 | NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); | 151 | NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); |
152 | if ( QDialog::Accepted == QPEApplication::execDialog( &nntp ) ) | 152 | if ( QDialog::Accepted == QPEApplication::execDialog( &nntp ) ) |
153 | { | 153 | { |
@@ -214,9 +214,9 @@ void EditAccounts::slotDeleteAccount( Account *account ) | |||
214 | } | 214 | } |
215 | 215 | ||
216 | void EditAccounts::slotEditMail() | 216 | void EditAccounts::slotEditMail() |
217 | { | 217 | { |
218 | odebug << "Edit Mail Account" << oendl; | 218 | odebug << "Edit Mail Account" << oendl; |
219 | if ( !mailList->currentItem() ) | 219 | if ( !mailList->currentItem() ) |
220 | { | 220 | { |
221 | QMessageBox::information( this, tr( "Error" ), | 221 | QMessageBox::information( this, tr( "Error" ), |
222 | tr( "<p>Please select an account.</p>" ), | 222 | tr( "<p>Please select an account.</p>" ), |
@@ -243,15 +243,15 @@ void EditAccounts::slotDeleteMail() | |||
243 | } | 243 | } |
244 | 244 | ||
245 | void EditAccounts::slotNewNews() | 245 | void EditAccounts::slotNewNews() |
246 | { | 246 | { |
247 | odebug << "New News Account" << oendl; | 247 | odebug << "New News Account" << oendl; |
248 | slotNewAccount( "NNTP" ); | 248 | slotNewAccount( "NNTP" ); |
249 | } | 249 | } |
250 | 250 | ||
251 | void EditAccounts::slotEditNews() | 251 | void EditAccounts::slotEditNews() |
252 | { | 252 | { |
253 | odebug << "Edit News Account" << oendl; | 253 | odebug << "Edit News Account" << oendl; |
254 | if ( !newsList->currentItem() ) | 254 | if ( !newsList->currentItem() ) |
255 | { | 255 | { |
256 | QMessageBox::information( this, tr( "Error" ), | 256 | QMessageBox::information( this, tr( "Error" ), |
257 | tr( "<p>Please select an account.</p>" ), | 257 | tr( "<p>Please select an account.</p>" ), |
@@ -264,9 +264,9 @@ void EditAccounts::slotEditNews() | |||
264 | } | 264 | } |
265 | 265 | ||
266 | void EditAccounts::slotDeleteNews() | 266 | void EditAccounts::slotDeleteNews() |
267 | { | 267 | { |
268 | odebug << "Delete News Account" << oendl; | 268 | odebug << "Delete News Account" << oendl; |
269 | if ( !newsList->currentItem() ) | 269 | if ( !newsList->currentItem() ) |
270 | { | 270 | { |
271 | QMessageBox::information( this, tr( "Error" ), | 271 | QMessageBox::information( this, tr( "Error" ), |
272 | tr( "<p>Please select an account.</p>" ), | 272 | tr( "<p>Please select an account.</p>" ), |
@@ -421,8 +421,10 @@ void POP3config::fillValues() | |||
421 | portLine->setText( data->getPort() ); | 421 | portLine->setText( data->getPort() ); |
422 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 422 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
423 | userLine->setText( data->getUser() ); | 423 | userLine->setText( data->getUser() ); |
424 | passLine->setText( data->getPassword() ); | 424 | passLine->setText( data->getPassword() ); |
425 | m_CheckSize->setChecked(data->getCheckMaxSize()); | ||
426 | m_MailLimitBox->setValue(data->getMaxSize()); | ||
425 | } | 427 | } |
426 | 428 | ||
427 | void POP3config::accept() | 429 | void POP3config::accept() |
428 | { | 430 | { |
@@ -431,8 +433,10 @@ void POP3config::accept() | |||
431 | data->setPort( portLine->text() ); | 433 | data->setPort( portLine->text() ); |
432 | data->setConnectionType( ComboBox1->currentItem() ); | 434 | data->setConnectionType( ComboBox1->currentItem() ); |
433 | data->setUser( userLine->text() ); | 435 | data->setUser( userLine->text() ); |
434 | data->setPassword( passLine->text() ); | 436 | data->setPassword( passLine->text() ); |
437 | data->setMaxSize(m_MailLimitBox->value()); | ||
438 | data->setCheckMaxSize(m_CheckSize->isChecked()); | ||
435 | 439 | ||
436 | QDialog::accept(); | 440 | QDialog::accept(); |
437 | } | 441 | } |
438 | 442 | ||
@@ -522,9 +526,9 @@ void NNTPconfig::slotGetNG() { | |||
522 | save(); | 526 | save(); |
523 | data->save(); | 527 | data->save(); |
524 | NNTPwrapper* tmp = new NNTPwrapper( data ); | 528 | NNTPwrapper* tmp = new NNTPwrapper( data ); |
525 | QStringList list = tmp->listAllNewsgroups(); | 529 | QStringList list = tmp->listAllNewsgroups(); |
526 | 530 | ||
527 | ListViewGroups->clear(); | 531 | ListViewGroups->clear(); |
528 | 532 | ||
529 | for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { | 533 | for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { |
530 | QCheckListItem *item; | 534 | QCheckListItem *item; |
@@ -580,9 +584,9 @@ void NNTPconfig::save() | |||
580 | QStringList groupList; | 584 | QStringList groupList; |
581 | for ( ; list_it.current(); ++list_it ) { | 585 | for ( ; list_it.current(); ++list_it ) { |
582 | 586 | ||
583 | if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { | 587 | if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { |
584 | odebug << list_it.current()->text(0) << oendl; | 588 | odebug << list_it.current()->text(0) << oendl; |
585 | groupList.append( list_it.current()->text(0) ); | 589 | groupList.append( list_it.current()->text(0) ); |
586 | } | 590 | } |
587 | 591 | ||
588 | } | 592 | } |
diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.cpp b/noncore/net/mail/libmailwrapper/genericwrapper.cpp index 1caa375..5ec9415 100644 --- a/noncore/net/mail/libmailwrapper/genericwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/genericwrapper.cpp | |||
@@ -2,8 +2,10 @@ | |||
2 | #include <libetpan/libetpan.h> | 2 | #include <libetpan/libetpan.h> |
3 | #include "mailtypes.h" | 3 | #include "mailtypes.h" |
4 | 4 | ||
5 | #include <opie2/odebug.h> | 5 | #include <opie2/odebug.h> |
6 | #include <qpe/timestring.h> | ||
7 | #include <qdatetime.h> | ||
6 | 8 | ||
7 | using namespace Opie::Core; | 9 | using namespace Opie::Core; |
8 | Genericwrapper::Genericwrapper() | 10 | Genericwrapper::Genericwrapper() |
9 | : AbstractMail() | 11 | : AbstractMail() |
@@ -242,14 +244,13 @@ RecBodyP Genericwrapper::parseMail( mailmessage * msg ) | |||
242 | } | 244 | } |
243 | 245 | ||
244 | QString Genericwrapper::parseDateTime( mailimf_date_time *date ) | 246 | QString Genericwrapper::parseDateTime( mailimf_date_time *date ) |
245 | { | 247 | { |
246 | char tmp[23]; | 248 | QDateTime da(QDate(date->dt_year,date->dt_month,date->dt_day),QTime(date->dt_hour,date->dt_min,date->dt_sec)); |
247 | 249 | QString timestring = TimeString::numberDateString(QDate(date->dt_year,date->dt_month,date->dt_day))+" "; | |
248 | snprintf( tmp, 23, "%02i.%02i.%04i %02i:%02i:%02i %+05i", | 250 | timestring+=TimeString::timeString(QTime(date->dt_hour,date->dt_min,date->dt_sec))+" "; |
249 | date->dt_day, date->dt_month, date->dt_year, date->dt_hour, date->dt_min, date->dt_sec, date->dt_zone ); | 251 | timestring.sprintf(timestring+" %+05i",date->dt_zone); |
250 | 252 | return timestring; | |
251 | return QString( tmp ); | ||
252 | } | 253 | } |
253 | 254 | ||
254 | QString Genericwrapper::parseAddressList( mailimf_address_list *list ) | 255 | QString Genericwrapper::parseAddressList( mailimf_address_list *list ) |
255 | { | 256 | { |
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 9b7c0e0..fe75a15 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -30,9 +30,9 @@ int IMAPwrapper::selectMbox(const QString&mbox) | |||
30 | return MAILIMAP_NO_ERROR; | 30 | return MAILIMAP_NO_ERROR; |
31 | } | 31 | } |
32 | int err = mailimap_select( m_imap, (char*)mbox.latin1()); | 32 | int err = mailimap_select( m_imap, (char*)mbox.latin1()); |
33 | if ( err != MAILIMAP_NO_ERROR ) { | 33 | if ( err != MAILIMAP_NO_ERROR ) { |
34 | odebug << "error selecting mailbox: " << m_imap->imap_response << "" << oendl; | 34 | odebug << "error selecting mailbox: " << m_imap->imap_response << "" << oendl; |
35 | m_Lastmbox = ""; | 35 | m_Lastmbox = ""; |
36 | return err; | 36 | return err; |
37 | } | 37 | } |
38 | m_Lastmbox = mbox; | 38 | m_Lastmbox = mbox; |
@@ -41,9 +41,9 @@ int IMAPwrapper::selectMbox(const QString&mbox) | |||
41 | 41 | ||
42 | void IMAPwrapper::imap_progress( size_t current, size_t maximum ) | 42 | void IMAPwrapper::imap_progress( size_t current, size_t maximum ) |
43 | { | 43 | { |
44 | qApp->processEvents(); | 44 | qApp->processEvents(); |
45 | odebug << "IMAP: " << current << " of " << maximum << "" << oendl; | 45 | odebug << "IMAP: " << current << " of " << maximum << "" << oendl; |
46 | } | 46 | } |
47 | 47 | ||
48 | bool IMAPwrapper::start_tls(bool force_tls) | 48 | bool IMAPwrapper::start_tls(bool force_tls) |
49 | { | 49 | { |
@@ -53,9 +53,9 @@ bool IMAPwrapper::start_tls(bool force_tls) | |||
53 | 53 | ||
54 | err = mailimap_capability(m_imap,&cap_data); | 54 | err = mailimap_capability(m_imap,&cap_data); |
55 | if (err != MAILIMAP_NO_ERROR) { | 55 | if (err != MAILIMAP_NO_ERROR) { |
56 | Global::statusMessage("error getting capabilities!"); | 56 | Global::statusMessage("error getting capabilities!"); |
57 | odebug << "error getting capabilities!" << oendl; | 57 | odebug << "error getting capabilities!" << oendl; |
58 | return false; | 58 | return false; |
59 | } | 59 | } |
60 | clistiter * cur; | 60 | clistiter * cur; |
61 | for(cur = clist_begin(cap_data->cap_list) ; cur != NULL;cur = clist_next(cur)) { | 61 | for(cur = clist_begin(cap_data->cap_list) ; cur != NULL;cur = clist_next(cur)) { |
@@ -74,9 +74,9 @@ bool IMAPwrapper::start_tls(bool force_tls) | |||
74 | if (try_tls) { | 74 | if (try_tls) { |
75 | err = mailimap_starttls(m_imap); | 75 | err = mailimap_starttls(m_imap); |
76 | if (err != MAILIMAP_NO_ERROR && force_tls) { | 76 | if (err != MAILIMAP_NO_ERROR && force_tls) { |
77 | Global::statusMessage(tr("Server has no TLS support!")); | 77 | Global::statusMessage(tr("Server has no TLS support!")); |
78 | odebug << "Server has no TLS support!" << oendl; | 78 | odebug << "Server has no TLS support!" << oendl; |
79 | try_tls = false; | 79 | try_tls = false; |
80 | } else { | 80 | } else { |
81 | mailstream_low * low; | 81 | mailstream_low * low; |
82 | mailstream_low * new_low; | 82 | mailstream_low * new_low; |
@@ -125,9 +125,9 @@ void IMAPwrapper::login() | |||
125 | user = login.getUser().latin1(); | 125 | user = login.getUser().latin1(); |
126 | pass = login.getPassword().latin1(); | 126 | pass = login.getPassword().latin1(); |
127 | } else { | 127 | } else { |
128 | // cancel | 128 | // cancel |
129 | odebug << "IMAP: Login canceled" << oendl; | 129 | odebug << "IMAP: Login canceled" << oendl; |
130 | return; | 130 | return; |
131 | } | 131 | } |
132 | } else { | 132 | } else { |
133 | user = account->getUser().latin1(); | 133 | user = account->getUser().latin1(); |
@@ -148,9 +148,9 @@ void IMAPwrapper::login() | |||
148 | force_tls = true; | 148 | force_tls = true; |
149 | } | 149 | } |
150 | 150 | ||
151 | if ( ssl ) { | 151 | if ( ssl ) { |
152 | odebug << "using ssl" << oendl; | 152 | odebug << "using ssl" << oendl; |
153 | err = mailimap_ssl_connect( m_imap, (char*)server, port ); | 153 | err = mailimap_ssl_connect( m_imap, (char*)server, port ); |
154 | } else { | 154 | } else { |
155 | err = mailimap_socket_connect( m_imap, (char*)server, port ); | 155 | err = mailimap_socket_connect( m_imap, (char*)server, port ); |
156 | } | 156 | } |
@@ -176,9 +176,9 @@ void IMAPwrapper::login() | |||
176 | 176 | ||
177 | bool ok = true; | 177 | bool ok = true; |
178 | if (force_tls && !try_tls) { | 178 | if (force_tls && !try_tls) { |
179 | Global::statusMessage(tr("Server has no TLS support!")); | 179 | Global::statusMessage(tr("Server has no TLS support!")); |
180 | odebug << "Server has no TLS support!" << oendl; | 180 | odebug << "Server has no TLS support!" << oendl; |
181 | ok = false; | 181 | ok = false; |
182 | } | 182 | } |
183 | 183 | ||
184 | 184 | ||
@@ -236,14 +236,18 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma | |||
236 | } | 236 | } |
237 | 237 | ||
238 | /* the range has to start at 1!!! not with 0!!!! */ | 238 | /* the range has to start at 1!!! not with 0!!!! */ |
239 | set = mailimap_set_new_interval( 1, last ); | 239 | set = mailimap_set_new_interval( 1, last ); |
240 | |||
241 | |||
242 | fetchType = mailimap_fetch_type_new_all(); | ||
243 | /* | ||
240 | fetchType = mailimap_fetch_type_new_fetch_att_list_empty(); | 244 | fetchType = mailimap_fetch_type_new_fetch_att_list_empty(); |
241 | mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_envelope()); | 245 | mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_envelope()); |
242 | mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_flags()); | 246 | mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_flags()); |
243 | mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_internaldate()); | 247 | mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_internaldate()); |
244 | mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_rfc822_size()); | 248 | mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_rfc822_size()); |
245 | 249 | */ | |
246 | err = mailimap_fetch( m_imap, set, fetchType, &result ); | 250 | err = mailimap_fetch( m_imap, set, fetchType, &result ); |
247 | mailimap_set_free( set ); | 251 | mailimap_set_free( set ); |
248 | mailimap_fetch_type_free( fetchType ); | 252 | mailimap_fetch_type_free( fetchType ); |
249 | 253 | ||
@@ -317,9 +321,9 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() | |||
317 | } | 321 | } |
318 | folders->append( new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix())); | 322 | folders->append( new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix())); |
319 | } | 323 | } |
320 | } else { | 324 | } else { |
321 | odebug << "error fetching folders: " << m_imap->imap_response << "" << oendl; | 325 | odebug << "error fetching folders: " << m_imap->imap_response << "" << oendl; |
322 | } | 326 | } |
323 | mailimap_list_result_free( result ); | 327 | mailimap_list_result_free( result ); |
324 | 328 | ||
325 | /* | 329 | /* |
@@ -327,9 +331,9 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() | |||
327 | */ | 331 | */ |
328 | mask = "*" ; | 332 | mask = "*" ; |
329 | path = account->getPrefix().latin1(); | 333 | path = account->getPrefix().latin1(); |
330 | if (!path) path = ""; | 334 | if (!path) path = ""; |
331 | odebug << path << oendl; | 335 | odebug << path << oendl; |
332 | err = mailimap_list( m_imap, (char*)path, (char*)mask, &result ); | 336 | err = mailimap_list( m_imap, (char*)path, (char*)mask, &result ); |
333 | if ( err == MAILIMAP_NO_ERROR ) { | 337 | if ( err == MAILIMAP_NO_ERROR ) { |
334 | current = result->first; | 338 | current = result->first; |
335 | for ( current=clist_begin(result);current!=NULL;current=clist_next(current)) { | 339 | for ( current=clist_begin(result);current!=NULL;current=clist_next(current)) { |
@@ -354,9 +358,9 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() | |||
354 | del = list->mb_delimiter; | 358 | del = list->mb_delimiter; |
355 | folders->append(new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix())); | 359 | folders->append(new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix())); |
356 | } | 360 | } |
357 | } else { | 361 | } else { |
358 | odebug << "error fetching folders " << m_imap->imap_response << "" << oendl; | 362 | odebug << "error fetching folders " << m_imap->imap_response << "" << oendl; |
359 | } | 363 | } |
360 | if (result) mailimap_list_result_free( result ); | 364 | if (result) mailimap_list_result_free( result ); |
361 | return folders; | 365 | return folders; |
362 | } | 366 | } |
@@ -374,12 +378,12 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
374 | 378 | ||
375 | if (!m_att) { | 379 | if (!m_att) { |
376 | return m; | 380 | return m; |
377 | } | 381 | } |
382 | size = 0; | ||
378 | m = new RecMail(); | 383 | m = new RecMail(); |
379 | for (c = clist_begin(m_att->att_list); c!=NULL;c=clist_next(c) ) { | 384 | for (c = clist_begin(m_att->att_list); c!=NULL;c=clist_next(c) ) { |
380 | current = c; | 385 | current = c; |
381 | size = 0; | ||
382 | item = (mailimap_msg_att_item*)current->data; | 386 | item = (mailimap_msg_att_item*)current->data; |
383 | if (item->att_type!=MAILIMAP_MSG_ATT_ITEM_STATIC) { | 387 | if (item->att_type!=MAILIMAP_MSG_ATT_ITEM_STATIC) { |
384 | flist = (mailimap_msg_att_dynamic*)item->att_data.att_dyn; | 388 | flist = (mailimap_msg_att_dynamic*)item->att_data.att_dyn; |
385 | if (!flist->att_list) { | 389 | if (!flist->att_list) { |
@@ -464,15 +468,22 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
464 | m->setMsgid(QString(head->env_message_id)); | 468 | m->setMsgid(QString(head->env_message_id)); |
465 | } | 469 | } |
466 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) { | 470 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) { |
467 | #if 0 | 471 | #if 0 |
468 | mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date; | 472 | mailimap_date_time*date = item->att_data.att_static->att_data.att_internal_date; |
473 | if (date->dt_sec>60 || date->dt_sec<0) date->dt_sec=0; | ||
474 | //QDateTime da(QDate(d->dt_year,date->dt_month,date->dt_day),QTime(date->dt_hour,date->dt_min,date->dt_sec)); | ||
475 | QString timestring = TimeString::numberDateString(QDate(date->dt_year,date->dt_month,date->dt_day))+" "; | ||
476 | timestring+=TimeString::timeString(QTime(date->dt_hour,date->dt_min,date->dt_sec))+" "; | ||
477 | timestring.sprintf(timestring+" %+05i",date->dt_zone); | ||
478 | m->setDate(timestring); | ||
469 | QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); | 479 | QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); |
470 | odebug << "" << d->dt_year << " " << d->dt_month << " " << d->dt_day << " - " << d->dt_hour << " " << d->dt_min << " " << d->dt_sec << "" << oendl; | 480 | odebug << "" << d->dt_year << " " << d->dt_month << " " << d->dt_day << " - " << d->dt_hour << " " << d->dt_min << " " << d->dt_sec << "" << oendl; |
471 | odebug << da.toString() << oendl; | 481 | odebug << da.toString() << oendl; |
472 | #endif | 482 | #endif |
473 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { | 483 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { |
474 | size = item->att_data.att_static->att_data.att_rfc822_size; | 484 | //size = item->att_data.att_static->att_data.att_rfc822_size; |
485 | m->setMsgsize(item->att_data.att_static->att_data.att_rfc822_size); | ||
475 | } | 486 | } |
476 | } | 487 | } |
477 | /* msg is already deleted */ | 488 | /* msg is already deleted */ |
478 | if (mFlags.testBit(FLAG_DELETED) && m) { | 489 | if (mFlags.testBit(FLAG_DELETED) && m) { |
@@ -480,9 +491,8 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
480 | m = 0; | 491 | m = 0; |
481 | } | 492 | } |
482 | if (m) { | 493 | if (m) { |
483 | m->setFlags(mFlags); | 494 | m->setFlags(mFlags); |
484 | m->setMsgsize(size); | ||
485 | } | 495 | } |
486 | return m; | 496 | return m; |
487 | } | 497 | } |
488 | 498 | ||
@@ -524,9 +534,9 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail) | |||
524 | QValueList<int> path; | 534 | QValueList<int> path; |
525 | body_desc = item->att_data.att_static->att_data.att_body; | 535 | body_desc = item->att_data.att_static->att_data.att_body; |
526 | traverseBody(mail,body_desc,body,0,path); | 536 | traverseBody(mail,body_desc,body,0,path); |
527 | } else { | 537 | } else { |
528 | odebug << "error fetching body: " << m_imap->imap_response << "" << oendl; | 538 | odebug << "error fetching body: " << m_imap->imap_response << "" << oendl; |
529 | } | 539 | } |
530 | if (result) mailimap_fetch_list_free(result); | 540 | if (result) mailimap_fetch_list_free(result); |
531 | return body; | 541 | return body; |
532 | } | 542 | } |
@@ -636,9 +646,9 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int | |||
636 | } | 646 | } |
637 | } | 647 | } |
638 | } | 648 | } |
639 | } else { | 649 | } else { |
640 | odebug << "error fetching text: " << m_imap->imap_response << "" << oendl; | 650 | odebug << "error fetching text: " << m_imap->imap_response << "" << oendl; |
641 | } | 651 | } |
642 | if (result) mailimap_fetch_list_free(result); | 652 | if (result) mailimap_fetch_list_free(result); |
643 | return res; | 653 | return res; |
644 | } | 654 | } |
@@ -663,9 +673,9 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t | |||
663 | for (unsigned int j = 0; j < countlist.count();++j) { | 673 | for (unsigned int j = 0; j < countlist.count();++j) { |
664 | id+=(j>0?" ":""); | 674 | id+=(j>0?" ":""); |
665 | id+=QString("%1").arg(countlist[j]); | 675 | id+=QString("%1").arg(countlist[j]); |
666 | } | 676 | } |
667 | odebug << "ID = " << id.latin1() << "" << oendl; | 677 | odebug << "ID = " << id.latin1() << "" << oendl; |
668 | currentPart->setIdentifier(id); | 678 | currentPart->setIdentifier(id); |
669 | fillSinglePart(currentPart,part1); | 679 | fillSinglePart(currentPart,part1); |
670 | /* important: Check for is NULL 'cause a body can be empty! | 680 | /* important: Check for is NULL 'cause a body can be empty! |
671 | And we put it only into the mail if it is the FIRST part */ | 681 | And we put it only into the mail if it is the FIRST part */ |
@@ -704,9 +714,9 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t | |||
704 | for (unsigned int j = 0; j < countlist.count();++j) { | 714 | for (unsigned int j = 0; j < countlist.count();++j) { |
705 | id+=(j>0?" ":""); | 715 | id+=(j>0?" ":""); |
706 | id+=QString("%1").arg(countlist[j]); | 716 | id+=QString("%1").arg(countlist[j]); |
707 | } | 717 | } |
708 | odebug << "ID(mpart) = " << id.latin1() << "" << oendl; | 718 | odebug << "ID(mpart) = " << id.latin1() << "" << oendl; |
709 | } | 719 | } |
710 | traverseBody(mail,current_body,target_body,current_recursion+1,countlist,ccount); | 720 | traverseBody(mail,current_body,target_body,current_recursion+1,countlist,ccount); |
711 | if (current_body->bd_type==MAILIMAP_BODY_MPART) { | 721 | if (current_body->bd_type==MAILIMAP_BODY_MPART) { |
712 | countlist = recList; | 722 | countlist = recList; |
@@ -748,9 +758,9 @@ void IMAPwrapper::fillSingleTextPart(RecPartP&target_part,mailimap_body_type_tex | |||
748 | return; | 758 | return; |
749 | } | 759 | } |
750 | QString sub; | 760 | QString sub; |
751 | sub = which->bd_media_text; | 761 | sub = which->bd_media_text; |
752 | odebug << "Type= text/" << which->bd_media_text << "" << oendl; | 762 | odebug << "Type= text/" << which->bd_media_text << "" << oendl; |
753 | target_part->setSubtype(sub.lower()); | 763 | target_part->setSubtype(sub.lower()); |
754 | target_part->setLines(which->bd_lines); | 764 | target_part->setLines(which->bd_lines); |
755 | fillBodyFields(target_part,which->bd_fields); | 765 | fillBodyFields(target_part,which->bd_fields); |
756 | } | 766 | } |
@@ -760,9 +770,9 @@ void IMAPwrapper::fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg* | |||
760 | if (!which) { | 770 | if (!which) { |
761 | return; | 771 | return; |
762 | } | 772 | } |
763 | target_part->setSubtype("rfc822"); | 773 | target_part->setSubtype("rfc822"); |
764 | odebug << "Message part" << oendl; | 774 | odebug << "Message part" << oendl; |
765 | /* we set this type to text/plain */ | 775 | /* we set this type to text/plain */ |
766 | target_part->setLines(which->bd_lines); | 776 | target_part->setLines(which->bd_lines); |
767 | fillBodyFields(target_part,which->bd_fields); | 777 | fillBodyFields(target_part,which->bd_fields); |
768 | } | 778 | } |
@@ -819,9 +829,9 @@ void IMAPwrapper::fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_ba | |||
819 | sub = which->bd_media_basic->med_subtype; | 829 | sub = which->bd_media_basic->med_subtype; |
820 | } else { | 830 | } else { |
821 | sub = ""; | 831 | sub = ""; |
822 | } | 832 | } |
823 | odebug << "Type = " << type.latin1() << "/" << sub.latin1() << "" << oendl; | 833 | odebug << "Type = " << type.latin1() << "/" << sub.latin1() << "" << oendl; |
824 | target_part->setType(type.lower()); | 834 | target_part->setType(type.lower()); |
825 | target_part->setSubtype(sub.lower()); | 835 | target_part->setSubtype(sub.lower()); |
826 | fillBodyFields(target_part,which->bd_fields); | 836 | fillBodyFields(target_part,which->bd_fields); |
827 | } | 837 | } |
@@ -895,18 +905,18 @@ void IMAPwrapper::deleteMail(const RecMailP&mail) | |||
895 | mailimap_set_free( set ); | 905 | mailimap_set_free( set ); |
896 | mailimap_store_att_flags_free(store_flags); | 906 | mailimap_store_att_flags_free(store_flags); |
897 | 907 | ||
898 | if (err != MAILIMAP_NO_ERROR) { | 908 | if (err != MAILIMAP_NO_ERROR) { |
899 | odebug << "error deleting mail: " << m_imap->imap_response << "" << oendl; | 909 | odebug << "error deleting mail: " << m_imap->imap_response << "" << oendl; |
900 | return; | 910 | return; |
901 | } | 911 | } |
902 | odebug << "deleting mail: " << m_imap->imap_response << "" << oendl; | 912 | odebug << "deleting mail: " << m_imap->imap_response << "" << oendl; |
903 | /* should we realy do that at this moment? */ | 913 | /* should we realy do that at this moment? */ |
904 | err = mailimap_expunge(m_imap); | 914 | err = mailimap_expunge(m_imap); |
905 | if (err != MAILIMAP_NO_ERROR) { | 915 | if (err != MAILIMAP_NO_ERROR) { |
906 | odebug << "error deleting mail: " << m_imap->imap_response << "" << oendl; | 916 | odebug << "error deleting mail: " << m_imap->imap_response << "" << oendl; |
907 | } | 917 | } |
908 | odebug << "Delete successfull " << m_imap->imap_response << "" << oendl; | 918 | odebug << "Delete successfull " << m_imap->imap_response << "" << oendl; |
909 | } | 919 | } |
910 | 920 | ||
911 | void IMAPwrapper::answeredMail(const RecMailP&mail) | 921 | void IMAPwrapper::answeredMail(const RecMailP&mail) |
912 | { | 922 | { |
@@ -930,9 +940,9 @@ void IMAPwrapper::answeredMail(const RecMailP&mail) | |||
930 | mailimap_set_free( set ); | 940 | mailimap_set_free( set ); |
931 | mailimap_store_att_flags_free(store_flags); | 941 | mailimap_store_att_flags_free(store_flags); |
932 | 942 | ||
933 | if (err != MAILIMAP_NO_ERROR) { | 943 | if (err != MAILIMAP_NO_ERROR) { |
934 | odebug << "error marking mail: " << m_imap->imap_response << "" << oendl; | 944 | odebug << "error marking mail: " << m_imap->imap_response << "" << oendl; |
935 | return; | 945 | return; |
936 | } | 946 | } |
937 | } | 947 | } |
938 | 948 | ||
@@ -998,16 +1008,16 @@ int IMAPwrapper::deleteAllMail(const FolderP&folder) | |||
998 | if (err != MAILIMAP_NO_ERROR) { | 1008 | if (err != MAILIMAP_NO_ERROR) { |
999 | Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response)); | 1009 | Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response)); |
1000 | return 0; | 1010 | return 0; |
1001 | } | 1011 | } |
1002 | odebug << "deleting mail: " << m_imap->imap_response << "" << oendl; | 1012 | odebug << "deleting mail: " << m_imap->imap_response << "" << oendl; |
1003 | /* should we realy do that at this moment? */ | 1013 | /* should we realy do that at this moment? */ |
1004 | err = mailimap_expunge(m_imap); | 1014 | err = mailimap_expunge(m_imap); |
1005 | if (err != MAILIMAP_NO_ERROR) { | 1015 | if (err != MAILIMAP_NO_ERROR) { |
1006 | Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response)); | 1016 | Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response)); |
1007 | return 0; | 1017 | return 0; |
1008 | } | 1018 | } |
1009 | odebug << "Delete successfull " << m_imap->imap_response << "" << oendl; | 1019 | odebug << "Delete successfull " << m_imap->imap_response << "" << oendl; |
1010 | return 1; | 1020 | return 1; |
1011 | } | 1021 | } |
1012 | 1022 | ||
1013 | int IMAPwrapper::createMbox(const QString&folder,const FolderP&parentfolder,const QString& delemiter,bool getsubfolder) | 1023 | int IMAPwrapper::createMbox(const QString&folder,const FolderP&parentfolder,const QString& delemiter,bool getsubfolder) |
@@ -1030,9 +1040,9 @@ int IMAPwrapper::createMbox(const QString&folder,const FolderP&parentfolder,cons | |||
1030 | Global::statusMessage(tr("Cannot create folder %1 for holding subfolders").arg(pre)); | 1040 | Global::statusMessage(tr("Cannot create folder %1 for holding subfolders").arg(pre)); |
1031 | return 0; | 1041 | return 0; |
1032 | } | 1042 | } |
1033 | } | 1043 | } |
1034 | odebug << "Creating " << pre.latin1() << "" << oendl; | 1044 | odebug << "Creating " << pre.latin1() << "" << oendl; |
1035 | int res = mailimap_create(m_imap,pre.latin1()); | 1045 | int res = mailimap_create(m_imap,pre.latin1()); |
1036 | if (res != MAILIMAP_NO_ERROR) { | 1046 | if (res != MAILIMAP_NO_ERROR) { |
1037 | Global::statusMessage(tr("%1").arg(m_imap->imap_response)); | 1047 | Global::statusMessage(tr("%1").arg(m_imap->imap_response)); |
1038 | return 0; | 1048 | return 0; |
@@ -1089,9 +1099,9 @@ void IMAPwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) | |||
1089 | break; | 1099 | break; |
1090 | } | 1100 | } |
1091 | } | 1101 | } |
1092 | } else { | 1102 | } else { |
1093 | odebug << "Error retrieving status" << oendl; | 1103 | odebug << "Error retrieving status" << oendl; |
1094 | } | 1104 | } |
1095 | if (status) mailimap_mailbox_data_status_free(status); | 1105 | if (status) mailimap_mailbox_data_status_free(status); |
1096 | if (att_list) mailimap_status_att_list_free(att_list); | 1106 | if (att_list) mailimap_status_att_list_free(att_list); |
1097 | } | 1107 | } |
@@ -1113,9 +1123,9 @@ MAILLIB::ATYPE IMAPwrapper::getType()const | |||
1113 | } | 1123 | } |
1114 | 1124 | ||
1115 | const QString&IMAPwrapper::getName()const | 1125 | const QString&IMAPwrapper::getName()const |
1116 | { | 1126 | { |
1117 | odebug << "Get name: " << account->getAccountName().latin1() << "" << oendl; | 1127 | odebug << "Get name: " << account->getAccountName().latin1() << "" << oendl; |
1118 | return account->getAccountName(); | 1128 | return account->getAccountName(); |
1119 | } | 1129 | } |
1120 | 1130 | ||
1121 | encodedString* IMAPwrapper::fetchRawBody(const RecMailP&mail) | 1131 | encodedString* IMAPwrapper::fetchRawBody(const RecMailP&mail) |
@@ -1129,9 +1139,9 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, | |||
1129 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) | 1139 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) |
1130 | { | 1140 | { |
1131 | if (targetWrapper != this) { | 1141 | if (targetWrapper != this) { |
1132 | AbstractMail::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit); | 1142 | AbstractMail::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit); |
1133 | odebug << "Using generic" << oendl; | 1143 | odebug << "Using generic" << oendl; |
1134 | return; | 1144 | return; |
1135 | } | 1145 | } |
1136 | mailimap_set *set = 0; | 1146 | mailimap_set *set = 0; |
1137 | login(); | 1147 | login(); |
@@ -1148,9 +1158,9 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, | |||
1148 | mailimap_set_free( set ); | 1158 | mailimap_set_free( set ); |
1149 | if ( err != MAILIMAP_NO_ERROR ) { | 1159 | if ( err != MAILIMAP_NO_ERROR ) { |
1150 | QString error_msg = tr("error copy mails: %1").arg(m_imap->imap_response); | 1160 | QString error_msg = tr("error copy mails: %1").arg(m_imap->imap_response); |
1151 | Global::statusMessage(error_msg); | 1161 | Global::statusMessage(error_msg); |
1152 | odebug << error_msg << oendl; | 1162 | odebug << error_msg << oendl; |
1153 | return; | 1163 | return; |
1154 | } | 1164 | } |
1155 | if (moveit) { | 1165 | if (moveit) { |
1156 | deleteAllMail(fromFolder); | 1166 | deleteAllMail(fromFolder); |
@@ -1159,9 +1169,9 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, | |||
1159 | 1169 | ||
1160 | void IMAPwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) | 1170 | void IMAPwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) |
1161 | { | 1171 | { |
1162 | if (targetWrapper != this) { | 1172 | if (targetWrapper != this) { |
1163 | odebug << "Using generic" << oendl; | 1173 | odebug << "Using generic" << oendl; |
1164 | AbstractMail::mvcpMail(mail,targetFolder,targetWrapper,moveit); | 1174 | AbstractMail::mvcpMail(mail,targetFolder,targetWrapper,moveit); |
1165 | return; | 1175 | return; |
1166 | } | 1176 | } |
1167 | mailimap_set *set = 0; | 1177 | mailimap_set *set = 0; |
@@ -1178,9 +1188,9 @@ void IMAPwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstra | |||
1178 | mailimap_set_free( set ); | 1188 | mailimap_set_free( set ); |
1179 | if ( err != MAILIMAP_NO_ERROR ) { | 1189 | if ( err != MAILIMAP_NO_ERROR ) { |
1180 | QString error_msg = tr("error copy mail: %1").arg(m_imap->imap_response); | 1190 | QString error_msg = tr("error copy mail: %1").arg(m_imap->imap_response); |
1181 | Global::statusMessage(error_msg); | 1191 | Global::statusMessage(error_msg); |
1182 | odebug << error_msg << oendl; | 1192 | odebug << error_msg << oendl; |
1183 | return; | 1193 | return; |
1184 | } | 1194 | } |
1185 | if (moveit) { | 1195 | if (moveit) { |
1186 | deleteMail(mail); | 1196 | deleteMail(mail); |
diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.cpp b/noncore/net/mail/libmailwrapper/mhwrapper.cpp index 403afcf..765a21c 100644 --- a/noncore/net/mail/libmailwrapper/mhwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mhwrapper.cpp | |||
@@ -16,9 +16,9 @@ MHwrapper::MHwrapper(const QString & mbox_dir,const QString&mbox_name) | |||
16 | if (MHPath.length()>0) { | 16 | if (MHPath.length()>0) { |
17 | if (MHPath[MHPath.length()-1]=='/') { | 17 | if (MHPath[MHPath.length()-1]=='/') { |
18 | MHPath=MHPath.left(MHPath.length()-1); | 18 | MHPath=MHPath.left(MHPath.length()-1); |
19 | } | 19 | } |
20 | odebug << MHPath << oendl; | 20 | odebug << MHPath << oendl; |
21 | QDir dir(MHPath); | 21 | QDir dir(MHPath); |
22 | if (!dir.exists()) { | 22 | if (!dir.exists()) { |
23 | dir.mkdir(MHPath); | 23 | dir.mkdir(MHPath); |
24 | } | 24 | } |
@@ -33,17 +33,17 @@ void MHwrapper::init_storage() | |||
33 | if (!m_storage) { | 33 | if (!m_storage) { |
34 | m_storage = mailstorage_new(NULL); | 34 | m_storage = mailstorage_new(NULL); |
35 | r = mh_mailstorage_init(m_storage,(char*)pre.latin1(),0,0,0); | 35 | r = mh_mailstorage_init(m_storage,(char*)pre.latin1(),0,0,0); |
36 | if (r != MAIL_NO_ERROR) { | 36 | if (r != MAIL_NO_ERROR) { |
37 | odebug << "error initializing storage" << oendl; | 37 | odebug << "error initializing storage" << oendl; |
38 | mailstorage_free(m_storage); | 38 | mailstorage_free(m_storage); |
39 | m_storage = 0; | 39 | m_storage = 0; |
40 | return; | 40 | return; |
41 | } | 41 | } |
42 | } | 42 | } |
43 | r = mailstorage_connect(m_storage); | 43 | r = mailstorage_connect(m_storage); |
44 | if (r!=MAIL_NO_ERROR) { | 44 | if (r!=MAIL_NO_ERROR) { |
45 | odebug << "error connecting storage" << oendl; | 45 | odebug << "error connecting storage" << oendl; |
46 | mailstorage_free(m_storage); | 46 | mailstorage_free(m_storage); |
47 | m_storage = 0; | 47 | m_storage = 0; |
48 | } | 48 | } |
49 | } | 49 | } |
@@ -70,9 +70,9 @@ void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSm | |||
70 | } | 70 | } |
71 | QString f = buildPath(mailbox); | 71 | QString f = buildPath(mailbox); |
72 | int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); | 72 | int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); |
73 | if (r!=MAIL_NO_ERROR) { | 73 | if (r!=MAIL_NO_ERROR) { |
74 | odebug << "listMessages: error selecting folder!" << oendl; | 74 | odebug << "listMessages: error selecting folder!" << oendl; |
75 | return; | 75 | return; |
76 | } | 76 | } |
77 | parseList(target,m_storage->sto_session,f); | 77 | parseList(target,m_storage->sto_session,f); |
78 | Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); | 78 | Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); |
@@ -90,9 +90,9 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders() | |||
90 | mail_list*flist = 0; | 90 | mail_list*flist = 0; |
91 | clistcell*current=0; | 91 | clistcell*current=0; |
92 | int r = mailsession_list_folders(m_storage->sto_session,NULL,&flist); | 92 | int r = mailsession_list_folders(m_storage->sto_session,NULL,&flist); |
93 | if (r != MAIL_NO_ERROR || !flist) { | 93 | if (r != MAIL_NO_ERROR || !flist) { |
94 | odebug << "error getting folder list" << oendl; | 94 | odebug << "error getting folder list" << oendl; |
95 | return folders; | 95 | return folders; |
96 | } | 96 | } |
97 | for (current=clist_begin(flist->mb_list);current!=0;current=clist_next(current)) { | 97 | for (current=clist_begin(flist->mb_list);current!=0;current=clist_next(current)) { |
98 | QString t = (char*)current->data; | 98 | QString t = (char*)current->data; |
@@ -110,14 +110,14 @@ void MHwrapper::deleteMail(const RecMailP&mail) | |||
110 | return; | 110 | return; |
111 | } | 111 | } |
112 | int r = mailsession_select_folder(m_storage->sto_session,(char*)mail->getMbox().latin1()); | 112 | int r = mailsession_select_folder(m_storage->sto_session,(char*)mail->getMbox().latin1()); |
113 | if (r!=MAIL_NO_ERROR) { | 113 | if (r!=MAIL_NO_ERROR) { |
114 | odebug << "error selecting folder!" << oendl; | 114 | odebug << "error selecting folder!" << oendl; |
115 | return; | 115 | return; |
116 | } | 116 | } |
117 | r = mailsession_remove_message(m_storage->sto_session,mail->getNumber()); | 117 | r = mailsession_remove_message(m_storage->sto_session,mail->getNumber()); |
118 | if (r != MAIL_NO_ERROR) { | 118 | if (r != MAIL_NO_ERROR) { |
119 | odebug << "error deleting mail" << oendl; | 119 | odebug << "error deleting mail" << oendl; |
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 | ||
123 | void MHwrapper::answeredMail(const RecMailP&) | 123 | void MHwrapper::answeredMail(const RecMailP&) |
@@ -140,9 +140,9 @@ RecBodyP MHwrapper::fetchBody( const RecMailP &mail ) | |||
140 | return body; | 140 | return body; |
141 | } | 141 | } |
142 | r = mailsession_get_message(m_storage->sto_session, mail->getNumber(), &msg); | 142 | r = mailsession_get_message(m_storage->sto_session, mail->getNumber(), &msg); |
143 | if (r != MAIL_NO_ERROR) { | 143 | if (r != MAIL_NO_ERROR) { |
144 | odebug << "Error fetching mail " << mail->getNumber() << "" << oendl; | 144 | odebug << "Error fetching mail " << mail->getNumber() << "" << oendl; |
145 | return body; | 145 | return body; |
146 | } | 146 | } |
147 | body = parseMail(msg); | 147 | body = parseMail(msg); |
148 | mailmessage_fetch_result_free(msg,data); | 148 | mailmessage_fetch_result_free(msg,data); |
@@ -150,9 +150,9 @@ RecBodyP MHwrapper::fetchBody( const RecMailP &mail ) | |||
150 | } | 150 | } |
151 | 151 | ||
152 | void MHwrapper::mbox_progress( size_t current, size_t maximum ) | 152 | void MHwrapper::mbox_progress( size_t current, size_t maximum ) |
153 | { | 153 | { |
154 | odebug << "MH " << current << " von " << maximum << "" << oendl; | 154 | odebug << "MH " << current << " von " << maximum << "" << oendl; |
155 | } | 155 | } |
156 | 156 | ||
157 | QString MHwrapper::buildPath(const QString&p) | 157 | QString MHwrapper::buildPath(const QString&p) |
158 | { | 158 | { |
@@ -183,15 +183,15 @@ int MHwrapper::createMbox(const QString&folder,const FolderP&pfolder,const QStri | |||
183 | f = pfolder->getName(); | 183 | f = pfolder->getName(); |
184 | f+="/"; | 184 | f+="/"; |
185 | f+=folder; | 185 | f+=folder; |
186 | } | 186 | } |
187 | odebug << f << oendl; | 187 | odebug << f << oendl; |
188 | int r = mailsession_create_folder(m_storage->sto_session,(char*)f.latin1()); | 188 | int r = mailsession_create_folder(m_storage->sto_session,(char*)f.latin1()); |
189 | if (r != MAIL_NO_ERROR) { | 189 | if (r != MAIL_NO_ERROR) { |
190 | odebug << "error creating folder " << r << "" << oendl; | 190 | odebug << "error creating folder " << r << "" << oendl; |
191 | return 0; | 191 | return 0; |
192 | } | 192 | } |
193 | odebug << "Folder created" << oendl; | 193 | odebug << "Folder created" << oendl; |
194 | return 1; | 194 | return 1; |
195 | } | 195 | } |
196 | 196 | ||
197 | void MHwrapper::storeMessage(const char*msg,size_t length, const QString&Folder) | 197 | void MHwrapper::storeMessage(const char*msg,size_t length, const QString&Folder) |
@@ -202,14 +202,14 @@ void MHwrapper::storeMessage(const char*msg,size_t length, const QString&Folder) | |||
202 | } | 202 | } |
203 | QString f = buildPath(Folder); | 203 | QString f = buildPath(Folder); |
204 | int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); | 204 | int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); |
205 | if (r!=MAIL_NO_ERROR) { | 205 | if (r!=MAIL_NO_ERROR) { |
206 | odebug << "error selecting folder!" << oendl; | 206 | odebug << "error selecting folder!" << oendl; |
207 | return; | 207 | return; |
208 | } | 208 | } |
209 | r = mailsession_append_message(m_storage->sto_session,(char*)msg,length); | 209 | r = mailsession_append_message(m_storage->sto_session,(char*)msg,length); |
210 | if (r!=MAIL_NO_ERROR) { | 210 | if (r!=MAIL_NO_ERROR) { |
211 | odebug << "error storing mail" << oendl; | 211 | odebug << "error storing mail" << oendl; |
212 | } | 212 | } |
213 | return; | 213 | return; |
214 | } | 214 | } |
215 | 215 | ||
@@ -224,9 +224,9 @@ encodedString* MHwrapper::fetchRawBody(const RecMailP&mail) | |||
224 | char*data=0; | 224 | char*data=0; |
225 | size_t size; | 225 | size_t size; |
226 | int r = mailsession_select_folder(m_storage->sto_session,(char*)mail->getMbox().latin1()); | 226 | int r = mailsession_select_folder(m_storage->sto_session,(char*)mail->getMbox().latin1()); |
227 | if (r!=MAIL_NO_ERROR) { | 227 | if (r!=MAIL_NO_ERROR) { |
228 | odebug << "error selecting folder!" << oendl; | 228 | odebug << "error selecting folder!" << oendl; |
229 | return result; | 229 | return result; |
230 | } | 230 | } |
231 | r = mailsession_get_message(m_storage->sto_session, mail->getNumber(), &msg); | 231 | r = mailsession_get_message(m_storage->sto_session, mail->getNumber(), &msg); |
232 | if (r != MAIL_NO_ERROR) { | 232 | if (r != MAIL_NO_ERROR) { |
@@ -248,16 +248,16 @@ void MHwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> & | |||
248 | { | 248 | { |
249 | QString f = buildPath(mailbox); | 249 | QString f = buildPath(mailbox); |
250 | int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); | 250 | int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); |
251 | if (r!=MAIL_NO_ERROR) { | 251 | if (r!=MAIL_NO_ERROR) { |
252 | odebug << "deleteMails: error selecting folder!" << oendl; | 252 | odebug << "deleteMails: error selecting folder!" << oendl; |
253 | return; | 253 | return; |
254 | } | 254 | } |
255 | QValueList<RecMailP>::ConstIterator it; | 255 | QValueList<RecMailP>::ConstIterator it; |
256 | for (it=target.begin(); it!=target.end();++it) { | 256 | for (it=target.begin(); it!=target.end();++it) { |
257 | r = mailsession_remove_message(m_storage->sto_session,(*it)->getNumber()); | 257 | r = mailsession_remove_message(m_storage->sto_session,(*it)->getNumber()); |
258 | if (r != MAIL_NO_ERROR) { | 258 | if (r != MAIL_NO_ERROR) { |
259 | odebug << "error deleting mail" << oendl; | 259 | odebug << "error deleting mail" << oendl; |
260 | break; | 260 | break; |
261 | } | 261 | } |
262 | } | 262 | } |
263 | } | 263 | } |
@@ -271,15 +271,15 @@ int MHwrapper::deleteAllMail(const FolderP&tfolder) | |||
271 | int res = 1; | 271 | int res = 1; |
272 | if (!tfolder) return 0; | 272 | if (!tfolder) return 0; |
273 | int r = mailsession_select_folder(m_storage->sto_session,(char*)tfolder->getName().latin1()); | 273 | int r = mailsession_select_folder(m_storage->sto_session,(char*)tfolder->getName().latin1()); |
274 | if (r!=MAIL_NO_ERROR) { | 274 | if (r!=MAIL_NO_ERROR) { |
275 | odebug << "error selecting folder!" << oendl; | 275 | odebug << "error selecting folder!" << oendl; |
276 | return 0; | 276 | return 0; |
277 | } | 277 | } |
278 | mailmessage_list*l=0; | 278 | mailmessage_list*l=0; |
279 | r = mailsession_get_messages_list(m_storage->sto_session,&l); | 279 | r = mailsession_get_messages_list(m_storage->sto_session,&l); |
280 | if (r != MAIL_NO_ERROR) { | 280 | if (r != MAIL_NO_ERROR) { |
281 | odebug << "Error message list" << oendl; | 281 | odebug << "Error message list" << oendl; |
282 | res = 0; | 282 | res = 0; |
283 | } | 283 | } |
284 | unsigned j = 0; | 284 | unsigned j = 0; |
285 | for(unsigned int i = 0 ; l!= 0 && res==1 && i < carray_count(l->msg_tab) ; ++i) { | 285 | for(unsigned int i = 0 ; l!= 0 && res==1 && i < carray_count(l->msg_tab) ; ++i) { |
@@ -308,9 +308,9 @@ int MHwrapper::deleteMbox(const FolderP&tfolder) | |||
308 | 308 | ||
309 | int r = mailsession_delete_folder(m_storage->sto_session,(char*)tfolder->getName().latin1()); | 309 | int r = mailsession_delete_folder(m_storage->sto_session,(char*)tfolder->getName().latin1()); |
310 | 310 | ||
311 | if (r != MAIL_NO_ERROR) { | 311 | if (r != MAIL_NO_ERROR) { |
312 | odebug << "error deleting mail box" << oendl; | 312 | odebug << "error deleting mail box" << oendl; |
313 | return 0; | 313 | return 0; |
314 | } | 314 | } |
315 | QString cmd = "rm -rf "+tfolder->getName(); | 315 | QString cmd = "rm -rf "+tfolder->getName(); |
316 | QStringList command; | 316 | QStringList command; |
@@ -326,12 +326,12 @@ int MHwrapper::deleteMbox(const FolderP&tfolder) | |||
326 | 326 | ||
327 | *process << command; | 327 | *process << command; |
328 | removeMboxfailed = false; | 328 | removeMboxfailed = false; |
329 | if(!process->start(OProcess::Block, OProcess::All) ) { | 329 | if(!process->start(OProcess::Block, OProcess::All) ) { |
330 | odebug << "could not start process" << oendl; | 330 | odebug << "could not start process" << oendl; |
331 | return 0; | 331 | return 0; |
332 | } | 332 | } |
333 | odebug << "mail box deleted" << oendl; | 333 | odebug << "mail box deleted" << oendl; |
334 | return 1; | 334 | return 1; |
335 | } | 335 | } |
336 | 336 | ||
337 | void MHwrapper::processEnded(OProcess *p) | 337 | void MHwrapper::processEnded(OProcess *p) |
@@ -378,26 +378,26 @@ void MHwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstract | |||
378 | if (!m_storage) { | 378 | if (!m_storage) { |
379 | return; | 379 | return; |
380 | } | 380 | } |
381 | if (targetWrapper != this) { | 381 | if (targetWrapper != this) { |
382 | odebug << "Using generic" << oendl; | 382 | odebug << "Using generic" << oendl; |
383 | Genericwrapper::mvcpMail(mail,targetFolder,targetWrapper,moveit); | 383 | Genericwrapper::mvcpMail(mail,targetFolder,targetWrapper,moveit); |
384 | return; | 384 | return; |
385 | } | 385 | } |
386 | odebug << "Using internal routines for move/copy" << oendl; | 386 | odebug << "Using internal routines for move/copy" << oendl; |
387 | QString tf = buildPath(targetFolder); | 387 | QString tf = buildPath(targetFolder); |
388 | int r = mailsession_select_folder(m_storage->sto_session,(char*)mail->getMbox().latin1()); | 388 | int r = mailsession_select_folder(m_storage->sto_session,(char*)mail->getMbox().latin1()); |
389 | if (r != MAIL_NO_ERROR) { | 389 | if (r != MAIL_NO_ERROR) { |
390 | odebug << "Error selecting source mailbox" << oendl; | 390 | odebug << "Error selecting source mailbox" << oendl; |
391 | return; | 391 | return; |
392 | } | 392 | } |
393 | if (moveit) { | 393 | if (moveit) { |
394 | r = mailsession_move_message(m_storage->sto_session,mail->getNumber(),(char*)tf.latin1()); | 394 | r = mailsession_move_message(m_storage->sto_session,mail->getNumber(),(char*)tf.latin1()); |
395 | } else { | 395 | } else { |
396 | r = mailsession_copy_message(m_storage->sto_session,mail->getNumber(),(char*)tf.latin1()); | 396 | r = mailsession_copy_message(m_storage->sto_session,mail->getNumber(),(char*)tf.latin1()); |
397 | } | 397 | } |
398 | if (r != MAIL_NO_ERROR) { | 398 | if (r != MAIL_NO_ERROR) { |
399 | odebug << "Error copy/moving mail internal (" << r << ")" << oendl; | 399 | odebug << "Error copy/moving mail internal (" << r << ")" << oendl; |
400 | } | 400 | } |
401 | } | 401 | } |
402 | 402 | ||
403 | void MHwrapper::mvcpAllMails(const FolderP&fromFolder, | 403 | void MHwrapper::mvcpAllMails(const FolderP&fromFolder, |
@@ -407,23 +407,23 @@ void MHwrapper::mvcpAllMails(const FolderP&fromFolder, | |||
407 | if (!m_storage) { | 407 | if (!m_storage) { |
408 | return; | 408 | return; |
409 | } | 409 | } |
410 | if (targetWrapper != this) { | 410 | if (targetWrapper != this) { |
411 | odebug << "Using generic" << oendl; | 411 | odebug << "Using generic" << oendl; |
412 | Genericwrapper::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit); | 412 | Genericwrapper::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit); |
413 | return; | 413 | return; |
414 | } | 414 | } |
415 | if (!fromFolder) return; | 415 | if (!fromFolder) return; |
416 | int r = mailsession_select_folder(m_storage->sto_session,(char*)fromFolder->getName().latin1()); | 416 | int r = mailsession_select_folder(m_storage->sto_session,(char*)fromFolder->getName().latin1()); |
417 | if (r!=MAIL_NO_ERROR) { | 417 | if (r!=MAIL_NO_ERROR) { |
418 | odebug << "error selecting source folder!" << oendl; | 418 | odebug << "error selecting source folder!" << oendl; |
419 | return; | 419 | return; |
420 | } | 420 | } |
421 | QString tf = buildPath(targetFolder); | 421 | QString tf = buildPath(targetFolder); |
422 | mailmessage_list*l=0; | 422 | mailmessage_list*l=0; |
423 | r = mailsession_get_messages_list(m_storage->sto_session,&l); | 423 | r = mailsession_get_messages_list(m_storage->sto_session,&l); |
424 | if (r != MAIL_NO_ERROR) { | 424 | if (r != MAIL_NO_ERROR) { |
425 | odebug << "Error message list" << oendl; | 425 | odebug << "Error message list" << oendl; |
426 | } | 426 | } |
427 | unsigned j = 0; | 427 | unsigned j = 0; |
428 | for(unsigned int i = 0 ; l!= 0 && i < carray_count(l->msg_tab) ; ++i) { | 428 | for(unsigned int i = 0 ; l!= 0 && i < carray_count(l->msg_tab) ; ++i) { |
429 | mailmessage * msg; | 429 | mailmessage * msg; |
@@ -434,9 +434,9 @@ void MHwrapper::mvcpAllMails(const FolderP&fromFolder, | |||
434 | } else { | 434 | } else { |
435 | r = mailsession_copy_message(m_storage->sto_session,j,(char*)tf.latin1()); | 435 | r = mailsession_copy_message(m_storage->sto_session,j,(char*)tf.latin1()); |
436 | } | 436 | } |
437 | if (r != MAIL_NO_ERROR) { | 437 | if (r != MAIL_NO_ERROR) { |
438 | odebug << "Error copy/moving mail internal (" << r << ")" << oendl; | 438 | odebug << "Error copy/moving mail internal (" << r << ")" << oendl; |
439 | break; | 439 | break; |
440 | } | 440 | } |
441 | } | 441 | } |
442 | if (l) mailmessage_list_free(l); | 442 | if (l) mailmessage_list_free(l); |
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp index 3cfd1ee..2d66fc9 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp | |||
@@ -6,8 +6,9 @@ | |||
6 | 6 | ||
7 | #include <opie2/odebug.h> | 7 | #include <opie2/odebug.h> |
8 | #include <qpe/global.h> | 8 | #include <qpe/global.h> |
9 | #include <qfile.h> | 9 | #include <qfile.h> |
10 | #include <qmessagebox.h> | ||
10 | 11 | ||
11 | /* we don't fetch messages larger than 5 MB */ | 12 | /* we don't fetch messages larger than 5 MB */ |
12 | #define HARD_MSG_SIZE_LIMIT 5242880 | 13 | #define HARD_MSG_SIZE_LIMIT 5242880 |
13 | 14 | ||
@@ -17,8 +18,10 @@ POP3wrapper::POP3wrapper( POP3account *a ) | |||
17 | account = a; | 18 | account = a; |
18 | m_pop3 = NULL; | 19 | m_pop3 = NULL; |
19 | msgTempName = a->getFileName()+"_msg_cache"; | 20 | msgTempName = a->getFileName()+"_msg_cache"; |
20 | last_msg_id = 0; | 21 | last_msg_id = 0; |
22 | m_maxsize = account->getMaxSize(); | ||
23 | m_checksize = account->getCheckMaxSize(); | ||
21 | } | 24 | } |
22 | 25 | ||
23 | POP3wrapper::~POP3wrapper() { | 26 | POP3wrapper::~POP3wrapper() { |
24 | logout(); | 27 | logout(); |
@@ -28,9 +31,9 @@ POP3wrapper::~POP3wrapper() { | |||
28 | } | 31 | } |
29 | } | 32 | } |
30 | 33 | ||
31 | void POP3wrapper::pop3_progress( size_t current, size_t maximum ) { | 34 | void POP3wrapper::pop3_progress( size_t current, size_t maximum ) { |
32 | odebug << "POP3: " << current << " of " << maximum << "" << oendl; | 35 | odebug << "POP3: " << current << " of " << maximum << "" << oendl; |
33 | } | 36 | } |
34 | 37 | ||
35 | RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { | 38 | RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { |
36 | int err = MAILPOP3_NO_ERROR; | 39 | int err = MAILPOP3_NO_ERROR; |
@@ -44,11 +47,15 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { | |||
44 | return body; | 47 | return body; |
45 | } | 48 | } |
46 | 49 | ||
47 | mailmessage * mailmsg; | 50 | mailmessage * mailmsg; |
48 | if (mail->Msgsize()>HARD_MSG_SIZE_LIMIT) { | 51 | if (mail->Msgsize()/1024>m_maxsize && m_checksize && mail->getNumber()!=last_msg_id) { |
49 | odebug << "Message to large: " << mail->Msgsize() << "" << oendl; | 52 | QString quest = QString(tr("Download mail?\nIt is %1 kByte but your limit is %2 kByte")).arg(mail->Msgsize()/1024).arg(m_maxsize); |
50 | return body; | 53 | int yesno = QMessageBox::warning(0,tr("Download message"), |
54 | quest,tr("Yes"),tr("No"),QString::null,0,1); | ||
55 | odebug << "Message to large: " << mail->Msgsize() << "" << oendl; | ||
56 | if (yesno==1) | ||
57 | return body; | ||
51 | } | 58 | } |
52 | 59 | ||
53 | QFile msg_cache(msgTempName); | 60 | QFile msg_cache(msgTempName); |
54 | 61 | ||
@@ -130,9 +137,9 @@ void POP3wrapper::login() | |||
130 | user = login.getUser().latin1(); | 137 | user = login.getUser().latin1(); |
131 | pass = login.getPassword().latin1(); | 138 | pass = login.getPassword().latin1(); |
132 | } else { | 139 | } else { |
133 | // cancel | 140 | // cancel |
134 | odebug << "POP3: Login canceled" << oendl; | 141 | odebug << "POP3: Login canceled" << oendl; |
135 | return; | 142 | return; |
136 | } | 143 | } |
137 | } else { | 144 | } else { |
138 | user = account->getUser().latin1(); | 145 | user = account->getUser().latin1(); |
@@ -162,9 +169,9 @@ void POP3wrapper::login() | |||
162 | 169 | ||
163 | 170 | ||
164 | err = mailstorage_connect(m_pop3); | 171 | err = mailstorage_connect(m_pop3); |
165 | if (err != MAIL_NO_ERROR) { | 172 | if (err != MAIL_NO_ERROR) { |
166 | odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl; | 173 | odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl; |
167 | Global::statusMessage(tr("Error initializing folder")); | 174 | Global::statusMessage(tr("Error initializing folder")); |
168 | mailstorage_free(m_pop3); | 175 | mailstorage_free(m_pop3); |
169 | m_pop3 = 0; | 176 | m_pop3 = 0; |
170 | } else { | 177 | } else { |
@@ -236,9 +243,9 @@ void POP3wrapper::statusFolder(folderStat&target_stat,const QString&) { | |||
236 | return; | 243 | return; |
237 | int r = mailsession_status_folder(m_pop3->sto_session,0,&target_stat.message_count, | 244 | int r = mailsession_status_folder(m_pop3->sto_session,0,&target_stat.message_count, |
238 | &target_stat.message_recent,&target_stat.message_unseen); | 245 | &target_stat.message_recent,&target_stat.message_unseen); |
239 | if (r != MAIL_NO_ERROR) { | 246 | if (r != MAIL_NO_ERROR) { |
240 | odebug << "error getting folter status." << oendl; | 247 | odebug << "error getting folter status." << oendl; |
241 | } | 248 | } |
242 | } | 249 | } |
243 | 250 | ||
244 | encodedString* POP3wrapper::fetchRawBody(const RecMailP&mail) { | 251 | encodedString* POP3wrapper::fetchRawBody(const RecMailP&mail) { |
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.h b/noncore/net/mail/libmailwrapper/pop3wrapper.h index 5101fa5..8c36cf9 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.h +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.h | |||
@@ -36,7 +36,9 @@ public: | |||
36 | protected: | 36 | protected: |
37 | void login(); | 37 | void login(); |
38 | POP3account *account; | 38 | POP3account *account; |
39 | mailstorage*m_pop3; | 39 | mailstorage*m_pop3; |
40 | int m_maxsize; | ||
41 | bool m_checksize; | ||
40 | }; | 42 | }; |
41 | 43 | ||
42 | #endif | 44 | #endif |
diff --git a/noncore/net/mail/libmailwrapper/settings.cpp b/noncore/net/mail/libmailwrapper/settings.cpp index 3c9b25c..09be91b 100644 --- a/noncore/net/mail/libmailwrapper/settings.cpp +++ b/noncore/net/mail/libmailwrapper/settings.cpp | |||
@@ -15,9 +15,8 @@ | |||
15 | #define POP3_SSL_PORT "995" | 15 | #define POP3_SSL_PORT "995" |
16 | #define NNTP_PORT "119" | 16 | #define NNTP_PORT "119" |
17 | #define NNTP_SSL_PORT "563" | 17 | #define NNTP_SSL_PORT "563" |
18 | 18 | ||
19 | |||
20 | Settings::Settings() | 19 | Settings::Settings() |
21 | : QObject() | 20 | : QObject() |
22 | { | 21 | { |
23 | updateAccounts(); | 22 | updateAccounts(); |
@@ -26,9 +25,9 @@ Settings::Settings() | |||
26 | void Settings::checkDirectory() | 25 | void Settings::checkDirectory() |
27 | { | 26 | { |
28 | if ( !QDir( (QString) getenv( "HOME" ) + "/Applications/opiemail/" ).exists() ) { | 27 | if ( !QDir( (QString) getenv( "HOME" ) + "/Applications/opiemail/" ).exists() ) { |
29 | system( "mkdir -p $HOME/Applications/opiemail" ); | 28 | system( "mkdir -p $HOME/Applications/opiemail" ); |
30 | odebug << "$HOME/Applications/opiemail created" << oendl; | 29 | odebug << "$HOME/Applications/opiemail created" << oendl; |
31 | } | 30 | } |
32 | } | 31 | } |
33 | 32 | ||
34 | QList<Account> Settings::getAccounts() | 33 | QList<Account> Settings::getAccounts() |
@@ -54,30 +53,30 @@ void Settings::updateAccounts() | |||
54 | QStringList::Iterator it; | 53 | QStringList::Iterator it; |
55 | 54 | ||
56 | QStringList imap = dir.entryList( "imap-*" ); | 55 | QStringList imap = dir.entryList( "imap-*" ); |
57 | for ( it = imap.begin(); it != imap.end(); it++ ) { | 56 | for ( it = imap.begin(); it != imap.end(); it++ ) { |
58 | odebug << "Added IMAP account" << oendl; | 57 | odebug << "Added IMAP account" << oendl; |
59 | IMAPaccount *account = new IMAPaccount( (*it).replace(0, 5, "") ); | 58 | IMAPaccount *account = new IMAPaccount( (*it).replace(0, 5, "") ); |
60 | accounts.append( account ); | 59 | accounts.append( account ); |
61 | } | 60 | } |
62 | 61 | ||
63 | QStringList pop3 = dir.entryList( "pop3-*" ); | 62 | QStringList pop3 = dir.entryList( "pop3-*" ); |
64 | for ( it = pop3.begin(); it != pop3.end(); it++ ) { | 63 | for ( it = pop3.begin(); it != pop3.end(); it++ ) { |
65 | odebug << "Added POP account" << oendl; | 64 | odebug << "Added POP account" << oendl; |
66 | POP3account *account = new POP3account( (*it).replace(0, 5, "") ); | 65 | POP3account *account = new POP3account( (*it).replace(0, 5, "") ); |
67 | accounts.append( account ); | 66 | accounts.append( account ); |
68 | } | 67 | } |
69 | 68 | ||
70 | QStringList smtp = dir.entryList( "smtp-*" ); | 69 | QStringList smtp = dir.entryList( "smtp-*" ); |
71 | for ( it = smtp.begin(); it != smtp.end(); it++ ) { | 70 | for ( it = smtp.begin(); it != smtp.end(); it++ ) { |
72 | odebug << "Added SMTP account" << oendl; | 71 | odebug << "Added SMTP account" << oendl; |
73 | SMTPaccount *account = new SMTPaccount( (*it).replace(0, 5, "") ); | 72 | SMTPaccount *account = new SMTPaccount( (*it).replace(0, 5, "") ); |
74 | accounts.append( account ); | 73 | accounts.append( account ); |
75 | } | 74 | } |
76 | 75 | ||
77 | QStringList nntp = dir.entryList( "nntp-*" ); | 76 | QStringList nntp = dir.entryList( "nntp-*" ); |
78 | for ( it = nntp.begin(); it != nntp.end(); it++ ) { | 77 | for ( it = nntp.begin(); it != nntp.end(); it++ ) { |
79 | odebug << "Added NNTP account" << oendl; | 78 | odebug << "Added NNTP account" << oendl; |
80 | NNTPaccount *account = new NNTPaccount( (*it).replace(0, 5, "") ); | 79 | NNTPaccount *account = new NNTPaccount( (*it).replace(0, 5, "") ); |
81 | accounts.append( account ); | 80 | accounts.append( account ); |
82 | } | 81 | } |
83 | 82 | ||
@@ -179,9 +178,9 @@ void IMAPaccount::read() | |||
179 | } | 178 | } |
180 | 179 | ||
181 | void IMAPaccount::save() | 180 | void IMAPaccount::save() |
182 | { | 181 | { |
183 | odebug << "saving " + getFileName() << oendl; | 182 | odebug << "saving " + getFileName() << oendl; |
184 | Settings::checkDirectory(); | 183 | Settings::checkDirectory(); |
185 | 184 | ||
186 | Config *conf = new Config( getFileName(), Config::File ); | 185 | Config *conf = new Config( getFileName(), Config::File ); |
187 | conf->setGroup( "IMAP Account" ); | 186 | conf->setGroup( "IMAP Account" ); |
@@ -212,8 +211,10 @@ POP3account::POP3account() | |||
212 | ssl = false; | 211 | ssl = false; |
213 | connectionType = 1; | 212 | connectionType = 1; |
214 | type = MAILLIB::A_POP3; | 213 | type = MAILLIB::A_POP3; |
215 | port = POP3_PORT; | 214 | port = POP3_PORT; |
215 | m_CheckSize = true; | ||
216 | m_MaxSize = 1024; | ||
216 | } | 217 | } |
217 | 218 | ||
218 | POP3account::POP3account( QString filename ) | 219 | POP3account::POP3account( QString filename ) |
219 | : Account() | 220 | : Account() |
@@ -223,8 +224,10 @@ POP3account::POP3account( QString filename ) | |||
223 | ssl = false; | 224 | ssl = false; |
224 | connectionType = 1; | 225 | connectionType = 1; |
225 | type = MAILLIB::A_POP3; | 226 | type = MAILLIB::A_POP3; |
226 | port = POP3_PORT; | 227 | port = POP3_PORT; |
228 | m_CheckSize = true; | ||
229 | m_MaxSize = 1024; | ||
227 | } | 230 | } |
228 | 231 | ||
229 | QString POP3account::getUniqueFileName() | 232 | QString POP3account::getUniqueFileName() |
230 | { | 233 | { |
@@ -252,14 +255,16 @@ void POP3account::read() | |||
252 | connectionType = conf->readNumEntry( "ConnectionType" ); | 255 | connectionType = conf->readNumEntry( "ConnectionType" ); |
253 | user = conf->readEntry( "User" ); | 256 | user = conf->readEntry( "User" ); |
254 | password = conf->readEntryCrypt( "Password" ); | 257 | password = conf->readEntryCrypt( "Password" ); |
255 | offline = conf->readBoolEntry("Offline",false); | 258 | offline = conf->readBoolEntry("Offline",false); |
259 | m_CheckSize = conf->readBoolEntry("Checkmaxsize",true); | ||
260 | m_MaxSize = conf->readNumEntry("Maxsize",1024); | ||
256 | delete conf; | 261 | delete conf; |
257 | } | 262 | } |
258 | 263 | ||
259 | void POP3account::save() | 264 | void POP3account::save() |
260 | { | 265 | { |
261 | odebug << "saving " + getFileName() << oendl; | 266 | odebug << "saving " + getFileName() << oendl; |
262 | Settings::checkDirectory(); | 267 | Settings::checkDirectory(); |
263 | 268 | ||
264 | Config *conf = new Config( getFileName(), Config::File ); | 269 | Config *conf = new Config( getFileName(), Config::File ); |
265 | conf->setGroup( "POP3 Account" ); | 270 | conf->setGroup( "POP3 Account" ); |
@@ -270,8 +275,10 @@ void POP3account::save() | |||
270 | conf->writeEntry( "ConnectionType", connectionType ); | 275 | conf->writeEntry( "ConnectionType", connectionType ); |
271 | conf->writeEntry( "User", user ); | 276 | conf->writeEntry( "User", user ); |
272 | conf->writeEntryCrypt( "Password", password ); | 277 | conf->writeEntryCrypt( "Password", password ); |
273 | conf->writeEntry( "Offline",offline); | 278 | conf->writeEntry( "Offline",offline); |
279 | conf->writeEntry("Checkmaxsize",m_CheckSize); | ||
280 | conf->writeEntry("Maxsize",m_MaxSize); | ||
274 | conf->write(); | 281 | conf->write(); |
275 | delete conf; | 282 | delete conf; |
276 | } | 283 | } |
277 | 284 | ||
@@ -280,8 +287,28 @@ QString POP3account::getFileName() | |||
280 | { | 287 | { |
281 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/pop3-" + file; | 288 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/pop3-" + file; |
282 | } | 289 | } |
283 | 290 | ||
291 | bool POP3account::getCheckMaxSize()const | ||
292 | { | ||
293 | return m_CheckSize; | ||
294 | } | ||
295 | |||
296 | void POP3account::setCheckMaxSize(bool aValue) | ||
297 | { | ||
298 | m_CheckSize = aValue; | ||
299 | } | ||
300 | |||
301 | int POP3account::getMaxSize()const | ||
302 | { | ||
303 | return m_MaxSize; | ||
304 | } | ||
305 | |||
306 | void POP3account::setMaxSize(int aValue) | ||
307 | { | ||
308 | m_MaxSize = aValue; | ||
309 | } | ||
310 | |||
284 | SMTPaccount::SMTPaccount() | 311 | SMTPaccount::SMTPaccount() |
285 | : Account() | 312 | : Account() |
286 | { | 313 | { |
287 | file = SMTPaccount::getUniqueFileName(); | 314 | file = SMTPaccount::getUniqueFileName(); |
@@ -339,9 +366,9 @@ void SMTPaccount::read() | |||
339 | } | 366 | } |
340 | 367 | ||
341 | void SMTPaccount::save() | 368 | void SMTPaccount::save() |
342 | { | 369 | { |
343 | odebug << "saving " + getFileName() << oendl; | 370 | odebug << "saving " + getFileName() << oendl; |
344 | Settings::checkDirectory(); | 371 | Settings::checkDirectory(); |
345 | 372 | ||
346 | Config *conf = new Config( getFileName(), Config::File ); | 373 | Config *conf = new Config( getFileName(), Config::File ); |
347 | conf->setGroup( "SMTP Account" ); | 374 | conf->setGroup( "SMTP Account" ); |
@@ -416,9 +443,9 @@ void NNTPaccount::read() | |||
416 | } | 443 | } |
417 | 444 | ||
418 | void NNTPaccount::save() | 445 | void NNTPaccount::save() |
419 | { | 446 | { |
420 | odebug << "saving " + getFileName() << oendl; | 447 | odebug << "saving " + getFileName() << oendl; |
421 | Settings::checkDirectory(); | 448 | Settings::checkDirectory(); |
422 | 449 | ||
423 | Config *conf = new Config( getFileName(), Config::File ); | 450 | Config *conf = new Config( getFileName(), Config::File ); |
424 | conf->setGroup( "NNTP Account" ); | 451 | conf->setGroup( "NNTP Account" ); |
diff --git a/noncore/net/mail/libmailwrapper/settings.h b/noncore/net/mail/libmailwrapper/settings.h index bf27b97..8683a05 100644 --- a/noncore/net/mail/libmailwrapper/settings.h +++ b/noncore/net/mail/libmailwrapper/settings.h | |||
@@ -88,12 +88,17 @@ public: | |||
88 | 88 | ||
89 | virtual void read(); | 89 | virtual void read(); |
90 | virtual void save(); | 90 | virtual void save(); |
91 | virtual QString getFileName(); | 91 | virtual QString getFileName(); |
92 | virtual bool getCheckMaxSize()const; | ||
93 | virtual void setCheckMaxSize(bool); | ||
94 | virtual int getMaxSize()const; | ||
95 | virtual void setMaxSize(int); | ||
92 | 96 | ||
93 | private: | 97 | private: |
94 | QString file; | 98 | QString file; |
95 | 99 | bool m_CheckSize; | |
100 | int m_MaxSize; | ||
96 | }; | 101 | }; |
97 | 102 | ||
98 | class SMTPaccount : public Account | 103 | class SMTPaccount : public Account |
99 | { | 104 | { |
diff --git a/noncore/net/mail/pop3configui.ui b/noncore/net/mail/pop3configui.ui index 1014ef4..e560661 100644 --- a/noncore/net/mail/pop3configui.ui +++ b/noncore/net/mail/pop3configui.ui | |||
@@ -10,9 +10,9 @@ | |||
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>314</width> | 14 | <width>302</width> |
15 | <height>410</height> | 15 | <height>410</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
@@ -27,13 +27,13 @@ | |||
27 | </property> | 27 | </property> |
28 | <vbox> | 28 | <vbox> |
29 | <property stdset="1"> | 29 | <property stdset="1"> |
30 | <name>margin</name> | 30 | <name>margin</name> |
31 | <number>3</number> | 31 | <number>11</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>6</number> |
36 | </property> | 36 | </property> |
37 | <widget> | 37 | <widget> |
38 | <class>QLayoutWidget</class> | 38 | <class>QLayoutWidget</class> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
@@ -318,8 +318,66 @@ | |||
318 | </vbox> | 318 | </vbox> |
319 | </widget> | 319 | </widget> |
320 | </hbox> | 320 | </hbox> |
321 | </widget> | 321 | </widget> |
322 | <widget> | ||
323 | <class>QCheckBox</class> | ||
324 | <property stdset="1"> | ||
325 | <name>name</name> | ||
326 | <cstring>m_CheckSize</cstring> | ||
327 | </property> | ||
328 | <property stdset="1"> | ||
329 | <name>text</name> | ||
330 | <string>ask before downloading large mails</string> | ||
331 | </property> | ||
332 | </widget> | ||
333 | <widget> | ||
334 | <class>QLayoutWidget</class> | ||
335 | <property stdset="1"> | ||
336 | <name>name</name> | ||
337 | <cstring>Layout9</cstring> | ||
338 | </property> | ||
339 | <grid> | ||
340 | <property stdset="1"> | ||
341 | <name>margin</name> | ||
342 | <number>0</number> | ||
343 | </property> | ||
344 | <property stdset="1"> | ||
345 | <name>spacing</name> | ||
346 | <number>6</number> | ||
347 | </property> | ||
348 | <widget row="0" column="0" > | ||
349 | <class>QLabel</class> | ||
350 | <property stdset="1"> | ||
351 | <name>name</name> | ||
352 | <cstring>m_MailLimitLabel</cstring> | ||
353 | </property> | ||
354 | <property stdset="1"> | ||
355 | <name>text</name> | ||
356 | <string>Large mail size (kb):</string> | ||
357 | </property> | ||
358 | </widget> | ||
359 | <widget row="0" column="1" > | ||
360 | <class>QSpinBox</class> | ||
361 | <property stdset="1"> | ||
362 | <name>name</name> | ||
363 | <cstring>m_MailLimitBox</cstring> | ||
364 | </property> | ||
365 | <property stdset="1"> | ||
366 | <name>suffix</name> | ||
367 | <string> kB</string> | ||
368 | </property> | ||
369 | <property stdset="1"> | ||
370 | <name>maxValue</name> | ||
371 | <number>5120</number> | ||
372 | </property> | ||
373 | <property stdset="1"> | ||
374 | <name>minValue</name> | ||
375 | <number>1</number> | ||
376 | </property> | ||
377 | </widget> | ||
378 | </grid> | ||
379 | </widget> | ||
322 | <spacer> | 380 | <spacer> |
323 | <property> | 381 | <property> |
324 | <name>name</name> | 382 | <name>name</name> |
325 | <cstring>spacer</cstring> | 383 | <cstring>spacer</cstring> |
@@ -345,8 +403,12 @@ | |||
345 | <tabstops> | 403 | <tabstops> |
346 | <tabstop>accountLine</tabstop> | 404 | <tabstop>accountLine</tabstop> |
347 | <tabstop>serverLine</tabstop> | 405 | <tabstop>serverLine</tabstop> |
348 | <tabstop>portLine</tabstop> | 406 | <tabstop>portLine</tabstop> |
407 | <tabstop>ComboBox1</tabstop> | ||
408 | <tabstop>CommandEdit</tabstop> | ||
349 | <tabstop>userLine</tabstop> | 409 | <tabstop>userLine</tabstop> |
350 | <tabstop>passLine</tabstop> | 410 | <tabstop>passLine</tabstop> |
411 | <tabstop>m_CheckSize</tabstop> | ||
412 | <tabstop>m_MailLimitBox</tabstop> | ||
351 | </tabstops> | 413 | </tabstops> |
352 | </UI> | 414 | </UI> |