summaryrefslogtreecommitdiffabout
path: root/kaddressbook/details/detailsviewcontainer.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/details/detailsviewcontainer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/details/detailsviewcontainer.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/kaddressbook/details/detailsviewcontainer.cpp b/kaddressbook/details/detailsviewcontainer.cpp
index a42499f..ceffc77 100644
--- a/kaddressbook/details/detailsviewcontainer.cpp
+++ b/kaddressbook/details/detailsviewcontainer.cpp
@@ -95,51 +95,48 @@ void ViewContainer::registerLooks()
if ( !mLookFactories.isEmpty() )
slotStyleSelected( 0 );
}
void ViewContainer::slotStyleSelected( int index )
{
#ifndef KAB_EMBEDDED
KConfig *config = kapp->config();
#else //KAB_EMBEDDED
//US I hope I got the same config object as above expected.
KConfig *config = KABPrefs::instance()->getConfig();
#endif //KAB_EMBEDDED
KABC::Addressee addr;
if ( index >= 0 && index < mStyleCombo->count() ) {
if ( mCurrentLook != 0 ) {
mCurrentLook->saveSettings( config );
addr = mCurrentLook->addressee();
delete mCurrentLook;
mCurrentLook = 0;
}
KABLookFactory *factory = mLookFactories.at( index );
- kdDebug(5720) << "ViewContainer::slotStyleSelected: "
- << "creating look "
- << factory->description() << endl;
mCurrentLook = factory->create();
mDetailsStack->raiseWidget( mCurrentLook );
connect( mCurrentLook, SIGNAL( sendEmail( const QString& ) ), this,
SIGNAL( sendEmail( const QString& ) ) );
connect( mCurrentLook, SIGNAL( browse( const QString& ) ), this,
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 )