-rw-r--r-- | kaddressbook/kabcore.cpp | 29 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 1 |
2 files changed, 19 insertions, 11 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index a6fc677..3c97ce9 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -678,6 +678,2 @@ void KABCore::setContactSelected( const QString &uid ) //mActionBeam->setEnabled( selected ); - - if (mActionBeamVCard) - mActionBeamVCard->setEnabled( selected ); - mActionWhoAmI->setEnabled( selected ); @@ -870,5 +866,11 @@ 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 ); @@ -1698,2 +1700,3 @@ void KABCore::initGUI() changeMenu= new QPopupMenu( this ); + beamMenu= new QPopupMenu( this ); @@ -1863,3 +1866,3 @@ void KABCore::initActions() 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(), @@ -2105,2 +2108,3 @@ void KABCore::addActionsManually() fileMenu->insertItem( i18n("&Change"), changeMenu ); + fileMenu->insertItem( i18n("&Beam"), beamMenu ); fileMenu->insertSeparator(); @@ -2108,4 +2112,5 @@ void KABCore::addActionsManually() #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 @@ -2153,3 +2158,5 @@ void KABCore::addActionsManually() 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 @@ -474,2 +474,3 @@ class KABCore : public QWidget, public KSyncInterface QPopupMenu *changeMenu; + QPopupMenu *beamMenu; //US QAction *mActionSave; |