summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Side-by-side diff
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/details/detailsviewcontainer.cpp11
-rw-r--r--kaddressbook/details/detailsviewcontainer.h1
-rw-r--r--kaddressbook/imagewidget.cpp7
-rw-r--r--kaddressbook/kabcore.cpp9
-rw-r--r--kaddressbook/kabcore.h9
-rw-r--r--kaddressbook/viewmanager.cpp1
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
@@ -126,28 +126,19 @@ void ViewContainer::slotStyleSelected( int index )
SIGNAL( browse( const QString& ) ) );
}
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()
{
static KABC::Addressee empty; // do not use!
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
@@ -42,13 +42,12 @@ class ViewContainer : public QWidget
Return the look currently selected. If there is none, it
returns zero. Do not use this pointer to store a reference
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();
public slots:
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp
index 49d456b..48370e3 100644
--- a/kaddressbook/imagewidget.cpp
+++ b/kaddressbook/imagewidget.cpp
@@ -128,16 +128,12 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
SIGNAL( changed() ) );
#ifndef KAB_EMBEDDED
KAcceleratorManager::manage( this );
#endif //KAB_EMBEDDED
-#ifndef DESKTOP_VERSION
- mUsePhotoUrl->setChecked( true );
- mUseLogoUrl->setChecked( true );
-#endif
}
ImageWidget::~ImageWidget()
{
}
@@ -257,18 +253,17 @@ 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 )
{
QString tempFile;
QPixmap pixmap;
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index f6bdda4..e14e579 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1123,27 +1123,24 @@ void KABCore::setModified()
void KABCore::setModifiedWOrefresh()
{
// qDebug("KABCore::setModifiedWOrefresh() ");
mModified = true;
mActionSave->setEnabled( mModified );
-#ifdef DESKTOP_VERSION
- mDetails->refreshView();
-#endif
+
}
void KABCore::setModified( bool modified )
{
mModified = modified;
mActionSave->setEnabled( mModified );
if ( modified )
mJumpButtonBar->recreateButtons();
mViewManager->refreshView();
- mDetails->refreshView();
}
bool KABCore::modified() const
{
return mModified;
@@ -1163,13 +1160,13 @@ void KABCore::contactModified( const KABC::Addressee &addr )
command = new PwEditCommand( mAddressBook, origAddr, addr );
uid = addr.uid();
}
UndoStack::instance()->push( command );
RedoStack::instance()->clear();
-
+ mDetails->setAddressee( addr );
setModified( true );
}
void KABCore::newContact()
{
@@ -1630,13 +1627,12 @@ void KABCore::addressBookChanged()
KMessageBox::information( this, text );
}
QString currentuid = mEditorDialog->addressee().uid();
mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) );
}
mViewManager->refreshView();
-// mDetails->refreshView();
}
AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent,
const char *name )
@@ -2286,13 +2282,12 @@ void KABCore::manageCategories( )
(*it).setCategories( newCatList );
mAddressBook->insertAddressee( (*it) );
}
}
setModified( true );
mViewManager->refreshView();
- mDetails->refreshView();
message( i18n("Removing categories done!"));
}
delete cp;
}
void KABCore::removeVoice()
{
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index c7c12ff..85ffbdb 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -92,16 +92,13 @@ class KABCore : public QWidget, public KSyncInterface
#endif //KAB_EMBEDDED
/**
Restores the global settings.
*/
void restoreSettings();
- /**
- Saves the global settings.
- */
- void saveSettings();
+
/**
Returns a pointer to the StdAddressBook of the application.
*/
KABC::AddressBook *addressBook() const;
@@ -355,13 +352,15 @@ class KABCore : public QWidget, public KSyncInterface
public slots:
void recieve(QString cmsg );
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 );
void toggleBeamReceive( );
void disableBR(bool);
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index 33bef5a..59bddd9 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -602,12 +602,13 @@ void ViewManager::configureFilters()
mActionSelectFilter->setCurrentItem( pos );
setActiveFilter( pos );
int cw = 150;
if (QApplication::desktop()->width() == 480 )
cw = 0;
mActionSelectFilter->setComboWidth( cw );
+ saveSettings();
}
QStringList ViewManager::filterNames() const
{
QStringList names( i18n( "No Filter" ) );