From 7c2e130ddd194f1c4b5365af6999a27c08232f4b Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 25 Mar 2005 00:08:08 +0000 Subject: fixes --- (limited to 'libkdepim') diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 7319285..184cb39 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -65,13 +65,7 @@ KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, Targ bar = new QProgressBar ( 1, 0 ); bar->setCaption (""); mWriteBackInPast = 2; - int w = 300; - if ( QApplication::desktop()->width() < 320 ) - w = 220; - int h = bar->sizeHint().height() ; - int dw = QApplication::desktop()->width(); - int dh = QApplication::desktop()->height(); - bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); + } @@ -1009,6 +1003,13 @@ void KSyncManager::showProgressBar(int percentage, QString caption, int total) { if (!bar->isVisible()) { + int w = 300; + if ( QApplication::desktop()->width() < 320 ) + w = 220; + int h = bar->sizeHint().height() ; + int dw = QApplication::desktop()->width(); + int dh = QApplication::desktop()->height(); + bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); bar->setCaption (caption); bar->setTotalSteps ( total ) ; bar->show(); -- cgit v0.9.0.2