-rw-r--r-- | kaddressbook/kabcore.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index ce5c755..eba74a6 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2053,96 +2053,103 @@ void KABCore::initActions() | |||
2053 | #ifndef KAB_EMBEDDED | 2053 | #ifndef KAB_EMBEDDED |
2054 | if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { | 2054 | if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { |
2055 | new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, | 2055 | new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, |
2056 | this, SLOT( openLDAPDialog() ), actionCollection(), | 2056 | this, SLOT( openLDAPDialog() ), actionCollection(), |
2057 | "ldap_lookup" ); | 2057 | "ldap_lookup" ); |
2058 | } | 2058 | } |
2059 | #else //KAB_EMBEDDED | 2059 | #else //KAB_EMBEDDED |
2060 | //qDebug("KABCore::initActions() LDAP has to be implemented"); | 2060 | //qDebug("KABCore::initActions() LDAP has to be implemented"); |
2061 | #endif //KAB_EMBEDDED | 2061 | #endif //KAB_EMBEDDED |
2062 | 2062 | ||
2063 | 2063 | ||
2064 | mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, | 2064 | mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, |
2065 | SLOT( setWhoAmI() ), actionCollection(), | 2065 | SLOT( setWhoAmI() ), actionCollection(), |
2066 | "set_personal" ); | 2066 | "set_personal" ); |
2067 | 2067 | ||
2068 | 2068 | ||
2069 | mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this, | 2069 | mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this, |
2070 | SLOT( setCategories() ), actionCollection(), | 2070 | SLOT( setCategories() ), actionCollection(), |
2071 | "edit_set_categories" ); | 2071 | "edit_set_categories" ); |
2072 | mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this, | 2072 | mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this, |
2073 | SLOT( editCategories() ), actionCollection(), | 2073 | SLOT( editCategories() ), actionCollection(), |
2074 | "edit__categories" ); | 2074 | "edit__categories" ); |
2075 | 2075 | ||
2076 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, | 2076 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, |
2077 | SLOT( removeVoice() ), actionCollection(), | 2077 | SLOT( removeVoice() ), actionCollection(), |
2078 | "remove_voice" ); | 2078 | "remove_voice" ); |
2079 | mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this, | 2079 | mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this, |
2080 | SLOT( setFormattedName() ), actionCollection(), | 2080 | SLOT( setFormattedName() ), actionCollection(), |
2081 | "set_formatted" ); | 2081 | "set_formatted" ); |
2082 | 2082 | ||
2083 | mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this, | 2083 | mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this, |
2084 | SLOT( manageCategories() ), actionCollection(), | 2084 | SLOT( manageCategories() ), actionCollection(), |
2085 | "remove_voice" ); | 2085 | "remove_voice" ); |
2086 | 2086 | ||
2087 | 2087 | ||
2088 | mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, | 2088 | mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, |
2089 | SLOT( importFromOL() ), actionCollection(), | 2089 | SLOT( importFromOL() ), actionCollection(), |
2090 | "import_OL" ); | 2090 | "import_OL" ); |
2091 | #ifdef KAB_EMBEDDED | 2091 | #ifdef KAB_EMBEDDED |
2092 | mActionLicence = new KAction( i18n( "Licence" ), 0, | 2092 | mActionLicence = new KAction( i18n( "Licence" ), 0, |
2093 | this, SLOT( showLicence() ), actionCollection(), | 2093 | this, SLOT( showLicence() ), actionCollection(), |
2094 | "licence_about_data" ); | 2094 | "licence_about_data" ); |
2095 | mActionFaq = new KAction( i18n( "Faq" ), 0, | 2095 | mActionFaq = new KAction( i18n( "Faq" ), 0, |
2096 | this, SLOT( faq() ), actionCollection(), | 2096 | this, SLOT( faq() ), actionCollection(), |
2097 | "faq_about_data" ); | 2097 | "faq_about_data" ); |
2098 | mActionWN = new KAction( i18n( "What's New?" ), 0, | 2098 | mActionWN = new KAction( i18n( "What's New?" ), 0, |
2099 | this, SLOT( whatsnew() ), actionCollection(), | 2099 | this, SLOT( whatsnew() ), actionCollection(), |
2100 | "wn" ); | 2100 | "wn" ); |
2101 | |||
2102 | |||
2103 | |||
2104 | mActionStorageHowto = new KAction( i18n( "Storage HowTo" ), 0, | ||
2105 | this, SLOT( storagehowto() ), actionCollection(), | ||
2106 | "storage" ); | ||
2107 | |||
2101 | mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, | 2108 | mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, |
2102 | this, SLOT( synchowto() ), actionCollection(), | 2109 | this, SLOT( synchowto() ), actionCollection(), |
2103 | "sync" ); | 2110 | "sync" ); |
2104 | mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, | 2111 | mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, |
2105 | this, SLOT( kdesynchowto() ), actionCollection(), | 2112 | this, SLOT( kdesynchowto() ), actionCollection(), |
2106 | "kdesync" ); | 2113 | "kdesync" ); |
2107 | mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, | 2114 | mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, |
2108 | this, SLOT( multisynchowto() ), actionCollection(), | 2115 | this, SLOT( multisynchowto() ), actionCollection(), |
2109 | "multisync" ); | 2116 | "multisync" ); |
2110 | 2117 | ||
2111 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, | 2118 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, |
2112 | this, SLOT( createAboutData() ), actionCollection(), | 2119 | this, SLOT( createAboutData() ), actionCollection(), |
2113 | "kaddressbook_about_data" ); | 2120 | "kaddressbook_about_data" ); |
2114 | #endif //KAB_EMBEDDED | 2121 | #endif //KAB_EMBEDDED |
2115 | 2122 | ||
2116 | clipboardDataChanged(); | 2123 | clipboardDataChanged(); |
2117 | connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); | 2124 | connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); |
2118 | connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); | 2125 | connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); |
2119 | } | 2126 | } |
2120 | 2127 | ||
2121 | //US we need this function, to plug all actions into the correct menues. | 2128 | //US we need this function, to plug all actions into the correct menues. |
2122 | // KDE uses a XML format to plug the actions, but we work her without this overhead. | 2129 | // KDE uses a XML format to plug the actions, but we work her without this overhead. |
2123 | void KABCore::addActionsManually() | 2130 | void KABCore::addActionsManually() |
2124 | { | 2131 | { |
2125 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 2132 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
2126 | 2133 | ||
2127 | #ifdef KAB_EMBEDDED | 2134 | #ifdef KAB_EMBEDDED |
2128 | QPopupMenu *fileMenu = new QPopupMenu( this ); | 2135 | QPopupMenu *fileMenu = new QPopupMenu( this ); |
2129 | QPopupMenu *editMenu = new QPopupMenu( this ); | 2136 | QPopupMenu *editMenu = new QPopupMenu( this ); |
2130 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 2137 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
2131 | 2138 | ||
2132 | KToolBar* tb = mMainWindow->toolBar(); | 2139 | KToolBar* tb = mMainWindow->toolBar(); |
2133 | mMainWindow->setToolBarsMovable (false ); | 2140 | mMainWindow->setToolBarsMovable (false ); |
2134 | #ifndef DESKTOP_VERSION | 2141 | #ifndef DESKTOP_VERSION |
2135 | if ( KABPrefs::instance()->mFullMenuBarVisible ) { | 2142 | if ( KABPrefs::instance()->mFullMenuBarVisible ) { |
2136 | #endif | 2143 | #endif |
2137 | QMenuBar* mb = mMainWindow->menuBar(); | 2144 | QMenuBar* mb = mMainWindow->menuBar(); |
2138 | 2145 | ||
2139 | //US setup menubar. | 2146 | //US setup menubar. |
2140 | //Disable the following block if you do not want to have a menubar. | 2147 | //Disable the following block if you do not want to have a menubar. |
2141 | mb->insertItem( i18n("&File"), fileMenu ); | 2148 | mb->insertItem( i18n("&File"), fileMenu ); |
2142 | mb->insertItem( i18n("&Edit"), editMenu ); | 2149 | mb->insertItem( i18n("&Edit"), editMenu ); |
2143 | mb->insertItem( i18n("&View"), viewMenu ); | 2150 | mb->insertItem( i18n("&View"), viewMenu ); |
2144 | mb->insertItem( i18n("&Settings"), settingsMenu ); | 2151 | mb->insertItem( i18n("&Settings"), settingsMenu ); |
2145 | #ifdef DESKTOP_VERSION | 2152 | #ifdef DESKTOP_VERSION |
2146 | mb->insertItem( i18n("Synchronize"), syncMenu ); | 2153 | mb->insertItem( i18n("Synchronize"), syncMenu ); |
2147 | #else | 2154 | #else |
2148 | mb->insertItem( i18n("Sync"), syncMenu ); | 2155 | mb->insertItem( i18n("Sync"), syncMenu ); |
@@ -2228,96 +2235,97 @@ void KABCore::addActionsManually() | |||
2228 | mActionCopy->plug( editMenu ); | 2235 | mActionCopy->plug( editMenu ); |
2229 | mActionPaste->plug( editMenu ); | 2236 | mActionPaste->plug( editMenu ); |
2230 | mActionDelete->plug( editMenu ); | 2237 | mActionDelete->plug( editMenu ); |
2231 | editMenu->insertSeparator(); | 2238 | editMenu->insertSeparator(); |
2232 | mActionSelectAll->plug( editMenu ); | 2239 | mActionSelectAll->plug( editMenu ); |
2233 | 2240 | ||
2234 | mActionSetFormattedName->plug( changeMenu ); | 2241 | mActionSetFormattedName->plug( changeMenu ); |
2235 | mActionRemoveVoice->plug( changeMenu ); | 2242 | mActionRemoveVoice->plug( changeMenu ); |
2236 | // settingsmings menu | 2243 | // settingsmings menu |
2237 | //US special menuentry to configure the addressbook resources. On KDE | 2244 | //US special menuentry to configure the addressbook resources. On KDE |
2238 | // you do that through the control center !!! | 2245 | // you do that through the control center !!! |
2239 | // settingsMenu->insertSeparator(); | 2246 | // settingsMenu->insertSeparator(); |
2240 | 2247 | ||
2241 | mActionConfigKAddressbook->plug( settingsMenu, 0 ); | 2248 | mActionConfigKAddressbook->plug( settingsMenu, 0 ); |
2242 | mActionConfigResources->plug( settingsMenu,1 ); | 2249 | mActionConfigResources->plug( settingsMenu,1 ); |
2243 | settingsMenu->insertSeparator(2); | 2250 | settingsMenu->insertSeparator(2); |
2244 | 2251 | ||
2245 | if ( mIsPart ) { | 2252 | if ( mIsPart ) { |
2246 | //US not implemented yet | 2253 | //US not implemented yet |
2247 | //mActionConfigShortcuts->plug( settingsMenu ); | 2254 | //mActionConfigShortcuts->plug( settingsMenu ); |
2248 | //mActionConfigureToolbars->plug( settingsMenu ); | 2255 | //mActionConfigureToolbars->plug( settingsMenu ); |
2249 | 2256 | ||
2250 | } else { | 2257 | } else { |
2251 | //US not implemented yet | 2258 | //US not implemented yet |
2252 | //mActionKeyBindings->plug( settingsMenu ); | 2259 | //mActionKeyBindings->plug( settingsMenu ); |
2253 | } | 2260 | } |
2254 | 2261 | ||
2255 | mActionEditCategories->plug( settingsMenu ); | 2262 | mActionEditCategories->plug( settingsMenu ); |
2256 | mActionManageCategories->plug( settingsMenu ); | 2263 | mActionManageCategories->plug( settingsMenu ); |
2257 | mActionJumpBar->plug( viewMenu,0 ); | 2264 | mActionJumpBar->plug( viewMenu,0 ); |
2258 | mActionDetails->plug( viewMenu,0 ); | 2265 | mActionDetails->plug( viewMenu,0 ); |
2259 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) | 2266 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) |
2260 | mActionDetails->plug( tb ); | 2267 | mActionDetails->plug( tb ); |
2261 | settingsMenu->insertSeparator(); | 2268 | settingsMenu->insertSeparator(); |
2262 | #ifndef DESKTOP_VERSION | 2269 | #ifndef DESKTOP_VERSION |
2263 | if ( Ir::supported() ) mActionBR->plug(settingsMenu ); | 2270 | if ( Ir::supported() ) mActionBR->plug(settingsMenu ); |
2264 | settingsMenu->insertSeparator(); | 2271 | settingsMenu->insertSeparator(); |
2265 | #endif | 2272 | #endif |
2266 | 2273 | ||
2267 | mActionWhoAmI->plug( settingsMenu ); | 2274 | mActionWhoAmI->plug( settingsMenu ); |
2268 | //mActionEditCategories->plug( changeMenu ); | 2275 | //mActionEditCategories->plug( changeMenu ); |
2269 | mActionCategories->plug( changeMenu ); | 2276 | mActionCategories->plug( changeMenu ); |
2270 | //mActionManageCategories->plug( changeMenu ); | 2277 | //mActionManageCategories->plug( changeMenu ); |
2271 | 2278 | ||
2272 | //mActionCategories->plug( settingsMenu ); | 2279 | //mActionCategories->plug( settingsMenu ); |
2273 | 2280 | ||
2274 | 2281 | ||
2275 | mActionWN->plug( helpMenu ); | 2282 | mActionWN->plug( helpMenu ); |
2283 | mActionStorageHowto->plug( helpMenu ); | ||
2276 | mActionSyncHowto->plug( helpMenu ); | 2284 | mActionSyncHowto->plug( helpMenu ); |
2277 | mActionKdeSyncHowto->plug( helpMenu ); | 2285 | mActionKdeSyncHowto->plug( helpMenu ); |
2278 | mActionMultiSyncHowto->plug( helpMenu ); | 2286 | mActionMultiSyncHowto->plug( helpMenu ); |
2279 | mActionFaq->plug( helpMenu ); | 2287 | mActionFaq->plug( helpMenu ); |
2280 | mActionLicence->plug( helpMenu ); | 2288 | mActionLicence->plug( helpMenu ); |
2281 | mActionAboutKAddressbook->plug( helpMenu ); | 2289 | mActionAboutKAddressbook->plug( helpMenu ); |
2282 | 2290 | ||
2283 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { | 2291 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { |
2284 | 2292 | ||
2285 | mActionSave->plug( tb ); | 2293 | mActionSave->plug( tb ); |
2286 | mViewManager->getFilterAction()->plug ( tb); | 2294 | mViewManager->getFilterAction()->plug ( tb); |
2287 | //LR hide filteraction on started in 480x640 | 2295 | //LR hide filteraction on started in 480x640 |
2288 | if (QApplication::desktop()->width() == 480 ) { | 2296 | if (QApplication::desktop()->width() == 480 ) { |
2289 | mViewManager->getFilterAction()->setComboWidth( 0 ); | 2297 | mViewManager->getFilterAction()->setComboWidth( 0 ); |
2290 | } | 2298 | } |
2291 | mActionUndo->plug( tb ); | 2299 | mActionUndo->plug( tb ); |
2292 | mActionDelete->plug( tb ); | 2300 | mActionDelete->plug( tb ); |
2293 | mActionRedo->plug( tb ); | 2301 | mActionRedo->plug( tb ); |
2294 | } else { | 2302 | } else { |
2295 | mActionSave->plug( tb ); | 2303 | mActionSave->plug( tb ); |
2296 | tb->enableMoving(false); | 2304 | tb->enableMoving(false); |
2297 | } | 2305 | } |
2298 | //mActionQuit->plug ( tb ); | 2306 | //mActionQuit->plug ( tb ); |
2299 | //tb->insertWidget(-1, 0, mIncSearchWidget, 6); | 2307 | //tb->insertWidget(-1, 0, mIncSearchWidget, 6); |
2300 | 2308 | ||
2301 | //US link the searchwidget first to this. | 2309 | //US link the searchwidget first to this. |
2302 | // The real linkage to the toolbar happens later. | 2310 | // The real linkage to the toolbar happens later. |
2303 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); | 2311 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); |
2304 | //US tb->insertItem( mIncSearchWidget ); | 2312 | //US tb->insertItem( mIncSearchWidget ); |
2305 | /*US | 2313 | /*US |
2306 | mIncSearchWidget = new IncSearchWidget( tb ); | 2314 | mIncSearchWidget = new IncSearchWidget( tb ); |
2307 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 2315 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
2308 | SLOT( incrementalSearch( const QString& ) ) ); | 2316 | SLOT( incrementalSearch( const QString& ) ) ); |
2309 | 2317 | ||
2310 | mJumpButtonBar = new JumpButtonBar( this, this ); | 2318 | mJumpButtonBar = new JumpButtonBar( this, this ); |
2311 | 2319 | ||
2312 | //US topLayout->addWidget( mJumpButtonBar ); | 2320 | //US topLayout->addWidget( mJumpButtonBar ); |
2313 | this->layout()->add( mJumpButtonBar ); | 2321 | this->layout()->add( mJumpButtonBar ); |
2314 | */ | 2322 | */ |
2315 | 2323 | ||
2316 | #endif //KAB_EMBEDDED | 2324 | #endif //KAB_EMBEDDED |
2317 | 2325 | ||
2318 | mActionExport2phone->plug( ExportMenu ); | 2326 | mActionExport2phone->plug( ExportMenu ); |
2319 | connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); | 2327 | connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); |
2320 | syncManager->fillSyncMenu(); | 2328 | syncManager->fillSyncMenu(); |
2321 | 2329 | ||
2322 | } | 2330 | } |
2323 | void KABCore::showLicence() | 2331 | void KABCore::showLicence() |
@@ -2681,97 +2689,100 @@ void KABCore::requestForDetails(const QString& sourceChannel, const QString& ses | |||
2681 | foundUid = emaillist[0].uid(); | 2689 | foundUid = emaillist[0].uid(); |
2682 | } | 2690 | } |
2683 | else if ((namelist.count() > 0) && (emaillist.count() == 0)) | 2691 | else if ((namelist.count() > 0) && (emaillist.count() == 0)) |
2684 | foundUid = namelist[0].uid(); | 2692 | foundUid = namelist[0].uid(); |
2685 | else | 2693 | else |
2686 | { | 2694 | { |
2687 | for (int i = 0; i < namelist.count(); i++) | 2695 | for (int i = 0; i < namelist.count(); i++) |
2688 | { | 2696 | { |
2689 | for (int j = 0; j < emaillist.count(); j++) | 2697 | for (int j = 0; j < emaillist.count(); j++) |
2690 | { | 2698 | { |
2691 | if (namelist[i] == emaillist[j]) | 2699 | if (namelist[i] == emaillist[j]) |
2692 | { | 2700 | { |
2693 | foundUid = namelist[i].uid(); | 2701 | foundUid = namelist[i].uid(); |
2694 | } | 2702 | } |
2695 | } | 2703 | } |
2696 | } | 2704 | } |
2697 | } | 2705 | } |
2698 | } | 2706 | } |
2699 | else | 2707 | else |
2700 | { | 2708 | { |
2701 | foundUid = uid; | 2709 | foundUid = uid; |
2702 | } | 2710 | } |
2703 | 2711 | ||
2704 | if (!foundUid.isEmpty()) | 2712 | if (!foundUid.isEmpty()) |
2705 | { | 2713 | { |
2706 | 2714 | ||
2707 | // raise Ka/Pi if it is in the background | 2715 | // raise Ka/Pi if it is in the background |
2708 | #ifndef DESKTOP_VERSION | 2716 | #ifndef DESKTOP_VERSION |
2709 | #ifndef KORG_NODCOP | 2717 | #ifndef KORG_NODCOP |
2710 | //QCopEnvelope e("QPE/Application/kapi", "raise()"); | 2718 | //QCopEnvelope e("QPE/Application/kapi", "raise()"); |
2711 | #endif | 2719 | #endif |
2712 | #endif | 2720 | #endif |
2713 | 2721 | ||
2714 | mMainWindow->showMaximized(); | 2722 | mMainWindow->showMaximized(); |
2715 | mMainWindow-> raise(); | 2723 | mMainWindow-> raise(); |
2716 | 2724 | ||
2717 | mViewManager->setSelected( "", false); | 2725 | mViewManager->setSelected( "", false); |
2718 | mViewManager->refreshView( "" ); | 2726 | mViewManager->refreshView( "" ); |
2719 | mViewManager->setSelected( foundUid, true ); | 2727 | mViewManager->setSelected( foundUid, true ); |
2720 | mViewManager->refreshView( foundUid ); | 2728 | mViewManager->refreshView( foundUid ); |
2721 | 2729 | ||
2722 | if ( !mMultipleViewsAtOnce ) | 2730 | if ( !mMultipleViewsAtOnce ) |
2723 | { | 2731 | { |
2724 | setDetailsVisible( true ); | 2732 | setDetailsVisible( true ); |
2725 | mActionDetails->setChecked(true); | 2733 | mActionDetails->setChecked(true); |
2726 | } | 2734 | } |
2727 | } | 2735 | } |
2728 | } | 2736 | } |
2729 | 2737 | void KABCore::storagehowto() | |
2738 | { | ||
2739 | KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); | ||
2740 | } | ||
2730 | void KABCore::whatsnew() | 2741 | void KABCore::whatsnew() |
2731 | { | 2742 | { |
2732 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | 2743 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); |
2733 | } | 2744 | } |
2734 | void KABCore::synchowto() | 2745 | void KABCore::synchowto() |
2735 | { | 2746 | { |
2736 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 2747 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
2737 | } | 2748 | } |
2738 | void KABCore::kdesynchowto() | 2749 | void KABCore::kdesynchowto() |
2739 | { | 2750 | { |
2740 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); | 2751 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); |
2741 | } | 2752 | } |
2742 | void KABCore::multisynchowto() | 2753 | void KABCore::multisynchowto() |
2743 | { | 2754 | { |
2744 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); | 2755 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); |
2745 | } | 2756 | } |
2746 | void KABCore::faq() | 2757 | void KABCore::faq() |
2747 | { | 2758 | { |
2748 | KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); | 2759 | KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); |
2749 | } | 2760 | } |
2750 | 2761 | ||
2751 | #include <libkcal/syncdefines.h> | 2762 | #include <libkcal/syncdefines.h> |
2752 | 2763 | ||
2753 | KABC::Addressee KABCore::getLastSyncAddressee() | 2764 | KABC::Addressee KABCore::getLastSyncAddressee() |
2754 | { | 2765 | { |
2755 | Addressee lse; | 2766 | Addressee lse; |
2756 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2767 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2757 | 2768 | ||
2758 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); | 2769 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); |
2759 | lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); | 2770 | lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); |
2760 | if (lse.isEmpty()) { | 2771 | if (lse.isEmpty()) { |
2761 | qDebug("KA: Creating new last-syncAddressee "); | 2772 | qDebug("KA: Creating new last-syncAddressee "); |
2762 | lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); | 2773 | lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); |
2763 | QString sum = ""; | 2774 | QString sum = ""; |
2764 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) | 2775 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) |
2765 | sum = "E: "; | 2776 | sum = "E: "; |
2766 | lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); | 2777 | lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); |
2767 | lse.setRevision( mLastAddressbookSync ); | 2778 | lse.setRevision( mLastAddressbookSync ); |
2768 | lse.setCategories( i18n("SyncEvent") ); | 2779 | lse.setCategories( i18n("SyncEvent") ); |
2769 | mAddressBook->insertAddressee( lse ); | 2780 | mAddressBook->insertAddressee( lse ); |
2770 | } | 2781 | } |
2771 | return lse; | 2782 | return lse; |
2772 | } | 2783 | } |
2773 | int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ) | 2784 | int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ) |
2774 | { | 2785 | { |
2775 | 2786 | ||
2776 | //void setZaurusId(int id); | 2787 | //void setZaurusId(int id); |
2777 | // int zaurusId() const; | 2788 | // int zaurusId() const; |