summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp47
1 files changed, 34 insertions, 13 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index d891b07..25891a0 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -452,6 +452,6 @@ void KABCore::setContactSelected( const QString &uid )
mActionMailVCard->setEnabled( selected );
- if (mActionBeam)
- mActionBeam->setEnabled( selected );
+ //if (mActionBeam)
+ //mActionBeam->setEnabled( selected );
- if (mActionBeam)
+ if (mActionBeamVCard)
mActionBeamVCard->setEnabled( selected );
@@ -587,2 +587,6 @@ void KABCore::beamMySelf()
beamVCard(uids);
+ } else {
+ KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) );
+
+
}
@@ -631,2 +635,4 @@ void KABCore::beamVCard(const QStringList& uids)
*/
+
+#if 0
QString tmpdir = locateLocal("tmp", KGlobal::getAppName());
@@ -638,5 +644,9 @@ void KABCore::beamVCard(const QStringList& uids)
QString fileName = dirName + "/" + name;
+#endif
+ // LR: we should use the /tmp dir, because: /tmp = RAM, (HOME)/kdepim = flash memory
+ //
+ QString fileName = "/tmp/kdepimbeamfile";
- QDir().mkdir( dirName, true );
+ //QDir().mkdir( dirName, true );
@@ -665,2 +675,5 @@ void KABCore::beamVCard(const QStringList& uids)
}
+ } else {
+ qDebug("Error open temp beam file ");
+ return;
}
@@ -669,2 +682,3 @@ void KABCore::beamVCard(const QStringList& uids)
+#ifndef DESKTOP_VERSION
Ir *ir = new Ir( this );
@@ -672,2 +686,3 @@ void KABCore::beamVCard(const QStringList& uids)
ir->send( fileName, description, "text/x-vCard" );
+#endif
@@ -677,3 +692,5 @@ void KABCore::beamDone( Ir *ir )
{
+#ifndef DESKTOP_VERSION
delete ir;
+#endif
}
@@ -1492,8 +1509,15 @@ void KABCore::initActions()
mActionBeamVCard = 0;
+ mActionBeam = 0;
+
+#ifndef DESKTOP_VERSION
if ( Ir::supported() ) {
- mActionBeamVCard = new KAction( i18n( "Beam v&Card" ), "beam", 0, this,
+ mActionBeamVCard = new KAction( i18n( "Beam selected v&Card(s)" ), "beam", 0, this,
SLOT( beamVCard() ), actionCollection(),
"kaddressbook_beam_vcard" );
- }
+ mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this,
+ SLOT( beamMySelf() ), actionCollection(),
+ "kaddressbook_beam_myself" );
+ }
+#endif
@@ -1599,8 +1623,3 @@ void KABCore::initActions()
- mActionBeam = 0;
- if ( Ir::supported() ) {
- mActionBeam = new KAction( i18n( "&Beam Who Am I" ), "beam", 0, this,
- SLOT( beamMySelf() ), actionCollection(),
- "kaddressbook_beam_myself" );
- }
+
@@ -1695,3 +1714,6 @@ void KABCore::addActionsManually()
mActionMailVCard->plug( fileMenu );
+#ifndef DESKTOP_VERSION
if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu );
+ if ( Ir::supported() ) mActionBeam->plug(fileMenu );
+#endif
fileMenu->insertSeparator();
@@ -1736,3 +1758,2 @@ void KABCore::addActionsManually()
mActionWhoAmI->plug( settingsMenu );
- if ( Ir::supported() ) mActionBeam->plug( settingsMenu );
mActionCategories->plug( settingsMenu );