-rw-r--r-- | kaddressbook/kabcore.cpp | 87 | ||||
-rw-r--r-- | kaddressbook/kabprefs.cpp | 5 | ||||
-rw-r--r-- | kaddressbook/kabprefs.h | 1 | ||||
-rw-r--r-- | kaddressbook/kaddressbookview.h | 1 | ||||
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.h | 2 | ||||
-rw-r--r-- | kaddressbook/viewmanager.cpp | 6 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbookcardview.cpp | 5 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbookcardview.h | 1 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbookiconview.cpp | 6 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbookiconview.h | 1 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbooktableview.cpp | 6 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbooktableview.h | 1 | ||||
-rw-r--r-- | kmicromail/editaccounts.cpp | 8 |
14 files changed, 84 insertions, 53 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index b0cb986..4964a6c 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -1920,40 +1920,41 @@ void KABCore::addActionsManually() KToolBar* tb = mMainWindow->toolBar(); -#ifdef DESKTOP_VERSION - 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); - -#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); + if ( KABPrefs::instance()->mFullMenuBarVisible ) { + 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); + + } 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()); @@ -1969,6 +1970,6 @@ void KABCore::addActionsManually() mActionEditAddressee->plug( fileMenu ); - if ((KGlobal::getDesktopSize() > KGlobal::Small ) || - (!KABPrefs::instance()->mMultipleViewsAtOnce )) + // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || + // (!KABPrefs::instance()->mMultipleViewsAtOnce )) mActionEditAddressee->plug( tb ); @@ -2022,6 +2023,6 @@ void KABCore::addActionsManually() mActionJumpBar->plug( settingsMenu ); mActionDetails->plug( settingsMenu ); - if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) - mActionDetails->plug( tb ); + //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) + mActionDetails->plug( tb ); settingsMenu->insertSeparator(); mActionBR->plug(settingsMenu ); @@ -2043,11 +2044,11 @@ void KABCore::addActionsManually() mViewManager->getFilterAction()->plug ( tb); if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { - mActionUndo->plug( tb ); - mActionDelete->plug( tb ); - mActionRedo->plug( tb ); + mActionUndo->plug( tb ); + mActionDelete->plug( tb ); + mActionRedo->plug( tb ); } } else { - if (KABPrefs::instance()->mMultipleViewsAtOnce ) - mActionSave->plug( tb ); + mActionSave->plug( tb ); + tb->enableMoving(false); } //mActionQuit->plug ( tb ); diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp index 3cbcc9a..db123da 100644 --- a/kaddressbook/kabprefs.cpp +++ b/kaddressbook/kabprefs.cpp @@ -68,4 +68,9 @@ KABPrefs::KABPrefs() KPrefs::setCurrentGroup( "MainWindow" ); + bool m_visible = false; +#ifdef DESKTOP_VERSION + m_visible = true; +#endif + addItemBool( "FullMenuBarVisible", &mFullMenuBarVisible, m_visible ); addItemBool( "JumpButtonBarVisible", &mJumpButtonBarVisible, false ); addItemBool( "DetailsPageVisible", &mDetailsPageVisible, true ); diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h index cc8413e..1e3b48f 100644 --- a/kaddressbook/kabprefs.h +++ b/kaddressbook/kabprefs.h @@ -66,4 +66,5 @@ class KABPrefs : public KPimPrefs // GUI + bool mFullMenuBarVisible; bool mJumpButtonBarVisible; bool mDetailsPageVisible; diff --git a/kaddressbook/kaddressbookview.h b/kaddressbook/kaddressbookview.h index c134e96..2e91cbc 100644 --- a/kaddressbook/kaddressbookview.h +++ b/kaddressbook/kaddressbookview.h @@ -68,4 +68,5 @@ class KAddressBookView : public QWidget virtual void scrollUP() = 0; virtual void scrollDOWN() = 0; + virtual void setFocusAV() = 0; /** diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp index 936d052..8bf9bb0 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp +++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp @@ -120,4 +120,6 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * boxLayout->setMargin(KDialog::marginHintSmall() ); boxLayout->setSpacing( KDialog::spacingHintSmall() ); + mMenuBarBox = new QCheckBox( i18n( "Full Menu bar (restart)" ), vBox, "mremenuturn" ); + boxLayout->addWidget( mMenuBarBox ); mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" ); boxLayout->addWidget( mSearchReturnBox ); @@ -166,4 +168,5 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * extensionLayout->addWidget( groupBox ); + connect( mMenuBarBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); @@ -193,5 +196,5 @@ void KABConfigWidget::usrReadConfig() bool blocked = signalsBlocked(); blockSignals( true ); - + mMenuBarBox->setChecked( prefs->mFullMenuBarVisible); mNameParsing->setChecked( prefs->mAutomaticNameParsing ); mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick ); @@ -211,5 +214,5 @@ void KABConfigWidget::usrWriteConfig() { KABPrefs* prefs = KABPrefs::instance(); - + prefs->mFullMenuBarVisible = mMenuBarBox->isChecked(); prefs->mAutomaticNameParsing = mNameParsing->isChecked(); prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked(); diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.h b/kaddressbook/kcmconfigs/kabconfigwidget.h index 1e71fd1..08d71b4 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.h +++ b/kaddressbook/kcmconfigs/kabconfigwidget.h @@ -67,5 +67,5 @@ class KABConfigWidget : public KPrefsWidget QCheckBox *mMultipleViewsAtOnce; QCheckBox *mAskForQuit; - + QCheckBox *mMenuBarBox; QPushButton *mConfigureButton; diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 81e0d99..3d0c275 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -107,5 +107,5 @@ void ViewManager::restoreSettings() mActionSelectFilter->setItems( filterNames() ); mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter ); - + mActionSelectFilter->setComboWidth( 100 ); // Tell the views to reread their config, since they may have // been modified by global settings @@ -304,5 +304,5 @@ void ViewManager::setFocusAV() { if ( mActiveView ) - mActiveView->setFocus(); + mActiveView->setFocusAV(); } void ViewManager::editView() @@ -598,4 +598,5 @@ void ViewManager::configureFilters() mActionSelectFilter->setCurrentItem( pos ); setActiveFilter( pos ); + //mActionSelectFilter->setComboWidth( 150 ); } @@ -693,5 +694,4 @@ void ViewManager::initActions() mActionSelectFilter = new KSelectAction( i18n( "Select Filter" ), "filter", mCore->actionCollection(), "select_filter" ); - #if KDE_VERSION >= 309 mActionSelectFilter->setMenuAccelsEnabled( false ); diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp index a7bf6c9..7f33bb4 100644 --- a/kaddressbook/views/kaddressbookcardview.cpp +++ b/kaddressbook/views/kaddressbookcardview.cpp @@ -170,5 +170,10 @@ KAddressBookCardView::~KAddressBookCardView() { } +void KAddressBookCardView::setFocusAV() +{ + if ( mCardView ) + mCardView->setFocus(); +} void KAddressBookCardView::scrollUP() { diff --git a/kaddressbook/views/kaddressbookcardview.h b/kaddressbook/views/kaddressbookcardview.h index 45a9781..8f22d54 100644 --- a/kaddressbook/views/kaddressbookcardview.h +++ b/kaddressbook/views/kaddressbookcardview.h @@ -63,4 +63,5 @@ class KAddressBookCardView : public KAddressBookView virtual void scrollUP(); virtual void scrollDOWN(); + virtual void setFocusAV(); public slots: diff --git a/kaddressbook/views/kaddressbookiconview.cpp b/kaddressbook/views/kaddressbookiconview.cpp index f4c68b8..41c3cb2 100644 --- a/kaddressbook/views/kaddressbookiconview.cpp +++ b/kaddressbook/views/kaddressbookiconview.cpp @@ -212,4 +212,10 @@ KAddressBookIconView::~KAddressBookIconView() { } +void KAddressBookIconView::setFocusAV() +{ + if ( mIconView ) + mIconView->setFocus(); +} + void KAddressBookIconView::scrollUP() diff --git a/kaddressbook/views/kaddressbookiconview.h b/kaddressbook/views/kaddressbookiconview.h index acfcd71..b0b9fea 100644 --- a/kaddressbook/views/kaddressbookiconview.h +++ b/kaddressbook/views/kaddressbookiconview.h @@ -64,4 +64,5 @@ class KAddressBookIconView : public KAddressBookView virtual void scrollUP(); virtual void scrollDOWN(); + virtual void setFocusAV(); public slots: diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp index 2412170..e40eb9e 100644 --- a/kaddressbook/views/kaddressbooktableview.cpp +++ b/kaddressbook/views/kaddressbooktableview.cpp @@ -52,4 +52,10 @@ KAddressBookTableView::~KAddressBookTableView() { } +void KAddressBookTableView::setFocusAV() +{ + if ( mListView ) + mListView->setFocus(); + +} void KAddressBookTableView::scrollUP() { diff --git a/kaddressbook/views/kaddressbooktableview.h b/kaddressbook/views/kaddressbooktableview.h index 865f8d5..38db7b4 100644 --- a/kaddressbook/views/kaddressbooktableview.h +++ b/kaddressbook/views/kaddressbooktableview.h @@ -66,4 +66,5 @@ friend class ContactListView; virtual void scrollUP(); virtual void scrollDOWN(); + virtual void setFocusAV(); public slots: diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index 7ad4ec8..c931e45 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp @@ -103,5 +103,5 @@ void EditAccounts::slotNewMail() void EditAccounts::slotNewAccount( const QString &type ) { - if ( type.compare( "IMAP" ) == 0 ) + if ( type.compare( i18n("IMAP") ) == 0 ) { IMAPaccount *account = new IMAPaccount(); @@ -119,5 +119,5 @@ void EditAccounts::slotNewAccount( const QString &type ) } } - else if ( type.compare( "POP3" ) == 0 ) + else if ( type.compare( i18n("POP3") ) == 0 ) { POP3account *account = new POP3account(); @@ -134,5 +134,5 @@ void EditAccounts::slotNewAccount( const QString &type ) } } - else if ( type.compare( "SMTP" ) == 0 ) + else if ( type.compare( i18n("SMTP") ) == 0 ) { SMTPaccount *account = new SMTPaccount(); @@ -150,5 +150,5 @@ void EditAccounts::slotNewAccount( const QString &type ) } } - else if ( type.compare( "NNTP" ) == 0 ) + else if ( type.compare( i18n("NNTP") ) == 0 ) { NNTPaccount *account = new NNTPaccount(); |