summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/accountitem.cpp6
-rw-r--r--noncore/net/mail/addresspicker.cpp6
-rw-r--r--noncore/net/mail/composemail.cpp9
-rw-r--r--noncore/net/mail/config.in6
-rw-r--r--noncore/net/mail/defines.h33
-rw-r--r--noncore/net/mail/mailistviewitem.cpp14
-rw-r--r--noncore/net/mail/mainwindow.cpp29
-rw-r--r--noncore/net/mail/opiemail.cpp7
-rw-r--r--noncore/net/mail/viewmailbase.cpp24
9 files changed, 71 insertions, 63 deletions
diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp
index f7fdccd..f3f2182 100644
--- a/noncore/net/mail/accountitem.cpp
+++ b/noncore/net/mail/accountitem.cpp
@@ -1,43 +1,45 @@
1 1
2#include "accountitem.h" 2#include "accountitem.h"
3#include "accountview.h" 3#include "accountview.h"
4#include "newmaildir.h" 4#include "newmaildir.h"
5#include "nntpgroupsdlg.h" 5#include "nntpgroupsdlg.h"
6#include "defines.h" 6#include "defines.h"
7 7
8#include <libmailwrapper/mailtypes.h> 8#include <libmailwrapper/mailtypes.h>
9#include <libmailwrapper/abstractmail.h> 9#include <libmailwrapper/abstractmail.h>
10#include <libmailwrapper/mailwrapper.h> 10#include <libmailwrapper/mailwrapper.h>
11
11/* OPIE */ 12/* OPIE */
12#include <opie2/odebug.h> 13#include <opie2/odebug.h>
14#include <opie2/oresource.h>
13#include <qpe/qpeapplication.h> 15#include <qpe/qpeapplication.h>
16using namespace Opie::Core;
14 17
15/* QT */ 18/* QT */
16#include <qpopupmenu.h> 19#include <qpopupmenu.h>
17#include <qmessagebox.h> 20#include <qmessagebox.h>
18 21
19using namespace Opie::Core;
20#define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );} 22#define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );}
21/** 23/**
22 * POP3 Account stuff 24 * POP3 Account stuff
23 */ 25 */
24POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent ) 26POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent )
25 : AccountViewItem( parent ) 27 : AccountViewItem( parent )
26{ 28{
27 account = a; 29 account = a;
28 wrapper = AbstractMail::getWrapper( account ); 30 wrapper = AbstractMail::getWrapper( account );
29 SETPIX(PIXMAP_POP3FOLDER); 31 SETPIX(PIXMAP_POP3FOLDER);
30#if 0 32#if 0
31 if (!account->getOffline()) 33 if (!account->getOffline())
32 { 34 {
33 setPixmap( 0, ); 35 setPixmap( 0, );
34 } 36 }
35 else 37 else
36 { 38 {
37 setPixmap( 0, PIXMAP_OFFLINE ); 39 setPixmap( 0, PIXMAP_OFFLINE );
38 } 40 }
39#endif 41#endif
40 setText( 0, account->getAccountName() ); 42 setText( 0, account->getAccountName() );
41 setOpen( true ); 43 setOpen( true );
42} 44}
43 45
@@ -877,49 +879,49 @@ MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, QLis
877 mbox = master; 879 mbox = master;
878 initName(); 880 initName();
879} 881}
880 882
881void MHfolderItem::initName() 883void MHfolderItem::initName()
882{ 884{
883 QString bName = folder->getDisplayName(); 885 QString bName = folder->getDisplayName();
884 if (bName.startsWith("/")&&bName.length()>1) 886 if (bName.startsWith("/")&&bName.length()>1)
885 { 887 {
886 bName.replace(0,1,""); 888 bName.replace(0,1,"");
887 } 889 }
888 int pos = bName.findRev("/"); 890 int pos = bName.findRev("/");
889 if (pos > 0) 891 if (pos > 0)
890 { 892 {
891 bName.replace(0,pos+1,""); 893 bName.replace(0,pos+1,"");
892 } 894 }
893 if (bName.lower() == "outgoing") 895 if (bName.lower() == "outgoing")
894 { 896 {
895 setPixmap( 0, PIXMAP_OUTBOXFOLDER ); 897 setPixmap( 0, PIXMAP_OUTBOXFOLDER );
896 } 898 }
897 else if (bName.lower() == "inbox") 899 else if (bName.lower() == "inbox")
898 { 900 {
899 setPixmap( 0, PIXMAP_INBOXFOLDER); 901 setPixmap( 0, PIXMAP_INBOXFOLDER);
900 } else if (bName.lower() == "drafts") { 902 } else if (bName.lower() == "drafts") {
901 setPixmap(0, Resource::loadPixmap("edit")); 903 setPixmap(0, Opie::Core::OResource::loadPixmap("edit", Opie::Core::OResource::SmallIcon));
902 } else { 904 } else {
903 setPixmap( 0, PIXMAP_MBOXFOLDER ); 905 setPixmap( 0, PIXMAP_MBOXFOLDER );
904 } 906 }
905 setText( 0, bName ); 907 setText( 0, bName );
906} 908}
907 909
908const FolderP&MHfolderItem::getFolder()const 910const FolderP&MHfolderItem::getFolder()const
909{ 911{
910 return folder; 912 return folder;
911} 913}
912 914
913void MHfolderItem::refresh(QValueList<RecMailP>&target) 915void MHfolderItem::refresh(QValueList<RecMailP>&target)
914{ 916{
915 if (folder->may_select()) 917 if (folder->may_select())
916 mbox->getWrapper()->listMessages( folder->getName(),target ); 918 mbox->getWrapper()->listMessages( folder->getName(),target );
917} 919}
918 920
919RECBODYP MHfolderItem::fetchBody(const RecMailP&aMail) 921RECBODYP MHfolderItem::fetchBody(const RecMailP&aMail)
920{ 922{
921 return mbox->getWrapper()->fetchBody(aMail); 923 return mbox->getWrapper()->fetchBody(aMail);
922} 924}
923 925
924bool MHfolderItem::deleteFolder() 926bool MHfolderItem::deleteFolder()
925{ 927{
diff --git a/noncore/net/mail/addresspicker.cpp b/noncore/net/mail/addresspicker.cpp
index 50c82e5..4e328d4 100644
--- a/noncore/net/mail/addresspicker.cpp
+++ b/noncore/net/mail/addresspicker.cpp
@@ -1,46 +1,46 @@
1 1
2#include "composemail.h" 2#include "composemail.h"
3 3
4/* OPIE */ 4/* OPIE */
5#include <opie2/ocontactaccess.h> 5#include <opie2/ocontactaccess.h>
6#include <opie2/opimcontact.h> 6#include <opie2/opimcontact.h>
7#include <qpe/resource.h> 7#include <opie2/oresource.h>
8#include <qpe/qpeapplication.h> 8#include <qpe/qpeapplication.h>
9 9
10/* QT */ 10/* QT */
11#include <qpushbutton.h> 11#include <qpushbutton.h>
12#include <qmessagebox.h> 12#include <qmessagebox.h>
13#include <qlistbox.h> 13#include <qlistbox.h>
14 14
15/* STD */ 15/* STD */
16#include <stdlib.h> 16#include <stdlib.h>
17 17
18AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFlags flags ) 18AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFlags flags )
19 : AddressPickerUI( parent, name, modal, flags ) 19 : AddressPickerUI( parent, name, modal, flags )
20{ 20{
21 okButton->setIconSet( Resource::loadPixmap( "enter" ) ); 21 okButton->setIconSet( Opie::Core::OResource::loadPixmap( "enter", Opie::Core::OResource::SmallIcon ) );
22 cancelButton->setIconSet( Resource::loadPixmap( "editdelete" ) ); 22 cancelButton->setIconSet( Opie::Core::OResource::loadPixmap( "editdelete", Opie::Core::OResource::SmallIcon ) );
23 23
24 connect(okButton, SIGNAL(clicked()), SLOT(accept())); 24 connect(okButton, SIGNAL(clicked()), SLOT(accept()));
25 connect(cancelButton, SIGNAL(clicked()), SLOT(close())); 25 connect(cancelButton, SIGNAL(clicked()), SLOT(close()));
26 Opie::OPimContactAccess::List::Iterator it; 26 Opie::OPimContactAccess::List::Iterator it;
27 27
28 QString lineEmail, lineName, contactLine; 28 QString lineEmail, lineName, contactLine;
29 /* what name has to set here???? */ 29 /* what name has to set here???? */
30 Opie::OPimContactAccess m_contactdb("opiemail"); 30 Opie::OPimContactAccess m_contactdb("opiemail");
31 31
32 QStringList mails; 32 QStringList mails;
33 QString pre,suf; 33 QString pre,suf;
34 Opie::OPimContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 ); 34 Opie::OPimContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 );
35 for ( it = m_list.begin(); it != m_list.end(); ++it ) 35 for ( it = m_list.begin(); it != m_list.end(); ++it )
36 { 36 {
37 if ((*it).defaultEmail().length()!=0) 37 if ((*it).defaultEmail().length()!=0)
38 { 38 {
39 mails = (*it).emailList(); 39 mails = (*it).emailList();
40 if ((*it).fileAs().length()>0) 40 if ((*it).fileAs().length()>0)
41 { 41 {
42 pre = "\""+(*it).firstName()+" "+(*it).lastName()+"\" <"; 42 pre = "\""+(*it).firstName()+" "+(*it).lastName()+"\" <";
43 suf = ">"; 43 suf = ">";
44 } 44 }
45 else 45 else
46 { 46 {
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp
index 154c1d5..9d04de3 100644
--- a/noncore/net/mail/composemail.cpp
+++ b/noncore/net/mail/composemail.cpp
@@ -1,46 +1,45 @@
1 1
2#include "composemail.h" 2#include "composemail.h"
3 3
4#include <libmailwrapper/smtpwrapper.h> 4#include <libmailwrapper/smtpwrapper.h>
5#include <libmailwrapper/storemail.h> 5#include <libmailwrapper/storemail.h>
6#include <libmailwrapper/abstractmail.h> 6#include <libmailwrapper/abstractmail.h>
7#include <libmailwrapper/mailtypes.h> 7#include <libmailwrapper/mailtypes.h>
8 8
9/* OPIE */ 9/* OPIE */
10#include <opie2/ofiledialog.h> 10#include <opie2/ofiledialog.h>
11#include <opie2/odebug.h> 11#include <opie2/odebug.h>
12#include <qpe/resource.h> 12#include <opie2/oresource.h>
13#include <qpe/config.h> 13#include <qpe/config.h>
14#include <qpe/global.h> 14#include <qpe/global.h>
15#include <qpe/contact.h> 15#include <qpe/contact.h>
16using namespace Opie::Core;
17using namespace Opie::Ui;
16 18
17/* QT */ 19/* QT */
18#include <qt.h> 20#include <qt.h>
19 21
20
21using namespace Opie::Core;
22using namespace Opie::Ui;
23ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) 22ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags )
24 : ComposeMailUI( parent, name, modal, flags ) 23 : ComposeMailUI( parent, name, modal, flags )
25{ 24{
26 settings = s; 25 settings = s;
27 m_replyid = ""; 26 m_replyid = "";
28 27
29 QString vfilename = Global::applicationFileName("addressbook", 28 QString vfilename = Global::applicationFileName("addressbook",
30 "businesscard.vcf"); 29 "businesscard.vcf");
31 Contact c; 30 Contact c;
32 if (QFile::exists(vfilename)) { 31 if (QFile::exists(vfilename)) {
33 c = Contact::readVCard( vfilename )[0]; 32 c = Contact::readVCard( vfilename )[0];
34 } 33 }
35 34
36 QStringList mails = c.emailList(); 35 QStringList mails = c.emailList();
37 QString defmail = c.defaultEmail(); 36 QString defmail = c.defaultEmail();
38 37
39 if (defmail.length()!=0) { 38 if (defmail.length()!=0) {
40 fromBox->insertItem(defmail); 39 fromBox->insertItem(defmail);
41 } 40 }
42 QStringList::ConstIterator sit = mails.begin(); 41 QStringList::ConstIterator sit = mails.begin();
43 for (;sit!=mails.end();++sit) { 42 for (;sit!=mails.end();++sit) {
44 if ( (*sit)==defmail) 43 if ( (*sit)==defmail)
45 continue; 44 continue;
46 fromBox->insertItem((*sit)); 45 fromBox->insertItem((*sit));
@@ -278,30 +277,30 @@ void ComposeMail::reject()
278 QDialog::reject(); 277 QDialog::reject();
279} 278}
280 279
281ComposeMail::~ComposeMail() 280ComposeMail::~ComposeMail()
282{ 281{
283} 282}
284 283
285void ComposeMail::reEditMail(const RecMailP&current) 284void ComposeMail::reEditMail(const RecMailP&current)
286{ 285{
287 RecMailP data = current; 286 RecMailP data = current;
288 message->setText(data->Wrapper()->fetchBody(current)->Bodytext()); 287 message->setText(data->Wrapper()->fetchBody(current)->Bodytext());
289 subjectLine->setText( data->getSubject()); 288 subjectLine->setText( data->getSubject());
290 toLine->setText(data->To().join(",")); 289 toLine->setText(data->To().join(","));
291 ccLine->setText(data->CC().join(",")); 290 ccLine->setText(data->CC().join(","));
292 bccLine->setText(data->Bcc().join(",")); 291 bccLine->setText(data->Bcc().join(","));
293 replyLine->setText(data->Replyto()); 292 replyLine->setText(data->Replyto());
294} 293}
295 294
296AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) 295AttachViewItem::AttachViewItem( QListView *parent, Attachment *att )
297 : QListViewItem( parent ) 296 : QListViewItem( parent )
298{ 297{
299 attachment = att; 298 attachment = att;
300 odebug << att->getMimeType() << oendl; 299 odebug << att->getMimeType() << oendl;
301 setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? 300 setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ?
302 Resource::loadPixmap( "UnknownDocument-14" ) : 301 OResource::loadPixmap( "UnknownDocument", OResource::SmallIcon ) :
303 attachment->getDocLnk().pixmap() ); 302 attachment->getDocLnk().pixmap() );
304 setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); 303 setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() );
305 setText( 1, QString::number( att->getSize() ) ); 304 setText( 1, QString::number( att->getSize() ) );
306} 305}
307 306
diff --git a/noncore/net/mail/config.in b/noncore/net/mail/config.in
index f7fce91..b18feb7 100644
--- a/noncore/net/mail/config.in
+++ b/noncore/net/mail/config.in
@@ -1,10 +1,10 @@
1source noncore/net/mail/libmailwrapper/config.in 1source noncore/net/mail/libmailwrapper/config.in
2 2
3config MAIL3 3config MAIL3
4 boolean "opie-mail3 (a mail client)" 4 boolean "opie-mail3 (a mail client)"
5 default "y" 5 default "y"
6 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2PIM && LIBOPIE2MM && LIBMAILWRAPPER 6 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM && LIBOPIE2MM && LIBMAILWRAPPER
7 comment "opie-mail3 needs a libqpe, libopie2core, libopie2pim and the libmailwrapper" 7 comment "opie-mail3 needs a libqpe, libopie2core, libopie2ui, libopie2pim and the libmailwrapper"
8 depends ! ( ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2PIM && LIBOPIE2MM && LIBMAILWRAPPER ) 8 depends ! ( ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM && LIBOPIE2MM && LIBMAILWRAPPER )
9 9
10source noncore/net/mail/taskbarapplet/config.in 10source noncore/net/mail/taskbarapplet/config.in
diff --git a/noncore/net/mail/defines.h b/noncore/net/mail/defines.h
index 50d63dd..36ac5a1 100644
--- a/noncore/net/mail/defines.h
+++ b/noncore/net/mail/defines.h
@@ -1,61 +1,62 @@
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 <opie2/oresource.h>
5using namespace Opie::Core;
5 6
6#define USER_AGENT "OpieMail v0.3" 7#define USER_AGENT "OpieMail v0.3"
7 8
8#define PIC_COMPOSEMAIL "mail/composemail" 9#define PIC_COMPOSEMAIL "mail/composemail"
9#define PIC_SENDQUEUED "mail/sendqueued" 10#define PIC_SENDQUEUED "mail/sendqueued"
10#define PIC_SHOWFOLDERS "mail/showfolders" 11#define PIC_SHOWFOLDERS "mail/showfolders"
11#define PIC_SYNC "mail/sync" 12#define PIC_SYNC "mail/sync"
12#define PIC_IMAPFOLDER "mail/imapfolder" 13#define PIC_IMAPFOLDER "mail/imapfolder"
13#define PIC_MBOXFOLDER "mail/mboxfolder" 14#define PIC_MBOXFOLDER "mail/mboxfolder"
14#define PIC_POP3FOLDER "mail/pop3folder" 15#define PIC_POP3FOLDER "mail/pop3folder"
15#define PIC_INBOXFOLDER "mail/inbox" 16#define PIC_INBOXFOLDER "mail/inbox"
16#define PIC_OUTBOXFOLDER "mail/outbox" 17#define PIC_OUTBOXFOLDER "mail/outbox"
17#define PIC_LOCALFOLDER "mail/localfolder" 18#define PIC_LOCALFOLDER "mail/localfolder"
18 19
19#define PIC_OFFLINE "mail/notconnected" 20#define PIC_OFFLINE "mail/notconnected"
20#define PIC_DOCUMENT "DocsIcon" 21#define PIC_DOCUMENT "DocsIcon"
21 22
22#define ICON_COMPOSEMAIL QIconSet( Resource::loadPixmap( PIC_COMPOSEMAIL ) ) 23#define ICON_COMPOSEMAIL QIconSet( OResource::loadPixmap( PIC_COMPOSEMAIL, OResource::SmallIcon ) )
23#define ICON_SENDQUEUED QIconSet( Resource::loadPixmap( PIC_SENDQUEUED ) ) 24#define ICON_SENDQUEUED QIconSet( OResource::loadPixmap( PIC_SENDQUEUED, OResource::SmallIcon ) )
24#define ICON_SHOWFOLDERS QIconSet( Resource::loadPixmap( PIC_SHOWFOLDERS ) ) 25#define ICON_SHOWFOLDERS QIconSet( OResource::loadPixmap( PIC_SHOWFOLDERS, OResource::SmallIcon ) )
25#define ICON_SEARCHMAILS QIconSet( Resource::loadPixmap( PIC_SEARCHMAILS ) ) 26#define ICON_SEARCHMAILS QIconSet( OResource::loadPixmap( PIC_SEARCHMAILS, OResource::SmallIcon ) )
26#define ICON_EDITSETTINGS QIconSet( Resource::loadPixmap( PIC_EDITSETTINGS ) ) 27#define ICON_EDITSETTINGS QIconSet( OResource::loadPixmap( PIC_EDITSETTINGS, OResource::SmallIcon ) )
27#define ICON_EDITACCOUNTS QIconSet( Resource::loadPixmap( PIC_EDITACCOUNTS ) ) 28#define ICON_EDITACCOUNTS QIconSet( OResource::loadPixmap( PIC_EDITACCOUNTS, OResource::SmallIcon ) )
28#define ICON_SYNC QIconSet( Resource::loadPixmap( PIC_SYNC ) ) 29#define ICON_SYNC QIconSet( OResource::loadPixmap( PIC_SYNC, OResource::SmallIcon ) )
29#define ICON_READMAIL QIconSet( Resource::loadPixmap( PIC_DOCUMENT)) 30#define ICON_READMAIL QIconSet( OResource::loadPixmap( PIC_DOCUMENT, OResource::SmallIcon) )
30 31
31#define PIXMAP_IMAPFOLDER QPixmap( Resource::loadPixmap( PIC_IMAPFOLDER ) ) 32#define PIXMAP_IMAPFOLDER QPixmap( OResource::loadPixmap( PIC_IMAPFOLDER, OResource::SmallIcon ) )
32#define PIXMAP_POP3FOLDER QPixmap( Resource::loadPixmap( PIC_POP3FOLDER ) ) 33#define PIXMAP_POP3FOLDER QPixmap( OResource::loadPixmap( PIC_POP3FOLDER, OResource::SmallIcon ) )
33#define PIXMAP_INBOXFOLDER QPixmap( Resource::loadPixmap( PIC_INBOXFOLDER) ) 34#define PIXMAP_INBOXFOLDER QPixmap( OResource::loadPixmap( PIC_INBOXFOLDER, OResource::SmallIcon ) )
34#define PIXMAP_MBOXFOLDER QPixmap( Resource::loadPixmap( PIC_MBOXFOLDER ) ) 35#define PIXMAP_MBOXFOLDER QPixmap( OResource::loadPixmap( PIC_MBOXFOLDER, OResource::SmallIcon ) )
35#define PIXMAP_OUTBOXFOLDER QPixmap( Resource::loadPixmap( PIC_OUTBOXFOLDER) ) 36#define PIXMAP_OUTBOXFOLDER QPixmap( OResource::loadPixmap( PIC_OUTBOXFOLDER, OResource::SmallIcon ) )
36#define PIXMAP_LOCALFOLDER QPixmap( Resource::loadPixmap( PIC_LOCALFOLDER) ) 37#define PIXMAP_LOCALFOLDER QPixmap( OResource::loadPixmap( PIC_LOCALFOLDER, OResource::SmallIcon ) )
37#define PIXMAP_OFFLINE QPixmap( Resource::loadPixmap( PIC_OFFLINE) ) 38#define PIXMAP_OFFLINE QPixmap( OResource::loadPixmap( PIC_OFFLINE, OResource::SmallIcon ) )
38 39
39#define IMAP_PORT "143" 40#define IMAP_PORT "143"
40#define IMAP_SSL_PORT "993" 41#define IMAP_SSL_PORT "993"
41#define SMTP_PORT "25" 42#define SMTP_PORT "25"
42#define SMTP_SSL_PORT "465" 43#define SMTP_SSL_PORT "465"
43#define POP3_PORT "110" 44#define POP3_PORT "110"
44#define POP3_SSL_PORT "995" 45#define POP3_SSL_PORT "995"
45#define NNTP_PORT "119" 46#define NNTP_PORT "119"
46#define NNTP_SSL_PORT "563" 47#define NNTP_SSL_PORT "563"
47 48
48/* used for decoding imapfoldername */ 49/* used for decoding imapfoldername */
49#define UNDEFINED 64 50#define UNDEFINED 64
50#define MAXLINE 76 51#define MAXLINE 76
51#define UTF16MASK 0x03FFUL 52#define UTF16MASK 0x03FFUL
52#define UTF16SHIFT 10 53#define UTF16SHIFT 10
53#define UTF16BASE 0x10000UL 54#define UTF16BASE 0x10000UL
54#define UTF16HIGHSTART 0xD800UL 55#define UTF16HIGHSTART 0xD800UL
55#define UTF16HIGHEND 0xDBFFUL 56#define UTF16HIGHEND 0xDBFFUL
56#define UTF16LOSTART 0xDC00UL 57#define UTF16LOSTART 0xDC00UL
57#define UTF16LOEND 0xDFFFUL 58#define UTF16LOEND 0xDFFFUL
58 59
59/* used for making menuids transparent */ 60/* used for making menuids transparent */
60#define FOLDER_MENU_REFRESH_HEADER 0 61#define FOLDER_MENU_REFRESH_HEADER 0
61#define FOLDER_MENU_DELETE_ALL_MAILS 1 62#define FOLDER_MENU_DELETE_ALL_MAILS 1
diff --git a/noncore/net/mail/mailistviewitem.cpp b/noncore/net/mail/mailistviewitem.cpp
index d3a0723..5254616 100644
--- a/noncore/net/mail/mailistviewitem.cpp
+++ b/noncore/net/mail/mailistviewitem.cpp
@@ -1,45 +1,49 @@
1#include "mailistviewitem.h" 1#include "mailistviewitem.h"
2#include <libmailwrapper/abstractmail.h> 2#include <libmailwrapper/abstractmail.h>
3#include <qtextstream.h> 3
4#include <qpe/resource.h> 4/* OPIE */
5#include <opie2/oresource.h>
5#include <qpe/timestring.h> 6#include <qpe/timestring.h>
6 7
8/* QT */
9#include <qtextstream.h>
10
7MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) 11MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item )
8 :QListViewItem(parent,item),mail_data() 12 :QListViewItem(parent,item),mail_data()
9{ 13{
10} 14}
11 15
12void MailListViewItem::showEntry() 16void MailListViewItem::showEntry()
13{ 17{
14 if ( mail_data->getFlags().testBit( FLAG_ANSWERED ) == true) { 18 if ( mail_data->getFlags().testBit( FLAG_ANSWERED ) == true) {
15 setPixmap( 0, Resource::loadPixmap( "mail/kmmsgreplied") ); 19 setPixmap( 0, Opie::Core::OResource::loadPixmap( "mail/kmmsgreplied", Opie::Core::OResource::SmallIcon ) );
16 } else if ( mail_data->getFlags().testBit( FLAG_SEEN ) == true ) { 20 } else if ( mail_data->getFlags().testBit( FLAG_SEEN ) == true ) {
17 /* I think it looks nicer if there are not such a lot of icons but only on mails 21 /* I think it looks nicer if there are not such a lot of icons but only on mails
18 replied or new - Alwin*/ 22 replied or new - Alwin*/
19 //setPixmap( 0, Resource::loadPixmap( "mail/kmmsgunseen") ); 23 //setPixmap( 0, Opie::Core::OResource::loadPixmap( "mail/kmmsgunseen", Opie::Core::OResource::SmallIcon ) );
20 } else { 24 } else {
21 setPixmap( 0, Resource::loadPixmap( "mail/kmmsgnew") ); 25 setPixmap( 0, Opie::Core::OResource::loadPixmap( "mail/kmmsgnew", Opie::Core::OResource::SmallIcon ) );
22 } 26 }
23 double s = mail_data->Msgsize(); 27 double s = mail_data->Msgsize();
24 int w; 28 int w;
25 w=0; 29 w=0;
26 30
27 while (s>1024) { 31 while (s>1024) {
28 s/=1024; 32 s/=1024;
29 ++w; 33 ++w;
30 if (w>=2) break; 34 if (w>=2) break;
31 } 35 }
32 36
33 QString q=""; 37 QString q="";
34 QString fsize=""; 38 QString fsize="";
35 switch(w) { 39 switch(w) {
36 case 1: 40 case 1:
37 q="k"; 41 q="k";
38 break; 42 break;
39 case 2: 43 case 2:
40 q="M"; 44 q="M";
41 break; 45 break;
42 default: 46 default:
43 break; 47 break;
44 } 48 }
45 49
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index b587424..bce4c0d 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -1,43 +1,44 @@
1#include <qlabel.h> 1#include "defines.h"
2#include <qvbox.h> 2#include "mainwindow.h"
3#include <qheader.h>
4#include <qtimer.h>
5#include <qlayout.h>
6 3
4/* OPIE */
7#include <opie2/odebug.h> 5#include <opie2/odebug.h>
6#include <opie2/oresource.h>
8#include <qpe/qpeapplication.h> 7#include <qpe/qpeapplication.h>
9#include <qpe/qcopenvelope_qws.h> 8#include <qpe/qcopenvelope_qws.h>
10
11#include "defines.h"
12#include "mainwindow.h"
13
14using namespace Opie::Core; 9using namespace Opie::Core;
15 10
11/* QT */
12#include <qlabel.h>
13#include <qvbox.h>
14#include <qheader.h>
15#include <qtimer.h>
16#include <qlayout.h>
17
16MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 18MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
17 : QMainWindow( parent, name, flags ) 19 : QMainWindow( parent, name, flags )
18{ 20{
19
20 setCaption( tr( "Mail" ) ); 21 setCaption( tr( "Mail" ) );
21 setToolBarsMovable( false ); 22 setToolBarsMovable( false );
22 23
23 toolBar = new QToolBar( this ); 24 toolBar = new QToolBar( this );
24 menuBar = new QMenuBar( toolBar ); 25 menuBar = new QMenuBar( toolBar );
25 26
26 mailMenu = new QPopupMenu( menuBar ); 27 mailMenu = new QPopupMenu( menuBar );
27 menuBar->insertItem( tr( "Mail" ), mailMenu ); 28 menuBar->insertItem( tr( "Mail" ), mailMenu );
28 29
29 settingsMenu = new QPopupMenu( menuBar ); 30 settingsMenu = new QPopupMenu( menuBar );
30 menuBar->insertItem( tr( "Settings" ), settingsMenu ); 31 menuBar->insertItem( tr( "Settings" ), settingsMenu );
31 32
32 if (QApplication::desktop()->width()<330) { 33 if (QApplication::desktop()->width()<330) {
33 serverMenu = new QPopupMenu( mailMenu ); 34 serverMenu = new QPopupMenu( mailMenu );
34 folderMenu = new QPopupMenu( mailMenu ); 35 folderMenu = new QPopupMenu( mailMenu );
35 m_ServerMenuId = mailMenu->insertItem( tr( "Server" ), serverMenu ); 36 m_ServerMenuId = mailMenu->insertItem( tr( "Server" ), serverMenu );
36 m_FolderMenuId = mailMenu->insertItem( tr( "Folder" ), folderMenu ); 37 m_FolderMenuId = mailMenu->insertItem( tr( "Folder" ), folderMenu );
37 } else { 38 } else {
38 serverMenu = new QPopupMenu( menuBar ); 39 serverMenu = new QPopupMenu( menuBar );
39 folderMenu = new QPopupMenu( menuBar ); 40 folderMenu = new QPopupMenu( menuBar );
40 m_FolderMenuId = menuBar->insertItem( tr( "Folder" ), folderMenu ); 41 m_FolderMenuId = menuBar->insertItem( tr( "Folder" ), folderMenu );
41 m_ServerMenuId = menuBar->insertItem( tr( "Server" ), serverMenu ); 42 m_ServerMenuId = menuBar->insertItem( tr( "Server" ), serverMenu );
42 } 43 }
43 serverMenu->insertItem(tr("Disconnect"),SERVER_MENU_DISCONNECT); 44 serverMenu->insertItem(tr("Disconnect"),SERVER_MENU_DISCONNECT);
@@ -74,66 +75,66 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
74 composeMail->addTo( mailMenu ); 75 composeMail->addTo( mailMenu );
75 76
76 77
77 sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, 78 sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED,
78 0, 0, this ); 79 0, 0, this );
79 sendQueued->addTo( toolBar ); 80 sendQueued->addTo( toolBar );
80 sendQueued->addTo( mailMenu ); 81 sendQueued->addTo( mailMenu );
81 82
82 /* 83 /*
83 syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, 84 syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC,
84 0, 0, this ); 85 0, 0, this );
85 syncFolders->addTo( toolBar ); 86 syncFolders->addTo( toolBar );
86 syncFolders->addTo( mailMenu ); 87 syncFolders->addTo( mailMenu );
87 */ 88 */
88 89
89 showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS, 90 showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS,
90 0, 0, this, 0, true ); 91 0, 0, this, 0, true );
91 showFolders->addTo( toolBar ); 92 showFolders->addTo( toolBar );
92 showFolders->addTo( mailMenu ); 93 showFolders->addTo( mailMenu );
93 showFolders->setOn( true ); 94 showFolders->setOn( true );
94 connect(showFolders, SIGNAL( toggled(bool) ), 95 connect(showFolders, SIGNAL( toggled(bool) ),
95 SLOT( slotShowFolders(bool) ) ); 96 SLOT( slotShowFolders(bool) ) );
96 97
97 /* 98 /*
98 searchMails = new QAction( tr( "Search mails" ), QIconSet( Resource::loadPixmap("find") ), 99 searchMails = new QAction( tr( "Search mails" ), OResource::loadPixmap("find", OResource::SmallIcon ),
99 0, 0, this ); 100 0, 0, this );
100 searchMails->addTo( toolBar ); 101 searchMails->addTo( toolBar );
101 searchMails->addTo( mailMenu ); 102 searchMails->addTo( mailMenu );
102 */ 103 */
103 104
104 deleteMails = new QAction(tr("Delete Mail"), QIconSet( Resource::loadPixmap("trash")), 0, 0, this); 105 deleteMails = new QAction(tr("Delete Mail"), OResource::loadPixmap("trash", OResource::SmallIcon ), 0, 0, this);
105 deleteMails->addTo( toolBar ); 106 deleteMails->addTo( toolBar );
106 deleteMails->addTo( mailMenu ); 107 deleteMails->addTo( mailMenu );
107 connect( deleteMails, SIGNAL( activated() ), 108 connect( deleteMails, SIGNAL( activated() ),
108 SLOT( slotDeleteMail() ) ); 109 SLOT( slotDeleteMail() ) );
109 110
110 editSettings = new QAction( tr( "Edit settings" ), QIconSet( Resource::loadPixmap("SettingsIcon") ) , 111 editSettings = new QAction( tr( "Edit settings" ), OResource::loadPixmap("SettingsIcon", OResource::SmallIcon ) ,
111 0, 0, this ); 112 0, 0, this );
112 editSettings->addTo( settingsMenu ); 113 editSettings->addTo( settingsMenu );
113 connect( editSettings, SIGNAL( activated() ), 114 connect( editSettings, SIGNAL( activated() ),
114 SLOT( slotEditSettings() ) ); 115 SLOT( slotEditSettings() ) );
115 editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("mail/editaccounts") ) , 116 editAccounts = new QAction( tr( "Configure accounts" ), OResource::loadPixmap("mail/editaccounts", OResource::SmallIcon ) ,
116 0, 0, this ); 117 0, 0, this );
117 editAccounts->addTo( settingsMenu ); 118 editAccounts->addTo( settingsMenu );
118 119
119 120
120 QWidget *view = new QWidget( this ); 121 QWidget *view = new QWidget( this );
121 setCentralWidget( view ); 122 setCentralWidget( view );
122 layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); 123 layout = new QBoxLayout ( view, QBoxLayout::LeftToRight );
123 124
124 folderView = new AccountView( view ); 125 folderView = new AccountView( view );
125 folderView->header()->hide(); 126 folderView->header()->hide();
126 folderView->setRootIsDecorated( true ); 127 folderView->setRootIsDecorated( true );
127 folderView->addColumn( tr( "Mailbox" ) ); 128 folderView->addColumn( tr( "Mailbox" ) );
128 connect(folderView,SIGNAL(serverSelected(int)),this,SLOT(serverSelected(int))); 129 connect(folderView,SIGNAL(serverSelected(int)),this,SLOT(serverSelected(int)));
129 connect(serverMenu,SIGNAL(activated(int)),folderView,SLOT(slotContextMenu(int))); 130 connect(serverMenu,SIGNAL(activated(int)),folderView,SLOT(slotContextMenu(int)));
130 connect(folderMenu,SIGNAL(activated(int)),folderView,SLOT(slotContextMenu(int))); 131 connect(folderMenu,SIGNAL(activated(int)),folderView,SLOT(slotContextMenu(int)));
131 connect(this,SIGNAL(settingsChanged()),folderView,SLOT(readSettings())); 132 connect(this,SIGNAL(settingsChanged()),folderView,SLOT(readSettings()));
132 133
133 134
134 layout->addWidget( folderView ); 135 layout->addWidget( folderView );
135 136
136 mailView = new QListView( view ); 137 mailView = new QListView( view );
137 mailView->addColumn( "" ); 138 mailView->addColumn( "" );
138 mailView->addColumn( tr( "Subject" ),QListView::Manual ); 139 mailView->addColumn( tr( "Subject" ),QListView::Manual );
139 mailView->addColumn( tr( "Sender" ),QListView::Manual ); 140 mailView->addColumn( tr( "Sender" ),QListView::Manual );
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp
index fb8877a..e07ed6f 100644
--- a/noncore/net/mail/opiemail.cpp
+++ b/noncore/net/mail/opiemail.cpp
@@ -1,52 +1,51 @@
1 1
2#include "settingsdialog.h" 2#include "settingsdialog.h"
3#include "opiemail.h" 3#include "opiemail.h"
4#include "editaccounts.h" 4#include "editaccounts.h"
5#include "composemail.h" 5#include "composemail.h"
6#include "mailistviewitem.h" 6#include "mailistviewitem.h"
7#include "viewmail.h" 7#include "viewmail.h"
8#include "selectstore.h" 8#include "selectstore.h"
9#include "selectsmtp.h" 9#include "selectsmtp.h"
10 10
11#include <libmailwrapper/smtpwrapper.h> 11#include <libmailwrapper/smtpwrapper.h>
12#include <libmailwrapper/mailtypes.h> 12#include <libmailwrapper/mailtypes.h>
13#include <libmailwrapper/abstractmail.h> 13#include <libmailwrapper/abstractmail.h>
14
14/* OPIE */ 15/* OPIE */
15#include <opie2/odebug.h> 16#include <opie2/odebug.h>
16#include <qpe/resource.h>
17#include <qpe/qpeapplication.h> 17#include <qpe/qpeapplication.h>
18#include <qpe/config.h> 18#include <qpe/config.h>
19using namespace Opie::Core;
19 20
20/* QT */ 21/* QT */
21#include <qmap.h> 22#include <qmap.h>
22#include <qvaluelist.h> 23#include <qvaluelist.h>
23 24
24/* UNIX */ 25/* UNIX */
25#include <signal.h> 26#include <signal.h>
26 27
27using namespace Opie::Core;
28
29typedef QMapNode<QString,QString> tkeyvalues; 28typedef QMapNode<QString,QString> tkeyvalues;
30typedef QValueList<tkeyvalues> tvaluelist; 29typedef QValueList<tkeyvalues> tvaluelist;
31 30
32class ValueExplode 31class ValueExplode
33{ 32{
34protected: 33protected:
35 //! what was parsed last 34 //! what was parsed last
36 tvaluelist m_LastParsed; 35 tvaluelist m_LastParsed;
37 //! the delemiter to use 36 //! the delemiter to use
38 QString mDelemiter; 37 QString mDelemiter;
39 //! the inner delemiter 38 //! the inner delemiter
40 QString m2Delemiter; 39 QString m2Delemiter;
41 //! the real split routine 40 //! the real split routine
42 void splitit(); 41 void splitit();
43 //! the content 42 //! the content
44 QString m_Command; 43 QString m_Command;
45 //! constructor 44 //! constructor
46 ValueExplode(){} 45 ValueExplode(){}
47public: 46public:
48 //! constructor 47 //! constructor
49 /*! 48 /*!
50 * \param aCommand the string to be splitted 49 * \param aCommand the string to be splitted
51 * \param aDelemiter which sign will be the delemiter character 50 * \param aDelemiter which sign will be the delemiter character
52 * \param a2Delemiter which sign will delemiter the key-value-pairs between other delemiters 51 * \param a2Delemiter which sign will delemiter the key-value-pairs between other delemiters
@@ -257,49 +256,49 @@ void OpieMail::slotEditAccounts()
257 if ( settings ) delete settings; 256 if ( settings ) delete settings;
258 settings = new Settings(); 257 settings = new Settings();
259 mailView->clear(); 258 mailView->clear();
260 folderView->populate( settings->getAccounts() ); 259 folderView->populate( settings->getAccounts() );
261} 260}
262 261
263void OpieMail::displayMail() 262void OpieMail::displayMail()
264{ 263{
265 QListViewItem*item = mailView->currentItem(); 264 QListViewItem*item = mailView->currentItem();
266 if (!item) return; 265 if (!item) return;
267 RecMailP mail = ((MailListViewItem*)item)->data(); 266 RecMailP mail = ((MailListViewItem*)item)->data();
268 RecBodyP body = folderView->fetchBody(mail); 267 RecBodyP body = folderView->fetchBody(mail);
269 ViewMail readMail( this,"", Qt::WType_Modal | WStyle_ContextHelp ); 268 ViewMail readMail( this,"", Qt::WType_Modal | WStyle_ContextHelp );
270 readMail.setBody( body ); 269 readMail.setBody( body );
271 readMail.setMail( mail ); 270 readMail.setMail( mail );
272 readMail.showMaximized(); 271 readMail.showMaximized();
273 readMail.exec(); 272 readMail.exec();
274 273
275 if ( readMail.deleted ) 274 if ( readMail.deleted )
276 { 275 {
277 folderView->refreshCurrent(); 276 folderView->refreshCurrent();
278 } 277 }
279 else 278 else
280 { 279 {
281 ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "" ) ); 280 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
282 } 281 }
283} 282}
284 283
285void OpieMail::slotDeleteMail() 284void OpieMail::slotDeleteMail()
286{ 285{
287 if (!mailView->currentItem()) return; 286 if (!mailView->currentItem()) return;
288 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); 287 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data();
289 if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 288 if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
290 { 289 {
291 mail->Wrapper()->deleteMail( mail ); 290 mail->Wrapper()->deleteMail( mail );
292 folderView->refreshCurrent(); 291 folderView->refreshCurrent();
293 } 292 }
294} 293}
295 294
296void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) 295void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
297{ 296{
298 if (!mailView->currentItem()) return; 297 if (!mailView->currentItem()) return;
299 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); 298 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType();
300 /* just the RIGHT button - or hold on pda */ 299 /* just the RIGHT button - or hold on pda */
301 if (button!=2) {return;} 300 if (button!=2) {return;}
302 odebug << "Event right/hold" << oendl; 301 odebug << "Event right/hold" << oendl;
303 if (!item) return; 302 if (!item) return;
304 QPopupMenu *m = new QPopupMenu(0); 303 QPopupMenu *m = new QPopupMenu(0);
305 if (m) 304 if (m)
diff --git a/noncore/net/mail/viewmailbase.cpp b/noncore/net/mail/viewmailbase.cpp
index 65ad0d6..9e17439 100644
--- a/noncore/net/mail/viewmailbase.cpp
+++ b/noncore/net/mail/viewmailbase.cpp
@@ -1,78 +1,80 @@
1#include "viewmailbase.h"
2
3/* OPIE */
4#include <opie2/oresource.h>
5using namespace Opie::Core;
6
7/* QT */
1#include <qtextbrowser.h> 8#include <qtextbrowser.h>
2#include <qlistview.h> 9#include <qlistview.h>
3#include <qaction.h> 10#include <qaction.h>
4#include <qlabel.h> 11#include <qlabel.h>
5#include <qvbox.h> 12#include <qvbox.h>
6
7#include <qtoolbar.h> 13#include <qtoolbar.h>
8#include <qlayout.h> 14#include <qlayout.h>
9#include <qmenubar.h> 15#include <qmenubar.h>
10#include <qpe/resource.h>
11
12#include "viewmailbase.h"
13//#include "opendiag.h"
14 16
15ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 17ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
16 : QMainWindow(parent, name, fl) 18 : QMainWindow(parent, name, fl)
17{ 19{
18 setCaption(tr("E-Mail view")); 20 setCaption(tr("E-Mail view"));
19 setToolBarsMovable(false); 21 setToolBarsMovable(false);
20 22
21 toolbar = new QToolBar(this); 23 toolbar = new QToolBar(this);
22 menubar = new QMenuBar( toolbar ); 24 menubar = new QMenuBar( toolbar );
23 mailmenu = new QPopupMenu( menubar ); 25 mailmenu = new QPopupMenu( menubar );
24 menubar->insertItem( tr( "Mail" ), mailmenu ); 26 menubar->insertItem( tr( "Mail" ), mailmenu );
25 toolbar->setHorizontalStretchable(true); 27 toolbar->setHorizontalStretchable(true);
26 addToolBar(toolbar); 28 addToolBar(toolbar);
27 QLabel *spacer = new QLabel(toolbar); 29 QLabel *spacer = new QLabel(toolbar);
28 spacer->setBackgroundMode(QWidget::PaletteButton); 30 spacer->setBackgroundMode(QWidget::PaletteButton);
29 toolbar->setStretchableWidget(spacer); 31 toolbar->setStretchableWidget(spacer);
30 32
31 reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this); 33 reply = new QAction(tr("Reply"), OResource::loadPixmap("mail/reply", OResource::SmallIcon), 0, 0, this);
32 reply->addTo(toolbar); 34 reply->addTo(toolbar);
33 reply->addTo(mailmenu); 35 reply->addTo(mailmenu);
34 36
35 forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this); 37 forward = new QAction(tr("Forward"), OResource::loadPixmap("mail/forward", OResource::SmallIcon), 0, 0, this);
36 forward->addTo(toolbar); 38 forward->addTo(toolbar);
37 forward->addTo(mailmenu); 39 forward->addTo(mailmenu);
38 40
39 attachbutton = new QAction(tr("Attachments"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); 41 attachbutton = new QAction(tr("Attachments"), OResource::loadPixmap("mail/attach", OResource::SmallIcon), 0, 0, this, 0, true);
40 attachbutton->addTo(toolbar); 42 attachbutton->addTo(toolbar);
41 attachbutton->addTo(mailmenu); 43 attachbutton->addTo(mailmenu);
42 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); 44 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool)));
43 45
44 46
45 showHtml = new QAction( tr( "Show Html" ), QIconSet( Resource::loadPixmap( "mail/html" ) ), 0, 0, this, 0, true ); 47 showHtml = new QAction( tr( "Show Html" ), OResource::loadPixmap( "mail/html", OResource::SmallIcon ), 0, 0, this, 0, true );
46 showHtml->addTo( toolbar ); 48 showHtml->addTo( toolbar );
47 showHtml->addTo( mailmenu ); 49 showHtml->addTo( mailmenu );
48 50
49 showPicsInline= new QAction(tr("Show image preview inline"), QIconSet(Resource::loadPixmap("pixmap")), 0, 0, this); 51 showPicsInline= new QAction(tr("Show image preview inline"), OResource::loadPixmap("pixmap", OResource::SmallIcon), 0, 0, this);
50 showPicsInline->setToggleAction(true); 52 showPicsInline->setToggleAction(true);
51 showPicsInline->addTo(toolbar); 53 showPicsInline->addTo(toolbar);
52 showPicsInline->addTo(mailmenu); 54 showPicsInline->addTo(mailmenu);
53 55
54 deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("trash")), 0, 0, this); 56 deleteMail = new QAction(tr("Delete Mail"), OResource::loadPixmap("trash", OResource::SmallIcon), 0, 0, this);
55 deleteMail->addTo(toolbar); 57 deleteMail->addTo(toolbar);
56 deleteMail->addTo(mailmenu); 58 deleteMail->addTo(mailmenu);
57 59
58 QVBox * view = new QVBox(this); 60 QVBox * view = new QVBox(this);
59 view->setSpacing(1); 61 view->setSpacing(1);
60 view->setMargin(0); 62 view->setMargin(0);
61 setCentralWidget(view); 63 setCentralWidget(view);
62 64
63 attachments = new QListView(view); 65 attachments = new QListView(view);
64 attachments->setMinimumHeight(90); 66 attachments->setMinimumHeight(90);
65 attachments->setMaximumHeight(90); 67 attachments->setMaximumHeight(90);
66 attachments->setAllColumnsShowFocus(true); 68 attachments->setAllColumnsShowFocus(true);
67 attachments->addColumn("Mime Type", 60); 69 attachments->addColumn("Mime Type", 60);
68 attachments->addColumn(tr("Description"), 100); 70 attachments->addColumn(tr("Description"), 100);
69 attachments->addColumn(tr("Filename"), 80); 71 attachments->addColumn(tr("Filename"), 80);
70 attachments->addColumn(tr("Size"), 80); 72 attachments->addColumn(tr("Size"), 80);
71 attachments->setSorting(-1); 73 attachments->setSorting(-1);
72 74
73 browser = new QTextBrowser(view); 75 browser = new QTextBrowser(view);
74 adjustSize(); 76 adjustSize();
75 attachments->hide(); 77 attachments->hide();
76} 78}
77 79
78void ViewMailBase::slotChangeAttachview(bool state) 80void ViewMailBase::slotChangeAttachview(bool state)