-rw-r--r-- | kaddressbook/kabcore.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 79f897b..3b1a0c1 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2038,193 +2038,192 @@ void KABCore::initActions() | |||
2038 | "set_personal" ); | 2038 | "set_personal" ); |
2039 | 2039 | ||
2040 | 2040 | ||
2041 | mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this, | 2041 | mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this, |
2042 | SLOT( setCategories() ), actionCollection(), | 2042 | SLOT( setCategories() ), actionCollection(), |
2043 | "edit_set_categories" ); | 2043 | "edit_set_categories" ); |
2044 | mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this, | 2044 | mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this, |
2045 | SLOT( editCategories() ), actionCollection(), | 2045 | SLOT( editCategories() ), actionCollection(), |
2046 | "edit__categories" ); | 2046 | "edit__categories" ); |
2047 | 2047 | ||
2048 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, | 2048 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, |
2049 | SLOT( removeVoice() ), actionCollection(), | 2049 | SLOT( removeVoice() ), actionCollection(), |
2050 | "remove_voice" ); | 2050 | "remove_voice" ); |
2051 | mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this, | 2051 | mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this, |
2052 | SLOT( setFormattedName() ), actionCollection(), | 2052 | SLOT( setFormattedName() ), actionCollection(), |
2053 | "set_formatted" ); | 2053 | "set_formatted" ); |
2054 | 2054 | ||
2055 | mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this, | 2055 | mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this, |
2056 | SLOT( manageCategories() ), actionCollection(), | 2056 | SLOT( manageCategories() ), actionCollection(), |
2057 | "remove_voice" ); | 2057 | "remove_voice" ); |
2058 | 2058 | ||
2059 | 2059 | ||
2060 | mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, | 2060 | mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, |
2061 | SLOT( importFromOL() ), actionCollection(), | 2061 | SLOT( importFromOL() ), actionCollection(), |
2062 | "import_OL" ); | 2062 | "import_OL" ); |
2063 | #ifdef KAB_EMBEDDED | 2063 | #ifdef KAB_EMBEDDED |
2064 | mActionLicence = new KAction( i18n( "Licence" ), 0, | 2064 | mActionLicence = new KAction( i18n( "Licence" ), 0, |
2065 | this, SLOT( showLicence() ), actionCollection(), | 2065 | this, SLOT( showLicence() ), actionCollection(), |
2066 | "licence_about_data" ); | 2066 | "licence_about_data" ); |
2067 | mActionFaq = new KAction( i18n( "Faq" ), 0, | 2067 | mActionFaq = new KAction( i18n( "Faq" ), 0, |
2068 | this, SLOT( faq() ), actionCollection(), | 2068 | this, SLOT( faq() ), actionCollection(), |
2069 | "faq_about_data" ); | 2069 | "faq_about_data" ); |
2070 | mActionWN = new KAction( i18n( "What's New?" ), 0, | 2070 | mActionWN = new KAction( i18n( "What's New?" ), 0, |
2071 | this, SLOT( whatsnew() ), actionCollection(), | 2071 | this, SLOT( whatsnew() ), actionCollection(), |
2072 | "wn" ); | 2072 | "wn" ); |
2073 | mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, | 2073 | mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, |
2074 | this, SLOT( synchowto() ), actionCollection(), | 2074 | this, SLOT( synchowto() ), actionCollection(), |
2075 | "sync" ); | 2075 | "sync" ); |
2076 | mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, | 2076 | mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, |
2077 | this, SLOT( kdesynchowto() ), actionCollection(), | 2077 | this, SLOT( kdesynchowto() ), actionCollection(), |
2078 | "kdesync" ); | 2078 | "kdesync" ); |
2079 | mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, | 2079 | mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, |
2080 | this, SLOT( multisynchowto() ), actionCollection(), | 2080 | this, SLOT( multisynchowto() ), actionCollection(), |
2081 | "multisync" ); | 2081 | "multisync" ); |
2082 | 2082 | ||
2083 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, | 2083 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, |
2084 | this, SLOT( createAboutData() ), actionCollection(), | 2084 | this, SLOT( createAboutData() ), actionCollection(), |
2085 | "kaddressbook_about_data" ); | 2085 | "kaddressbook_about_data" ); |
2086 | #endif //KAB_EMBEDDED | 2086 | #endif //KAB_EMBEDDED |
2087 | 2087 | ||
2088 | clipboardDataChanged(); | 2088 | clipboardDataChanged(); |
2089 | connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); | 2089 | connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); |
2090 | connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); | 2090 | connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); |
2091 | } | 2091 | } |
2092 | 2092 | ||
2093 | //US we need this function, to plug all actions into the correct menues. | 2093 | //US we need this function, to plug all actions into the correct menues. |
2094 | // KDE uses a XML format to plug the actions, but we work her without this overhead. | 2094 | // KDE uses a XML format to plug the actions, but we work her without this overhead. |
2095 | void KABCore::addActionsManually() | 2095 | void KABCore::addActionsManually() |
2096 | { | 2096 | { |
2097 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 2097 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
2098 | 2098 | ||
2099 | #ifdef KAB_EMBEDDED | 2099 | #ifdef KAB_EMBEDDED |
2100 | QPopupMenu *fileMenu = new QPopupMenu( this ); | 2100 | QPopupMenu *fileMenu = new QPopupMenu( this ); |
2101 | QPopupMenu *editMenu = new QPopupMenu( this ); | 2101 | QPopupMenu *editMenu = new QPopupMenu( this ); |
2102 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 2102 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
2103 | 2103 | ||
2104 | KToolBar* tb = mMainWindow->toolBar(); | 2104 | KToolBar* tb = mMainWindow->toolBar(); |
2105 | 2105 | ||
2106 | #ifndef DESKTOP_VERSION | 2106 | #ifndef DESKTOP_VERSION |
2107 | if ( KABPrefs::instance()->mFullMenuBarVisible ) { | 2107 | if ( KABPrefs::instance()->mFullMenuBarVisible ) { |
2108 | #endif | 2108 | #endif |
2109 | QMenuBar* mb = mMainWindow->menuBar(); | 2109 | QMenuBar* mb = mMainWindow->menuBar(); |
2110 | 2110 | ||
2111 | //US setup menubar. | 2111 | //US setup menubar. |
2112 | //Disable the following block if you do not want to have a menubar. | 2112 | //Disable the following block if you do not want to have a menubar. |
2113 | mb->insertItem( i18n("&File"), fileMenu ); | 2113 | mb->insertItem( i18n("&File"), fileMenu ); |
2114 | mb->insertItem( i18n("&Edit"), editMenu ); | 2114 | mb->insertItem( i18n("&Edit"), editMenu ); |
2115 | mb->insertItem( i18n("&View"), viewMenu ); | 2115 | mb->insertItem( i18n("&View"), viewMenu ); |
2116 | mb->insertItem( i18n("&Settings"), settingsMenu ); | 2116 | mb->insertItem( i18n("&Settings"), settingsMenu ); |
2117 | #ifdef DESKTOP_VERSION | 2117 | #ifdef DESKTOP_VERSION |
2118 | mb->insertItem( i18n("Synchronize"), syncMenu ); | 2118 | mb->insertItem( i18n("Synchronize"), syncMenu ); |
2119 | #else | 2119 | #else |
2120 | mb->insertItem( i18n("Sync"), syncMenu ); | 2120 | mb->insertItem( i18n("Sync"), syncMenu ); |
2121 | #endif | 2121 | #endif |
2122 | //mb->insertItem( i18n("&Change"), changeMenu ); | 2122 | //mb->insertItem( i18n("&Change"), changeMenu ); |
2123 | mb->insertItem( i18n("&Help"), helpMenu ); | 2123 | mb->insertItem( i18n("&Help"), helpMenu ); |
2124 | mIncSearchWidget = new IncSearchWidget( tb ); | 2124 | mIncSearchWidget = new IncSearchWidget( tb ); |
2125 | // tb->insertWidget(-1, 0, mIncSearchWidget); | 2125 | // tb->insertWidget(-1, 0, mIncSearchWidget); |
2126 | #ifndef DESKTOP_VERSION | 2126 | #ifndef DESKTOP_VERSION |
2127 | } else { | 2127 | } else { |
2128 | //US setup toolbar | 2128 | //US setup toolbar |
2129 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); | 2129 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); |
2130 | QPopupMenu *popupBarTB = new QPopupMenu( this ); | 2130 | QPopupMenu *popupBarTB = new QPopupMenu( this ); |
2131 | menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); | 2131 | menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); |
2132 | tb->insertWidget(-1, 0, menuBarTB); | 2132 | tb->insertWidget(-1, 0, menuBarTB); |
2133 | mIncSearchWidget = new IncSearchWidget( tb ); | 2133 | mIncSearchWidget = new IncSearchWidget( tb ); |
2134 | |||
2135 | tb->enableMoving(false); | 2134 | tb->enableMoving(false); |
2136 | popupBarTB->insertItem( i18n("&File"), fileMenu ); | 2135 | popupBarTB->insertItem( i18n("&File"), fileMenu ); |
2137 | popupBarTB->insertItem( i18n("&Edit"), editMenu ); | 2136 | popupBarTB->insertItem( i18n("&Edit"), editMenu ); |
2138 | popupBarTB->insertItem( i18n("&View"), viewMenu ); | 2137 | popupBarTB->insertItem( i18n("&View"), viewMenu ); |
2139 | popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); | 2138 | popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); |
2140 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); | 2139 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); |
2141 | mViewManager->getFilterAction()->plug ( popupBarTB); | 2140 | mViewManager->getFilterAction()->plug ( popupBarTB); |
2142 | //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); | 2141 | //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); |
2143 | popupBarTB->insertItem( i18n("&Help"), helpMenu ); | 2142 | popupBarTB->insertItem( i18n("&Help"), helpMenu ); |
2144 | if (QApplication::desktop()->width() > 320 ) { | 2143 | if (QApplication::desktop()->width() > 320 ) { |
2145 | // mViewManager->getFilterAction()->plug ( tb); | 2144 | // mViewManager->getFilterAction()->plug ( tb); |
2146 | } | 2145 | } |
2147 | } | 2146 | } |
2148 | #endif | 2147 | #endif |
2149 | // mActionQuit->plug ( mMainWindow->toolBar()); | 2148 | // mActionQuit->plug ( mMainWindow->toolBar()); |
2150 | 2149 | ||
2151 | 2150 | ||
2152 | 2151 | ||
2153 | //US Now connect the actions with the menue entries. | 2152 | //US Now connect the actions with the menue entries. |
2154 | #ifdef DESKTOP_VERSION | 2153 | #ifdef DESKTOP_VERSION |
2155 | mActionPrint->plug( fileMenu ); | 2154 | mActionPrint->plug( fileMenu ); |
2156 | mActionPrintDetails->plug( fileMenu ); | 2155 | mActionPrintDetails->plug( fileMenu ); |
2157 | fileMenu->insertSeparator(); | 2156 | fileMenu->insertSeparator(); |
2158 | #endif | 2157 | #endif |
2159 | mActionMail->plug( fileMenu ); | 2158 | mActionMail->plug( fileMenu ); |
2160 | fileMenu->insertSeparator(); | 2159 | fileMenu->insertSeparator(); |
2161 | 2160 | ||
2162 | mActionNewContact->plug( fileMenu ); | 2161 | mActionNewContact->plug( fileMenu ); |
2163 | mActionNewContact->plug( tb ); | 2162 | mActionNewContact->plug( tb ); |
2164 | 2163 | ||
2165 | mActionEditAddressee->plug( fileMenu ); | 2164 | mActionEditAddressee->plug( fileMenu ); |
2166 | // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || | 2165 | // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || |
2167 | // (!KABPrefs::instance()->mMultipleViewsAtOnce )) | 2166 | // (!KABPrefs::instance()->mMultipleViewsAtOnce )) |
2168 | mActionEditAddressee->plug( tb ); | 2167 | mActionEditAddressee->plug( tb ); |
2169 | 2168 | ||
2170 | fileMenu->insertSeparator(); | 2169 | fileMenu->insertSeparator(); |
2171 | mActionSave->plug( fileMenu ); | 2170 | mActionSave->plug( fileMenu ); |
2172 | fileMenu->insertItem( "&Import", ImportMenu ); | 2171 | fileMenu->insertItem( "&Import", ImportMenu ); |
2173 | fileMenu->insertItem( "&Export", ExportMenu ); | 2172 | fileMenu->insertItem( "&Export", ExportMenu ); |
2174 | fileMenu->insertItem( i18n("&Change"), changeMenu ); | 2173 | fileMenu->insertItem( i18n("&Change"), changeMenu ); |
2175 | #ifndef DESKTOP_VERSION | 2174 | #ifndef DESKTOP_VERSION |
2176 | if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); | 2175 | if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); |
2177 | #endif | 2176 | #endif |
2178 | #if 0 | 2177 | #if 0 |
2179 | // PENDING fix MailVCard | 2178 | // PENDING fix MailVCard |
2180 | fileMenu->insertSeparator(); | 2179 | fileMenu->insertSeparator(); |
2181 | mActionMailVCard->plug( fileMenu ); | 2180 | mActionMailVCard->plug( fileMenu ); |
2182 | #endif | 2181 | #endif |
2183 | #ifndef DESKTOP_VERSION | 2182 | #ifndef DESKTOP_VERSION |
2184 | if ( Ir::supported() ) mActionBR->plug( beamMenu ); | 2183 | if ( Ir::supported() ) mActionBR->plug( beamMenu ); |
2185 | if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); | 2184 | if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); |
2186 | if ( Ir::supported() ) mActionBeam->plug( beamMenu ); | 2185 | if ( Ir::supported() ) mActionBeam->plug( beamMenu ); |
2187 | #endif | 2186 | #endif |
2188 | fileMenu->insertSeparator(); | 2187 | fileMenu->insertSeparator(); |
2189 | mActionQuit->plug( fileMenu ); | 2188 | mActionQuit->plug( fileMenu ); |
2190 | #ifdef _OL_IMPORT_ | 2189 | #ifdef _OL_IMPORT_ |
2191 | mActionImportOL->plug( ImportMenu ); | 2190 | mActionImportOL->plug( ImportMenu ); |
2192 | #endif | 2191 | #endif |
2193 | // edit menu | 2192 | // edit menu |
2194 | mActionUndo->plug( editMenu ); | 2193 | mActionUndo->plug( editMenu ); |
2195 | mActionRedo->plug( editMenu ); | 2194 | mActionRedo->plug( editMenu ); |
2196 | editMenu->insertSeparator(); | 2195 | editMenu->insertSeparator(); |
2197 | mActionCut->plug( editMenu ); | 2196 | mActionCut->plug( editMenu ); |
2198 | mActionCopy->plug( editMenu ); | 2197 | mActionCopy->plug( editMenu ); |
2199 | mActionPaste->plug( editMenu ); | 2198 | mActionPaste->plug( editMenu ); |
2200 | mActionDelete->plug( editMenu ); | 2199 | mActionDelete->plug( editMenu ); |
2201 | editMenu->insertSeparator(); | 2200 | editMenu->insertSeparator(); |
2202 | mActionSelectAll->plug( editMenu ); | 2201 | mActionSelectAll->plug( editMenu ); |
2203 | 2202 | ||
2204 | mActionSetFormattedName->plug( changeMenu ); | 2203 | mActionSetFormattedName->plug( changeMenu ); |
2205 | mActionRemoveVoice->plug( changeMenu ); | 2204 | mActionRemoveVoice->plug( changeMenu ); |
2206 | // settings menu | 2205 | // settings menu |
2207 | //US special menuentry to configure the addressbook resources. On KDE | 2206 | //US special menuentry to configure the addressbook resources. On KDE |
2208 | // you do that through the control center !!! | 2207 | // you do that through the control center !!! |
2209 | mActionConfigResources->plug( settingsMenu ); | 2208 | mActionConfigResources->plug( settingsMenu ); |
2210 | settingsMenu->insertSeparator(); | 2209 | settingsMenu->insertSeparator(); |
2211 | 2210 | ||
2212 | mActionConfigKAddressbook->plug( settingsMenu ); | 2211 | mActionConfigKAddressbook->plug( settingsMenu ); |
2213 | 2212 | ||
2214 | if ( mIsPart ) { | 2213 | if ( mIsPart ) { |
2215 | //US not implemented yet | 2214 | //US not implemented yet |
2216 | //mActionConfigShortcuts->plug( settingsMenu ); | 2215 | //mActionConfigShortcuts->plug( settingsMenu ); |
2217 | //mActionConfigureToolbars->plug( settingsMenu ); | 2216 | //mActionConfigureToolbars->plug( settingsMenu ); |
2218 | 2217 | ||
2219 | } else { | 2218 | } else { |
2220 | //US not implemented yet | 2219 | //US not implemented yet |
2221 | //mActionKeyBindings->plug( settingsMenu ); | 2220 | //mActionKeyBindings->plug( settingsMenu ); |
2222 | } | 2221 | } |
2223 | 2222 | ||
2224 | settingsMenu->insertSeparator(); | 2223 | settingsMenu->insertSeparator(); |
2225 | 2224 | ||
2226 | mActionJumpBar->plug( settingsMenu ); | 2225 | mActionJumpBar->plug( settingsMenu ); |
2227 | mActionDetails->plug( settingsMenu ); | 2226 | mActionDetails->plug( settingsMenu ); |
2228 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) | 2227 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) |
2229 | mActionDetails->plug( tb ); | 2228 | mActionDetails->plug( tb ); |
2230 | settingsMenu->insertSeparator(); | 2229 | settingsMenu->insertSeparator(); |