summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-30 17:55:57 (UTC)
committer zautrix <zautrix>2005-03-30 17:55:57 (UTC)
commit0d8be3961052dc4396aa7db1c5f50db3ec1ac194 (patch) (unidiff)
treef823a8b81413f16f861c9c91ef753d3627577cb2
parent95ec57b2f9df64dc40067c3a2278438029517f4c (diff)
downloadkdepimpi-0d8be3961052dc4396aa7db1c5f50db3ec1ac194.zip
kdepimpi-0d8be3961052dc4396aa7db1c5f50db3ec1ac194.tar.gz
kdepimpi-0d8be3961052dc4396aa7db1c5f50db3ec1ac194.tar.bz2
MENU CLEANUP
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/extensionmanager.cpp4
-rw-r--r--kaddressbook/kabcore.cpp28
-rw-r--r--kaddressbook/viewmanager.cpp2
3 files changed, 17 insertions, 17 deletions
diff --git a/kaddressbook/extensionmanager.cpp b/kaddressbook/extensionmanager.cpp
index efbdf17..46defa1 100644
--- a/kaddressbook/extensionmanager.cpp
+++ b/kaddressbook/extensionmanager.cpp
@@ -1,104 +1,104 @@
1/* 1/*
2 This file is part of KAddressbook. 2 This file is part of KAddressbook.
3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> 3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#include <qlayout.h> 23#include <qlayout.h>
24#include <qapplication.h> 24#include <qapplication.h>
25#include <kactionclasses.h> 25#include <kactionclasses.h>
26#include <kconfig.h> 26#include <kconfig.h>
27#include <kdebug.h> 27#include <kdebug.h>
28#include <klocale.h> 28#include <klocale.h>
29 29
30#ifndef KAB_EMBEDDED 30#ifndef KAB_EMBEDDED
31#include <ktrader.h> 31#include <ktrader.h>
32#else //KAB_EMBEDDED 32#else //KAB_EMBEDDED
33#include <features/mergewidget.h> 33#include <features/mergewidget.h>
34#include <features/distributionlistwidget.h> 34#include <features/distributionlistwidget.h>
35#endif //KAB_EMBEDDED 35#endif //KAB_EMBEDDED
36 36
37#include "addresseeeditorwidget.h" 37#include "addresseeeditorwidget.h"
38#include "kabcore.h" 38#include "kabcore.h"
39#include "kabprefs.h" 39#include "kabprefs.h"
40 40
41#include "extensionmanager.h" 41#include "extensionmanager.h"
42 42
43ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent, 43ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent,
44 const char *name ) 44 const char *name )
45 : QScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 ) 45 : QScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 )
46{ 46{
47#ifdef KAB_EMBEDDED 47#ifdef KAB_EMBEDDED
48//US QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu(); 48//US QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu();
49 QWidget *settingsmenu = (QWidget*)mCore->getSettingsMenu(); 49 QWidget *settingsmenu = (QWidget*)mCore->getViewMenu();
50#endif //KAB_EMBEDDED 50#endif //KAB_EMBEDDED
51 51
52 mActionExtensions = new KSelectAction( i18n( "Show Extension Bar" ), 0, 52 mActionExtensions = new KSelectAction( i18n( "Show Extension Bar" ), 0,
53 mCore->actionCollection(), 53 mCore->actionCollection(),
54 "options_show_extensions" ); 54 "options_show_extensions" );
55 55
56 mActionExtensions->plug( settingsmenu ); 56 mActionExtensions->plug( settingsmenu ,0);
57 57
58 connect( mActionExtensions, SIGNAL( activated( int ) ), 58 connect( mActionExtensions, SIGNAL( activated( int ) ),
59 SLOT( setActiveExtension( int ) ) ); 59 SLOT( setActiveExtension( int ) ) );
60 mWidgetBox = new QWidget( viewport() ); 60 mWidgetBox = new QWidget( viewport() );
61 new QHBoxLayout (mWidgetBox ); 61 new QHBoxLayout (mWidgetBox );
62 addChild( mWidgetBox ); 62 addChild( mWidgetBox );
63 setResizePolicy(AutoOneFit); 63 setResizePolicy(AutoOneFit);
64 createExtensionWidgets(); 64 createExtensionWidgets();
65 hide(); 65 hide();
66} 66}
67 67
68ExtensionManager::~ExtensionManager() 68ExtensionManager::~ExtensionManager()
69{ 69{
70} 70}
71 71
72void ExtensionManager::restoreSettings() 72void ExtensionManager::restoreSettings()
73{ 73{
74 mActionExtensions->setCurrentItem( KABPrefs::instance()->mCurrentExtension ); 74 mActionExtensions->setCurrentItem( KABPrefs::instance()->mCurrentExtension );
75 int i = 1; 75 int i = 1;
76 mCurrentExtensionWidget = mExtensionWidgetList.at( i-1 ); 76 mCurrentExtensionWidget = mExtensionWidgetList.at( i-1 );
77 while ( mCurrentExtensionWidget ) { 77 while ( mCurrentExtensionWidget ) {
78 if( i != KABPrefs::instance()->mCurrentExtension ) 78 if( i != KABPrefs::instance()->mCurrentExtension )
79 mCurrentExtensionWidget->hide(); 79 mCurrentExtensionWidget->hide();
80 mCurrentExtensionWidget = mExtensionWidgetList.at( ++i-1 ); 80 mCurrentExtensionWidget = mExtensionWidgetList.at( ++i-1 );
81 81
82 } 82 }
83 setActiveExtension( mActionExtensions->currentItem() ); 83 setActiveExtension( mActionExtensions->currentItem() );
84} 84}
85 85
86void ExtensionManager::saveSettings() 86void ExtensionManager::saveSettings()
87{ 87{
88 KABPrefs::instance()->mCurrentExtension = mActionExtensions->currentItem(); 88 KABPrefs::instance()->mCurrentExtension = mActionExtensions->currentItem();
89} 89}
90 90
91void ExtensionManager::reconfigure() 91void ExtensionManager::reconfigure()
92{ 92{
93 saveSettings(); 93 saveSettings();
94 createExtensionWidgets(); 94 createExtensionWidgets();
95 restoreSettings(); 95 restoreSettings();
96} 96}
97 97
98bool ExtensionManager::isQuickEditVisible() const 98bool ExtensionManager::isQuickEditVisible() const
99{ 99{
100 return ( mCurrentExtensionWidget && 100 return ( mCurrentExtensionWidget &&
101 mCurrentExtensionWidget->identifier() == "contact_editor" ); 101 mCurrentExtensionWidget->identifier() == "contact_editor" );
102} 102}
103 103
104void ExtensionManager::setSelectionChanged() 104void ExtensionManager::setSelectionChanged()
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 1433568..5ef61b1 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2085,235 +2085,235 @@ void KABCore::initActions()
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 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, 2101 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0,
2102 this, SLOT( synchowto() ), actionCollection(), 2102 this, SLOT( synchowto() ), actionCollection(),
2103 "sync" ); 2103 "sync" );
2104 mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, 2104 mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0,
2105 this, SLOT( kdesynchowto() ), actionCollection(), 2105 this, SLOT( kdesynchowto() ), actionCollection(),
2106 "kdesync" ); 2106 "kdesync" );
2107 mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, 2107 mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0,
2108 this, SLOT( multisynchowto() ), actionCollection(), 2108 this, SLOT( multisynchowto() ), actionCollection(),
2109 "multisync" ); 2109 "multisync" );
2110 2110
2111 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, 2111 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0,
2112 this, SLOT( createAboutData() ), actionCollection(), 2112 this, SLOT( createAboutData() ), actionCollection(),
2113 "kaddressbook_about_data" ); 2113 "kaddressbook_about_data" );
2114#endif //KAB_EMBEDDED 2114#endif //KAB_EMBEDDED
2115 2115
2116 clipboardDataChanged(); 2116 clipboardDataChanged();
2117 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 2117 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
2118 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 2118 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
2119} 2119}
2120 2120
2121//US we need this function, to plug all actions into the correct menues. 2121//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. 2122// KDE uses a XML format to plug the actions, but we work her without this overhead.
2123void KABCore::addActionsManually() 2123void KABCore::addActionsManually()
2124{ 2124{
2125//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 2125//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
2126 2126
2127#ifdef KAB_EMBEDDED 2127#ifdef KAB_EMBEDDED
2128 QPopupMenu *fileMenu = new QPopupMenu( this ); 2128 QPopupMenu *fileMenu = new QPopupMenu( this );
2129 QPopupMenu *editMenu = new QPopupMenu( this ); 2129 QPopupMenu *editMenu = new QPopupMenu( this );
2130 QPopupMenu *helpMenu = new QPopupMenu( this ); 2130 QPopupMenu *helpMenu = new QPopupMenu( this );
2131 2131
2132 KToolBar* tb = mMainWindow->toolBar(); 2132 KToolBar* tb = mMainWindow->toolBar();
2133 2133 mMainWindow->setToolBarsMovable (false );
2134#ifndef DESKTOP_VERSION 2134#ifndef DESKTOP_VERSION
2135 if ( KABPrefs::instance()->mFullMenuBarVisible ) { 2135 if ( KABPrefs::instance()->mFullMenuBarVisible ) {
2136#endif 2136#endif
2137 QMenuBar* mb = mMainWindow->menuBar(); 2137 QMenuBar* mb = mMainWindow->menuBar();
2138 2138
2139 //US setup menubar. 2139 //US setup menubar.
2140 //Disable the following block if you do not want to have a menubar. 2140 //Disable the following block if you do not want to have a menubar.
2141 mb->insertItem( i18n("&File"), fileMenu ); 2141 mb->insertItem( i18n("&File"), fileMenu );
2142 mb->insertItem( i18n("&Edit"), editMenu ); 2142 mb->insertItem( i18n("&Edit"), editMenu );
2143 mb->insertItem( i18n("&View"), viewMenu ); 2143 mb->insertItem( i18n("&View"), viewMenu );
2144 mb->insertItem( i18n("&Settings"), settingsMenu ); 2144 mb->insertItem( i18n("&Settings"), settingsMenu );
2145#ifdef DESKTOP_VERSION 2145#ifdef DESKTOP_VERSION
2146 mb->insertItem( i18n("Synchronize"), syncMenu ); 2146 mb->insertItem( i18n("Synchronize"), syncMenu );
2147#else 2147#else
2148 mb->insertItem( i18n("Sync"), syncMenu ); 2148 mb->insertItem( i18n("Sync"), syncMenu );
2149#endif 2149#endif
2150 //mb->insertItem( i18n("&Change"), changeMenu ); 2150 //mb->insertItem( i18n("&Change"), changeMenu );
2151 mb->insertItem( i18n("&Help"), helpMenu ); 2151 mb->insertItem( i18n("&Help"), helpMenu );
2152 mIncSearchWidget = new IncSearchWidget( tb ); 2152 mIncSearchWidget = new IncSearchWidget( tb );
2153 // tb->insertWidget(-1, 0, mIncSearchWidget); 2153 // tb->insertWidget(-1, 0, mIncSearchWidget);
2154#ifndef DESKTOP_VERSION 2154#ifndef DESKTOP_VERSION
2155 } else { 2155 } else {
2156 //US setup toolbar 2156 //US setup toolbar
2157 QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); 2157 QPEMenuBar *menuBarTB = new QPEMenuBar( tb );
2158 QPopupMenu *popupBarTB = new QPopupMenu( this ); 2158 QPopupMenu *popupBarTB = new QPopupMenu( this );
2159 menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); 2159 menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB);
2160 tb->insertWidget(-1, 0, menuBarTB); 2160 tb->insertWidget(-1, 0, menuBarTB);
2161 mIncSearchWidget = new IncSearchWidget( tb ); 2161 mIncSearchWidget = new IncSearchWidget( tb );
2162 tb->enableMoving(false); 2162 tb->enableMoving(false);
2163 popupBarTB->insertItem( i18n("&File"), fileMenu ); 2163 popupBarTB->insertItem( i18n("&File"), fileMenu );
2164 popupBarTB->insertItem( i18n("&Edit"), editMenu ); 2164 popupBarTB->insertItem( i18n("&Edit"), editMenu );
2165 popupBarTB->insertItem( i18n("&View"), viewMenu ); 2165 popupBarTB->insertItem( i18n("&View"), viewMenu );
2166 popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); 2166 popupBarTB->insertItem( i18n("&Settings"), settingsMenu );
2167 popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); 2167 popupBarTB->insertItem( i18n("Synchronize"), syncMenu );
2168 mViewManager->getFilterAction()->plug ( popupBarTB); 2168 mViewManager->getFilterAction()->plug ( popupBarTB);
2169 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); 2169 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu );
2170 popupBarTB->insertItem( i18n("&Help"), helpMenu ); 2170 popupBarTB->insertItem( i18n("&Help"), helpMenu );
2171 if (QApplication::desktop()->width() > 320 ) { 2171 if (QApplication::desktop()->width() > 320 ) {
2172 // mViewManager->getFilterAction()->plug ( tb); 2172 // mViewManager->getFilterAction()->plug ( tb);
2173 } 2173 }
2174 } 2174 }
2175#endif 2175#endif
2176 // mActionQuit->plug ( mMainWindow->toolBar()); 2176 // mActionQuit->plug ( mMainWindow->toolBar());
2177 2177
2178 2178
2179 2179
2180 //US Now connect the actions with the menue entries. 2180 //US Now connect the actions with the menue entries.
2181#ifdef DESKTOP_VERSION 2181#ifdef DESKTOP_VERSION
2182 mActionPrint->plug( fileMenu ); 2182 mActionPrint->plug( fileMenu );
2183 mActionPrintDetails->plug( fileMenu ); 2183 mActionPrintDetails->plug( fileMenu );
2184 fileMenu->insertSeparator(); 2184 fileMenu->insertSeparator();
2185#endif 2185#endif
2186 mActionMail->plug( fileMenu ); 2186 mActionMail->plug( fileMenu );
2187 fileMenu->insertSeparator(); 2187 fileMenu->insertSeparator();
2188 2188
2189 mActionNewContact->plug( fileMenu ); 2189 mActionNewContact->plug( editMenu );
2190 mActionNewContact->plug( tb ); 2190 mActionNewContact->plug( tb );
2191 2191
2192 mActionEditAddressee->plug( fileMenu ); 2192 mActionEditAddressee->plug( editMenu );
2193 editMenu->insertSeparator();
2193 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || 2194 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) ||
2194 // (!KABPrefs::instance()->mMultipleViewsAtOnce )) 2195 // (!KABPrefs::instance()->mMultipleViewsAtOnce ))
2195 mActionEditAddressee->plug( tb ); 2196 mActionEditAddressee->plug( tb );
2196 2197
2197 fileMenu->insertSeparator(); 2198 // fileMenu->insertSeparator();
2198 mActionSave->plug( fileMenu ); 2199 mActionSave->plug( fileMenu );
2199 fileMenu->insertItem( "&Import", ImportMenu ); 2200 fileMenu->insertItem( "&Import", ImportMenu );
2200 fileMenu->insertItem( "&Export", ExportMenu ); 2201 fileMenu->insertItem( "&Export", ExportMenu );
2201 fileMenu->insertItem( i18n("&Change"), changeMenu ); 2202 editMenu->insertItem( i18n("&Change"), changeMenu );
2203 editMenu->insertSeparator();
2202#ifndef DESKTOP_VERSION 2204#ifndef DESKTOP_VERSION
2203 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); 2205 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu );
2204#endif 2206#endif
2205#if 0 2207#if 0
2206 // PENDING fix MailVCard 2208 // PENDING fix MailVCard
2207 fileMenu->insertSeparator(); 2209 fileMenu->insertSeparator();
2208 mActionMailVCard->plug( fileMenu ); 2210 mActionMailVCard->plug( fileMenu );
2209#endif 2211#endif
2210#ifndef DESKTOP_VERSION 2212#ifndef DESKTOP_VERSION
2211 if ( Ir::supported() ) mActionBR->plug( beamMenu ); 2213 if ( Ir::supported() ) mActionBR->plug( beamMenu );
2212 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); 2214 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu );
2213 if ( Ir::supported() ) mActionBeam->plug( beamMenu ); 2215 if ( Ir::supported() ) mActionBeam->plug( beamMenu );
2214#endif 2216#endif
2215 fileMenu->insertSeparator(); 2217 fileMenu->insertSeparator();
2216 mActionQuit->plug( fileMenu ); 2218 mActionQuit->plug( fileMenu );
2217#ifdef _OL_IMPORT_ 2219#ifdef _OL_IMPORT_
2218 mActionImportOL->plug( ImportMenu ); 2220 mActionImportOL->plug( ImportMenu );
2219#endif 2221#endif
2220 // edit menu 2222 // edit menu
2221 mActionUndo->plug( editMenu ); 2223 mActionUndo->plug( editMenu );
2222 mActionRedo->plug( editMenu ); 2224 mActionRedo->plug( editMenu );
2223 editMenu->insertSeparator(); 2225 editMenu->insertSeparator();
2224 mActionCut->plug( editMenu ); 2226 mActionCut->plug( editMenu );
2225 mActionCopy->plug( editMenu ); 2227 mActionCopy->plug( editMenu );
2226 mActionPaste->plug( editMenu ); 2228 mActionPaste->plug( editMenu );
2227 mActionDelete->plug( editMenu ); 2229 mActionDelete->plug( editMenu );
2228 editMenu->insertSeparator(); 2230 editMenu->insertSeparator();
2229 mActionSelectAll->plug( editMenu ); 2231 mActionSelectAll->plug( editMenu );
2230 2232
2231 mActionSetFormattedName->plug( changeMenu ); 2233 mActionSetFormattedName->plug( changeMenu );
2232 mActionRemoveVoice->plug( changeMenu ); 2234 mActionRemoveVoice->plug( changeMenu );
2233 // settingsmings menu 2235 // settingsmings menu
2234//US special menuentry to configure the addressbook resources. On KDE 2236//US special menuentry to configure the addressbook resources. On KDE
2235// you do that through the control center !!! 2237// you do that through the control center !!!
2236 // settingsMenu->insertSeparator(); 2238 // settingsMenu->insertSeparator();
2237 2239
2238 mActionConfigKAddressbook->plug( settingsMenu, 0 ); 2240 mActionConfigKAddressbook->plug( settingsMenu, 0 );
2239 mActionConfigResources->plug( settingsMenu,1 ); 2241 mActionConfigResources->plug( settingsMenu,1 );
2240 settingsMenu->insertSeparator(2); 2242 settingsMenu->insertSeparator(2);
2241 2243
2242 if ( mIsPart ) { 2244 if ( mIsPart ) {
2243 //US not implemented yet 2245 //US not implemented yet
2244 //mActionConfigShortcuts->plug( settingsMenu ); 2246 //mActionConfigShortcuts->plug( settingsMenu );
2245 //mActionConfigureToolbars->plug( settingsMenu ); 2247 //mActionConfigureToolbars->plug( settingsMenu );
2246 2248
2247 } else { 2249 } else {
2248 //US not implemented yet 2250 //US not implemented yet
2249 //mActionKeyBindings->plug( settingsMenu ); 2251 //mActionKeyBindings->plug( settingsMenu );
2250 } 2252 }
2251 2253
2252 settingsMenu->insertSeparator(); 2254 mActionEditCategories->plug( settingsMenu );
2253 2255 mActionManageCategories->plug( settingsMenu );
2254 mActionJumpBar->plug( settingsMenu ); 2256 mActionJumpBar->plug( viewMenu,0 );
2255 mActionDetails->plug( settingsMenu ); 2257 mActionDetails->plug( viewMenu,0 );
2256 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) 2258 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop )
2257 mActionDetails->plug( tb ); 2259 mActionDetails->plug( tb );
2258 settingsMenu->insertSeparator(); 2260 settingsMenu->insertSeparator();
2259#ifndef DESKTOP_VERSION 2261#ifndef DESKTOP_VERSION
2260 if ( Ir::supported() ) mActionBR->plug(settingsMenu ); 2262 if ( Ir::supported() ) mActionBR->plug(settingsMenu );
2261 settingsMenu->insertSeparator(); 2263 settingsMenu->insertSeparator();
2262#endif 2264#endif
2263 2265
2264 mActionWhoAmI->plug( settingsMenu ); 2266 mActionWhoAmI->plug( settingsMenu );
2265 mActionEditCategories->plug( settingsMenu ); 2267 //mActionEditCategories->plug( changeMenu );
2266 mActionEditCategories->plug( changeMenu );
2267 mActionCategories->plug( changeMenu ); 2268 mActionCategories->plug( changeMenu );
2268 mActionManageCategories->plug( changeMenu ); 2269 //mActionManageCategories->plug( changeMenu );
2269 2270
2270 mActionCategories->plug( settingsMenu ); 2271 //mActionCategories->plug( settingsMenu );
2271 mActionManageCategories->plug( settingsMenu );
2272 2272
2273 2273
2274 mActionWN->plug( helpMenu ); 2274 mActionWN->plug( helpMenu );
2275 mActionSyncHowto->plug( helpMenu ); 2275 mActionSyncHowto->plug( helpMenu );
2276 mActionKdeSyncHowto->plug( helpMenu ); 2276 mActionKdeSyncHowto->plug( helpMenu );
2277 mActionMultiSyncHowto->plug( helpMenu ); 2277 mActionMultiSyncHowto->plug( helpMenu );
2278 mActionFaq->plug( helpMenu ); 2278 mActionFaq->plug( helpMenu );
2279 mActionLicence->plug( helpMenu ); 2279 mActionLicence->plug( helpMenu );
2280 mActionAboutKAddressbook->plug( helpMenu ); 2280 mActionAboutKAddressbook->plug( helpMenu );
2281 2281
2282 if (KGlobal::getDesktopSize() > KGlobal::Small ) { 2282 if (KGlobal::getDesktopSize() > KGlobal::Small ) {
2283 2283
2284 mActionSave->plug( tb ); 2284 mActionSave->plug( tb );
2285 mViewManager->getFilterAction()->plug ( tb); 2285 mViewManager->getFilterAction()->plug ( tb);
2286 //LR hide filteraction on started in 480x640 2286 //LR hide filteraction on started in 480x640
2287 if (QApplication::desktop()->width() == 480 ) { 2287 if (QApplication::desktop()->width() == 480 ) {
2288 mViewManager->getFilterAction()->setComboWidth( 0 ); 2288 mViewManager->getFilterAction()->setComboWidth( 0 );
2289 } 2289 }
2290 mActionUndo->plug( tb ); 2290 mActionUndo->plug( tb );
2291 mActionDelete->plug( tb ); 2291 mActionDelete->plug( tb );
2292 mActionRedo->plug( tb ); 2292 mActionRedo->plug( tb );
2293 } else { 2293 } else {
2294 mActionSave->plug( tb ); 2294 mActionSave->plug( tb );
2295 tb->enableMoving(false); 2295 tb->enableMoving(false);
2296 } 2296 }
2297 //mActionQuit->plug ( tb ); 2297 //mActionQuit->plug ( tb );
2298 // tb->insertWidget(-1, 0, mIncSearchWidget, 6); 2298 // tb->insertWidget(-1, 0, mIncSearchWidget, 6);
2299 2299
2300 //US link the searchwidget first to this. 2300 //US link the searchwidget first to this.
2301 // The real linkage to the toolbar happens later. 2301 // The real linkage to the toolbar happens later.
2302//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); 2302//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE);
2303//US tb->insertItem( mIncSearchWidget ); 2303//US tb->insertItem( mIncSearchWidget );
2304/*US 2304/*US
2305 mIncSearchWidget = new IncSearchWidget( tb ); 2305 mIncSearchWidget = new IncSearchWidget( tb );
2306 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 2306 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
2307 SLOT( incrementalSearch( const QString& ) ) ); 2307 SLOT( incrementalSearch( const QString& ) ) );
2308 2308
2309 mJumpButtonBar = new JumpButtonBar( this, this ); 2309 mJumpButtonBar = new JumpButtonBar( this, this );
2310 2310
2311//US topLayout->addWidget( mJumpButtonBar ); 2311//US topLayout->addWidget( mJumpButtonBar );
2312 this->layout()->add( mJumpButtonBar ); 2312 this->layout()->add( mJumpButtonBar );
2313*/ 2313*/
2314 2314
2315#endif //KAB_EMBEDDED 2315#endif //KAB_EMBEDDED
2316 2316
2317 mActionExport2phone->plug( ExportMenu ); 2317 mActionExport2phone->plug( ExportMenu );
2318 connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); 2318 connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) );
2319 syncManager->fillSyncMenu(); 2319 syncManager->fillSyncMenu();
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index c2b1bb0..86f0f3d 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -675,63 +675,63 @@ void ViewManager::initActions()
675#else //KAB_EMBEDDED 675#else //KAB_EMBEDDED
676 action->plug(viewmenu); 676 action->plug(viewmenu);
677#endif //KAB_EMBEDDED 677#endif //KAB_EMBEDDED
678 678
679 action = new KAction( i18n( "Add View..." ), "window_new", 0, this, 679 action = new KAction( i18n( "Add View..." ), "window_new", 0, this,
680 SLOT( addView() ), mCore->actionCollection(), "view_add" ); 680 SLOT( addView() ), mCore->actionCollection(), "view_add" );
681#ifndef KAB_EMBEDDED 681#ifndef KAB_EMBEDDED
682 action->setWhatsThis( i18n( "You can add a new view by choosing one of the dialog that appears after pressing the button. You have to give the view a name, so that you can distinguish between the different views." ) ); 682 action->setWhatsThis( i18n( "You can add a new view by choosing one of the dialog that appears after pressing the button. You have to give the view a name, so that you can distinguish between the different views." ) );
683#else //KAB_EMBEDDED 683#else //KAB_EMBEDDED
684 action->plug(viewmenu); 684 action->plug(viewmenu);
685#endif //KAB_EMBEDDED 685#endif //KAB_EMBEDDED
686 686
687 mActionDeleteView = new KAction( i18n( "Delete View" ), "view_remove", 0, 687 mActionDeleteView = new KAction( i18n( "Delete View" ), "view_remove", 0,
688 this, SLOT( deleteView() ), 688 this, SLOT( deleteView() ),
689 mCore->actionCollection(), "view_delete" ); 689 mCore->actionCollection(), "view_delete" );
690#ifndef KAB_EMBEDDED 690#ifndef KAB_EMBEDDED
691 mActionDeleteView->setWhatsThis( i18n( "By pressing this button you can delete the actual view, which you have added before." ) ); 691 mActionDeleteView->setWhatsThis( i18n( "By pressing this button you can delete the actual view, which you have added before." ) );
692#else //KAB_EMBEDDED 692#else //KAB_EMBEDDED
693 mActionDeleteView->plug(viewmenu); 693 mActionDeleteView->plug(viewmenu);
694 viewmenu->insertSeparator(); 694 viewmenu->insertSeparator();
695#endif //KAB_EMBEDDED 695#endif //KAB_EMBEDDED
696 696
697#ifndef KAB_EMBEDDED 697#ifndef KAB_EMBEDDED
698 action = new KAction( i18n( "Refresh View" ), "reload", 0, this, 698 action = new KAction( i18n( "Refresh View" ), "reload", 0, this,
699 SLOT( refreshView(const QString &) ), mCore->actionCollection(), 699 SLOT( refreshView(const QString &) ), mCore->actionCollection(),
700 "view_refresh" ); 700 "view_refresh" );
701 action->setWhatsThis( i18n( "The view will be refreshed by pressing this button." ) ); 701 action->setWhatsThis( i18n( "The view will be refreshed by pressing this button." ) );
702#else //KAB_EMBEDDED 702#else //KAB_EMBEDDED
703 action = new KAction( i18n( "Refresh View" ), "reload", 0, this, 703 action = new KAction( i18n( "Refresh View" ), "reload", 0, this,
704 SLOT( refreshView()), mCore->actionCollection(), 704 SLOT( refreshView()), mCore->actionCollection(),
705 "view_refresh" ); 705 "view_refresh" );
706 action->plug(viewmenu); 706 action->plug(viewmenu);
707 viewmenu->insertSeparator(); 707 viewmenu->insertSeparator();
708#endif //KAB_EMBEDDED 708#endif //KAB_EMBEDDED
709 709
710 action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this, 710 action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this,
711 SLOT( configureFilters() ), mCore->actionCollection(), 711 SLOT( configureFilters() ), mCore->actionCollection(),
712 "options_edit_filters" ); 712 "options_edit_filters" );
713 713
714 mActionSelectFilter = new KSelectAction( i18n( "Select Filter" ), "filter", mCore->actionCollection(), "select_filter" ); 714 mActionSelectFilter = new KSelectAction( i18n( "Select Filter" ), "filter", mCore->actionCollection(), "select_filter" );
715#if KDE_VERSION >= 309 715#if KDE_VERSION >= 309
716 mActionSelectFilter->setMenuAccelsEnabled( false ); 716 mActionSelectFilter->setMenuAccelsEnabled( false );
717#endif 717#endif
718 connect( mActionSelectFilter, SIGNAL( activated( int ) ), 718 connect( mActionSelectFilter, SIGNAL( activated( int ) ),
719 SLOT( setActiveFilter( int ) ) ); 719 SLOT( setActiveFilter( int ) ) );
720 720
721#ifdef KAB_EMBEDDED 721#ifdef KAB_EMBEDDED
722 action->plug(settingsmenu); 722 action->plug(settingsmenu);
723 mActionSelectFilter->plug(viewmenu); 723 mActionSelectFilter->plug(viewmenu,0);
724#endif //KAB_EMBEDDED 724#endif //KAB_EMBEDDED
725 725
726} 726}
727 727
728void ViewManager::initGUI() 728void ViewManager::initGUI()
729{ 729{
730 QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 ); 730 QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 );
731 mViewWidgetStack = new QWidgetStack( this ); 731 mViewWidgetStack = new QWidgetStack( this );
732 layout->addWidget( mViewWidgetStack ); 732 layout->addWidget( mViewWidgetStack );
733} 733}
734 734
735#ifndef KAB_EMBEDDED 735#ifndef KAB_EMBEDDED
736#include "viewmanager.moc" 736#include "viewmanager.moc"
737#endif //KAB_EMBEDDED 737#endif //KAB_EMBEDDED