Diffstat (limited to 'noncore/net/mail/accountview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/accountview.cpp | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index d9792d4..2ddf834 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp | |||
@@ -1 +1,2 @@ | |||
1 | |||
1 | #include "accountview.h" | 2 | #include "accountview.h" |
@@ -3,4 +4,4 @@ | |||
3 | #include "selectstore.h" | 4 | #include "selectstore.h" |
4 | #include <qmessagebox.h> | 5 | |
5 | #include <qpopupmenu.h> | 6 | /* OPIE */ |
6 | #include <libmailwrapper/settings.h> | 7 | #include <libmailwrapper/settings.h> |
@@ -9,3 +10,7 @@ | |||
9 | #include <libmailwrapper/abstractmail.h> | 10 | #include <libmailwrapper/abstractmail.h> |
11 | #include <qpe/qpeapplication.h> | ||
10 | 12 | ||
13 | /* QT */ | ||
14 | #include <qmessagebox.h> | ||
15 | #include <qpopupmenu.h> | ||
11 | 16 | ||
@@ -57,4 +62,6 @@ void AccountView::populate( QList<Account> list ) | |||
57 | Account *it; | 62 | Account *it; |
58 | for ( it = list.first(); it; it = list.next() ) { | 63 | for ( it = list.first(); it; it = list.next() ) |
59 | if ( it->getType().compare( "IMAP" ) == 0 ) { | 64 | { |
65 | if ( it->getType().compare( "IMAP" ) == 0 ) | ||
66 | { | ||
60 | IMAPaccount *imap = static_cast<IMAPaccount *>(it); | 67 | IMAPaccount *imap = static_cast<IMAPaccount *>(it); |
@@ -62,3 +69,5 @@ void AccountView::populate( QList<Account> list ) | |||
62 | imapAccounts.append(new IMAPviewItem( imap, this )); | 69 | imapAccounts.append(new IMAPviewItem( imap, this )); |
63 | } else if ( it->getType().compare( "POP3" ) == 0 ) { | 70 | } |
71 | else if ( it->getType().compare( "POP3" ) == 0 ) | ||
72 | { | ||
64 | POP3account *pop3 = static_cast<POP3account *>(it); | 73 | POP3account *pop3 = static_cast<POP3account *>(it); |
@@ -71,6 +80,8 @@ void AccountView::populate( QList<Account> list ) | |||
71 | 80 | ||
72 | void AccountView::refresh(QListViewItem *item) { | 81 | void AccountView::refresh(QListViewItem *item) |
82 | { | ||
73 | 83 | ||
74 | qDebug("AccountView refresh..."); | 84 | qDebug("AccountView refresh..."); |
75 | if ( item ) { | 85 | if ( item ) |
86 | { | ||
76 | m_currentItem = item; | 87 | m_currentItem = item; |
@@ -97,3 +108,2 @@ void AccountView::refreshAll() | |||
97 | { | 108 | { |
98 | |||
99 | } | 109 | } |
@@ -110,6 +120,7 @@ void AccountView::setupFolderselect(Selectstore*sels) | |||
110 | { | 120 | { |
111 | sels->showMaximized(); | 121 | QPEApplication::showDialog( sels ); |
112 | QStringList sFolders; | 122 | QStringList sFolders; |
113 | unsigned int i = 0; | 123 | unsigned int i = 0; |
114 | for (i=0; i < mhAccounts.count();++i) { | 124 | for (i=0; i < mhAccounts.count();++i) |
125 | { | ||
115 | mhAccounts[i]->refresh(false); | 126 | mhAccounts[i]->refresh(false); |
@@ -118,3 +129,4 @@ void AccountView::setupFolderselect(Selectstore*sels) | |||
118 | } | 129 | } |
119 | for (i=0; i < imapAccounts.count();++i) { | 130 | for (i=0; i < imapAccounts.count();++i) |
131 | { | ||
120 | if (imapAccounts[i]->offline()) | 132 | if (imapAccounts[i]->offline()) |
@@ -136,6 +148,8 @@ void AccountView::downloadMails(Folder*fromFolder,AbstractMail*fromWrapper) | |||
136 | if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) || | 148 | if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) || |
137 | targetFolder.isEmpty()) { | 149 | targetFolder.isEmpty()) |
150 | { | ||
138 | return; | 151 | return; |
139 | } | 152 | } |
140 | if (sels.newFolder() && !targetMail->createMbox(targetFolder)) { | 153 | if (sels.newFolder() && !targetMail->createMbox(targetFolder)) |
154 | { | ||
141 | QMessageBox::critical(0,tr("Error creating new Folder"), | 155 | QMessageBox::critical(0,tr("Error creating new Folder"), |