-rw-r--r-- | noncore/net/mail/accountview.cpp | 12 | ||||
-rw-r--r-- | noncore/net/mail/defines.h | 6 | ||||
-rw-r--r-- | pics/mail/imapfolder.png | bin | 767 -> 470 bytes | |||
-rw-r--r-- | pics/mail/inbox.png | bin | 616 -> 783 bytes | |||
-rw-r--r-- | pics/mail/localfolder.png | bin | 0 -> 736 bytes | |||
-rw-r--r-- | pics/mail/mboxfolder.png | bin | 0 -> 473 bytes | |||
-rw-r--r-- | pics/mail/outbox.png | bin | 0 -> 769 bytes | |||
-rw-r--r-- | pics/mail/pop3folder.png | bin | 701 -> 520 bytes |
8 files changed, 13 insertions, 5 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index 6bc8b8b..59e8bc0 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp | |||
@@ -54,326 +54,328 @@ RecBody POP3viewItem::fetchBody( const RecMail &mail ) | |||
54 | } | 54 | } |
55 | 55 | ||
56 | POP3folderItem::~POP3folderItem() | 56 | POP3folderItem::~POP3folderItem() |
57 | { | 57 | { |
58 | delete folder; | 58 | delete folder; |
59 | } | 59 | } |
60 | 60 | ||
61 | POP3folderItem::POP3folderItem( Folder *folderInit, POP3viewItem *parent , QListViewItem*after ) | 61 | POP3folderItem::POP3folderItem( Folder *folderInit, POP3viewItem *parent , QListViewItem*after ) |
62 | : AccountViewItem( parent,after ) | 62 | : AccountViewItem( parent,after ) |
63 | { | 63 | { |
64 | folder = folderInit; | 64 | folder = folderInit; |
65 | pop3 = parent; | 65 | pop3 = parent; |
66 | if (folder->getDisplayName().lower()!="inbox") { | 66 | if (folder->getDisplayName().lower()!="inbox") { |
67 | setPixmap( 0, PIXMAP_POP3FOLDER ); | 67 | setPixmap( 0, PIXMAP_POP3FOLDER ); |
68 | } else { | 68 | } else { |
69 | setPixmap( 0, PIXMAP_INBOXFOLDER); | 69 | setPixmap( 0, PIXMAP_INBOXFOLDER); |
70 | } | 70 | } |
71 | setText( 0, folder->getDisplayName() ); | 71 | setText( 0, folder->getDisplayName() ); |
72 | } | 72 | } |
73 | 73 | ||
74 | void POP3folderItem::refresh(QList<RecMail>&target) | 74 | void POP3folderItem::refresh(QList<RecMail>&target) |
75 | { | 75 | { |
76 | if (folder->may_select()) | 76 | if (folder->may_select()) |
77 | pop3->getWrapper()->listMessages( folder->getName(),target ); | 77 | pop3->getWrapper()->listMessages( folder->getName(),target ); |
78 | } | 78 | } |
79 | 79 | ||
80 | RecBody POP3folderItem::fetchBody(const RecMail&aMail) | 80 | RecBody POP3folderItem::fetchBody(const RecMail&aMail) |
81 | { | 81 | { |
82 | return pop3->getWrapper()->fetchBody(aMail); | 82 | return pop3->getWrapper()->fetchBody(aMail); |
83 | } | 83 | } |
84 | 84 | ||
85 | /** | 85 | /** |
86 | * IMAP Account stuff | 86 | * IMAP Account stuff |
87 | */ | 87 | */ |
88 | IMAPviewItem::IMAPviewItem( IMAPaccount *a, QListView *parent ) | 88 | IMAPviewItem::IMAPviewItem( IMAPaccount *a, QListView *parent ) |
89 | : AccountViewItem( parent ) | 89 | : AccountViewItem( parent ) |
90 | { | 90 | { |
91 | account = a; | 91 | account = a; |
92 | wrapper = AbstractMail::getWrapper( account ); | 92 | wrapper = AbstractMail::getWrapper( account ); |
93 | setPixmap( 0, PIXMAP_IMAPFOLDER ); | 93 | setPixmap( 0, PIXMAP_IMAPFOLDER ); |
94 | setText( 0, account->getAccountName() ); | 94 | setText( 0, account->getAccountName() ); |
95 | setOpen( true ); | 95 | setOpen( true ); |
96 | } | 96 | } |
97 | 97 | ||
98 | IMAPviewItem::~IMAPviewItem() | 98 | IMAPviewItem::~IMAPviewItem() |
99 | { | 99 | { |
100 | delete wrapper; | 100 | delete wrapper; |
101 | } | 101 | } |
102 | 102 | ||
103 | AbstractMail *IMAPviewItem::getWrapper() | 103 | AbstractMail *IMAPviewItem::getWrapper() |
104 | { | 104 | { |
105 | return wrapper; | 105 | return wrapper; |
106 | } | 106 | } |
107 | 107 | ||
108 | IMAPfolderItem*IMAPviewItem::findSubItem(const QString&path,IMAPfolderItem*start) | 108 | IMAPfolderItem*IMAPviewItem::findSubItem(const QString&path,IMAPfolderItem*start) |
109 | { | 109 | { |
110 | IMAPfolderItem*pitem,*sitem; | 110 | IMAPfolderItem*pitem,*sitem; |
111 | if (!start) pitem = (IMAPfolderItem*)firstChild(); | 111 | if (!start) pitem = (IMAPfolderItem*)firstChild(); |
112 | else pitem = (IMAPfolderItem*)start->firstChild(); | 112 | else pitem = (IMAPfolderItem*)start->firstChild(); |
113 | while (pitem) { | 113 | while (pitem) { |
114 | if (pitem->matchName(path)) { | 114 | if (pitem->matchName(path)) { |
115 | break; | 115 | break; |
116 | } | 116 | } |
117 | if (pitem->childCount()>0) { | 117 | if (pitem->childCount()>0) { |
118 | sitem = findSubItem(path,pitem); | 118 | sitem = findSubItem(path,pitem); |
119 | if (sitem) { | 119 | if (sitem) { |
120 | pitem = sitem; | 120 | pitem = sitem; |
121 | break; | 121 | break; |
122 | } | 122 | } |
123 | } | 123 | } |
124 | pitem=(IMAPfolderItem*)pitem->nextSibling(); | 124 | pitem=(IMAPfolderItem*)pitem->nextSibling(); |
125 | } | 125 | } |
126 | return pitem; | 126 | return pitem; |
127 | } | 127 | } |
128 | 128 | ||
129 | void IMAPviewItem::refresh(QList<RecMail>&) | 129 | void IMAPviewItem::refresh(QList<RecMail>&) |
130 | { | 130 | { |
131 | if (childCount()>0) return; | 131 | if (childCount()>0) return; |
132 | QList<Folder> *folders = wrapper->listFolders(); | 132 | QList<Folder> *folders = wrapper->listFolders(); |
133 | 133 | ||
134 | QListViewItem *child = firstChild(); | 134 | QListViewItem *child = firstChild(); |
135 | while ( child ) { | 135 | while ( child ) { |
136 | QListViewItem *tmp = child; | 136 | QListViewItem *tmp = child; |
137 | child = child->nextSibling(); | 137 | child = child->nextSibling(); |
138 | delete tmp; | 138 | delete tmp; |
139 | } | 139 | } |
140 | 140 | ||
141 | Folder *it; | 141 | Folder *it; |
142 | QListViewItem*item = 0; | 142 | QListViewItem*item = 0; |
143 | QListViewItem*titem = 0; | 143 | QListViewItem*titem = 0; |
144 | QString fname,del,search; | 144 | QString fname,del,search; |
145 | int pos; | 145 | int pos; |
146 | // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 146 | // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
147 | folders->setAutoDelete(false); | 147 | folders->setAutoDelete(false); |
148 | 148 | ||
149 | for ( it = folders->first(); it; it = folders->next() ) { | 149 | for ( it = folders->first(); it; it = folders->next() ) { |
150 | if (it->getDisplayName().lower()=="inbox") { | 150 | if (it->getDisplayName().lower()=="inbox") { |
151 | item = new IMAPfolderItem( it, this , item ); | 151 | item = new IMAPfolderItem( it, this , item ); |
152 | folders->remove(it); | 152 | folders->remove(it); |
153 | qDebug("inbox found"); | 153 | qDebug("inbox found"); |
154 | break; | 154 | break; |
155 | } | 155 | } |
156 | } | 156 | } |
157 | for ( it = folders->first(); it; it = folders->next() ) { | 157 | for ( it = folders->first(); it; it = folders->next() ) { |
158 | fname = it->getDisplayName(); | 158 | fname = it->getDisplayName(); |
159 | pos = fname.findRev(it->Separator()); | 159 | pos = fname.findRev(it->Separator()); |
160 | if (pos != -1) { | 160 | if (pos != -1) { |
161 | fname = fname.left(pos); | 161 | fname = fname.left(pos); |
162 | } | 162 | } |
163 | IMAPfolderItem*pitem = findSubItem(fname); | 163 | IMAPfolderItem*pitem = findSubItem(fname); |
164 | if (pitem) { | 164 | if (pitem) { |
165 | titem = item; | 165 | titem = item; |
166 | item = new IMAPfolderItem(it,pitem,pitem->firstChild(),this); | 166 | item = new IMAPfolderItem(it,pitem,pitem->firstChild(),this); |
167 | item->setSelectable(it->may_select()); | 167 | item->setSelectable(it->may_select()); |
168 | /* setup the short name */ | 168 | /* setup the short name */ |
169 | item->setText(0,it->getDisplayName().right(it->getDisplayName().length()-pos-1)); | 169 | item->setText(0,it->getDisplayName().right(it->getDisplayName().length()-pos-1)); |
170 | item = titem; | 170 | item = titem; |
171 | } else { | 171 | } else { |
172 | item = new IMAPfolderItem( it, this , item ); | 172 | item = new IMAPfolderItem( it, this , item ); |
173 | item->setSelectable(it->may_select()); | 173 | item->setSelectable(it->may_select()); |
174 | } | 174 | } |
175 | } | 175 | } |
176 | delete folders; | 176 | delete folders; |
177 | } | 177 | } |
178 | 178 | ||
179 | RecBody IMAPviewItem::fetchBody(const RecMail&) | 179 | RecBody IMAPviewItem::fetchBody(const RecMail&) |
180 | { | 180 | { |
181 | return RecBody(); | 181 | return RecBody(); |
182 | } | 182 | } |
183 | 183 | ||
184 | IMAPfolderItem::~IMAPfolderItem() | 184 | IMAPfolderItem::~IMAPfolderItem() |
185 | { | 185 | { |
186 | delete folder; | 186 | delete folder; |
187 | } | 187 | } |
188 | 188 | ||
189 | IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPviewItem *parent , QListViewItem*after ) | 189 | IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPviewItem *parent , QListViewItem*after ) |
190 | : AccountViewItem( parent , after ) | 190 | : AccountViewItem( parent , after ) |
191 | { | 191 | { |
192 | folder = folderInit; | 192 | folder = folderInit; |
193 | imap = parent; | 193 | imap = parent; |
194 | if (folder->getDisplayName().lower()!="inbox") { | 194 | if (folder->getDisplayName().lower()!="inbox") { |
195 | setPixmap( 0, PIXMAP_IMAPFOLDER ); | 195 | setPixmap( 0, PIXMAP_IMAPFOLDER ); |
196 | } else { | 196 | } else { |
197 | setPixmap( 0, PIXMAP_INBOXFOLDER); | 197 | setPixmap( 0, PIXMAP_INBOXFOLDER); |
198 | } | 198 | } |
199 | setText( 0, folder->getDisplayName() ); | 199 | setText( 0, folder->getDisplayName() ); |
200 | } | 200 | } |
201 | 201 | ||
202 | IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ) | 202 | IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ) |
203 | : AccountViewItem( parent,after ) | 203 | : AccountViewItem( parent,after ) |
204 | { | 204 | { |
205 | folder = folderInit; | 205 | folder = folderInit; |
206 | imap = master; | 206 | imap = master; |
207 | if (folder->getDisplayName().lower()!="inbox") { | 207 | if (folder->getDisplayName().lower()!="inbox") { |
208 | setPixmap( 0, PIXMAP_IMAPFOLDER ); | 208 | setPixmap( 0, PIXMAP_IMAPFOLDER ); |
209 | } else { | 209 | } else { |
210 | setPixmap( 0, PIXMAP_INBOXFOLDER); | 210 | setPixmap( 0, PIXMAP_INBOXFOLDER); |
211 | } | 211 | } |
212 | setText( 0, folder->getDisplayName() ); | 212 | setText( 0, folder->getDisplayName() ); |
213 | } | 213 | } |
214 | 214 | ||
215 | bool IMAPfolderItem::matchName(const QString&name)const | 215 | bool IMAPfolderItem::matchName(const QString&name)const |
216 | { | 216 | { |
217 | return folder->getDisplayName()==name; | 217 | return folder->getDisplayName()==name; |
218 | } | 218 | } |
219 | 219 | ||
220 | void IMAPfolderItem::refresh(QList<RecMail>&target) | 220 | void IMAPfolderItem::refresh(QList<RecMail>&target) |
221 | { | 221 | { |
222 | if (folder->may_select()) | 222 | if (folder->may_select()) |
223 | imap->getWrapper()->listMessages( folder->getName(),target ); | 223 | imap->getWrapper()->listMessages( folder->getName(),target ); |
224 | } | 224 | } |
225 | 225 | ||
226 | RecBody IMAPfolderItem::fetchBody(const RecMail&aMail) | 226 | RecBody IMAPfolderItem::fetchBody(const RecMail&aMail) |
227 | { | 227 | { |
228 | return imap->getWrapper()->fetchBody(aMail); | 228 | return imap->getWrapper()->fetchBody(aMail); |
229 | } | 229 | } |
230 | 230 | ||
231 | 231 | ||
232 | /** | 232 | /** |
233 | * Generic stuff | 233 | * Generic stuff |
234 | */ | 234 | */ |
235 | 235 | ||
236 | AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) | 236 | AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) |
237 | : QListView( parent, name, flags ) | 237 | : QListView( parent, name, flags ) |
238 | { | 238 | { |
239 | connect( this, SIGNAL( selectionChanged( QListViewItem * ) ), | 239 | connect( this, SIGNAL( selectionChanged( QListViewItem * ) ), |
240 | SLOT( refresh( QListViewItem * ) ) ); | 240 | SLOT( refresh( QListViewItem * ) ) ); |
241 | setSorting(0); | 241 | setSorting(0); |
242 | } | 242 | } |
243 | 243 | ||
244 | void AccountView::populate( QList<Account> list ) | 244 | void AccountView::populate( QList<Account> list ) |
245 | { | 245 | { |
246 | clear(); | 246 | clear(); |
247 | 247 | ||
248 | QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); | 248 | QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); |
249 | (void) new MBOXviewItem(localfolders,this); | 249 | (void) new MBOXviewItem(localfolders,this); |
250 | 250 | ||
251 | Account *it; | 251 | Account *it; |
252 | for ( it = list.first(); it; it = list.next() ) { | 252 | for ( it = list.first(); it; it = list.next() ) { |
253 | if ( it->getType().compare( "IMAP" ) == 0 ) { | 253 | if ( it->getType().compare( "IMAP" ) == 0 ) { |
254 | IMAPaccount *imap = static_cast<IMAPaccount *>(it); | 254 | IMAPaccount *imap = static_cast<IMAPaccount *>(it); |
255 | qDebug( "added IMAP " + imap->getAccountName() ); | 255 | qDebug( "added IMAP " + imap->getAccountName() ); |
256 | (void) new IMAPviewItem( imap, this ); | 256 | (void) new IMAPviewItem( imap, this ); |
257 | } else if ( it->getType().compare( "POP3" ) == 0 ) { | 257 | } else if ( it->getType().compare( "POP3" ) == 0 ) { |
258 | POP3account *pop3 = static_cast<POP3account *>(it); | 258 | POP3account *pop3 = static_cast<POP3account *>(it); |
259 | qDebug( "added POP3 " + pop3->getAccountName() ); | 259 | qDebug( "added POP3 " + pop3->getAccountName() ); |
260 | (void) new POP3viewItem( pop3, this ); | 260 | (void) new POP3viewItem( pop3, this ); |
261 | } | 261 | } |
262 | } | 262 | } |
263 | } | 263 | } |
264 | 264 | ||
265 | void AccountView::refresh(QListViewItem *item) { | 265 | void AccountView::refresh(QListViewItem *item) { |
266 | 266 | ||
267 | qDebug("AccountView refresh..."); | 267 | qDebug("AccountView refresh..."); |
268 | if ( item ) { | 268 | if ( item ) { |
269 | m_currentItem = item; | 269 | m_currentItem = item; |
270 | QList<RecMail> headerlist; | 270 | QList<RecMail> headerlist; |
271 | headerlist.setAutoDelete(true); | 271 | headerlist.setAutoDelete(true); |
272 | AccountViewItem *view = static_cast<AccountViewItem *>(item); | 272 | AccountViewItem *view = static_cast<AccountViewItem *>(item); |
273 | view->refresh(headerlist); | 273 | view->refresh(headerlist); |
274 | emit refreshMailview(&headerlist); | 274 | emit refreshMailview(&headerlist); |
275 | } | 275 | } |
276 | } | 276 | } |
277 | 277 | ||
278 | void AccountView::refreshCurrent() | 278 | void AccountView::refreshCurrent() |
279 | { | 279 | { |
280 | if ( !m_currentItem ) return; | 280 | if ( !m_currentItem ) return; |
281 | QList<RecMail> headerlist; | 281 | QList<RecMail> headerlist; |
282 | headerlist.setAutoDelete(true); | 282 | headerlist.setAutoDelete(true); |
283 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); | 283 | AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); |
284 | view->refresh(headerlist); | 284 | view->refresh(headerlist); |
285 | emit refreshMailview(&headerlist); | 285 | emit refreshMailview(&headerlist); |
286 | } | 286 | } |
287 | 287 | ||
288 | void AccountView::refreshAll() | 288 | void AccountView::refreshAll() |
289 | { | 289 | { |
290 | 290 | ||
291 | } | 291 | } |
292 | 292 | ||
293 | RecBody AccountView::fetchBody(const RecMail&aMail) | 293 | RecBody AccountView::fetchBody(const RecMail&aMail) |
294 | { | 294 | { |
295 | QListViewItem*item = selectedItem (); | 295 | QListViewItem*item = selectedItem (); |
296 | if (!item) return RecBody(); | 296 | if (!item) return RecBody(); |
297 | AccountViewItem *view = static_cast<AccountViewItem *>(item); | 297 | AccountViewItem *view = static_cast<AccountViewItem *>(item); |
298 | return view->fetchBody(aMail); | 298 | return view->fetchBody(aMail); |
299 | } | 299 | } |
300 | 300 | ||
301 | /** | 301 | /** |
302 | * MBOX Account stuff | 302 | * MBOX Account stuff |
303 | */ | 303 | */ |
304 | 304 | ||
305 | MBOXviewItem::MBOXviewItem( const QString&aPath, QListView *parent ) | 305 | MBOXviewItem::MBOXviewItem( const QString&aPath, QListView *parent ) |
306 | : AccountViewItem( parent ) | 306 | : AccountViewItem( parent ) |
307 | { | 307 | { |
308 | m_Path = aPath; | 308 | m_Path = aPath; |
309 | wrapper = AbstractMail::getWrapper( m_Path ); | 309 | wrapper = AbstractMail::getWrapper( m_Path ); |
310 | setPixmap( 0, PIXMAP_POP3FOLDER ); | 310 | setPixmap( 0, PIXMAP_LOCALFOLDER ); |
311 | setText( 0, " Local Folders" ); | 311 | setText( 0, " Local Folders" ); |
312 | setOpen( true ); | 312 | setOpen( true ); |
313 | } | 313 | } |
314 | 314 | ||
315 | MBOXviewItem::~MBOXviewItem() | 315 | MBOXviewItem::~MBOXviewItem() |
316 | { | 316 | { |
317 | delete wrapper; | 317 | delete wrapper; |
318 | } | 318 | } |
319 | 319 | ||
320 | AbstractMail *MBOXviewItem::getWrapper() | 320 | AbstractMail *MBOXviewItem::getWrapper() |
321 | { | 321 | { |
322 | return wrapper; | 322 | return wrapper; |
323 | } | 323 | } |
324 | 324 | ||
325 | void MBOXviewItem::refresh( QList<RecMail> & ) | 325 | void MBOXviewItem::refresh( QList<RecMail> & ) |
326 | { | 326 | { |
327 | QList<Folder> *folders = wrapper->listFolders(); | 327 | QList<Folder> *folders = wrapper->listFolders(); |
328 | QListViewItem *child = firstChild(); | 328 | QListViewItem *child = firstChild(); |
329 | while ( child ) { | 329 | while ( child ) { |
330 | QListViewItem *tmp = child; | 330 | QListViewItem *tmp = child; |
331 | child = child->nextSibling(); | 331 | child = child->nextSibling(); |
332 | delete tmp; | 332 | delete tmp; |
333 | } | 333 | } |
334 | Folder *it; | 334 | Folder *it; |
335 | QListViewItem*item = 0; | 335 | QListViewItem*item = 0; |
336 | for ( it = folders->first(); it; it = folders->next() ) { | 336 | for ( it = folders->first(); it; it = folders->next() ) { |
337 | item = new MBOXfolderItem( it, this , item ); | 337 | item = new MBOXfolderItem( it, this , item ); |
338 | item->setSelectable(it->may_select()); | 338 | item->setSelectable(it->may_select()); |
339 | } | 339 | } |
340 | // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 340 | // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
341 | folders->setAutoDelete(false); | 341 | folders->setAutoDelete(false); |
342 | delete folders; | 342 | delete folders; |
343 | } | 343 | } |
344 | 344 | ||
345 | RecBody MBOXviewItem::fetchBody( const RecMail &mail ) | 345 | RecBody MBOXviewItem::fetchBody( const RecMail &mail ) |
346 | { | 346 | { |
347 | qDebug( "POP3 fetchBody" ); | 347 | qDebug( "POP3 fetchBody" ); |
348 | return wrapper->fetchBody( mail ); | 348 | return wrapper->fetchBody( mail ); |
349 | } | 349 | } |
350 | 350 | ||
351 | MBOXfolderItem::~MBOXfolderItem() | 351 | MBOXfolderItem::~MBOXfolderItem() |
352 | { | 352 | { |
353 | delete folder; | 353 | delete folder; |
354 | } | 354 | } |
355 | 355 | ||
356 | MBOXfolderItem::MBOXfolderItem( Folder *folderInit, MBOXviewItem *parent , QListViewItem*after ) | 356 | MBOXfolderItem::MBOXfolderItem( Folder *folderInit, MBOXviewItem *parent , QListViewItem*after ) |
357 | : AccountViewItem( parent,after ) | 357 | : AccountViewItem( parent,after ) |
358 | { | 358 | { |
359 | folder = folderInit; | 359 | folder = folderInit; |
360 | mbox = parent; | 360 | mbox = parent; |
361 | if (folder->getDisplayName().lower()!="inbox") { | 361 | if (folder->getDisplayName().lower() == "outgoing") { |
362 | setPixmap( 0, PIXMAP_POP3FOLDER ); | 362 | setPixmap( 0, PIXMAP_OUTBOXFOLDER ); |
363 | } else { | 363 | } else if (folder->getDisplayName().lower() == "inbox") { |
364 | setPixmap( 0, PIXMAP_INBOXFOLDER); | 364 | setPixmap( 0, PIXMAP_INBOXFOLDER); |
365 | } | 365 | } else { |
366 | setPixmap( 0, PIXMAP_MBOXFOLDER ); | ||
367 | } | ||
366 | setText( 0, folder->getDisplayName() ); | 368 | setText( 0, folder->getDisplayName() ); |
367 | } | 369 | } |
368 | 370 | ||
369 | void MBOXfolderItem::refresh(QList<RecMail>&target) | 371 | void MBOXfolderItem::refresh(QList<RecMail>&target) |
370 | { | 372 | { |
371 | if (folder->may_select()) | 373 | if (folder->may_select()) |
372 | mbox->getWrapper()->listMessages( folder->getName(),target ); | 374 | mbox->getWrapper()->listMessages( folder->getName(),target ); |
373 | } | 375 | } |
374 | 376 | ||
375 | RecBody MBOXfolderItem::fetchBody(const RecMail&aMail) | 377 | RecBody MBOXfolderItem::fetchBody(const RecMail&aMail) |
376 | { | 378 | { |
377 | return mbox->getWrapper()->fetchBody(aMail); | 379 | return mbox->getWrapper()->fetchBody(aMail); |
378 | } | 380 | } |
379 | 381 | ||
diff --git a/noncore/net/mail/defines.h b/noncore/net/mail/defines.h index d9cdab0..36c85c7 100644 --- a/noncore/net/mail/defines.h +++ b/noncore/net/mail/defines.h | |||
@@ -1,51 +1,57 @@ | |||
1 | #ifndef DEFINE_CONSTANTS_H | 1 | #ifndef DEFINE_CONSTANTS_H |
2 | #define DEFINE_CONSTANTS_H | 2 | #define DEFINE_CONSTANTS_H |
3 | 3 | ||
4 | #include <qpe/resource.h> | 4 | #include <qpe/resource.h> |
5 | 5 | ||
6 | #define USER_AGENT "OpieMail v0.1" | 6 | #define USER_AGENT "OpieMail v0.1" |
7 | 7 | ||
8 | #define PIC_COMPOSEMAIL "mail/composemail" | 8 | #define PIC_COMPOSEMAIL "mail/composemail" |
9 | #define PIC_SENDQUEUED "mail/sendqueued" | 9 | #define PIC_SENDQUEUED "mail/sendqueued" |
10 | #define PIC_SHOWFOLDERS "mail/showfolders" | 10 | #define PIC_SHOWFOLDERS "mail/showfolders" |
11 | #define PIC_SEARCHMAILS "mail/searchmails" | 11 | #define PIC_SEARCHMAILS "mail/searchmails" |
12 | #define PIC_EDITSETTINGS "mail/editsettings" | 12 | #define PIC_EDITSETTINGS "mail/editsettings" |
13 | #define PIC_EDITACCOUNTS "mail/editaccounts" | 13 | #define PIC_EDITACCOUNTS "mail/editaccounts" |
14 | #define PIC_SYNC "mail/sync" | 14 | #define PIC_SYNC "mail/sync" |
15 | #define PIC_IMAPFOLDER "mail/imapfolder" | 15 | #define PIC_IMAPFOLDER "mail/imapfolder" |
16 | #define PIC_MBOXFOLDER "mail/mboxfolder" | ||
16 | #define PIC_POP3FOLDER "mail/pop3folder" | 17 | #define PIC_POP3FOLDER "mail/pop3folder" |
17 | #define PIC_INBOXFOLDER "mail/inbox" | 18 | #define PIC_INBOXFOLDER "mail/inbox" |
19 | #define PIC_OUTBOXFOLDER "mail/outbox" | ||
20 | #define PIC_LOCALFOLDER "mail/localfolder" | ||
18 | 21 | ||
19 | #define ICON_COMPOSEMAIL QIconSet( Resource::loadPixmap( PIC_COMPOSEMAIL ) ) | 22 | #define ICON_COMPOSEMAIL QIconSet( Resource::loadPixmap( PIC_COMPOSEMAIL ) ) |
20 | #define ICON_SENDQUEUED QIconSet( Resource::loadPixmap( PIC_SENDQUEUED ) ) | 23 | #define ICON_SENDQUEUED QIconSet( Resource::loadPixmap( PIC_SENDQUEUED ) ) |
21 | #define ICON_SHOWFOLDERS QIconSet( Resource::loadPixmap( PIC_SHOWFOLDERS ) ) | 24 | #define ICON_SHOWFOLDERS QIconSet( Resource::loadPixmap( PIC_SHOWFOLDERS ) ) |
22 | #define ICON_SEARCHMAILS QIconSet( Resource::loadPixmap( PIC_SEARCHMAILS ) ) | 25 | #define ICON_SEARCHMAILS QIconSet( Resource::loadPixmap( PIC_SEARCHMAILS ) ) |
23 | #define ICON_EDITSETTINGS QIconSet( Resource::loadPixmap( PIC_EDITSETTINGS ) ) | 26 | #define ICON_EDITSETTINGS QIconSet( Resource::loadPixmap( PIC_EDITSETTINGS ) ) |
24 | #define ICON_EDITACCOUNTS QIconSet( Resource::loadPixmap( PIC_EDITACCOUNTS ) ) | 27 | #define ICON_EDITACCOUNTS QIconSet( Resource::loadPixmap( PIC_EDITACCOUNTS ) ) |
25 | #define ICON_SYNC QIconSet( Resource::loadPixmap( PIC_SYNC ) ) | 28 | #define ICON_SYNC QIconSet( Resource::loadPixmap( PIC_SYNC ) ) |
26 | 29 | ||
27 | #define PIXMAP_IMAPFOLDER QPixmap( Resource::loadPixmap( PIC_IMAPFOLDER ) ) | 30 | #define PIXMAP_IMAPFOLDER QPixmap( Resource::loadPixmap( PIC_IMAPFOLDER ) ) |
28 | #define PIXMAP_POP3FOLDER QPixmap( Resource::loadPixmap( PIC_POP3FOLDER ) ) | 31 | #define PIXMAP_POP3FOLDER QPixmap( Resource::loadPixmap( PIC_POP3FOLDER ) ) |
29 | #define PIXMAP_INBOXFOLDER QPixmap( Resource::loadPixmap( PIC_INBOXFOLDER) ) | 32 | #define PIXMAP_INBOXFOLDER QPixmap( Resource::loadPixmap( PIC_INBOXFOLDER) ) |
33 | #define PIXMAP_MBOXFOLDER QPixmap( Resource::loadPixmap( PIC_MBOXFOLDER ) ) | ||
34 | #define PIXMAP_OUTBOXFOLDER QPixmap( Resource::loadPixmap( PIC_OUTBOXFOLDER) ) | ||
35 | #define PIXMAP_LOCALFOLDER QPixmap( Resource::loadPixmap( PIC_LOCALFOLDER) ) | ||
30 | 36 | ||
31 | #define IMAP_PORT "143" | 37 | #define IMAP_PORT "143" |
32 | #define IMAP_SSL_PORT "993" | 38 | #define IMAP_SSL_PORT "993" |
33 | #define SMTP_PORT "25" | 39 | #define SMTP_PORT "25" |
34 | #define SMTP_SSL_PORT "465" | 40 | #define SMTP_SSL_PORT "465" |
35 | #define POP3_PORT "110" | 41 | #define POP3_PORT "110" |
36 | #define POP3_SSL_PORT "995" | 42 | #define POP3_SSL_PORT "995" |
37 | #define NNTP_PORT "119" | 43 | #define NNTP_PORT "119" |
38 | #define NNTP_SSL_PORT "563" | 44 | #define NNTP_SSL_PORT "563" |
39 | 45 | ||
40 | /* used for decoding imapfoldername */ | 46 | /* used for decoding imapfoldername */ |
41 | #define UNDEFINED 64 | 47 | #define UNDEFINED 64 |
42 | #define MAXLINE 76 | 48 | #define MAXLINE 76 |
43 | #define UTF16MASK 0x03FFUL | 49 | #define UTF16MASK 0x03FFUL |
44 | #define UTF16SHIFT 10 | 50 | #define UTF16SHIFT 10 |
45 | #define UTF16BASE 0x10000UL | 51 | #define UTF16BASE 0x10000UL |
46 | #define UTF16HIGHSTART 0xD800UL | 52 | #define UTF16HIGHSTART 0xD800UL |
47 | #define UTF16HIGHEND 0xDBFFUL | 53 | #define UTF16HIGHEND 0xDBFFUL |
48 | #define UTF16LOSTART 0xDC00UL | 54 | #define UTF16LOSTART 0xDC00UL |
49 | #define UTF16LOEND 0xDFFFUL | 55 | #define UTF16LOEND 0xDFFFUL |
50 | 56 | ||
51 | #endif | 57 | #endif |
diff --git a/pics/mail/imapfolder.png b/pics/mail/imapfolder.png index 0c980dc..f7a2901 100644 --- a/pics/mail/imapfolder.png +++ b/pics/mail/imapfolder.png | |||
Binary files differ | |||
diff --git a/pics/mail/inbox.png b/pics/mail/inbox.png index 662573d..b34f5fe 100644 --- a/pics/mail/inbox.png +++ b/pics/mail/inbox.png | |||
Binary files differ | |||
diff --git a/pics/mail/localfolder.png b/pics/mail/localfolder.png new file mode 100644 index 0000000..6b0ac61 --- a/dev/null +++ b/pics/mail/localfolder.png | |||
Binary files differ | |||
diff --git a/pics/mail/mboxfolder.png b/pics/mail/mboxfolder.png new file mode 100644 index 0000000..5012829 --- a/dev/null +++ b/pics/mail/mboxfolder.png | |||
Binary files differ | |||
diff --git a/pics/mail/outbox.png b/pics/mail/outbox.png new file mode 100644 index 0000000..3c81b43 --- a/dev/null +++ b/pics/mail/outbox.png | |||
Binary files differ | |||
diff --git a/pics/mail/pop3folder.png b/pics/mail/pop3folder.png index fad29f4..65baa24 100644 --- a/pics/mail/pop3folder.png +++ b/pics/mail/pop3folder.png | |||
Binary files differ | |||