summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-03-30 17:55:57 (UTC)
committer zautrix <zautrix>2005-03-30 17:55:57 (UTC)
commit0d8be3961052dc4396aa7db1c5f50db3ec1ac194 (patch) (side-by-side diff)
treef823a8b81413f16f861c9c91ef753d3627577cb2 /kaddressbook
parent95ec57b2f9df64dc40067c3a2278438029517f4c (diff)
downloadkdepimpi-0d8be3961052dc4396aa7db1c5f50db3ec1ac194.zip
kdepimpi-0d8be3961052dc4396aa7db1c5f50db3ec1ac194.tar.gz
kdepimpi-0d8be3961052dc4396aa7db1c5f50db3ec1ac194.tar.bz2
MENU CLEANUP
Diffstat (limited to 'kaddressbook') (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
@@ -25,56 +25,56 @@
#include <kactionclasses.h>
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
#ifndef KAB_EMBEDDED
#include <ktrader.h>
#else //KAB_EMBEDDED
#include <features/mergewidget.h>
#include <features/distributionlistwidget.h>
#endif //KAB_EMBEDDED
#include "addresseeeditorwidget.h"
#include "kabcore.h"
#include "kabprefs.h"
#include "extensionmanager.h"
ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent,
const char *name )
: QScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 )
{
#ifdef KAB_EMBEDDED
//US QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu();
- QWidget *settingsmenu = (QWidget*)mCore->getSettingsMenu();
+ QWidget *settingsmenu = (QWidget*)mCore->getViewMenu();
#endif //KAB_EMBEDDED
mActionExtensions = new KSelectAction( i18n( "Show Extension Bar" ), 0,
mCore->actionCollection(),
"options_show_extensions" );
- mActionExtensions->plug( settingsmenu );
+ mActionExtensions->plug( settingsmenu ,0);
connect( mActionExtensions, SIGNAL( activated( int ) ),
SLOT( setActiveExtension( int ) ) );
mWidgetBox = new QWidget( viewport() );
new QHBoxLayout (mWidgetBox );
addChild( mWidgetBox );
setResizePolicy(AutoOneFit);
createExtensionWidgets();
hide();
}
ExtensionManager::~ExtensionManager()
{
}
void ExtensionManager::restoreSettings()
{
mActionExtensions->setCurrentItem( KABPrefs::instance()->mCurrentExtension );
int i = 1;
mCurrentExtensionWidget = mExtensionWidgetList.at( i-1 );
while ( mCurrentExtensionWidget ) {
if( i != KABPrefs::instance()->mCurrentExtension )
mCurrentExtensionWidget->hide();
mCurrentExtensionWidget = mExtensionWidgetList.at( ++i-1 );
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 1433568..5ef61b1 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2109,49 +2109,49 @@ void KABCore::initActions()
"multisync" );
mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0,
this, SLOT( createAboutData() ), actionCollection(),
"kaddressbook_about_data" );
#endif //KAB_EMBEDDED
clipboardDataChanged();
connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
}
//US we need this function, to plug all actions into the correct menues.
// KDE uses a XML format to plug the actions, but we work her without this overhead.
void KABCore::addActionsManually()
{
//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
#ifdef KAB_EMBEDDED
QPopupMenu *fileMenu = new QPopupMenu( this );
QPopupMenu *editMenu = new QPopupMenu( this );
QPopupMenu *helpMenu = new QPopupMenu( this );
KToolBar* tb = mMainWindow->toolBar();
-
+ mMainWindow->setToolBarsMovable (false );
#ifndef DESKTOP_VERSION
if ( KABPrefs::instance()->mFullMenuBarVisible ) {
#endif
QMenuBar* mb = mMainWindow->menuBar();
//US setup menubar.
//Disable the following block if you do not want to have a menubar.
mb->insertItem( i18n("&File"), fileMenu );
mb->insertItem( i18n("&Edit"), editMenu );
mb->insertItem( i18n("&View"), viewMenu );
mb->insertItem( i18n("&Settings"), settingsMenu );
#ifdef DESKTOP_VERSION
mb->insertItem( i18n("Synchronize"), syncMenu );
#else
mb->insertItem( i18n("Sync"), syncMenu );
#endif
//mb->insertItem( i18n("&Change"), changeMenu );
mb->insertItem( i18n("&Help"), helpMenu );
mIncSearchWidget = new IncSearchWidget( tb );
// tb->insertWidget(-1, 0, mIncSearchWidget);
#ifndef DESKTOP_VERSION
} else {
//US setup toolbar
QPEMenuBar *menuBarTB = new QPEMenuBar( tb );
@@ -2165,61 +2165,63 @@ void KABCore::addActionsManually()
popupBarTB->insertItem( i18n("&View"), viewMenu );
popupBarTB->insertItem( i18n("&Settings"), settingsMenu );
popupBarTB->insertItem( i18n("Synchronize"), syncMenu );
mViewManager->getFilterAction()->plug ( popupBarTB);
//popupBarTB->insertItem( i18n("&Change selected"), changeMenu );
popupBarTB->insertItem( i18n("&Help"), helpMenu );
if (QApplication::desktop()->width() > 320 ) {
// mViewManager->getFilterAction()->plug ( tb);
}
}
#endif
// mActionQuit->plug ( mMainWindow->toolBar());
//US Now connect the actions with the menue entries.
#ifdef DESKTOP_VERSION
mActionPrint->plug( fileMenu );
mActionPrintDetails->plug( fileMenu );
fileMenu->insertSeparator();
#endif
mActionMail->plug( fileMenu );
fileMenu->insertSeparator();
- mActionNewContact->plug( fileMenu );
+ mActionNewContact->plug( editMenu );
mActionNewContact->plug( tb );
- mActionEditAddressee->plug( fileMenu );
+ mActionEditAddressee->plug( editMenu );
+ editMenu->insertSeparator();
// if ((KGlobal::getDesktopSize() > KGlobal::Small ) ||
// (!KABPrefs::instance()->mMultipleViewsAtOnce ))
mActionEditAddressee->plug( tb );
- fileMenu->insertSeparator();
+ // fileMenu->insertSeparator();
mActionSave->plug( fileMenu );
fileMenu->insertItem( "&Import", ImportMenu );
fileMenu->insertItem( "&Export", ExportMenu );
- fileMenu->insertItem( i18n("&Change"), changeMenu );
+ editMenu->insertItem( i18n("&Change"), changeMenu );
+ editMenu->insertSeparator();
#ifndef DESKTOP_VERSION
if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu );
#endif
#if 0
// PENDING fix MailVCard
fileMenu->insertSeparator();
mActionMailVCard->plug( fileMenu );
#endif
#ifndef DESKTOP_VERSION
if ( Ir::supported() ) mActionBR->plug( beamMenu );
if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu );
if ( Ir::supported() ) mActionBeam->plug( beamMenu );
#endif
fileMenu->insertSeparator();
mActionQuit->plug( fileMenu );
#ifdef _OL_IMPORT_
mActionImportOL->plug( ImportMenu );
#endif
// edit menu
mActionUndo->plug( editMenu );
mActionRedo->plug( editMenu );
editMenu->insertSeparator();
mActionCut->plug( editMenu );
mActionCopy->plug( editMenu );
@@ -2228,68 +2230,66 @@ void KABCore::addActionsManually()
editMenu->insertSeparator();
mActionSelectAll->plug( editMenu );
mActionSetFormattedName->plug( changeMenu );
mActionRemoveVoice->plug( changeMenu );
// settingsmings menu
//US special menuentry to configure the addressbook resources. On KDE
// you do that through the control center !!!
// settingsMenu->insertSeparator();
mActionConfigKAddressbook->plug( settingsMenu, 0 );
mActionConfigResources->plug( settingsMenu,1 );
settingsMenu->insertSeparator(2);
if ( mIsPart ) {
//US not implemented yet
//mActionConfigShortcuts->plug( settingsMenu );
//mActionConfigureToolbars->plug( settingsMenu );
} else {
//US not implemented yet
//mActionKeyBindings->plug( settingsMenu );
}
- settingsMenu->insertSeparator();
-
- mActionJumpBar->plug( settingsMenu );
- mActionDetails->plug( settingsMenu );
+ mActionEditCategories->plug( settingsMenu );
+ mActionManageCategories->plug( settingsMenu );
+ mActionJumpBar->plug( viewMenu,0 );
+ mActionDetails->plug( viewMenu,0 );
//if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop )
mActionDetails->plug( tb );
settingsMenu->insertSeparator();
#ifndef DESKTOP_VERSION
if ( Ir::supported() ) mActionBR->plug(settingsMenu );
settingsMenu->insertSeparator();
#endif
mActionWhoAmI->plug( settingsMenu );
- mActionEditCategories->plug( settingsMenu );
- mActionEditCategories->plug( changeMenu );
+ //mActionEditCategories->plug( changeMenu );
mActionCategories->plug( changeMenu );
- mActionManageCategories->plug( changeMenu );
+ //mActionManageCategories->plug( changeMenu );
- mActionCategories->plug( settingsMenu );
- mActionManageCategories->plug( settingsMenu );
+ //mActionCategories->plug( settingsMenu );
mActionWN->plug( helpMenu );
mActionSyncHowto->plug( helpMenu );
mActionKdeSyncHowto->plug( helpMenu );
mActionMultiSyncHowto->plug( helpMenu );
mActionFaq->plug( helpMenu );
mActionLicence->plug( helpMenu );
mActionAboutKAddressbook->plug( helpMenu );
if (KGlobal::getDesktopSize() > KGlobal::Small ) {
mActionSave->plug( tb );
mViewManager->getFilterAction()->plug ( tb);
//LR hide filteraction on started in 480x640
if (QApplication::desktop()->width() == 480 ) {
mViewManager->getFilterAction()->setComboWidth( 0 );
}
mActionUndo->plug( tb );
mActionDelete->plug( tb );
mActionRedo->plug( tb );
} else {
mActionSave->plug( tb );
tb->enableMoving(false);
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index c2b1bb0..86f0f3d 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -699,39 +699,39 @@ void ViewManager::initActions()
SLOT( refreshView(const QString &) ), mCore->actionCollection(),
"view_refresh" );
action->setWhatsThis( i18n( "The view will be refreshed by pressing this button." ) );
#else //KAB_EMBEDDED
action = new KAction( i18n( "Refresh View" ), "reload", 0, this,
SLOT( refreshView()), mCore->actionCollection(),
"view_refresh" );
action->plug(viewmenu);
viewmenu->insertSeparator();
#endif //KAB_EMBEDDED
action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this,
SLOT( configureFilters() ), mCore->actionCollection(),
"options_edit_filters" );
mActionSelectFilter = new KSelectAction( i18n( "Select Filter" ), "filter", mCore->actionCollection(), "select_filter" );
#if KDE_VERSION >= 309
mActionSelectFilter->setMenuAccelsEnabled( false );
#endif
connect( mActionSelectFilter, SIGNAL( activated( int ) ),
SLOT( setActiveFilter( int ) ) );
#ifdef KAB_EMBEDDED
action->plug(settingsmenu);
- mActionSelectFilter->plug(viewmenu);
+ mActionSelectFilter->plug(viewmenu,0);
#endif //KAB_EMBEDDED
}
void ViewManager::initGUI()
{
QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 );
mViewWidgetStack = new QWidgetStack( this );
layout->addWidget( mViewWidgetStack );
}
#ifndef KAB_EMBEDDED
#include "viewmanager.moc"
#endif //KAB_EMBEDDED