summaryrefslogtreecommitdiffabout
path: root/kmicromail
Unidiff
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/mailistviewitem.cpp2
-rw-r--r--kmicromail/mainwindow.cpp1
2 files changed, 1 insertions, 2 deletions
diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp
index 15fa148..41cee52 100644
--- a/kmicromail/mailistviewitem.cpp
+++ b/kmicromail/mailistviewitem.cpp
@@ -34,49 +34,49 @@ void MailListViewItem::showEntry()
34 switch(fsize.length() ) { 34 switch(fsize.length() ) {
35 case 6: 35 case 6:
36 fsort = "00" + fsize ; 36 fsort = "00" + fsize ;
37 break; 37 break;
38 case 7: 38 case 7:
39 fsort = "0" + fsize ; 39 fsort = "0" + fsize ;
40 break; 40 break;
41 default: 41 default:
42 fsort = fsize ; 42 fsort = fsize ;
43 break; 43 break;
44 44
45 } 45 }
46 46
47 setText(3, fsize ); 47 setText(3, fsize );
48 //qDebug("fsize *%s* ",fsize.latin1() ); 48 //qDebug("fsize *%s* ",fsize.latin1() );
49 //qDebug("fsort *%s* ",fsort.latin1() ); 49 //qDebug("fsort *%s* ",fsort.latin1() );
50 if ( fsize.right(2) == "kB" ) { 50 if ( fsize.right(2) == "kB" ) {
51 mKeyMap.insert(3, "k" + fsort); 51 mKeyMap.insert(3, "k" + fsort);
52 } else { 52 } else {
53 mKeyMap.insert(3, "M" +fsort ); 53 mKeyMap.insert(3, "M" +fsort );
54 } 54 }
55 setText(1,mail_data->getSubject()); 55 setText(1,mail_data->getSubject());
56 setText(2,mail_data->getFrom()); 56 setText(2,mail_data->getFrom());
57 mKeyMap.insert(4,mail_data->getIsoDate()); 57 mKeyMap.insert(4,mail_data->getIsoDate());
58 setText(4,mail_data->getDate()); 58 setText(4," "+mail_data->getDate());
59 if ( KOPrefs::instance()->mShowToField ) 59 if ( KOPrefs::instance()->mShowToField )
60 setText(5,mail_data->To()[0]); 60 setText(5,mail_data->To()[0]);
61} 61}
62 62
63void MailListViewItem::storeData(const RecMailP&data) 63void MailListViewItem::storeData(const RecMailP&data)
64{ 64{
65 mail_data = data; 65 mail_data = data;
66} 66}
67void MailListViewItem::setSortKey(int column,const QString &key) 67void MailListViewItem::setSortKey(int column,const QString &key)
68{ 68{
69 mKeyMap.insert(column,key); 69 mKeyMap.insert(column,key);
70} 70}
71QString MailListViewItem::key(int column, bool) const 71QString MailListViewItem::key(int column, bool) const
72{ 72{
73 // to make is fast, we use here special cases 73 // to make is fast, we use here special cases
74 if ( column == 3 || column == 4 || column == 0) { 74 if ( column == 3 || column == 4 || column == 0) {
75 return *mKeyMap.find(column); 75 return *mKeyMap.find(column);
76 } 76 }
77 if ( column == 1 ) { 77 if ( column == 1 ) {
78 if ( text(1).left(4).lower() == "re: " ) 78 if ( text(1).left(4).lower() == "re: " )
79 return text(1).mid(4); 79 return text(1).mid(4);
80 80
81 } 81 }
82 return text(column); 82 return text(column);
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 3dde3cd..d547dda 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -356,49 +356,48 @@ void MainWindow::slotAdjustLayout() {
356 QWidget *d = QApplication::desktop(); 356 QWidget *d = QApplication::desktop();
357 357
358 if ( d->width() < d->height() ) { 358 if ( d->width() < d->height() ) {
359 layout->setDirection( QBoxLayout::TopToBottom ); 359 layout->setDirection( QBoxLayout::TopToBottom );
360 } else { 360 } else {
361 layout->setDirection( QBoxLayout::LeftToRight ); 361 layout->setDirection( QBoxLayout::LeftToRight );
362 } 362 }
363 */ 363 */
364} 364}
365 365
366void MainWindow::slotAdjustColumns() 366void MainWindow::slotAdjustColumns()
367{ 367{
368 368
369 if ( !folderView->isHidden() ) 369 if ( !folderView->isHidden() )
370 folderView->setColumnWidth( 0, folderView->visibleWidth() ); 370 folderView->setColumnWidth( 0, folderView->visibleWidth() );
371 371
372 mailView->setColumnWidth( 0, 10 ); 372 mailView->setColumnWidth( 0, 10 );
373 mailView->setColumnWidth( 1, 100 ); 373 mailView->setColumnWidth( 1, 100 );
374 mailView->setColumnWidth( 2, 100 ); 374 mailView->setColumnWidth( 2, 100 );
375 mailView->setColumnWidth( 3, 70 ); 375 mailView->setColumnWidth( 3, 70 );
376 mailView->setColumnWidth( 4, 180 ); 376 mailView->setColumnWidth( 4, 180 );
377 if ( KOPrefs::instance()->mShowToField ) 377 if ( KOPrefs::instance()->mShowToField )
378 mailView->setColumnWidth( 5, 100 ); 378 mailView->setColumnWidth( 5, 100 );
379 mailView->setColumnAlignment( 3, AlignRight); 379 mailView->setColumnAlignment( 3, AlignRight);
380 mailView->setColumnAlignment( 4, AlignRight);
381} 380}
382void MainWindow::slotAdjustColumnsWide() 381void MainWindow::slotAdjustColumnsWide()
383{ 382{
384 if ( !folderView->isHidden() ) 383 if ( !folderView->isHidden() )
385 folderView->setColumnWidth( 0, folderView->visibleWidth() ); 384 folderView->setColumnWidth( 0, folderView->visibleWidth() );
386 385
387 mailView->setColumnWidth( 0, 10 ); 386 mailView->setColumnWidth( 0, 10 );
388 mailView->setColumnWidth( 1, 200 ); 387 mailView->setColumnWidth( 1, 200 );
389 mailView->setColumnWidth( 2, 200 ); 388 mailView->setColumnWidth( 2, 200 );
390 mailView->setColumnWidth( 3, 70 ); 389 mailView->setColumnWidth( 3, 70 );
391 mailView->setColumnWidth( 4, 180 ); 390 mailView->setColumnWidth( 4, 180 );
392 if ( KOPrefs::instance()->mShowToField ) 391 if ( KOPrefs::instance()->mShowToField )
393 mailView->setColumnWidth( 5, 100 ); 392 mailView->setColumnWidth( 5, 100 );
394 mailView->setColumnAlignment( 3, AlignRight); 393 mailView->setColumnAlignment( 3, AlignRight);
395} 394}
396 395
397void MainWindow::slotEditSettings() 396void MainWindow::slotEditSettings()
398{ 397{
399} 398}
400void MainWindow::slotEditGlobalSettings() 399void MainWindow::slotEditGlobalSettings()
401{ 400{
402} 401}
403 402
404void MainWindow::slotShowFolders( bool ) 403void MainWindow::slotShowFolders( bool )