summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index f6bdda4..e14e579 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1117,39 +1117,36 @@ void KABCore::incrementalSearch( const QString& text )
}
void KABCore::setModified()
{
setModified( true );
}
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;
}
void KABCore::contactModified( const KABC::Addressee &addr )
{
Command *command = 0;
@@ -1157,25 +1154,25 @@ void KABCore::contactModified( const KABC::Addressee &addr )
// check if it exists already
KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() );
if ( origAddr.isEmpty() )
command = new PwNewCommand( mAddressBook, addr );
else {
command = new PwEditCommand( mAddressBook, origAddr, addr );
uid = addr.uid();
}
UndoStack::instance()->push( command );
RedoStack::instance()->clear();
-
+ mDetails->setAddressee( addr );
setModified( true );
}
void KABCore::newContact()
{
QPtrList<KABC::Resource> kabcResources = mAddressBook->resources();
QPtrList<KRES::Resource> kresResources;
QPtrListIterator<KABC::Resource> it( kabcResources );
KABC::Resource *resource;
@@ -1624,25 +1621,24 @@ void KABCore::addressBookChanged()
if (mEditorDialog)
{
if (mEditorDialog->dirty())
{
QString text = i18n( "Data has been changed externally. Unsaved "
"changes will be lost." );
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 )
{
if ( mEditorDialog == 0 ) {
mEditorDialog = new AddresseeEditorDialog( this, parent,
name ? name : "editorDialog" );
@@ -2280,25 +2276,24 @@ void KABCore::manageCategories( )
for( i = 0; i< catIncList.count(); ++i ) {
if ( catList.contains (catIncList[i])) {
newCatList.append( catIncList[i] );
}
}
newCatList.sort();
(*it).setCategories( newCatList );
mAddressBook->insertAddressee( (*it) );
}
}
setModified( true );
mViewManager->refreshView();
- mDetails->refreshView();
message( i18n("Removing categories done!"));
}
delete cp;
}
void KABCore::removeVoice()
{
if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No )
return;
KABC::Addressee::List list;
XXPortSelectDialog dlg( this, false, this );
if ( dlg.exec() )
list = dlg.contacts();