summaryrefslogtreecommitdiff
authordrw <drw>2005-02-07 20:57:24 (UTC)
committer drw <drw>2005-02-07 20:57:24 (UTC)
commit7631c91d6c495a6c60e87a9ab131280f31ee4c87 (patch) (side-by-side diff)
treee28891ee563e7d33fd057e8afac477b0a16cf084
parent9f7017a1a571991763ed53066b64988cefdff07b (diff)
downloadopie-7631c91d6c495a6c60e87a9ab131280f31ee4c87.zip
opie-7631c91d6c495a6c60e87a9ab131280f31ee4c87.tar.gz
opie-7631c91d6c495a6c60e87a9ab131280f31ee4c87.tar.bz2
Implement contact duplication
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 7c52ef2..75e539a 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -349,24 +349,36 @@ void AddressbookWindow::slotItemEdit()
editPersonal();
} else {
editEntry( EditEntry );
}
} else {
QMessageBox::warning( this, tr("Contacts"),
tr("Can not edit data, currently syncing") );
}
}
void AddressbookWindow::slotItemDuplicate()
{
+ if(!syncing)
+ {
+ Opie::OPimContact entry = m_abView->currentEntry();
+ entry.assignUid();
+ m_abView->addEntry( entry );
+ m_abView->setCurrentUid( entry.uid() );
+ }
+ else
+ {
+ QMessageBox::warning( this, tr("Contacts"),
+ tr("Can not edit data, currently syncing") );
+ }
}
void AddressbookWindow::slotItemDelete()
{
if(!syncing) {
Opie::OPimContact tmpEntry = m_abView ->currentEntry();
// get a name, do the best we can...
QString strName = tmpEntry.fullName();
if ( strName.isEmpty() ) {
strName = tmpEntry.company();
if ( strName.isEmpty() )