summaryrefslogtreecommitdiffabout
path: root/kabc
Side-by-side diff
Diffstat (limited to 'kabc') (more/less context) (show whitespace changes)
-rw-r--r--kabc/distributionlisteditor.cpp34
1 files changed, 8 insertions, 26 deletions
diff --git a/kabc/distributionlisteditor.cpp b/kabc/distributionlisteditor.cpp
index 569dc96..8b485d8 100644
--- a/kabc/distributionlisteditor.cpp
+++ b/kabc/distributionlisteditor.cpp
@@ -32,15 +32,13 @@
#include "addressbook.h"
#include "addresseedialog.h"
#include "distributionlist.h"
#include "distributionlisteditor.h"
-#ifndef KAB_EMBEDDED
-#include "distributionlisteditor.moc"
-#endif //KAB_EMBEDDED
+//US #include "distributionlisteditor.moc"
using namespace KABC;
EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString &current,
QWidget *parent ) :
KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok,
@@ -182,17 +180,14 @@ DistributionListEditor::~DistributionListEditor()
mManager->save();
delete mManager;
}
void DistributionListEditor::slotSelectionEntryViewChanged()
{
-#ifndef KAB_EMBEDDED
- EditEntryItem *entryItem = dynamic_cast<EditEntryItem *>( mEntryView->selectedItem() );
-#else //KAB_EMBEDDED
+//US EditEntryItem *entryItem = dynamic_cast<EditEntryItem *>( mEntryView->selectedItem() );
EditEntryItem *entryItem = (EditEntryItem *)( mEntryView->selectedItem() );
-#endif //KAB_EMBEDDED
bool state = (entryItem != 0L);
changeEmailButton->setEnabled(state);
removeEntryButton->setEnabled(state);
}
@@ -220,19 +215,18 @@ void DistributionListEditor::removeList()
addEntryButton->setEnabled( !mNameCombo->currentText().isEmpty());
updateEntryView();
}
void DistributionListEditor::addEntry()
{
-#ifndef KAB_EMBEDDED
+/*US
AddresseeItem *addresseeItem =
dynamic_cast<AddresseeItem *>( mAddresseeView->selectedItem() );
-#else //KAB_EMBEDDED
+*/
AddresseeItem *addresseeItem =
(AddresseeItem *)( mAddresseeView->selectedItem() );
-#endif //KAB_EMBEDDED
if( !addresseeItem ) {
kdDebug(5700) << "DLE::addEntry(): No addressee selected." << endl;
return;
}
@@ -250,33 +244,27 @@ void DistributionListEditor::addEntry()
void DistributionListEditor::removeEntry()
{
DistributionList *list = mManager->list( mNameCombo->currentText() );
if ( !list ) return;
-#ifndef KAB_EMBEDDED
- EditEntryItem *entryItem = dynamic_cast<EditEntryItem *>( mEntryView->selectedItem() );
-#else //KAB_EMBEDDED
+//US EditEntryItem *entryItem = dynamic_cast<EditEntryItem *>( mEntryView->selectedItem() );
EditEntryItem *entryItem = (EditEntryItem *)( mEntryView->selectedItem() );
-#endif //KAB_EMBEDDED
if ( !entryItem ) return;
list->removeEntry( entryItem->addressee(), entryItem->email() );
delete entryItem;
}
void DistributionListEditor::changeEmail()
{
DistributionList *list = mManager->list( mNameCombo->currentText() );
if ( !list ) return;
-#ifndef KAB_EMBEDDED
- EditEntryItem *entryItem = dynamic_cast<EditEntryItem *>( mEntryView->selectedItem() );
-#else //KAB_EMBEDDED
+//US EditEntryItem *entryItem = dynamic_cast<EditEntryItem *>( mEntryView->selectedItem() );
EditEntryItem *entryItem = (EditEntryItem *)( mEntryView->selectedItem() );
-#endif //KAB_EMBEDDED
if ( !entryItem ) return;
QString email = EmailSelectDialog::getEmail( entryItem->addressee().emails(),
entryItem->email(), this );
list->removeEntry( entryItem->addressee(), entryItem->email() );
list->insertEntry( entryItem->addressee(), email );
@@ -292,17 +280,14 @@ void DistributionListEditor::updateEntryView()
mEntryView->clear();
DistributionList::Entry::List entries = list->entries();
DistributionList::Entry::List::ConstIterator it;
for( it = entries.begin(); it != entries.end(); ++it ) {
new EditEntryItem( mEntryView, (*it).addressee, (*it).email );
}
-#ifndef KAB_EMBEDDED
- EditEntryItem *entryItem = dynamic_cast<EditEntryItem *>( mEntryView->selectedItem() );
-#else //KAB_EMBEDDED
+//US EditEntryItem *entryItem = dynamic_cast<EditEntryItem *>( mEntryView->selectedItem() );
EditEntryItem *entryItem = (EditEntryItem *)( mEntryView->selectedItem() );
-#endif //KAB_EMBEDDED
bool state = (entryItem != 0L);
changeEmailButton->setEnabled(state);
removeEntryButton->setEnabled(state);
}
@@ -322,14 +307,11 @@ void DistributionListEditor::updateNameCombo()
updateEntryView();
}
void DistributionListEditor::slotSelectionAddresseeViewChanged()
{
-#ifndef KAB_EMBEDDED
- AddresseeItem *addresseeItem = dynamic_cast<AddresseeItem *>( mAddresseeView->selectedItem() );
-#else //KAB_EMBEDDED
+//US AddresseeItem *addresseeItem = dynamic_cast<AddresseeItem *>( mAddresseeView->selectedItem() );
AddresseeItem *addresseeItem = (AddresseeItem *)( mAddresseeView->selectedItem() );
-#endif //KAB_EMBEDDED
bool state = (addresseeItem != 0L);
addEntryButton->setEnabled( state && !mNameCombo->currentText().isEmpty());
}