-rw-r--r-- | kaddressbook/kabcore.cpp | 27 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 1 |
2 files changed, 18 insertions, 10 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index a6fc677..3c97ce9 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -677,8 +677,4 @@ void KABCore::setContactSelected( const QString &uid ) //if (mActionBeam) //mActionBeam->setEnabled( selected ); - - if (mActionBeamVCard) - mActionBeamVCard->setEnabled( selected ); - mActionWhoAmI->setEnabled( selected ); } @@ -870,6 +866,12 @@ void KABCore::writeToPhone( ) void KABCore::beamVCard() { - QStringList uids = mViewManager->selectedUids(); - if ( !uids.isEmpty() ) + QStringList uids; + XXPortSelectDialog dlg( this, false, this ); + if ( dlg.exec() ) + uids = dlg.uids(); + else + return; + if ( uids.isEmpty() ) + return; beamVCard( uids ); } @@ -1697,4 +1699,5 @@ void KABCore::initGUI() syncMenu = new QPopupMenu( this ); changeMenu= new QPopupMenu( this ); + beamMenu= new QPopupMenu( this ); //US since we have no splitter for the embedded system, setup @@ -1862,5 +1865,5 @@ void KABCore::initActions() #ifndef DESKTOP_VERSION if ( Ir::supported() ) { - mActionBeamVCard = new KAction( i18n( "Beam selected v&Card(s)" ), "beam", 0, this, + mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this, SLOT( beamVCard() ), actionCollection(), "kaddressbook_beam_vcard" ); @@ -2104,9 +2107,11 @@ void KABCore::addActionsManually() fileMenu->insertItem( "&Export", ExportMenu ); fileMenu->insertItem( i18n("&Change"), changeMenu ); + fileMenu->insertItem( i18n("&Beam"), beamMenu ); fileMenu->insertSeparator(); mActionMailVCard->plug( fileMenu ); #ifndef DESKTOP_VERSION - if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu ); - if ( Ir::supported() ) mActionBeam->plug(fileMenu ); + if ( Ir::supported() ) mActionBR->plug( beamMenu ); + if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); + if ( Ir::supported() ) mActionBeam->plug( beamMenu ); #endif fileMenu->insertSeparator(); @@ -2152,5 +2157,7 @@ void KABCore::addActionsManually() mActionDetails->plug( tb ); settingsMenu->insertSeparator(); - mActionBR->plug(settingsMenu ); +#ifndef DESKTOP_VERSION + if ( Ir::supported() ) mActionBR->plug(settingsMenu ); +#endif settingsMenu->insertSeparator(); diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index 88e83f0..c7c12ff 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -473,4 +473,5 @@ class KABCore : public QWidget, public KSyncInterface QPopupMenu *settingsMenu; QPopupMenu *changeMenu; + QPopupMenu *beamMenu; //US QAction *mActionSave; QPopupMenu *ImportMenu; |