summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 75e539a..6984501 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -643,94 +643,97 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
// Reset category and edit..
m_abView -> setShowByCategory( QString::null );
m_abView -> setCurrentUid( uid );
slotItemEdit();
// Categories might have changed, so reload
reloadCategories();
}
if (needShow)
QPEApplication::setKeepRunning();
}
void AddressbookWindow::editEntry( EntryMode entryMode )
{
Opie::OPimContact entry;
if ( !abEditor ) {
abEditor = new ContactEditor( entry, this, "editor" );
}
if ( entryMode == EditEntry )
abEditor->setEntry( m_abView -> currentEntry() );
else if ( entryMode == NewEntry )
abEditor->setEntry( entry );
- // other things may change the caption.
- abEditor->setCaption( tr("Edit Address") );
+
+ // Set the dialog caption
+ if ( m_actionPersonal->isOn() )
+ abEditor->setCaption( tr( "Edit My Personal Details" ) );
+ else
+ abEditor->setCaption( tr( "Edit Contact" ) );
// fix the focus...
abEditor->setNameFocus();
if ( QPEApplication::execDialog( abEditor ) == QDialog::Accepted ) {
setFocus();
if ( entryMode == NewEntry ) {
Opie::OPimContact insertEntry = abEditor->entry();
insertEntry.assignUid();
m_abView -> addEntry( insertEntry );
m_abView -> setCurrentUid( insertEntry.uid() );
} else {
Opie::OPimContact replEntry = abEditor->entry();
if ( !replEntry.isValidUid() )
replEntry.assignUid();
m_abView -> replaceEntry( replEntry );
}
// Categories might have changed, so reload
reloadCategories();
}
}
void AddressbookWindow::editPersonal()
{
Opie::OPimContact entry;
// Switch to personal view if not selected
// but take care of the menu, too
if ( ! m_actionPersonal->isOn() ){
odebug << "*** ++++" << oendl;
m_actionPersonal->setOn( true );
slotPersonalView();
}
if ( !abEditor ) {
abEditor = new ContactEditor( entry, this, "editor" );
}
- abEditor->setCaption(tr("Edit My Personal Details"));
- abEditor->setPersonalView( true );
+ abEditor->setPersonalView( true );
editEntry( EditEntry );
- abEditor->setPersonalView( false );
+ abEditor->setPersonalView( false );
}
void AddressbookWindow::slotPersonalView()
{
odebug << "slotPersonalView()" << oendl;
bool personal = m_actionPersonal->isOn();
// Disable actions when showing personal details
setItemNewEnabled( !personal );
setItemDuplicateEnabled( !personal );
setItemDeleteEnabled( !personal );
m_actionMail->setEnabled( !personal );
setShowCategories( !personal );
// Display appropriate view
m_abView->showPersonal( personal );
if ( personal )
{
setCaption( tr( "Contacts - My Personal Details") );