summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kolistview.cpp22
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp6
2 files changed, 26 insertions, 2 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index b378330..192f8c0 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -1397,24 +1397,25 @@ void KOListViewListView::printList()
1397#ifdef DESKTOP_VERSION 1397#ifdef DESKTOP_VERSION
1398 KOPrintPrefs pp ( this ); 1398 KOPrintPrefs pp ( this );
1399 if (!pp.exec() ) 1399 if (!pp.exec() )
1400 return; 1400 return;
1401 int scaleval = pp.printMode() ; 1401 int scaleval = pp.printMode() ;
1402 1402
1403 QPrinter printer; 1403 QPrinter printer;
1404 if (!printer.setup() ) 1404 if (!printer.setup() )
1405 return; 1405 return;
1406 clearSelection (); 1406 clearSelection ();
1407 QPainter p; 1407 QPainter p;
1408 p.begin ( &printer ); 1408 p.begin ( &printer );
1409 p.setFont(font());
1409 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 1410 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
1410 float dx, dy; 1411 float dx, dy;
1411 int wid = (m.width() * 9)/10; 1412 int wid = (m.width() * 9)/10;
1412 dx = (float) wid/(float)contentsWidth (); 1413 dx = (float) wid/(float)contentsWidth ();
1413 dy = (float)(m.height()) / (float)contentsHeight (); 1414 dy = (float)(m.height()) / (float)contentsHeight ();
1414 float scale; 1415 float scale;
1415 // scale to fit the width or height of the paper 1416 // scale to fit the width or height of the paper
1416 if ( dx < dy ) 1417 if ( dx < dy )
1417 scale = dx; 1418 scale = dx;
1418 else 1419 else
1419 scale = dy; 1420 scale = dy;
1420 1421
@@ -1423,16 +1424,35 @@ void KOListViewListView::printList()
1423 p.scale( scale, scale ); 1424 p.scale( scale, scale );
1424 } 1425 }
1425 1426
1426 int cou = header()->count(); 1427 int cou = header()->count();
1427 int iii; 1428 int iii;
1428 QRect rect ( 0,0,0, header()->height()); 1429 QRect rect ( 0,0,0, header()->height());
1429 for ( iii = 0; iii < cou; ++iii ) { 1430 for ( iii = 0; iii < cou; ++iii ) {
1430 rect.setLeft ( header()->sectionPos( iii ) ); 1431 rect.setLeft ( header()->sectionPos( iii ) );
1431 rect.setRight ( header()->sectionPos( iii ) + header()->sectionSize (iii)); 1432 rect.setRight ( header()->sectionPos( iii ) + header()->sectionSize (iii));
1432 header()->paintSection ( & p, header()->mapToIndex (iii), rect ); 1433 header()->paintSection ( & p, header()->mapToIndex (iii), rect );
1433 } 1434 }
1434 p.translate( 0, header()->height()); 1435 p.translate( 0, header()->height());
1435 drawContentsOffset ( &p, 0,0, 0,0, contentsWidth (), contentsHeight () ); 1436 //drawContentsOffset ( &p, 0,0, 0,0, contentsWidth (), contentsHeight () );
1437
1438 const QColorGroup &cg = colorGroup();
1439 KOListViewItem* item = (KOListViewItem* )firstChild();
1440 int yOff = 0;
1441 while ( item ) {
1442 p.translate( 0, yOff );
1443 p.save();
1444 for ( iii = 0; iii < cou; ++iii ) {
1445 int align = columnAlignment( iii );
1446 if ( align == AlignAuto ) align = AlignLeft;
1447 p.restore();
1448 p.save();
1449 p.translate( header()->sectionPos( iii ), 0);
1450 item->paintCell( &p, cg, iii, header()->sectionSize (iii), align );
1451 }
1452 yOff = item->height();
1453 item = (KOListViewItem* )(item->itemBelow());
1454 p.restore();
1455 }
1436 p.end(); 1456 p.end();
1437#endif 1457#endif
1438} 1458}
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 764c495..292951b 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -916,25 +916,29 @@ void KDEPIMConfigWidget::usrReadConfig()
916 blockSignals( blocked ); 916 blockSignals( blocked );
917 917
918} 918}
919 919
920void KDEPIMConfigWidget::usrWriteConfig() 920void KDEPIMConfigWidget::usrWriteConfig()
921{ 921{
922 KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); 922 KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance();
923 923
924 saveEditFieldSettings(); 924 saveEditFieldSettings();
925 925
926 prefs->mBackupNumbers = mBackupNumbersSpin->value(); 926 prefs->mBackupNumbers = mBackupNumbersSpin->value();
927 prefs->mBackupDayCount = mBackupDayCountSpin->value(); 927 prefs->mBackupDayCount = mBackupDayCountSpin->value();
928 prefs->mBackupDatadir = mBackupUrl->url(); 928 QString bup_url = mBackupUrl->url();
929 if ( bup_url.right(1) != "/" && bup_url.right(1) != "\\" )
930 bup_url += "/";
931
932 prefs->mBackupDatadir = bup_url;
929 933
930 prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); 934 prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") );
931 prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); 935 prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") );
932 936
933 prefs->mTimeZoneId = mTimeZoneCombo->currentText(); 937 prefs->mTimeZoneId = mTimeZoneCombo->currentText();
934 QDate date; 938 QDate date;
935 date = mStartDateSavingEdit->date(); 939 date = mStartDateSavingEdit->date();
936 int sub = 0; 940 int sub = 0;
937 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 941 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
938 sub = 1; 942 sub = 1;
939 prefs->mDaylightsavingStart = date.dayOfYear()-sub; 943 prefs->mDaylightsavingStart = date.dayOfYear()-sub;
940 date = mEndDateSavingEdit->date(); 944 date = mEndDateSavingEdit->date();