summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-24 18:27:06 (UTC)
committer zautrix <zautrix>2005-01-24 18:27:06 (UTC)
commitbb33b559609356149ae51cb50c081b3e82aecafb (patch) (side-by-side diff)
tree4878aa5887bf1c539845ce9c4e5470eea94d41cc
parent77f93c632b66b5c8d92e4c63330362272ca1fc40 (diff)
downloadkdepimpi-bb33b559609356149ae51cb50c081b3e82aecafb.zip
kdepimpi-bb33b559609356149ae51cb50c081b3e82aecafb.tar.gz
kdepimpi-bb33b559609356149ae51cb50c081b3e82aecafb.tar.bz2
pixmap update fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/mailistviewitem.cpp5
-rw-r--r--kmicromail/opiemail.cpp4
-rw-r--r--kmicromail/viewmail.h4
-rw-r--r--kmicromail/viewmailbase.cpp12
4 files changed, 13 insertions, 12 deletions
diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp
index 137c482..5119744 100644
--- a/kmicromail/mailistviewitem.cpp
+++ b/kmicromail/mailistviewitem.cpp
@@ -6,30 +6,33 @@
#include "koprefs.h"
//#include <qpe/resource.h>
MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item )
:QListViewItem(parent,item),mail_data()
{
}
void MailListViewItem::showEntry()
{
if ( mail_data->getFlags().testBit( FLAG_ANSWERED ) == true) {
setPixmap( 0, SmallIcon ( "kmmsgreplied") );
+ mKeyMap.insert(0, "r" );
} else if ( mail_data->getFlags().testBit( FLAG_SEEN ) == true ) {
/* I think it looks nicer if there are not such a log of icons but only on mails
replied or new - Alwin*/
//setPixmap( 0,SmallIcon ("kmmsgunseen") );
+ mKeyMap.insert(0, "s" );
} else {
setPixmap( 0,SmallIcon ( "kmmsgnew") );
+ mKeyMap.insert(0, "u" );
}
QString fsize = mail_data->MsgsizeString();
// 1.23
// 11.23
// 111.23
// 999.23 maxlen
QString fsort;
switch(fsize.length() ) {
case 6:
fsort = "00" + fsize ;
break;
case 7:
@@ -58,25 +61,25 @@ void MailListViewItem::showEntry()
void MailListViewItem::storeData(const RecMailP&data)
{
mail_data = data;
}
void MailListViewItem::setSortKey(int column,const QString &key)
{
mKeyMap.insert(column,key);
}
QString MailListViewItem::key(int column, bool) const
{
// to make is fast, we use here special cases
- if ( column == 3 || column == 4 ) {
+ if ( column == 3 || column == 4 || column == 0) {
return *mKeyMap.find(column);
}
if ( column == 1 ) {
if ( text(1).left(4).lower() == "re: " )
return text(1).mid(4);
}
return text(column);
/*
QMap<int,QString>::ConstIterator it = mKeyMap.find(column);
if (it == mKeyMap.end()) return text(column);
else return *it;
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 760e3b0..68f0eb3 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -406,25 +406,27 @@ void OpieMail::displayMail()
connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) );
connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) );
connect( &readMail,SIGNAL( signalDownloadMail() ), this, SLOT( slotDownloadMail() ) );
readMail.exec();
if ( readMail.deleted )
{
folderView->refreshCurrent();
}
else
{
- ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
+ QListViewItem*item = mailView->currentItem();
+ if (item)
+ ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
}
}
void OpieMail::slotGetAllMail()
{
QListViewItem * item = folderView->firstChild();
while ( item ){
((AccountViewItem *)item)->contextMenuSelected( 101 );
item = item->nextSibling ();
}
}
void OpieMail::slotGetMail()
{
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h
index 561989e..fc5edcf 100644
--- a/kmicromail/viewmail.h
+++ b/kmicromail/viewmail.h
@@ -1,22 +1,24 @@
#ifndef VIEWMAIL_H
#define VIEWMAIL_H
#include "viewmailbase.h"
#include <libmailwrapper/mailtypes.h>
#include <qdialog.h>
+#include <qapplication.h>
#include <qlistview.h>
#include <qmap.h>
+#include <klocale.h>
#include <qstringlist.h>
#include <qvaluelist.h>
//namespace Opie { namespace MM { class OImageScrollView; } }
class AttachItem : public QListViewItem
{
public:
AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file,
const QString&fsize,int num,const QValueList<int>&path);
AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file,
const QString&fsize,int num,const QValueList<int>&path);
@@ -43,25 +45,25 @@ public:
void setBody(const RecBodyP&body);
bool deleted;
signals:
void showNextMail(ViewMail*);
void deleteAndDisplayNextMail(ViewMail *);
void signalDownloadMail();
protected:
QString deHtml(const QString &string);
AttachItem* searchParent(const QValueList<int>&path);
AttachItem* lastChild(AttachItem*parent);
protected slots:
- void slotNextMail() { emit showNextMail(this); };
+ void slotNextMail() { setCaption(i18n("Displaying next mail...please wait!")); qApp->processEvents();emit showNextMail(this); };
void slotReply();
void slotForward();
void setText();
void slotItemClicked( QListViewItem * item , const QPoint & point, int c );
void slotDeleteMail( );
void slotShowHtml( bool );
void slotViewSource();
private:
void readConfig();
bool sourceOn;;
bool _inLoop;
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index 9365c23..3a41ba0 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -40,43 +40,37 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
reply->addTo(toolbar);
reply->addTo(mailmenu);
forward = new QAction(i18n("Forward"),SmallIcon("forward"), 0, 0, this);
forward->addTo(toolbar);
forward->addTo(mailmenu);
attachbutton = new QAction(i18n("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true);
attachbutton->addTo(toolbar);
attachbutton->addTo(mailmenu);
connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool)));
-
- showHtml = new QAction( i18n( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true );
- showHtml->addTo( toolbar );
- showHtml->addTo( mailmenu );
+ showHtml = new QAction( i18n( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true );
+ showHtml->addTo( toolbar );
+ showHtml->addTo( mailmenu );
deleteMail = new QAction(i18n("Delete Mail"),SmallIcon("trash"), 0, 0, this);
deleteMail->addTo(toolbar);
deleteMail->addTo(mailmenu);
-
-
nextMail = new QAction(i18n("Show next mail"),SmallIcon("enter"), 0, 0, this);
QLabel *spacer = new QLabel(toolbar);
nextMail->addTo(toolbar);
nextMail->addTo(mailmenu);
-
-
-
closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
//QLabel *spacer = new QLabel(toolbar);
spacer->setBackgroundMode(QWidget::PaletteButton);
toolbar->setStretchableWidget(spacer);
closeMail->addTo(toolbar);
closeMail->addTo(mailmenu);
QVBox *view = new QVBox(this);
setCentralWidget(view);
attachments = new QListView(view);
attachments->setMinimumHeight(90);
attachments->setMaximumHeight(90);