-rw-r--r-- | kmicromail/mainwindow.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
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() { } |