summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -329,64 +329,76 @@ void AddressbookWindow::edit( int /*uid*/ )
void AddressbookWindow::add( const Opie::OPimRecord& )
{
}
void AddressbookWindow::slotItemNew()
{
Opie::OPimContact cnt;
if( !syncing ) {
editEntry( NewEntry );
} else {
QMessageBox::warning(this, tr("Contacts"),
tr("Can not edit data, currently syncing"));
}
}
void AddressbookWindow::slotItemEdit()
{
if(!syncing) {
if (m_actionPersonal->isOn()) {
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() )
strName = "No Name";
}
if ( QPEMessageBox::confirmDelete( this, tr( "Contacts" ),
strName ) ) {
m_abView->removeEntry( tmpEntry.uid() );
}
} else {
QMessageBox::warning( this, tr("Contacts"),
tr("Can not edit data, currently syncing") );
}
}
static const char * beamfile = "/tmp/obex/contact.vcf";
void AddressbookWindow::slotItemBeam()
{
QString beamFilename;
Opie::OPimContact c;