summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Side-by-side diff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp29
-rw-r--r--kaddressbook/kabcore.h1
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
@@ -676,10 +676,6 @@ void KABCore::setContactSelected( const QString &uid )
mActionMailVCard->setEnabled( selected );
//if (mActionBeam)
//mActionBeam->setEnabled( selected );
-
- if (mActionBeamVCard)
- mActionBeamVCard->setEnabled( selected );
-
mActionWhoAmI->setEnabled( selected );
}
@@ -868,9 +864,15 @@ void KABCore::writeToPhone( )
qDebug(i18n("Error exporting to phone"));
}
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 );
}
@@ -1696,6 +1698,7 @@ void KABCore::initGUI()
ExportMenu = new QPopupMenu( this );
syncMenu = new QPopupMenu( this );
changeMenu= new QPopupMenu( this );
+ beamMenu= new QPopupMenu( this );
//US since we have no splitter for the embedded system, setup
// a layout with two frames. One left and one right.
@@ -1861,7 +1864,7 @@ 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" );
@@ -2103,11 +2106,13 @@ void KABCore::addActionsManually()
fileMenu->insertItem( "&Import", ImportMenu );
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();
mActionQuit->plug( fileMenu );
@@ -2151,7 +2156,9 @@ void KABCore::addActionsManually()
//if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop )
mActionDetails->plug( tb );
settingsMenu->insertSeparator();
- mActionBR->plug(settingsMenu );
+#ifndef DESKTOP_VERSION
+ if ( Ir::supported() ) mActionBR->plug(settingsMenu );
+#endif
settingsMenu->insertSeparator();
mActionWhoAmI->plug( settingsMenu );
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index 88e83f0..c7c12ff 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -472,6 +472,7 @@ class KABCore : public QWidget, public KSyncInterface
QPopupMenu *filterMenu;
QPopupMenu *settingsMenu;
QPopupMenu *changeMenu;
+ QPopupMenu *beamMenu;
//US QAction *mActionSave;
QPopupMenu *ImportMenu;
QPopupMenu *ExportMenu;