summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index f2d4cd6..282560f 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1837,48 +1837,54 @@ void KABCore::initActions()
1837 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, 1837 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this,
1838 SLOT( setWhoAmI() ), actionCollection(), 1838 SLOT( setWhoAmI() ), actionCollection(),
1839 "set_personal" ); 1839 "set_personal" );
1840 1840
1841 1841
1842 1842
1843 1843
1844 mActionCategories = new KAction( i18n( "Set Categories" ), 0, this, 1844 mActionCategories = new KAction( i18n( "Set Categories" ), 0, this,
1845 SLOT( setCategories() ), actionCollection(), 1845 SLOT( setCategories() ), actionCollection(),
1846 "edit_set_categories" ); 1846 "edit_set_categories" );
1847 1847
1848 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, 1848 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this,
1849 SLOT( removeVoice() ), actionCollection(), 1849 SLOT( removeVoice() ), actionCollection(),
1850 "remove_voice" ); 1850 "remove_voice" );
1851 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, 1851 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this,
1852 SLOT( importFromOL() ), actionCollection(), 1852 SLOT( importFromOL() ), actionCollection(),
1853 "import_OL" ); 1853 "import_OL" );
1854#ifdef KAB_EMBEDDED 1854#ifdef KAB_EMBEDDED
1855 mActionLicence = new KAction( i18n( "Licence" ), 0, 1855 mActionLicence = new KAction( i18n( "Licence" ), 0,
1856 this, SLOT( showLicence() ), actionCollection(), 1856 this, SLOT( showLicence() ), actionCollection(),
1857 "licence_about_data" ); 1857 "licence_about_data" );
1858 mActionFaq = new KAction( i18n( "Faq" ), 0, 1858 mActionFaq = new KAction( i18n( "Faq" ), 0,
1859 this, SLOT( faq() ), actionCollection(), 1859 this, SLOT( faq() ), actionCollection(),
1860 "faq_about_data" ); 1860 "faq_about_data" );
1861 mActionWN = new KAction( i18n( "What's New?" ), 0,
1862 this, SLOT( whatsnew() ), actionCollection(),
1863 "wn" );
1864 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0,
1865 this, SLOT( synchowto() ), actionCollection(),
1866 "sync" );
1861 1867
1862 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, 1868 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0,
1863 this, SLOT( createAboutData() ), actionCollection(), 1869 this, SLOT( createAboutData() ), actionCollection(),
1864 "kaddressbook_about_data" ); 1870 "kaddressbook_about_data" );
1865#endif //KAB_EMBEDDED 1871#endif //KAB_EMBEDDED
1866 1872
1867 clipboardDataChanged(); 1873 clipboardDataChanged();
1868 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 1874 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
1869 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 1875 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
1870} 1876}
1871 1877
1872//US we need this function, to plug all actions into the correct menues. 1878//US we need this function, to plug all actions into the correct menues.
1873// KDE uses a XML format to plug the actions, but we work her without this overhead. 1879// KDE uses a XML format to plug the actions, but we work her without this overhead.
1874void KABCore::addActionsManually() 1880void KABCore::addActionsManually()
1875{ 1881{
1876//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 1882//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
1877 1883
1878#ifdef KAB_EMBEDDED 1884#ifdef KAB_EMBEDDED
1879 QPopupMenu *fileMenu = new QPopupMenu( this ); 1885 QPopupMenu *fileMenu = new QPopupMenu( this );
1880 QPopupMenu *editMenu = new QPopupMenu( this ); 1886 QPopupMenu *editMenu = new QPopupMenu( this );
1881 QPopupMenu *helpMenu = new QPopupMenu( this ); 1887 QPopupMenu *helpMenu = new QPopupMenu( this );
1882 1888
1883 KToolBar* tb = mMainWindow->toolBar(); 1889 KToolBar* tb = mMainWindow->toolBar();
1884 1890
@@ -1968,48 +1974,51 @@ void KABCore::addActionsManually()
1968 mActionConfigResources->plug( settingsMenu ); 1974 mActionConfigResources->plug( settingsMenu );
1969 settingsMenu->insertSeparator(); 1975 settingsMenu->insertSeparator();
1970 1976
1971 mActionConfigKAddressbook->plug( settingsMenu ); 1977 mActionConfigKAddressbook->plug( settingsMenu );
1972 1978
1973 if ( mIsPart ) { 1979 if ( mIsPart ) {
1974 mActionConfigShortcuts->plug( settingsMenu ); 1980 mActionConfigShortcuts->plug( settingsMenu );
1975 mActionConfigureToolbars->plug( settingsMenu ); 1981 mActionConfigureToolbars->plug( settingsMenu );
1976 1982
1977 } else { 1983 } else {
1978 mActionKeyBindings->plug( settingsMenu ); 1984 mActionKeyBindings->plug( settingsMenu );
1979 } 1985 }
1980 1986
1981 settingsMenu->insertSeparator(); 1987 settingsMenu->insertSeparator();
1982 1988
1983 mActionJumpBar->plug( settingsMenu ); 1989 mActionJumpBar->plug( settingsMenu );
1984 mActionDetails->plug( settingsMenu ); 1990 mActionDetails->plug( settingsMenu );
1985 if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) 1991 if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop )
1986 mActionDetails->plug( tb ); 1992 mActionDetails->plug( tb );
1987 settingsMenu->insertSeparator(); 1993 settingsMenu->insertSeparator();
1988 1994
1989 mActionWhoAmI->plug( settingsMenu ); 1995 mActionWhoAmI->plug( settingsMenu );
1990 mActionCategories->plug( settingsMenu ); 1996 mActionCategories->plug( settingsMenu );
1991 1997
1998
1999 mActionWN->plug( helpMenu );
2000 mActionSyncHowto->plug( helpMenu );
1992 mActionLicence->plug( helpMenu ); 2001 mActionLicence->plug( helpMenu );
1993 mActionFaq->plug( helpMenu ); 2002 mActionFaq->plug( helpMenu );
1994 mActionAboutKAddressbook->plug( helpMenu ); 2003 mActionAboutKAddressbook->plug( helpMenu );
1995 2004
1996 if (KGlobal::getDesktopSize() > KGlobal::Small ) { 2005 if (KGlobal::getDesktopSize() > KGlobal::Small ) {
1997 2006
1998 mActionSave->plug( tb ); 2007 mActionSave->plug( tb );
1999 mViewManager->getFilterAction()->plug ( tb); 2008 mViewManager->getFilterAction()->plug ( tb);
2000 if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { 2009 if (KGlobal::getDesktopSize() == KGlobal::Desktop ) {
2001 mActionUndo->plug( tb ); 2010 mActionUndo->plug( tb );
2002 mActionDelete->plug( tb ); 2011 mActionDelete->plug( tb );
2003 mActionRedo->plug( tb ); 2012 mActionRedo->plug( tb );
2004 } 2013 }
2005 } 2014 }
2006 //mActionQuit->plug ( tb ); 2015 //mActionQuit->plug ( tb );
2007 // tb->insertWidget(-1, 0, mIncSearchWidget, 6); 2016 // tb->insertWidget(-1, 0, mIncSearchWidget, 6);
2008 2017
2009 //US link the searchwidget first to this. 2018 //US link the searchwidget first to this.
2010 // The real linkage to the toolbar happens later. 2019 // The real linkage to the toolbar happens later.
2011//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); 2020//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE);
2012//US tb->insertItem( mIncSearchWidget ); 2021//US tb->insertItem( mIncSearchWidget );
2013/*US 2022/*US
2014 mIncSearchWidget = new IncSearchWidget( tb ); 2023 mIncSearchWidget = new IncSearchWidget( tb );
2015 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 2024 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
@@ -2256,48 +2265,56 @@ void KABCore::requestForDetails(const QString& sourceChannel, const QString& ses
2256 2265
2257 // raise Ka/Pi if it is in the background 2266 // raise Ka/Pi if it is in the background
2258#ifndef DESKTOP_VERSION 2267#ifndef DESKTOP_VERSION
2259#ifndef KORG_NODCOP 2268#ifndef KORG_NODCOP
2260 //QCopEnvelope e("QPE/Application/kapi", "raise()"); 2269 //QCopEnvelope e("QPE/Application/kapi", "raise()");
2261#endif 2270#endif
2262#endif 2271#endif
2263 2272
2264 mMainWindow->showMaximized(); 2273 mMainWindow->showMaximized();
2265 mMainWindow-> raise(); 2274 mMainWindow-> raise();
2266 2275
2267 mViewManager->setSelected( "", false); 2276 mViewManager->setSelected( "", false);
2268 mViewManager->refreshView( "" ); 2277 mViewManager->refreshView( "" );
2269 mViewManager->setSelected( foundUid, true ); 2278 mViewManager->setSelected( foundUid, true );
2270 mViewManager->refreshView( foundUid ); 2279 mViewManager->refreshView( foundUid );
2271 2280
2272 if ( !mMultipleViewsAtOnce ) 2281 if ( !mMultipleViewsAtOnce )
2273 { 2282 {
2274 setDetailsVisible( true ); 2283 setDetailsVisible( true );
2275 mActionDetails->setChecked(true); 2284 mActionDetails->setChecked(true);
2276 } 2285 }
2277 } 2286 }
2278} 2287}
2279 2288
2289void KABCore::whatsnew()
2290{
2291 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
2292}
2293void KABCore::synchowto()
2294{
2295 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
2296}
2280 2297
2281void KABCore::faq() 2298void KABCore::faq()
2282{ 2299{
2283 KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); 2300 KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" );
2284} 2301}
2285 2302
2286#include <libkcal/syncdefines.h> 2303#include <libkcal/syncdefines.h>
2287 2304
2288KABC::Addressee KABCore::getLastSyncAddressee() 2305KABC::Addressee KABCore::getLastSyncAddressee()
2289{ 2306{
2290 Addressee lse; 2307 Addressee lse;
2291 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2308 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2292 2309
2293 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); 2310 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() );
2294 lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); 2311 lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice );
2295 if (lse.isEmpty()) { 2312 if (lse.isEmpty()) {
2296 qDebug("Creating new last-syncAddressee "); 2313 qDebug("Creating new last-syncAddressee ");
2297 lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); 2314 lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice );
2298 QString sum = ""; 2315 QString sum = "";
2299 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) 2316 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
2300 sum = "E: "; 2317 sum = "E: ";
2301 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); 2318 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event"));
2302 lse.setRevision( mLastAddressbookSync ); 2319 lse.setRevision( mLastAddressbookSync );
2303 lse.setCategories( i18n("SyncEvent") ); 2320 lse.setCategories( i18n("SyncEvent") );