summaryrefslogtreecommitdiffabout
Side-by-side diff
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
@@ -1401,16 +1401,17 @@ void KOListViewListView::printList()
int scaleval = pp.printMode() ;
QPrinter printer;
if (!printer.setup() )
return;
clearSelection ();
QPainter p;
p.begin ( &printer );
+ p.setFont(font());
QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
float dx, dy;
int wid = (m.width() * 9)/10;
dx = (float) wid/(float)contentsWidth ();
dy = (float)(m.height()) / (float)contentsHeight ();
float scale;
// scale to fit the width or height of the paper
if ( dx < dy )
@@ -1427,12 +1428,31 @@ void KOListViewListView::printList()
int iii;
QRect rect ( 0,0,0, header()->height());
for ( iii = 0; iii < cou; ++iii ) {
rect.setLeft ( header()->sectionPos( iii ) );
rect.setRight ( header()->sectionPos( iii ) + header()->sectionSize (iii));
header()->paintSection ( & p, header()->mapToIndex (iii), rect );
}
p.translate( 0, header()->height());
- drawContentsOffset ( &p, 0,0, 0,0, contentsWidth (), contentsHeight () );
+ //drawContentsOffset ( &p, 0,0, 0,0, contentsWidth (), contentsHeight () );
+
+ const QColorGroup &cg = colorGroup();
+ KOListViewItem* item = (KOListViewItem* )firstChild();
+ int yOff = 0;
+ while ( item ) {
+ p.translate( 0, yOff );
+ p.save();
+ for ( iii = 0; iii < cou; ++iii ) {
+ int align = columnAlignment( iii );
+ if ( align == AlignAuto ) align = AlignLeft;
+ p.restore();
+ p.save();
+ p.translate( header()->sectionPos( iii ), 0);
+ item->paintCell( &p, cg, iii, header()->sectionSize (iii), align );
+ }
+ yOff = item->height();
+ item = (KOListViewItem* )(item->itemBelow());
+ p.restore();
+ }
p.end();
#endif
}
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
@@ -920,17 +920,21 @@ void KDEPIMConfigWidget::usrReadConfig()
void KDEPIMConfigWidget::usrWriteConfig()
{
KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance();
saveEditFieldSettings();
prefs->mBackupNumbers = mBackupNumbersSpin->value();
prefs->mBackupDayCount = mBackupDayCountSpin->value();
- prefs->mBackupDatadir = mBackupUrl->url();
+ QString bup_url = mBackupUrl->url();
+ if ( bup_url.right(1) != "/" && bup_url.right(1) != "\\" )
+ bup_url += "/";
+
+ prefs->mBackupDatadir = bup_url;
prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") );
prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") );
prefs->mTimeZoneId = mTimeZoneCombo->currentText();
QDate date;
date = mStartDateSavingEdit->date();
int sub = 0;