-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 ) | |||
128 | 128 | ||
129 | mCurrentLook->restoreSettings( config ); | 129 | mCurrentLook->restoreSettings( config ); |
130 | mCurrentLook->setAddressee( addr ); | 130 | mCurrentLook->setAddressee( addr ); |
131 | } | 131 | } |
132 | void ViewContainer::refreshView() | ||
133 | { | ||
134 | if ( mCurrentLook ) { | ||
135 | mCurrentLook->setAddressee( mCurrentAddressee ); | ||
136 | } | ||
137 | } | ||
138 | 132 | ||
139 | void ViewContainer::setAddressee( const KABC::Addressee& addressee ) | 133 | void ViewContainer::setAddressee( const KABC::Addressee& addressee ) |
140 | { | 134 | { |
141 | if ( mCurrentLook != 0 ) { | 135 | if ( mCurrentLook != 0 ) { |
142 | if ( addressee == mCurrentAddressee ) | ||
143 | return; | ||
144 | else { | ||
145 | mCurrentAddressee = addressee; | 136 | mCurrentAddressee = addressee; |
146 | mCurrentLook->setAddressee( mCurrentAddressee ); | 137 | mCurrentLook->setAddressee( mCurrentAddressee ); |
147 | } | 138 | |
148 | } | 139 | } |
149 | } | 140 | } |
150 | 141 | ||
151 | KABC::Addressee ViewContainer::addressee() | 142 | 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 | |||
44 | to a look, the user might select another one (e.g., create | 44 | to a look, the user might select another one (e.g., create |
45 | a new object) at any time. | 45 | a new object) at any time. |
46 | */ | 46 | */ |
47 | KABBasicLook *currentLook(); | 47 | KABBasicLook *currentLook(); |
48 | void refreshView(); | ||
49 | /** | 48 | /** |
50 | Return the contact currently displayed. | 49 | Return the contact currently displayed. |
51 | */ | 50 | */ |
52 | KABC::Addressee addressee(); | 51 | 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 ) | |||
130 | #ifndef KAB_EMBEDDED | 130 | #ifndef KAB_EMBEDDED |
131 | KAcceleratorManager::manage( this ); | 131 | KAcceleratorManager::manage( this ); |
132 | #endif //KAB_EMBEDDED | 132 | #endif //KAB_EMBEDDED |
133 | 133 | ||
134 | #ifndef DESKTOP_VERSION | ||
135 | mUsePhotoUrl->setChecked( true ); | ||
136 | mUseLogoUrl->setChecked( true ); | ||
137 | #endif | ||
138 | } | 134 | } |
139 | 135 | ||
140 | ImageWidget::~ImageWidget() | 136 | ImageWidget::~ImageWidget() |
141 | { | 137 | { |
@@ -259,14 +255,13 @@ void ImageWidget::loadLogo() | |||
259 | void ImageWidget::updateGUI() | 255 | void ImageWidget::updateGUI() |
260 | { | 256 | { |
261 | KURLRequester *ptr = (KURLRequester*)sender(); | 257 | KURLRequester *ptr = (KURLRequester*)sender(); |
262 | 258 | ||
263 | #ifdef DESKTOP_VERSION | 259 | |
264 | if ( ptr == mPhotoUrl ) | 260 | if ( ptr == mPhotoUrl ) |
265 | mUsePhotoUrl->setEnabled( true ); | 261 | mUsePhotoUrl->setEnabled( true ); |
266 | else if ( ptr == mLogoUrl ) | 262 | else if ( ptr == mLogoUrl ) |
267 | mUseLogoUrl->setEnabled( true ); | 263 | mUseLogoUrl->setEnabled( true ); |
268 | #endif | ||
269 | } | 264 | } |
270 | 265 | ||
271 | QPixmap ImageWidget::loadPixmap( const KURL &url ) | 266 | QPixmap ImageWidget::loadPixmap( const KURL &url ) |
272 | { | 267 | { |
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() | |||
1125 | { | 1125 | { |
1126 | // qDebug("KABCore::setModifiedWOrefresh() "); | 1126 | // qDebug("KABCore::setModifiedWOrefresh() "); |
1127 | mModified = true; | 1127 | mModified = true; |
1128 | mActionSave->setEnabled( mModified ); | 1128 | mActionSave->setEnabled( mModified ); |
1129 | #ifdef DESKTOP_VERSION | 1129 | |
1130 | mDetails->refreshView(); | ||
1131 | #endif | ||
1132 | 1130 | ||
1133 | } | 1131 | } |
1134 | void KABCore::setModified( bool modified ) | 1132 | void KABCore::setModified( bool modified ) |
1135 | { | 1133 | { |
@@ -1139,9 +1137,8 @@ void KABCore::setModified( bool modified ) | |||
1139 | if ( modified ) | 1137 | if ( modified ) |
1140 | mJumpButtonBar->recreateButtons(); | 1138 | mJumpButtonBar->recreateButtons(); |
1141 | 1139 | ||
1142 | mViewManager->refreshView(); | 1140 | mViewManager->refreshView(); |
1143 | mDetails->refreshView(); | ||
1144 | 1141 | ||
1145 | } | 1142 | } |
1146 | 1143 | ||
1147 | bool KABCore::modified() const | 1144 | bool KABCore::modified() const |
@@ -1165,9 +1162,9 @@ void KABCore::contactModified( const KABC::Addressee &addr ) | |||
1165 | } | 1162 | } |
1166 | 1163 | ||
1167 | UndoStack::instance()->push( command ); | 1164 | UndoStack::instance()->push( command ); |
1168 | RedoStack::instance()->clear(); | 1165 | RedoStack::instance()->clear(); |
1169 | 1166 | mDetails->setAddressee( addr ); | |
1170 | setModified( true ); | 1167 | setModified( true ); |
1171 | } | 1168 | } |
1172 | 1169 | ||
1173 | void KABCore::newContact() | 1170 | void KABCore::newContact() |
@@ -1632,9 +1629,8 @@ void KABCore::addressBookChanged() | |||
1632 | QString currentuid = mEditorDialog->addressee().uid(); | 1629 | QString currentuid = mEditorDialog->addressee().uid(); |
1633 | mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); | 1630 | mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); |
1634 | } | 1631 | } |
1635 | mViewManager->refreshView(); | 1632 | mViewManager->refreshView(); |
1636 | // mDetails->refreshView(); | ||
1637 | 1633 | ||
1638 | 1634 | ||
1639 | } | 1635 | } |
1640 | 1636 | ||
@@ -2288,9 +2284,8 @@ void KABCore::manageCategories( ) | |||
2288 | } | 2284 | } |
2289 | } | 2285 | } |
2290 | setModified( true ); | 2286 | setModified( true ); |
2291 | mViewManager->refreshView(); | 2287 | mViewManager->refreshView(); |
2292 | mDetails->refreshView(); | ||
2293 | message( i18n("Removing categories done!")); | 2288 | message( i18n("Removing categories done!")); |
2294 | } | 2289 | } |
2295 | delete cp; | 2290 | delete cp; |
2296 | } | 2291 | } |
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 | |||
94 | Restores the global settings. | 94 | Restores the global settings. |
95 | */ | 95 | */ |
96 | void restoreSettings(); | 96 | void restoreSettings(); |
97 | 97 | ||
98 | /** | 98 | |
99 | Saves the global settings. | ||
100 | */ | ||
101 | void saveSettings(); | ||
102 | 99 | ||
103 | /** | 100 | /** |
104 | Returns a pointer to the StdAddressBook of the application. | 101 | Returns a pointer to the StdAddressBook of the application. |
105 | */ | 102 | */ |
@@ -357,9 +354,11 @@ class KABCore : public QWidget, public KSyncInterface | |||
357 | void getFile( bool success ); | 354 | void getFile( bool success ); |
358 | void syncFileRequest(); | 355 | void syncFileRequest(); |
359 | void setDetailsVisible( bool visible ); | 356 | void setDetailsVisible( bool visible ); |
360 | void setDetailsToState(); | 357 | void setDetailsToState(); |
361 | // void slotSyncMenu( int ); | 358 | |
359 | void saveSettings(); | ||
360 | |||
362 | private slots: | 361 | private slots: |
363 | void updateToolBar(); | 362 | void updateToolBar(); |
364 | void updateMainWindow(); | 363 | void updateMainWindow(); |
365 | void receive( const QCString& cmsg, const QByteArray& data ); | 364 | 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() | |||
604 | int cw = 150; | 604 | int cw = 150; |
605 | if (QApplication::desktop()->width() == 480 ) | 605 | if (QApplication::desktop()->width() == 480 ) |
606 | cw = 0; | 606 | cw = 0; |
607 | mActionSelectFilter->setComboWidth( cw ); | 607 | mActionSelectFilter->setComboWidth( cw ); |
608 | saveSettings(); | ||
608 | } | 609 | } |
609 | 610 | ||
610 | QStringList ViewManager::filterNames() const | 611 | QStringList ViewManager::filterNames() const |
611 | { | 612 | { |