summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-08-23 21:48:53 (UTC)
committer zautrix <zautrix>2005-08-23 21:48:53 (UTC)
commit2acca9aff5bd651923b5d728712a0fd80b3d54e9 (patch) (unidiff)
treec2113d441908520d86902a8a9fade08eb05ee0d0
parent6f5464760f5fb1e4c13027464cfe4943b85d29a0 (diff)
downloadkdepimpi-2acca9aff5bd651923b5d728712a0fd80b3d54e9.zip
kdepimpi-2acca9aff5bd651923b5d728712a0fd80b3d54e9.tar.gz
kdepimpi-2acca9aff5bd651923b5d728712a0fd80b3d54e9.tar.bz2
fastload fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp18
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp4
-rw-r--r--korganizer/mainwindow.cpp15
-rw-r--r--microkde/kdeui/ktoolbar.cpp4
4 files changed, 27 insertions, 14 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index af12f2b..4e2523e 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -612,7 +612,7 @@ void KABCore::saveSettings()
612 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); 612 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem();
613 613
614 KABPrefs::instance()->writeConfig(); 614 KABPrefs::instance()->writeConfig();
615 qDebug("KA: KABCore::saveSettings() "); 615 //qDebug("KA: KABCore::saveSettings() ");
616} 616}
617 617
618KABC::AddressBook *KABCore::addressBook() const 618KABC::AddressBook *KABCore::addressBook() const
@@ -844,36 +844,44 @@ void KABCore::beamMySelf()
844void KABCore::updateMainWindow() 844void KABCore::updateMainWindow()
845{ 845{
846 mMainWindow->showMaximized(); 846 mMainWindow->showMaximized();
847 mMainWindow->update(); 847 //mMainWindow->repaint();
848} 848}
849void KABCore::resizeEvent(QResizeEvent* e ) 849void KABCore::resizeEvent(QResizeEvent* e )
850{ 850{
851 if ( !mMiniSplitter ) 851 if ( !mMiniSplitter )
852 return; 852 return;
853 //qDebug("KABCore::resizeEvent(QResizeEvent* e ) "); 853 static int desktop_width = 0;
854 if ( e->oldSize().width() != e->size().width() ) 854 //qDebug("KABCore::resizeEvent %d %d ",desktop_width,QApplication::desktop()->width() );
855 if ( desktop_width != QApplication::desktop()->width() )
855 if ( QApplication::desktop()->width() >= 480 ) { 856 if ( QApplication::desktop()->width() >= 480 ) {
856 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 857 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480
858 //qDebug("640 ");
857 if ( mMiniSplitter->orientation() == Qt::Vertical ) { 859 if ( mMiniSplitter->orientation() == Qt::Vertical ) {
860 //qDebug("switch V->H ");
858 mMiniSplitter->setOrientation( Qt::Horizontal); 861 mMiniSplitter->setOrientation( Qt::Horizontal);
859 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 862 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
860 } 863 }
861 if ( QApplication::desktop()->width() <= 640 ) { 864 if ( QApplication::desktop()->width() <= 640 ) {
865 bool shot = mMainWindow->isVisible();
862 mMainWindow->showMinimized(); 866 mMainWindow->showMinimized();
863 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 867 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
864 mViewManager->getFilterAction()->setComboWidth( 150 ); 868 mViewManager->getFilterAction()->setComboWidth( 150 );
865 if ( mIncSearchWidget ) 869 if ( mIncSearchWidget )
866 mIncSearchWidget->setSize(); 870 mIncSearchWidget->setSize();
871 if ( shot )
867 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 872 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
868 } 873 }
869 874
870 } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640 875 } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640
876 //qDebug("480 ");
871 if ( mMiniSplitter->orientation() == Qt::Horizontal ) { 877 if ( mMiniSplitter->orientation() == Qt::Horizontal ) {
878 //qDebug("switch H->V ");
872 mMiniSplitter->setOrientation( Qt::Vertical ); 879 mMiniSplitter->setOrientation( Qt::Vertical );
873 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 880 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
874 } 881 }
875 if ( QApplication::desktop()->width() <= 640 ) { 882 if ( QApplication::desktop()->width() <= 640 ) {
876 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 883 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
884 bool shot = mMainWindow->isVisible();
877 mMainWindow->showMinimized(); 885 mMainWindow->showMinimized();
878 if ( KABPrefs::instance()->mHideSearchOnSwitch ) { 886 if ( KABPrefs::instance()->mHideSearchOnSwitch ) {
879 if ( mIncSearchWidget ) { 887 if ( mIncSearchWidget ) {
@@ -882,10 +890,12 @@ void KABCore::resizeEvent(QResizeEvent* e )
882 } else { 890 } else {
883 mViewManager->getFilterAction()->setComboWidth( 0 ); 891 mViewManager->getFilterAction()->setComboWidth( 0 );
884 } 892 }
893 if ( shot )
885 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 894 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
886 } 895 }
887 } 896 }
888 } 897 }
898 desktop_width = QApplication::desktop()->width();
889 QWidget::resizeEvent( e ); 899 QWidget::resizeEvent( e );
890 900
891} 901}
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index 02fc40a..272f2eb 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -334,10 +334,12 @@ void KAddressBookTableView::refresh(QString uid)
334 // Sometimes the background pixmap gets messed up when we add lots 334 // Sometimes the background pixmap gets messed up when we add lots
335 // of items. 335 // of items.
336 mListView->repaint(); 336 mListView->repaint();
337 337 if ( !currentItem )
338 currentItem = (ContactListViewItem *)mListView->firstChild();
338 if ( currentItem ) { 339 if ( currentItem ) {
339 mListView->setCurrentItem( currentItem ); 340 mListView->setCurrentItem( currentItem );
340 mListView->ensureItemVisible( currentItem ); 341 mListView->ensureItemVisible( currentItem );
342 mListView->setSelected( currentItem, true );
341 } 343 }
342 } else { 344 } else {
343 // Only need to update on entry. Iterate through and try to find it 345 // Only need to update on entry. Iterate through and try to find it
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 8c72d89..70baf5c 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -289,18 +289,19 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
289 289
290 290
291 mCalendarModifiedFlag = false; 291 mCalendarModifiedFlag = false;
292 QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); 292 // QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this );
293 splash->setAlignment ( AlignCenter ); 293 //splash->setAlignment ( AlignCenter );
294 setCentralWidget( splash ); 294 //setCentralWidget( splash );
295#ifndef DESKTOP_VERSION 295#ifndef DESKTOP_VERSION
296 showMaximized(); 296 //showMaximized();
297#endif 297#endif
298 298
299 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); 299 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ());
300 setDefaultPreferences(); 300 setDefaultPreferences();
301 mCalendar = new CalendarLocal(); 301 mCalendar = new CalendarLocal();
302 mView = new CalendarView( mCalendar, this,"mCalendar " ); 302 mView = new CalendarView( mCalendar, this,"mCalendar " );
303 mView->hide(); 303 setCentralWidget( mView );
304 //mView->hide();
304 //mView->resize(splash->size() ); 305 //mView->resize(splash->size() );
305 initActions(); 306 initActions();
306 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); 307 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu);
@@ -361,8 +362,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
361 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); 362 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) );
362 setCentralWidget( mView ); 363 setCentralWidget( mView );
363 globalFlagBlockStartup = 0; 364 globalFlagBlockStartup = 0;
364 mView->show(); 365 //mView->show();
365 delete splash; 366 //delete splash;
366 if ( newFile ) 367 if ( newFile )
367 mView->updateConfig(); 368 mView->updateConfig();
368 // qApp->processEvents(); 369 // qApp->processEvents();
diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp
index 36ede81..df2aad8 100644
--- a/microkde/kdeui/ktoolbar.cpp
+++ b/microkde/kdeui/ktoolbar.cpp
@@ -1415,13 +1415,13 @@ void KToolBar::repaintMe()
1415{ 1415{
1416 setUpdatesEnabled( true ); 1416 setUpdatesEnabled( true );
1417 QToolBar::repaint( true ); 1417 QToolBar::repaint( true );
1418 //qDebug(" KToolBar::repaintMe() "); 1418 qDebug(" KToolBar::repaintMe() ");
1419} 1419}
1420 1420
1421void KToolBar::showEvent( QShowEvent *e ) 1421void KToolBar::showEvent( QShowEvent *e )
1422{ 1422{
1423 QToolBar::showEvent( e );
1424 rebuildLayout(); 1423 rebuildLayout();
1424 QToolBar::showEvent( e );
1425} 1425}
1426 1426
1427void KToolBar::setStretchableWidget( QWidget *w ) 1427void KToolBar::setStretchableWidget( QWidget *w )