summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-12-12 14:50:30 (UTC)
committer harlekin <harlekin>2003-12-12 14:50:30 (UTC)
commitab38828e927334e5e1ad66bf6682099068f4c5e0 (patch) (side-by-side diff)
tree88479ca55851b45bc8c51aaa5216bcd77318049e
parent1aa69d74df6ac0ae182815e03fe57cfee5702d5a (diff)
downloadopie-ab38828e927334e5e1ad66bf6682099068f4c5e0.zip
opie-ab38828e927334e5e1ad66bf6682099068f4c5e0.tar.gz
opie-ab38828e927334e5e1ad66bf6682099068f4c5e0.tar.bz2
beauty
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/mainwindow.cpp21
-rw-r--r--pics/opiemail/kmmsgnew.pngbin0 -> 481 bytes
-rw-r--r--pics/opiemail/kmmsgunseen.pngbin0 -> 396 bytes
3 files changed, 15 insertions, 6 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index 1d6e901..f0a915d 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -1,15 +1,16 @@
#include <qlabel.h>
#include <qvbox.h>
#include <qheader.h>
#include <qtimer.h>
#include <qlayout.h>
#include <qpe/qpeapplication.h>
+#include <qpe/resource.h>
#include "defines.h"
#include "mainwindow.h"
#include "viewmail.h"
#include "mailtypes.h"
#include "mailistviewitem.h"
MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
@@ -76,16 +77,17 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
folderView = new AccountView( view );
folderView->header()->hide();
folderView->addColumn( tr( "Mailbox" ) );
folderView->hide();
layout->addWidget( folderView );
mailView = new QListView( view );
+ mailView->addColumn( tr( "Status" ) );
mailView->addColumn( tr( "Subject" ),QListView::Manual );
mailView->addColumn( tr( "Sender" ),QListView::Manual );
mailView->addColumn( tr( "Date" ));
mailView->setAllColumnsShowFocus(true);
mailView->setSorting(-1);
layout->addWidget( mailView );
layout->setStretchFactor( folderView, 1 );
@@ -116,19 +118,20 @@ void MainWindow::slotAdjustLayout() {
void MainWindow::slotAdjustColumns()
{
bool hidden = folderView->isHidden();
if ( hidden ) folderView->show();
folderView->setColumnWidth( 0, folderView->visibleWidth() );
if ( hidden ) folderView->hide();
- mailView->setColumnWidth( 0, mailView->visibleWidth() - 130 );
- mailView->setColumnWidth( 1, 80 );
- mailView->setColumnWidth( 2, 50 );
+ mailView->setColumnWidth( 0, 10 );
+ mailView->setColumnWidth( 1, mailView->visibleWidth() - 130 );
+ mailView->setColumnWidth( 2, 80 );
+ mailView->setColumnWidth( 3, 50 );
}
void MainWindow::slotShowFolders( bool show )
{
qDebug( "Show Folders" );
if ( show && folderView->isHidden() ) {
qDebug( "-> showing" );
folderView->show();
@@ -154,28 +157,34 @@ void MainWindow::displayMail(QListViewItem*item)
RecMail mail = ((MailListViewItem*)item)->data();
RecBody body = folderView->fetchBody(mail);
ViewMail readMail( this );
readMail.setBody( body );
readMail.setMail( mail );
readMail.showMaximized();
readMail.exec();
+ ( (MailListViewItem*)item )->setPixmap( 0, Resource::loadPixmap( "opiemail/kmmsgunseen") );
}
MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * after )
:QListViewItem(parent,after),mail_data()
{
}
void MailListViewItem::showEntry()
{
- setText(0,mail_data.getSubject());
- setText(1,mail_data.getFrom());
- setText(2,mail_data.getDate());
+ if ( mail_data.getFlags().testBit( FLAG_SEEN ) == true ) {
+ setPixmap( 0, Resource::loadPixmap( "opiemail/kmmsgunseen") );
+ } else {
+ setPixmap( 0, Resource::loadPixmap( "opiemail/kmmsgnew") );
+ }
+ setText(1,mail_data.getSubject());
+ setText(2,mail_data.getFrom());
+ setText(3,mail_data.getDate());
}
void MailListViewItem::storeData(const RecMail&data)
{
mail_data = data;
}
const RecMail& MailListViewItem::data()const
diff --git a/pics/opiemail/kmmsgnew.png b/pics/opiemail/kmmsgnew.png
new file mode 100644
index 0000000..245d156
--- a/dev/null
+++ b/pics/opiemail/kmmsgnew.png
Binary files differ
diff --git a/pics/opiemail/kmmsgunseen.png b/pics/opiemail/kmmsgunseen.png
new file mode 100644
index 0000000..8e3de20
--- a/dev/null
+++ b/pics/opiemail/kmmsgunseen.png
Binary files differ