author | zautrix <zautrix> | 2005-01-14 11:37:40 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-14 11:37:40 (UTC) |
commit | 61c95ce0295f1397db6499c5b468a9fb3d32a0f4 (patch) (side-by-side diff) | |
tree | 2bceecc46d42a572adfad7d8e5000d1534642cbd /kaddressbook | |
parent | a46ecf5ed81460ec9a4e457798e1bf0fb74c5624 (diff) | |
download | kdepimpi-61c95ce0295f1397db6499c5b468a9fb3d32a0f4.zip kdepimpi-61c95ce0295f1397db6499c5b468a9fb3d32a0f4.tar.gz kdepimpi-61c95ce0295f1397db6499c5b468a9fb3d32a0f4.tar.bz2 |
made kapi saving faster
-rw-r--r-- | kaddressbook/details/detailsviewcontainer.cpp | 11 | ||||
-rw-r--r-- | kaddressbook/details/detailsviewcontainer.h | 1 | ||||
-rw-r--r-- | kaddressbook/imagewidget.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 9 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 9 | ||||
-rw-r--r-- | kaddressbook/viewmanager.cpp | 1 |
6 files changed, 9 insertions, 29 deletions
diff --git a/kaddressbook/details/detailsviewcontainer.cpp b/kaddressbook/details/detailsviewcontainer.cpp index ceffc77..229cce0 100644 --- a/kaddressbook/details/detailsviewcontainer.cpp +++ b/kaddressbook/details/detailsviewcontainer.cpp @@ -128,24 +128,15 @@ void ViewContainer::slotStyleSelected( int index ) mCurrentLook->restoreSettings( config ); mCurrentLook->setAddressee( addr ); } -void ViewContainer::refreshView() -{ - if ( mCurrentLook ) { - mCurrentLook->setAddressee( mCurrentAddressee ); - } -} void ViewContainer::setAddressee( const KABC::Addressee& addressee ) { if ( mCurrentLook != 0 ) { - if ( addressee == mCurrentAddressee ) - return; - else { mCurrentAddressee = addressee; mCurrentLook->setAddressee( mCurrentAddressee ); - } + } } KABC::Addressee ViewContainer::addressee() diff --git a/kaddressbook/details/detailsviewcontainer.h b/kaddressbook/details/detailsviewcontainer.h index b561d12..667f0cb 100644 --- a/kaddressbook/details/detailsviewcontainer.h +++ b/kaddressbook/details/detailsviewcontainer.h @@ -44,9 +44,8 @@ class ViewContainer : public QWidget to a look, the user might select another one (e.g., create a new object) at any time. */ KABBasicLook *currentLook(); - void refreshView(); /** Return the contact currently displayed. */ KABC::Addressee addressee(); diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp index 49d456b..48370e3 100644 --- a/kaddressbook/imagewidget.cpp +++ b/kaddressbook/imagewidget.cpp @@ -130,12 +130,8 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) #ifndef KAB_EMBEDDED KAcceleratorManager::manage( this ); #endif //KAB_EMBEDDED -#ifndef DESKTOP_VERSION - mUsePhotoUrl->setChecked( true ); - mUseLogoUrl->setChecked( true ); -#endif } ImageWidget::~ImageWidget() { @@ -259,14 +255,13 @@ void ImageWidget::loadLogo() void ImageWidget::updateGUI() { KURLRequester *ptr = (KURLRequester*)sender(); -#ifdef DESKTOP_VERSION + if ( ptr == mPhotoUrl ) mUsePhotoUrl->setEnabled( true ); else if ( ptr == mLogoUrl ) mUseLogoUrl->setEnabled( true ); -#endif } QPixmap ImageWidget::loadPixmap( const KURL &url ) { diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index f6bdda4..e14e579 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -1125,11 +1125,9 @@ void KABCore::setModifiedWOrefresh() { // qDebug("KABCore::setModifiedWOrefresh() "); mModified = true; mActionSave->setEnabled( mModified ); -#ifdef DESKTOP_VERSION - mDetails->refreshView(); -#endif + } void KABCore::setModified( bool modified ) { @@ -1139,9 +1137,8 @@ void KABCore::setModified( bool modified ) if ( modified ) mJumpButtonBar->recreateButtons(); mViewManager->refreshView(); - mDetails->refreshView(); } bool KABCore::modified() const @@ -1165,9 +1162,9 @@ void KABCore::contactModified( const KABC::Addressee &addr ) } UndoStack::instance()->push( command ); RedoStack::instance()->clear(); - + mDetails->setAddressee( addr ); setModified( true ); } void KABCore::newContact() @@ -1632,9 +1629,8 @@ void KABCore::addressBookChanged() QString currentuid = mEditorDialog->addressee().uid(); mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); } mViewManager->refreshView(); -// mDetails->refreshView(); } @@ -2288,9 +2284,8 @@ void KABCore::manageCategories( ) } } setModified( true ); mViewManager->refreshView(); - mDetails->refreshView(); message( i18n("Removing categories done!")); } delete cp; } diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index c7c12ff..85ffbdb 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -94,12 +94,9 @@ class KABCore : public QWidget, public KSyncInterface Restores the global settings. */ void restoreSettings(); - /** - Saves the global settings. - */ - void saveSettings(); + /** Returns a pointer to the StdAddressBook of the application. */ @@ -357,9 +354,11 @@ class KABCore : public QWidget, public KSyncInterface void getFile( bool success ); void syncFileRequest(); void setDetailsVisible( bool visible ); void setDetailsToState(); - // void slotSyncMenu( int ); + + void saveSettings(); + private slots: void updateToolBar(); void updateMainWindow(); void receive( const QCString& cmsg, const QByteArray& data ); diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 33bef5a..59bddd9 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -604,8 +604,9 @@ void ViewManager::configureFilters() int cw = 150; if (QApplication::desktop()->width() == 480 ) cw = 0; mActionSelectFilter->setComboWidth( cw ); + saveSettings(); } QStringList ViewManager::filterNames() const { |