summaryrefslogtreecommitdiffabout
path: root/kmicromail
Side-by-side diff
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/composemail.cpp5
-rw-r--r--kmicromail/mailistviewitem.cpp3
-rw-r--r--kmicromail/mailistviewitem.h4
-rw-r--r--kmicromail/mainwindow.cpp16
-rw-r--r--kmicromail/mainwindow.h4
5 files changed, 19 insertions, 13 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 7b609fc..4bc4441 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -48,16 +48,17 @@
#include <qlistview.h>
//using namespace Opie::Core;
//using namespace Opie::Ui;
ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, bool modal )
: ComposeMailUI( parent, name, modal )
{
+ topLevelWidget()->setCaption( i18n("Compose mail - Click OK to send ->") );
mPickLineEdit = 0;
mEncoding = KOPrefs::instance()->mCurrentCodeName;
//managed from opiemail now
//connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
// this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
settings = sett;
m_replyid = "";
if ( KOPrefs::instance()->mUseKapi) {
@@ -218,17 +219,17 @@ void ComposeMail::saveAsDraft()
QMessageBox::warning(0,i18n("Store message"),
i18n("<center>Attachments will not be stored in \"Draft\" folder</center>"));
warnAttach = false;
}
setStatus( i18n("Mail saved as draft!") );
}
void ComposeMail::clearStatus()
{
- topLevelWidget()->setCaption( i18n("Compose mail") );
+ topLevelWidget()->setCaption( i18n("Compose mail - Click OK to send ->") );
}
void ComposeMail::setStatus( QString status )
{
topLevelWidget()->setCaption( status );
QTimer::singleShot ( 10000, this, SLOT( clearStatus() ) ) ;
}
void ComposeMail::pickAddress( )
{
@@ -419,17 +420,17 @@ void ComposeMail::accept()
{
if ( smtpAccountBox->count() == 0 ) {
reject();
return;
}
if (! checkBoxLater->isChecked() ) {
- int yesno = QMessageBox::warning(0,i18n("Stop editing message"),
+ int yesno = QMessageBox::warning(0, subjectLine->text().left ( 25 ),
i18n("Send this message?"),
i18n("Yes"),
i18n("Cancel"));
if (yesno == 1) {
return;
}
}
diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp
index 5119744..15fa148 100644
--- a/kmicromail/mailistviewitem.cpp
+++ b/kmicromail/mailistviewitem.cpp
@@ -2,17 +2,17 @@
#include "mailistviewitem.h"
#include <libmailwrapper/abstractmail.h>
#include <qtextstream.h>
#include <kiconloader.h>
#include "koprefs.h"
//#include <qpe/resource.h>
MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item )
- :QListViewItem(parent,item),mail_data()
+ :KListViewItem(parent,item),mail_data()
{
}
void MailListViewItem::showEntry()
{
if ( mail_data->getFlags().testBit( FLAG_ANSWERED ) == true) {
setPixmap( 0, SmallIcon ( "kmmsgreplied") );
mKeyMap.insert(0, "r" );
@@ -38,16 +38,17 @@ void MailListViewItem::showEntry()
case 7:
fsort = "0" + fsize ;
break;
default:
fsort = fsize ;
break;
}
+
setText(3, fsize );
//qDebug("fsize *%s* ",fsize.latin1() );
//qDebug("fsort *%s* ",fsort.latin1() );
if ( fsize.right(2) == "kB" ) {
mKeyMap.insert(3, "k" + fsort);
} else {
mKeyMap.insert(3, "M" +fsort );
}
diff --git a/kmicromail/mailistviewitem.h b/kmicromail/mailistviewitem.h
index 0fd44d3..b409c9d 100644
--- a/kmicromail/mailistviewitem.h
+++ b/kmicromail/mailistviewitem.h
@@ -1,17 +1,17 @@
// CHANGED 2004-08-06 Lutz Rogowski
#ifndef __MAILLISTVIEWITEM_H
#define __MAILLISTVIEWITEM_H
-#include <qlistview.h>
+#include <klistview.h>
#include <libmailwrapper/mailtypes.h>
#include <libmailwrapper/maildefines.h>
-class MailListViewItem:public QListViewItem
+class MailListViewItem:public KListViewItem
{
public:
MailListViewItem(QListView * parent, MailListViewItem * after );
virtual ~MailListViewItem(){}
void storeData(const RecMailP&data);
const RecMailP&data()const;
void showEntry();
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index e3c5ec3..82a915e 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -18,16 +18,17 @@ extern QStatusBar* globalSstatusBarMainWindow;
#include <qpe/qpeapplication.h>
#include <klocale.h>
#endif
#include "defines.h"
#include "koprefs.h"
#include "mainwindow.h"
#include "mailistviewitem.h"
#include <KDGanttMinimizeSplitter.h>
+#include <libkdepim/kpimglobalprefs.h>
#include "koprefs.h"
MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
: QMainWindow( parent, name ) //, flags )
{
#ifdef DESKTOP_VERSION
globalSstatusBarMainWindow = statusBar();
@@ -160,30 +161,32 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
folderView = new AccountView( split );
folderView->header()->hide();
folderView->setRootIsDecorated( false );
folderView->addColumn( i18n( "Mailbox" ) );
//layout->addWidget( folderView );
- mailView = new QListView( split );
+ mailView = new KListView( split );
mailView->addColumn( i18n( " " ) );
mailView->addColumn( i18n( "Subject" ),QListView::Manual );
mailView->addColumn( i18n( "Sender" ),QListView::Manual );
mailView->addColumn( i18n( "Size" ),QListView::Manual);
mailView->addColumn( i18n( "Date" ),QListView::Manual);
if ( KOPrefs::instance()->mShowToField )
mailView->addColumn( i18n( "To" ),QListView::Manual);
mailView->setAllColumnsShowFocus(true);
//mailView->setSorting(-1);
mailView->setRootIsDecorated( false );
statusWidget = new StatusWidget( wrapperBox );
statusWidget->hide();
-
+ mailView->setSelectionMode( QListView::Multi );
+ mailView->setMultiSelection( true);
+ mailView->setAlternateBackground(KPimGlobalPrefs::instance()->mAlternateColor );
//layout->addWidget( mailView );
//layout->setStretchFactor( folderView, 1 );
//layout->setStretchFactor( mailView, 2 );
slotAdjustLayout();
#ifndef DESKTOP_VERSION
QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
@@ -206,25 +209,25 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this,
SLOT( setInfoFields(QListViewItem*) ) );
connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
//mailView->setMultiSelection ( true );
- mailView->setSelectionMode( QListView::Extended );
+ //mailView->setSelectionMode( QListView::Extended );
QValueList<int> list;
int fw = 100;
if ( QApplication::desktop()->width() > 320 )
fw = 50;
list.append( fw );
list.append( 100 );
split->setSizes( list );
- QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
+ QTimer::singleShot( 100, this, SLOT( slotAdjustColumns() ) );
mailView->setShowSortIndicator ( true );
QLabel *spacer = new QLabel( toolBar );
spacer->setBackgroundMode( QWidget::PaletteButton );
toolBar->setStretchableWidget( spacer );
QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
if ( QApplication::desktop()->width() > 320 )
@@ -365,20 +368,21 @@ void MainWindow::slotAdjustColumns()
bool hidden = folderView->isHidden();
if ( hidden ) folderView->show();
folderView->setColumnWidth( 0, folderView->visibleWidth() );
if ( hidden ) folderView->hide();
mailView->setColumnWidth( 0, 10 );
mailView->setColumnWidth( 1, 100 );
mailView->setColumnWidth( 2, 100 );
- mailView->setColumnWidth( 3, 50 );
- mailView->setColumnWidth( 4, 120 );
+ mailView->setColumnWidth( 3, 70 );
+ mailView->setColumnWidth( 4, 170 );
if ( KOPrefs::instance()->mShowToField )
mailView->setColumnWidth( 5, 100 );
+ mailView->setColumnAlignment( 3, AlignRight);
}
void MainWindow::slotEditSettings()
{
}
void MainWindow::slotEditGlobalSettings()
{
}
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index 6894039..178d2bb 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -1,15 +1,15 @@
// CHANGED 2004-08-06 Lutz Rogowski
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <qmainwindow.h>
-#include <qlistview.h>
+#include <klistview.h>
#include <qaction.h>
#include <qlineedit.h>
#include <qtoolbar.h>
#ifdef DESKTOP_VERSION
#include <qmenubar.h>
#define QPEMenuBar QMenuBar
#else
@@ -61,14 +61,14 @@ protected slots:
protected:
QToolBar *toolBar;
StatusWidget *statusWidget;
QPEMenuBar *menuBar;
QPopupMenu *mailMenu, *settingsMenu, *codecMenu;
QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails,
*editSettings, *editAccounts, *syncFolders;
AccountView *folderView;
- QListView *mailView;
+ KListView *mailView;
QLineEdit* toLE,*fromLE,*subLE;
//QBoxLayout *layout;
};
#endif