summaryrefslogtreecommitdiffabout
path: root/kmicromail/mainwindow.cpp
Unidiff
Diffstat (limited to 'kmicromail/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/mainwindow.cpp16
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
@@ -23,6 +23,7 @@ extern QStatusBar* globalSstatusBarMainWindow;
23#include "mainwindow.h" 23#include "mainwindow.h"
24#include "mailistviewitem.h" 24#include "mailistviewitem.h"
25#include <KDGanttMinimizeSplitter.h> 25#include <KDGanttMinimizeSplitter.h>
26#include <libkdepim/kpimglobalprefs.h>
26 27
27#include "koprefs.h" 28#include "koprefs.h"
28 29
@@ -165,7 +166,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
165 166
166 //layout->addWidget( folderView ); 167 //layout->addWidget( folderView );
167 168
168 mailView = new QListView( split ); 169 mailView = new KListView( split );
169 mailView->addColumn( i18n( " " ) ); 170 mailView->addColumn( i18n( " " ) );
170 mailView->addColumn( i18n( "Subject" ),QListView::Manual ); 171 mailView->addColumn( i18n( "Subject" ),QListView::Manual );
171 mailView->addColumn( i18n( "Sender" ),QListView::Manual ); 172 mailView->addColumn( i18n( "Sender" ),QListView::Manual );
@@ -178,7 +179,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
178 mailView->setRootIsDecorated( false ); 179 mailView->setRootIsDecorated( false );
179 statusWidget = new StatusWidget( wrapperBox ); 180 statusWidget = new StatusWidget( wrapperBox );
180 statusWidget->hide(); 181 statusWidget->hide();
181 182 mailView->setSelectionMode( QListView::Multi );
183 mailView->setMultiSelection( true);
184 mailView->setAlternateBackground(KPimGlobalPrefs::instance()->mAlternateColor );
182 //layout->addWidget( mailView ); 185 //layout->addWidget( mailView );
183 //layout->setStretchFactor( folderView, 1 ); 186 //layout->setStretchFactor( folderView, 1 );
184 //layout->setStretchFactor( mailView, 2 ); 187 //layout->setStretchFactor( mailView, 2 );
@@ -211,7 +214,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
211// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); 214// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
212 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 215 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
213 //mailView->setMultiSelection ( true ); 216 //mailView->setMultiSelection ( true );
214 mailView->setSelectionMode( QListView::Extended ); 217 //mailView->setSelectionMode( QListView::Extended );
215 QValueList<int> list; 218 QValueList<int> list;
216 int fw = 100; 219 int fw = 100;
217 if ( QApplication::desktop()->width() > 320 ) 220 if ( QApplication::desktop()->width() > 320 )
@@ -219,7 +222,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
219 list.append( fw ); 222 list.append( fw );
220 list.append( 100 ); 223 list.append( 100 );
221 split->setSizes( list ); 224 split->setSizes( list );
222 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); 225 QTimer::singleShot( 100, this, SLOT( slotAdjustColumns() ) );
223 mailView->setShowSortIndicator ( true ); 226 mailView->setShowSortIndicator ( true );
224 QLabel *spacer = new QLabel( toolBar ); 227 QLabel *spacer = new QLabel( toolBar );
225 spacer->setBackgroundMode( QWidget::PaletteButton ); 228 spacer->setBackgroundMode( QWidget::PaletteButton );
@@ -370,10 +373,11 @@ void MainWindow::slotAdjustColumns()
370 mailView->setColumnWidth( 0, 10 ); 373 mailView->setColumnWidth( 0, 10 );
371 mailView->setColumnWidth( 1, 100 ); 374 mailView->setColumnWidth( 1, 100 );
372 mailView->setColumnWidth( 2, 100 ); 375 mailView->setColumnWidth( 2, 100 );
373 mailView->setColumnWidth( 3, 50 ); 376 mailView->setColumnWidth( 3, 70 );
374 mailView->setColumnWidth( 4, 120 ); 377 mailView->setColumnWidth( 4, 170 );
375 if ( KOPrefs::instance()->mShowToField ) 378 if ( KOPrefs::instance()->mShowToField )
376 mailView->setColumnWidth( 5, 100 ); 379 mailView->setColumnWidth( 5, 100 );
380 mailView->setColumnAlignment( 3, AlignRight);
377} 381}
378 382
379void MainWindow::slotEditSettings() 383void MainWindow::slotEditSettings()