summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Unidiff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 755da11..d99a9cd 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1997,45 +1997,45 @@ void KABCore::addActionsManually()
1997#ifndef DESKTOP_VERSION 1997#ifndef DESKTOP_VERSION
1998 if ( KABPrefs::instance()->mFullMenuBarVisible ) { 1998 if ( KABPrefs::instance()->mFullMenuBarVisible ) {
1999#endif 1999#endif
2000 QMenuBar* mb = mMainWindow->menuBar(); 2000 QMenuBar* mb = mMainWindow->menuBar();
2001 2001
2002 //US setup menubar. 2002 //US setup menubar.
2003 //Disable the following block if you do not want to have a menubar. 2003 //Disable the following block if you do not want to have a menubar.
2004 mb->insertItem( i18n("&File"), fileMenu ); 2004 mb->insertItem( i18n("&File"), fileMenu );
2005 mb->insertItem( i18n("&Edit"), editMenu ); 2005 mb->insertItem( i18n("&Edit"), editMenu );
2006 mb->insertItem( i18n("&View"), viewMenu ); 2006 mb->insertItem( i18n("&View"), viewMenu );
2007 mb->insertItem( i18n("&Settings"), settingsMenu ); 2007 mb->insertItem( i18n("&Settings"), settingsMenu );
2008 mb->insertItem( i18n("Synchronize"), syncMenu ); 2008 mb->insertItem( i18n("Synchronize"), syncMenu );
2009 mb->insertItem( i18n("&Change selected"), changeMenu ); 2009 //mb->insertItem( i18n("&Change"), changeMenu );
2010 mb->insertItem( i18n("&Help"), helpMenu ); 2010 mb->insertItem( i18n("&Help"), helpMenu );
2011 mIncSearchWidget = new IncSearchWidget( tb ); 2011 mIncSearchWidget = new IncSearchWidget( tb );
2012 // tb->insertWidget(-1, 0, mIncSearchWidget); 2012 // tb->insertWidget(-1, 0, mIncSearchWidget);
2013#ifndef DESKTOP_VERSION 2013#ifndef DESKTOP_VERSION
2014 } else { 2014 } else {
2015 //US setup toolbar 2015 //US setup toolbar
2016 QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); 2016 QPEMenuBar *menuBarTB = new QPEMenuBar( tb );
2017 QPopupMenu *popupBarTB = new QPopupMenu( this ); 2017 QPopupMenu *popupBarTB = new QPopupMenu( this );
2018 menuBarTB->insertItem( "ME", popupBarTB); 2018 menuBarTB->insertItem( "ME", popupBarTB);
2019 tb->insertWidget(-1, 0, menuBarTB); 2019 tb->insertWidget(-1, 0, menuBarTB);
2020 mIncSearchWidget = new IncSearchWidget( tb ); 2020 mIncSearchWidget = new IncSearchWidget( tb );
2021 2021
2022 tb->enableMoving(false); 2022 tb->enableMoving(false);
2023 popupBarTB->insertItem( i18n("&File"), fileMenu ); 2023 popupBarTB->insertItem( i18n("&File"), fileMenu );
2024 popupBarTB->insertItem( i18n("&Edit"), editMenu ); 2024 popupBarTB->insertItem( i18n("&Edit"), editMenu );
2025 popupBarTB->insertItem( i18n("&View"), viewMenu ); 2025 popupBarTB->insertItem( i18n("&View"), viewMenu );
2026 popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); 2026 popupBarTB->insertItem( i18n("&Settings"), settingsMenu );
2027 popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); 2027 popupBarTB->insertItem( i18n("Synchronize"), syncMenu );
2028 mViewManager->getFilterAction()->plug ( popupBarTB); 2028 mViewManager->getFilterAction()->plug ( popupBarTB);
2029 popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); 2029 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu );
2030 popupBarTB->insertItem( i18n("&Help"), helpMenu ); 2030 popupBarTB->insertItem( i18n("&Help"), helpMenu );
2031 if (QApplication::desktop()->width() > 320 ) { 2031 if (QApplication::desktop()->width() > 320 ) {
2032 // mViewManager->getFilterAction()->plug ( tb); 2032 // mViewManager->getFilterAction()->plug ( tb);
2033 } 2033 }
2034 } 2034 }
2035#endif 2035#endif
2036 // mActionQuit->plug ( mMainWindow->toolBar()); 2036 // mActionQuit->plug ( mMainWindow->toolBar());
2037 2037
2038 2038
2039 2039
2040 //US Now connect the actions with the menue entries. 2040 //US Now connect the actions with the menue entries.
2041 mActionPrint->plug( fileMenu ); 2041 mActionPrint->plug( fileMenu );
@@ -2045,24 +2045,25 @@ void KABCore::addActionsManually()
2045 mActionNewContact->plug( fileMenu ); 2045 mActionNewContact->plug( fileMenu );
2046 mActionNewContact->plug( tb ); 2046 mActionNewContact->plug( tb );
2047 2047
2048 mActionEditAddressee->plug( fileMenu ); 2048 mActionEditAddressee->plug( fileMenu );
2049 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || 2049 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) ||
2050 // (!KABPrefs::instance()->mMultipleViewsAtOnce )) 2050 // (!KABPrefs::instance()->mMultipleViewsAtOnce ))
2051 mActionEditAddressee->plug( tb ); 2051 mActionEditAddressee->plug( tb );
2052 2052
2053 fileMenu->insertSeparator(); 2053 fileMenu->insertSeparator();
2054 mActionSave->plug( fileMenu ); 2054 mActionSave->plug( fileMenu );
2055 fileMenu->insertItem( "&Import", ImportMenu ); 2055 fileMenu->insertItem( "&Import", ImportMenu );
2056 fileMenu->insertItem( "&Export", ExportMenu ); 2056 fileMenu->insertItem( "&Export", ExportMenu );
2057 fileMenu->insertItem( i18n("&Change"), changeMenu );
2057 fileMenu->insertSeparator(); 2058 fileMenu->insertSeparator();
2058 mActionMailVCard->plug( fileMenu ); 2059 mActionMailVCard->plug( fileMenu );
2059#ifndef DESKTOP_VERSION 2060#ifndef DESKTOP_VERSION
2060 if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu ); 2061 if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu );
2061 if ( Ir::supported() ) mActionBeam->plug(fileMenu ); 2062 if ( Ir::supported() ) mActionBeam->plug(fileMenu );
2062#endif 2063#endif
2063 fileMenu->insertSeparator(); 2064 fileMenu->insertSeparator();
2064 mActionQuit->plug( fileMenu ); 2065 mActionQuit->plug( fileMenu );
2065#ifdef _WIN32_ 2066#ifdef _WIN32_
2066 mActionImportOL->plug( ImportMenu ); 2067 mActionImportOL->plug( ImportMenu );
2067#endif 2068#endif
2068 // edit menu 2069 // edit menu
@@ -2217,28 +2218,32 @@ void KABCore::manageCategories( )
2217 } 2218 }
2218 setModified( true ); 2219 setModified( true );
2219 mViewManager->refreshView(); 2220 mViewManager->refreshView();
2220 mDetails->refreshView(); 2221 mDetails->refreshView();
2221 message( i18n("Removing categories done!")); 2222 message( i18n("Removing categories done!"));
2222 } 2223 }
2223 delete cp; 2224 delete cp;
2224} 2225}
2225void KABCore::removeVoice() 2226void KABCore::removeVoice()
2226{ 2227{
2227 if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No ) 2228 if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No )
2228 return; 2229 return;
2229 KABC::Addressee::List list = mViewManager->selectedAddressees(); 2230 KABC::Addressee::List list;
2231 XXPortSelectDialog dlg( this, false, this );
2232 if ( dlg.exec() )
2233 list = dlg.contacts();
2234 else
2235 return;
2230 KABC::Addressee::List::Iterator it; 2236 KABC::Addressee::List::Iterator it;
2231 for ( it = list.begin(); it != list.end(); ++it ) { 2237 for ( it = list.begin(); it != list.end(); ++it ) {
2232
2233 if ( (*it).removeVoice() ) 2238 if ( (*it).removeVoice() )
2234 contactModified((*it) ); 2239 contactModified((*it) );
2235 } 2240 }
2236} 2241}
2237 2242
2238 2243
2239 2244
2240void KABCore::clipboardDataChanged() 2245void KABCore::clipboardDataChanged()
2241{ 2246{
2242 2247
2243 if ( mReadWrite ) 2248 if ( mReadWrite )
2244 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); 2249 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() );