author | zautrix <zautrix> | 2004-10-28 07:46:21 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-28 07:46:21 (UTC) |
commit | aada2527dee908aa96bfc16f5faddd3b29372bee (patch) (side-by-side diff) | |
tree | 7ca9bbe5dc64684ec94110becf63d80ae9ad0edd /kaddressbook | |
parent | 2fe1a56682ef4dc1fa0a30f764c7313b583631c5 (diff) | |
download | kdepimpi-aada2527dee908aa96bfc16f5faddd3b29372bee.zip kdepimpi-aada2527dee908aa96bfc16f5faddd3b29372bee.tar.gz kdepimpi-aada2527dee908aa96bfc16f5faddd3b29372bee.tar.bz2 |
compile fixes
-rw-r--r-- | kaddressbook/kabcore.cpp | 6 | ||||
-rw-r--r-- | kaddressbook/viewmanager.cpp | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 638abc9..5ebd3a4 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -1913,85 +1913,87 @@ void KABCore::initActions() 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(); - +#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( "&File", fileMenu ); mb->insertItem( "&Edit", editMenu ); mb->insertItem( "&View", viewMenu ); mb->insertItem( "&Settings", settingsMenu ); mb->insertItem( i18n("Synchronize"), syncMenu ); mb->insertItem( "&Change selected", changeMenu ); mb->insertItem( "&Help", helpMenu ); mIncSearchWidget = new IncSearchWidget( tb ); // tb->insertWidget(-1, 0, mIncSearchWidget); - +#ifndef DESKTOP_VERSION } else { //US setup toolbar QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); QPopupMenu *popupBarTB = new QPopupMenu( this ); menuBarTB->insertItem( "ME", popupBarTB); tb->insertWidget(-1, 0, menuBarTB); mIncSearchWidget = new IncSearchWidget( tb ); tb->enableMoving(false); popupBarTB->insertItem( "&File", fileMenu ); popupBarTB->insertItem( "&Edit", editMenu ); popupBarTB->insertItem( "&View", viewMenu ); popupBarTB->insertItem( "&Settings", settingsMenu ); popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); mViewManager->getFilterAction()->plug ( popupBarTB); popupBarTB->insertItem( "&Change selected", changeMenu ); popupBarTB->insertItem( "&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. mActionPrint->plug( fileMenu ); mActionMail->plug( fileMenu ); fileMenu->insertSeparator(); mActionNewContact->plug( fileMenu ); mActionNewContact->plug( tb ); mActionEditAddressee->plug( fileMenu ); // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || // (!KABPrefs::instance()->mMultipleViewsAtOnce )) mActionEditAddressee->plug( tb ); fileMenu->insertSeparator(); mActionSave->plug( fileMenu ); fileMenu->insertItem( "&Import", ImportMenu ); fileMenu->insertItem( "&Export", ExportMenu ); fileMenu->insertSeparator(); mActionMailVCard->plug( fileMenu ); #ifndef DESKTOP_VERSION diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 3d0c275..0d91c12 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -85,49 +85,49 @@ ViewManager::~ViewManager() unloadViews(); mViewFactoryDict.clear(); } void ViewManager::scrollUP() { if ( mActiveView ) mActiveView->scrollUP(); } void ViewManager::scrollDOWN() { if ( mActiveView ) mActiveView->scrollDOWN(); } void ViewManager::restoreSettings() { mViewNameList = KABPrefs::instance()->mViewNames; QString activeViewName = KABPrefs::instance()->mCurrentView; mActionSelectView->setItems( mViewNameList ); // Filter mFilterList = Filter::restore( mCore->config(), "Filter" ); mActionSelectFilter->setItems( filterNames() ); mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter ); - mActionSelectFilter->setComboWidth( 100 ); + mActionSelectFilter->setComboWidth( 150 ); // Tell the views to reread their config, since they may have // been modified by global settings QString _oldgroup = mCore->config()->group(); QDictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { KConfigGroupSaver saver( mCore->config(), it.currentKey() ); it.current()->readConfig( mCore->config() ); } setActiveView( activeViewName ); mActionDeleteView->setEnabled( mViewNameList.count() > 1 ); } void ViewManager::saveSettings() { QString _oldgroup = mCore->config()->group(); QDictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { KConfigGroupSaver saver( mCore->config(), it.currentKey() ); #ifdef DESKTOP_VERSION (*it)->writeConfig( mCore->config() ); #else @@ -576,49 +576,49 @@ void ViewManager::setActiveFilter( int index ) currentFilter = mFilterList[ index - 1 ]; // Check if we have a view. Since the filter combo is created before // the view, this slot could be called before there is a valid view. if ( mActiveView ) { mActiveView->setFilter( currentFilter ); mActiveView->refresh(); emit selected( QString::null ); } } void ViewManager::configureFilters() { FilterDialog dlg( this ); dlg.setFilters( mFilterList ); if ( dlg.exec() ) mFilterList = dlg.filters(); uint pos = mActionSelectFilter->currentItem(); mActionSelectFilter->setItems( filterNames() ); mActionSelectFilter->setCurrentItem( pos ); setActiveFilter( pos ); - //mActionSelectFilter->setComboWidth( 150 ); + mActionSelectFilter->setComboWidth( 150 ); } QStringList ViewManager::filterNames() const { QStringList names( i18n( "No Filter" ) ); Filter::List::ConstIterator it; for ( it = mFilterList.begin(); it != mFilterList.end(); ++it ) names.append( (*it).name() ); return names; } int ViewManager::filterPosition( const QString &name ) const { int pos = 0; Filter::List::ConstIterator it; for ( it = mFilterList.begin(); it != mFilterList.end(); ++it, ++pos ) if ( name == (*it).name() ) return pos + 1; return 0; } |