author | zautrix <zautrix> | 2004-11-08 23:57:27 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-11-08 23:57:27 (UTC) |
commit | 48b2ccf53b1821598c6f18aab57e6e626047c262 (patch) (side-by-side diff) | |
tree | 10e4f0123debd92ed06f037dc9212c88a6046bc3 | |
parent | a102330ef5acb7346aa811378eaf9dbcdeabd4c4 (diff) | |
download | kdepimpi-48b2ccf53b1821598c6f18aab57e6e626047c262.zip kdepimpi-48b2ccf53b1821598c6f18aab57e6e626047c262.tar.gz kdepimpi-48b2ccf53b1821598c6f18aab57e6e626047c262.tar.bz2 |
more menu cleanup in kapi
-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 @@ -673,16 +673,12 @@ void KABCore::setContactSelected( const QString &uid ) mActionDelete->setEnabled( selected ); mActionEditAddressee->setEnabled( selected ); mActionMail->setEnabled( selected ); mActionMailVCard->setEnabled( selected ); //if (mActionBeam) //mActionBeam->setEnabled( selected ); - - if (mActionBeamVCard) - mActionBeamVCard->setEnabled( selected ); - mActionWhoAmI->setEnabled( selected ); } void KABCore::sendMail() { sendMail( mViewManager->selectedEmails().join( ", " ) ); @@ -866,14 +862,20 @@ void KABCore::writeToPhone( ) message(i18n("Export to phone finished!")); else 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 ); } void KABCore::beamVCard(const QStringList& uids) { @@ -1693,12 +1695,13 @@ void KABCore::initGUI() settingsMenu = new QPopupMenu( this ); //filterMenu = new QPopupMenu( this ); ImportMenu = new QPopupMenu( this ); 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. QBoxLayout *topLayout; @@ -1858,13 +1861,13 @@ void KABCore::initActions() mActionBeamVCard = 0; mActionBeam = 0; #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" ); mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, SLOT( beamMySelf() ), actionCollection(), "kaddressbook_beam_myself" ); @@ -2100,17 +2103,19 @@ void KABCore::addActionsManually() fileMenu->insertSeparator(); mActionSave->plug( fileMenu ); 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 ); #ifdef _WIN32_ mActionImportOL->plug( ImportMenu ); #endif @@ -2148,13 +2153,15 @@ void KABCore::addActionsManually() mActionJumpBar->plug( settingsMenu ); mActionDetails->plug( settingsMenu ); //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 ); mActionEditCategories->plug( settingsMenu ); mActionEditCategories->plug( changeMenu ); mActionCategories->plug( changeMenu ); diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index 88e83f0..c7c12ff 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -469,12 +469,13 @@ class KABCore : public QWidget, public KSyncInterface KAction *mActionDeleteView; QPopupMenu *viewMenu; QPopupMenu *filterMenu; QPopupMenu *settingsMenu; QPopupMenu *changeMenu; + QPopupMenu *beamMenu; //US QAction *mActionSave; QPopupMenu *ImportMenu; QPopupMenu *ExportMenu; //LR additional methods KAction *mActionRemoveVoice; KAction * mActionImportOL; |