summaryrefslogtreecommitdiff
authorharlekin <harlekin>2004-01-06 12:33:20 (UTC)
committer harlekin <harlekin>2004-01-06 12:33:20 (UTC)
commita1270a04613d9adbd72c41ae1cde4683b036eebd (patch) (side-by-side diff)
tree0ba4084bb84bd7e9e75fe1918f5b0b5cf0059410
parent1c484a5dfcea2e7e3dc4774c706ca03cab229d40 (diff)
downloadopie-a1270a04613d9adbd72c41ae1cde4683b036eebd.zip
opie-a1270a04613d9adbd72c41ae1cde4683b036eebd.tar.gz
opie-a1270a04613d9adbd72c41ae1cde4683b036eebd.tar.bz2
less icons
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/defines.h5
-rw-r--r--noncore/net/mail/libmailwrapper/pop3wrapper.cpp17
-rw-r--r--noncore/net/mail/mainwindow.cpp8
-rw-r--r--noncore/net/mail/taskbarapplet/mailapplet.cpp1
-rw-r--r--noncore/net/mail/viewmailbase.cpp2
-rw-r--r--pics/mail/abort.pngbin702 -> 0 bytes
-rw-r--r--pics/mail/configure.pngbin697 -> 0 bytes
-rw-r--r--pics/mail/delete.pngbin626 -> 0 bytes
-rw-r--r--pics/mail/deletemail.pngbin679 -> 0 bytes
-rw-r--r--pics/mail/editsettings.pngbin697 -> 0 bytes
-rw-r--r--pics/mail/find.pngbin809 -> 0 bytes
-rw-r--r--pics/mail/folder.pngbin767 -> 0 bytes
-rw-r--r--pics/mail/mailchecker.pngbin832 -> 0 bytes
-rw-r--r--pics/mail/reload.pngbin699 -> 0 bytes
-rw-r--r--pics/mail/savemail.pngbin757 -> 0 bytes
-rw-r--r--pics/mail/searchmails.pngbin820 -> 0 bytes
16 files changed, 16 insertions, 17 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,25 +1,22 @@
#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 ) )
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
@@ -30,41 +30,41 @@ POP3wrapper::~POP3wrapper()
}
void POP3wrapper::pop3_progress( size_t current, size_t maximum )
{
qDebug( "POP3: %i of %i", current, maximum );
}
RecBody POP3wrapper::fetchBody( const RecMail &mail )
{
int err = MAILPOP3_NO_ERROR;
char *message = 0;
size_t length = 0;
-
+
login();
if ( !m_pop3 ) {
return RecBody();
}
RecBody body;
mailmessage * mailmsg;
if (mail.Msgsize()>HARD_MSG_SIZE_LIMIT) {
qDebug("Message to large: %i",mail.Msgsize());
return body;
}
-
+
QFile msg_cache(msgTempName);
cleanMimeCache();
-
+
if (mail.getNumber()!=last_msg_id) {
if (msg_cache.exists()) {
msg_cache.remove();
}
msg_cache.open(IO_ReadWrite|IO_Truncate);
last_msg_id = mail.getNumber();
err = mailsession_get_message(m_folder->fld_session, mail.getNumber(), &mailmsg);
err = mailmessage_fetch(mailmsg,&message,&length);
msg_cache.writeBlock(message,length);
} else {
QString msg="";
msg_cache.open(IO_ReadOnly);
@@ -79,29 +79,29 @@ RecBody POP3wrapper::fetchBody( const RecMail &mail )
memset(message,0,msg.length()+1);
memcpy(message,msg.latin1(),msg.length());
/* transform to libetpan stuff */
mailmsg = mailmessage_new();
mailmessage_init(mailmsg, NULL, data_message_driver, 0, strlen(message));
generic_message_t * msg_data;
msg_data = (generic_message_t *)mailmsg->msg_data;
msg_data->msg_fetched = 1;
msg_data->msg_message = message;
msg_data->msg_length = strlen(message);
}
body = parseMail(mailmsg);
-
+
/* clean up */
- if (mailmsg) mailmessage_free(mailmsg);
+ if (mailmsg) mailmessage_free(mailmsg);
if (message) free(message);
-
+
return body;
}
void POP3wrapper::listMessages(const QString &, QList<RecMail> &target )
{
login();
if (!m_pop3) return;
uint32_t res_messages,res_recent,res_unseen;
mailsession_status_folder(m_folder->fld_session,"INBOX",&res_messages,&res_recent,&res_unseen);
parseList(target,m_folder->fld_session,"INBOX");
Global::statusMessage( tr("Mailbox contains %1 mail(s)").arg(res_messages));
}
@@ -144,24 +144,25 @@ void POP3wrapper::login()
(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;
@@ -205,46 +206,46 @@ int POP3wrapper::deleteAllMail(const Folder*)
int err = mailsession_messages_number(m_folder->fld_session,NULL,&result);
if (err != MAIL_NO_ERROR) {
Global::statusMessage(tr("Error getting folder info"));
return 0;
}
for (unsigned int i = 0; i < result; ++i) {
err = mailsession_remove_message(m_folder->fld_session,i+1);
if (err != MAIL_NO_ERROR) {
Global::statusMessage(tr("Error deleting mail %1").arg(i+1));
res=0;
}
break;
- }
+ }
return res;
}
void POP3wrapper::statusFolder(folderStat&target_stat,const QString&)
{
login();
target_stat.message_count = 0;
target_stat.message_unseen = 0;
target_stat.message_recent = 0;
if (!m_pop3) return;
int r = mailsession_status_folder(m_folder->fld_session,0,&target_stat.message_count,
&target_stat.message_recent,&target_stat.message_unseen);
}
encodedString* POP3wrapper::fetchRawBody(const RecMail&mail)
{
char*target=0;
size_t length=0;
encodedString*res = 0;
mailmessage * mailmsg = 0;
int err = mailsession_get_message(m_folder->fld_session, mail.getNumber(), &mailmsg);
err = mailmessage_fetch(mailmsg,&target,&length);
- if (mailmsg) mailmessage_free(mailmsg);
+ if (mailmsg) mailmessage_free(mailmsg);
if (target) {
res = new encodedString(target,length);
}
return res;
}
const QString&POP3wrapper::getType()const
{
return account->getType();
}
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
@@ -55,42 +55,42 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
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 );
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
@@ -40,24 +40,25 @@ 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" );
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
@@ -39,25 +39,25 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
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);
diff --git a/pics/mail/abort.png b/pics/mail/abort.png
deleted file mode 100644
index 13d0588..0000000
--- a/pics/mail/abort.png
+++ b/dev/null
Binary files differ
diff --git a/pics/mail/configure.png b/pics/mail/configure.png
deleted file mode 100644
index 9bbde25..0000000
--- a/pics/mail/configure.png
+++ b/dev/null
Binary files differ
diff --git a/pics/mail/delete.png b/pics/mail/delete.png
deleted file mode 100644
index 3d3daf2..0000000
--- a/pics/mail/delete.png
+++ b/dev/null
Binary files differ
diff --git a/pics/mail/deletemail.png b/pics/mail/deletemail.png
deleted file mode 100644
index 78a5f62..0000000
--- a/pics/mail/deletemail.png
+++ b/dev/null
Binary files differ
diff --git a/pics/mail/editsettings.png b/pics/mail/editsettings.png
deleted file mode 100644
index 9bbde25..0000000
--- a/pics/mail/editsettings.png
+++ b/dev/null
Binary files differ
diff --git a/pics/mail/find.png b/pics/mail/find.png
deleted file mode 100644
index 0dbfa0b..0000000
--- a/pics/mail/find.png
+++ b/dev/null
Binary files differ
diff --git a/pics/mail/folder.png b/pics/mail/folder.png
deleted file mode 100644
index 0c980dc..0000000
--- a/pics/mail/folder.png
+++ b/dev/null
Binary files differ
diff --git a/pics/mail/mailchecker.png b/pics/mail/mailchecker.png
deleted file mode 100644
index 7fb36b1..0000000
--- a/pics/mail/mailchecker.png
+++ b/dev/null
Binary files differ
diff --git a/pics/mail/reload.png b/pics/mail/reload.png
deleted file mode 100644
index 3bfff11..0000000
--- a/pics/mail/reload.png
+++ b/dev/null
Binary files differ
diff --git a/pics/mail/savemail.png b/pics/mail/savemail.png
deleted file mode 100644
index a44dd1f..0000000
--- a/pics/mail/savemail.png
+++ b/dev/null
Binary files differ
diff --git a/pics/mail/searchmails.png b/pics/mail/searchmails.png
deleted file mode 100644
index 21dc83e..0000000
--- a/pics/mail/searchmails.png
+++ b/dev/null
Binary files differ