-rw-r--r-- | noncore/net/mail/defines.h | 5 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.cpp | 1 | ||||
-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 8 | ||||
-rw-r--r-- | noncore/net/mail/taskbarapplet/mailapplet.cpp | 1 | ||||
-rw-r--r-- | noncore/net/mail/viewmailbase.cpp | 2 | ||||
-rw-r--r-- | pics/mail/abort.png | bin | 702 -> 0 bytes | |||
-rw-r--r-- | pics/mail/configure.png | bin | 697 -> 0 bytes | |||
-rw-r--r-- | pics/mail/delete.png | bin | 626 -> 0 bytes | |||
-rw-r--r-- | pics/mail/deletemail.png | bin | 679 -> 0 bytes | |||
-rw-r--r-- | pics/mail/editsettings.png | bin | 697 -> 0 bytes | |||
-rw-r--r-- | pics/mail/find.png | bin | 809 -> 0 bytes | |||
-rw-r--r-- | pics/mail/folder.png | bin | 767 -> 0 bytes | |||
-rw-r--r-- | pics/mail/mailchecker.png | bin | 832 -> 0 bytes | |||
-rw-r--r-- | pics/mail/reload.png | bin | 699 -> 0 bytes | |||
-rw-r--r-- | pics/mail/savemail.png | bin | 757 -> 0 bytes | |||
-rw-r--r-- | pics/mail/searchmails.png | bin | 820 -> 0 bytes |
16 files changed, 8 insertions, 9 deletions
diff --git a/noncore/net/mail/defines.h b/noncore/net/mail/defines.h index 36c85c7..ebe8e08 100644 --- a/noncore/net/mail/defines.h +++ b/noncore/net/mail/defines.h @@ -1,57 +1,54 @@ #ifndef DEFINE_CONSTANTS_H #define DEFINE_CONSTANTS_H #include <qpe/resource.h> -#define USER_AGENT "OpieMail v0.1" +#define USER_AGENT "OpieMail v0.3" #define PIC_COMPOSEMAIL "mail/composemail" #define PIC_SENDQUEUED "mail/sendqueued" #define PIC_SHOWFOLDERS "mail/showfolders" -#define PIC_SEARCHMAILS "mail/searchmails" -#define PIC_EDITSETTINGS "mail/editsettings" -#define PIC_EDITACCOUNTS "mail/editaccounts" #define PIC_SYNC "mail/sync" #define PIC_IMAPFOLDER "mail/imapfolder" #define PIC_MBOXFOLDER "mail/mboxfolder" #define PIC_POP3FOLDER "mail/pop3folder" #define PIC_INBOXFOLDER "mail/inbox" #define PIC_OUTBOXFOLDER "mail/outbox" #define PIC_LOCALFOLDER "mail/localfolder" #define ICON_COMPOSEMAIL QIconSet( Resource::loadPixmap( PIC_COMPOSEMAIL ) ) #define ICON_SENDQUEUED QIconSet( Resource::loadPixmap( PIC_SENDQUEUED ) ) #define ICON_SHOWFOLDERS QIconSet( Resource::loadPixmap( PIC_SHOWFOLDERS ) ) #define ICON_SEARCHMAILS QIconSet( Resource::loadPixmap( PIC_SEARCHMAILS ) ) #define ICON_EDITSETTINGS QIconSet( Resource::loadPixmap( PIC_EDITSETTINGS ) ) #define ICON_EDITACCOUNTS QIconSet( Resource::loadPixmap( PIC_EDITACCOUNTS ) ) #define ICON_SYNC QIconSet( Resource::loadPixmap( PIC_SYNC ) ) #define PIXMAP_IMAPFOLDER QPixmap( Resource::loadPixmap( PIC_IMAPFOLDER ) ) #define PIXMAP_POP3FOLDER QPixmap( Resource::loadPixmap( PIC_POP3FOLDER ) ) #define PIXMAP_INBOXFOLDER QPixmap( Resource::loadPixmap( PIC_INBOXFOLDER) ) #define PIXMAP_MBOXFOLDER QPixmap( Resource::loadPixmap( PIC_MBOXFOLDER ) ) #define PIXMAP_OUTBOXFOLDER QPixmap( Resource::loadPixmap( PIC_OUTBOXFOLDER) ) #define PIXMAP_LOCALFOLDER QPixmap( Resource::loadPixmap( PIC_LOCALFOLDER) ) #define IMAP_PORT "143" #define IMAP_SSL_PORT "993" #define SMTP_PORT "25" #define SMTP_SSL_PORT "465" #define POP3_PORT "110" #define POP3_SSL_PORT "995" #define NNTP_PORT "119" #define NNTP_SSL_PORT "563" /* used for decoding imapfoldername */ #define UNDEFINED 64 #define MAXLINE 76 #define UTF16MASK 0x03FFUL #define UTF16SHIFT 10 #define UTF16BASE 0x10000UL #define UTF16HIGHSTART 0xD800UL #define UTF16HIGHEND 0xDBFFUL #define UTF16LOSTART 0xDC00UL #define UTF16LOEND 0xDFFFUL #endif diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp index ec4dcd2..cceb22e 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp @@ -108,96 +108,97 @@ void POP3wrapper::listMessages(const QString &, QList<RecMail> &target ) void POP3wrapper::login() { /* we'll hold the line */ if ( m_pop3 != NULL ) return; const char *server, *user, *pass; uint16_t port; int err = MAILPOP3_NO_ERROR; server = account->getServer().latin1(); port = account->getPort().toUInt(); if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true ); login.show(); if ( QDialog::Accepted == login.exec() ) { // ok user = login.getUser().latin1(); pass = login.getPassword().latin1(); } else { // cancel qDebug( "POP3: Login canceled" ); return; } } else { user = account->getUser().latin1(); pass = account->getPassword().latin1(); } bool ssl = account->getSSL(); m_pop3=mailstorage_new(NULL); int conntype = (ssl?CONNECTION_TYPE_TLS:CONNECTION_TYPE_PLAIN); pop3_mailstorage_init(m_pop3,(char*)server,port,NULL,conntype,POP3_AUTH_TYPE_PLAIN, (char*)user,(char*)pass,0,0,0); m_folder = mailfolder_new(m_pop3, NULL, NULL); if (m_folder==0) { Global::statusMessage(tr("Error initializing folder")); mailstorage_free(m_pop3); m_pop3 = NULL; return; } err = mailfolder_connect(m_folder); if (err != MAIL_NO_ERROR) { + qDebug( QString( "FEHLERNUMMER %1" ).arg( err ) ); Global::statusMessage(tr("Error initializing folder")); mailfolder_free(m_folder); m_folder = 0; mailstorage_free(m_pop3); m_pop3 = 0; } } void POP3wrapper::logout() { int err = MAILPOP3_NO_ERROR; if ( m_pop3 == NULL ) return; mailfolder_free(m_folder); m_folder = 0; mailstorage_free(m_pop3); m_pop3 = 0; } QList<Folder>* POP3wrapper::listFolders() { QList<Folder> * folders = new QList<Folder>(); folders->setAutoDelete( false ); Folder*inb=new Folder("INBOX","/"); folders->append(inb); return folders; } void POP3wrapper::deleteMail(const RecMail&mail) { login(); if (!m_pop3) return; int err = mailsession_remove_message(m_folder->fld_session,mail.getNumber()); if (err != MAIL_NO_ERROR) { Global::statusMessage(tr("error deleting mail")); } } void POP3wrapper::answeredMail(const RecMail&) { } int POP3wrapper::deleteAllMail(const Folder*) { login(); if (!m_pop3) return 0; int res = 1; diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index 43d02e7..3c659e4 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp @@ -19,114 +19,114 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) : QMainWindow( parent, name, flags ) { setCaption( tr( "Mail" ) ); setToolBarsMovable( false ); toolBar = new QToolBar( this ); menuBar = new QMenuBar( toolBar ); mailMenu = new QPopupMenu( menuBar ); menuBar->insertItem( tr( "Mail" ), mailMenu ); settingsMenu = new QPopupMenu( menuBar ); menuBar->insertItem( tr( "Settings" ), settingsMenu ); addToolBar( toolBar ); toolBar->setHorizontalStretchable( true ); QLabel *spacer = new QLabel( toolBar ); spacer->setBackgroundMode( QWidget::PaletteButton ); toolBar->setStretchableWidget( spacer ); composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL, 0, 0, this ); composeMail->addTo( toolBar ); composeMail->addTo( mailMenu ); sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, 0, 0, this ); sendQueued->addTo( toolBar ); sendQueued->addTo( mailMenu ); /* syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, 0, 0, this ); syncFolders->addTo( toolBar ); syncFolders->addTo( mailMenu ); */ showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS, 0, 0, this, 0, true ); showFolders->addTo( toolBar ); showFolders->addTo( mailMenu ); showFolders->setOn( true ); connect(showFolders, SIGNAL( toggled( bool ) ), SLOT( slotShowFolders( bool ) ) ); /* - searchMails = new QAction( tr( "Search mails" ), ICON_SEARCHMAILS, + searchMails = new QAction( tr( "Search mails" ), QIconSet( Resource::loadPixmap("find") ), 0, 0, this ); searchMails->addTo( toolBar ); searchMails->addTo( mailMenu ); */ - deleteMails = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); + deleteMails = new QAction(tr("Delete Mail"), QIconSet( Resource::loadPixmap("trash")), 0, 0, this); deleteMails->addTo( toolBar ); deleteMails->addTo( mailMenu ); connect( deleteMails, SIGNAL( activated() ), SLOT( slotDeleteMail() ) ); - editSettings = new QAction( tr( "Edit settings" ), ICON_EDITSETTINGS, + editSettings = new QAction( tr( "Edit settings" ), QIconSet( Resource::loadPixmap("SettingsIcon") ) , 0, 0, this ); editSettings->addTo( settingsMenu ); connect( editSettings, SIGNAL( activated() ), SLOT( slotEditSettings() ) ); - editAccounts = new QAction( tr( "Configure accounts" ), ICON_EDITACCOUNTS, + editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("mail/editaccounts") ) , 0, 0, this ); editAccounts->addTo( settingsMenu ); //setCentralWidget( view ); QVBox* wrapperBox = new QVBox( this ); setCentralWidget( wrapperBox ); QWidget *view = new QWidget( wrapperBox ); layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); folderView = new AccountView( view ); folderView->header()->hide(); folderView->setRootIsDecorated( true ); folderView->addColumn( tr( "Mailbox" ) ); layout->addWidget( folderView ); mailView = new QListView( view ); mailView->addColumn( tr( "" ) ); mailView->addColumn( tr( "Subject" ),QListView::Manual ); mailView->addColumn( tr( "Sender" ),QListView::Manual ); mailView->addColumn( tr( "Size" ),QListView::Manual); mailView->addColumn( tr( "Date" )); mailView->setAllColumnsShowFocus(true); mailView->setSorting(-1); statusWidget = new StatusWidget( wrapperBox ); statusWidget->hide(); layout->addWidget( mailView ); layout->setStretchFactor( folderView, 1 ); layout->setStretchFactor( mailView, 2 ); slotAdjustLayout(); QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); connect( mailView, SIGNAL( mouseButtonClicked(int, QListViewItem *,const QPoint&,int ) ),this, SLOT( mailLeftClicked( int, QListViewItem *,const QPoint&,int ) ) ); connect( mailView, SIGNAL( mouseButtonPressed(int, QListViewItem *,const QPoint&,int ) ),this, SLOT( mailHold( int, QListViewItem *,const QPoint&,int ) ) ); connect(folderView, SIGNAL(refreshMailview(QList<RecMail>*)),this,SLOT(refreshMailView(QList<RecMail>*))); QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); } diff --git a/noncore/net/mail/taskbarapplet/mailapplet.cpp b/noncore/net/mail/taskbarapplet/mailapplet.cpp index a261d14..991b5fb 100644 --- a/noncore/net/mail/taskbarapplet/mailapplet.cpp +++ b/noncore/net/mail/taskbarapplet/mailapplet.cpp @@ -4,96 +4,97 @@ #include <qpe/qcopenvelope_qws.h> #include <qpe/resource.h> #include <qpe/config.h> #include <qpe/applnk.h> #include <opie/odevice.h> #include <libmailwrapper/settings.h> #include "mailapplet.h" using namespace Opie; MailApplet::MailApplet( QWidget *parent ) : QWidget( parent ) { m_config = new Config( "mail" ); m_config->setGroup( "Applet" ); setFixedWidth( AppLnk::smallIconSize() ); setFixedHeight( AppLnk::smallIconSize() ); hide(); m_newMails = 0; m_statusMail = 0l; if ( !m_config->readBoolEntry( "Disabled", false ) ) { // delay 5 sec until the whole mail backend gets started .-) QTimer::singleShot( 5000, this, SLOT( startup() ) ); } repaint( true ); } MailApplet::~MailApplet() { if ( m_statusMail ) delete m_statusMail; if ( m_config ) delete m_config; } void MailApplet::paintEvent( QPaintEvent* ) { QPainter p( this ); p.drawPixmap( 0, 0, Resource::loadPixmap( "mail/inbox" ) ); QFont f( "vera", AppLnk::smallIconSize() ); QFontMetrics fm( f ); p.setFont( f ); + p.setPen( Qt::blue ); p.drawText( AppLnk::smallIconSize()/3, AppLnk::smallIconSize() - 2, QString::number( m_newMails ) ); return; } void MailApplet::mouseReleaseEvent( QMouseEvent* e ) { slotClicked(); } void MailApplet::slotClicked() { QCopEnvelope e( "QPE/System", "execute(QString)" ); e << QString( "opiemail" ); ODevice *device = ODevice::inst(); if ( !device-> ledList().isEmpty() ) { OLed led = ( device->ledList().contains( Led_Mail ) ) ? Led_Mail : device->ledList()[0]; device->setLedState( led, Led_Off ); } // m_statusMails->reset_status(); } void MailApplet::startup() { Settings *settings = new Settings(); QList<Account> ma = settings->getAccounts(); m_statusMail = new StatusMail( ma ); delete settings; m_intervalMs = m_config->readNumEntry( "CheckEvery", 5 ) * 60000; m_intervalTimer = new QTimer(); m_intervalTimer->start( m_intervalMs ); connect( m_intervalTimer, SIGNAL( timeout() ), this, SLOT( slotCheck() ) ); } void MailApplet::slotCheck() { // Check wether the check interval has been changed. int newIntervalMs = m_config->readNumEntry( "CheckEvery", 5 ) * 60000; if ( newIntervalMs != m_intervalMs ) { m_intervalTimer->changeInterval( newIntervalMs ); m_intervalMs = newIntervalMs; } if (m_statusMail == 0) { return; } folderStat stat; diff --git a/noncore/net/mail/viewmailbase.cpp b/noncore/net/mail/viewmailbase.cpp index 0e994d4..153ba9d 100644 --- a/noncore/net/mail/viewmailbase.cpp +++ b/noncore/net/mail/viewmailbase.cpp @@ -3,80 +3,80 @@ #include <qaction.h> #include <qlabel.h> #include <qvbox.h> #include <qpopupmenu.h> #include <qpe/qpetoolbar.h> #include <qmenubar.h> #include <qpe/resource.h> #include "viewmailbase.h" //#include "opendiag.h" ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) : QMainWindow(parent, name, fl) { setCaption(tr("E-Mail by %1")); setToolBarsMovable(false); toolbar = new QToolBar(this); menubar = new QMenuBar( toolbar ); mailmenu = new QPopupMenu( menubar ); menubar->insertItem( tr( "Mail" ), mailmenu ); toolbar->setHorizontalStretchable(true); addToolBar(toolbar); QLabel *spacer = new QLabel(toolbar); spacer->setBackgroundMode(QWidget::PaletteButton); toolbar->setStretchableWidget(spacer); reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this); reply->addTo(toolbar); reply->addTo(mailmenu); forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this); forward->addTo(toolbar); forward->addTo(mailmenu); attachbutton = new QAction(tr("Attachments"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); attachbutton->addTo(toolbar); attachbutton->addTo(mailmenu); connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); showHtml = new QAction( tr( "Show Html" ), QIconSet( Resource::loadPixmap( "mail/html" ) ), 0, 0, this, 0, true ); showHtml->addTo( toolbar ); showHtml->addTo( mailmenu ); - deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); + deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("trash")), 0, 0, this); deleteMail->addTo(toolbar); deleteMail->addTo(mailmenu); QVBox *view = new QVBox(this); setCentralWidget(view); attachments = new QListView(view); attachments->setMinimumHeight(90); attachments->setMaximumHeight(90); attachments->setAllColumnsShowFocus(true); attachments->addColumn("Mime Type", 60); attachments->addColumn(tr("Description"), 100); attachments->addColumn(tr("Filename"), 80); attachments->addColumn(tr("Size"), 80); attachments->setSorting(-1); attachments->hide(); browser = new QTextBrowser(view); // openDiag = new OpenDiag(view); // openDiag->hide(); } void ViewMailBase::slotChangeAttachview(bool state) { if (state) attachments->show(); else attachments->hide(); } diff --git a/pics/mail/abort.png b/pics/mail/abort.png Binary files differdeleted file mode 100644 index 13d0588..0000000 --- a/pics/mail/abort.png +++ b/dev/null diff --git a/pics/mail/configure.png b/pics/mail/configure.png Binary files differdeleted file mode 100644 index 9bbde25..0000000 --- a/pics/mail/configure.png +++ b/dev/null diff --git a/pics/mail/delete.png b/pics/mail/delete.png Binary files differdeleted file mode 100644 index 3d3daf2..0000000 --- a/pics/mail/delete.png +++ b/dev/null diff --git a/pics/mail/deletemail.png b/pics/mail/deletemail.png Binary files differdeleted file mode 100644 index 78a5f62..0000000 --- a/pics/mail/deletemail.png +++ b/dev/null diff --git a/pics/mail/editsettings.png b/pics/mail/editsettings.png Binary files differdeleted file mode 100644 index 9bbde25..0000000 --- a/pics/mail/editsettings.png +++ b/dev/null diff --git a/pics/mail/find.png b/pics/mail/find.png Binary files differdeleted file mode 100644 index 0dbfa0b..0000000 --- a/pics/mail/find.png +++ b/dev/null diff --git a/pics/mail/folder.png b/pics/mail/folder.png Binary files differdeleted file mode 100644 index 0c980dc..0000000 --- a/pics/mail/folder.png +++ b/dev/null diff --git a/pics/mail/mailchecker.png b/pics/mail/mailchecker.png Binary files differdeleted file mode 100644 index 7fb36b1..0000000 --- a/pics/mail/mailchecker.png +++ b/dev/null diff --git a/pics/mail/reload.png b/pics/mail/reload.png Binary files differdeleted file mode 100644 index 3bfff11..0000000 --- a/pics/mail/reload.png +++ b/dev/null diff --git a/pics/mail/savemail.png b/pics/mail/savemail.png Binary files differdeleted file mode 100644 index a44dd1f..0000000 --- a/pics/mail/savemail.png +++ b/dev/null diff --git a/pics/mail/searchmails.png b/pics/mail/searchmails.png Binary files differdeleted file mode 100644 index 21dc83e..0000000 --- a/pics/mail/searchmails.png +++ b/dev/null |