author | zautrix <zautrix> | 2004-10-27 21:34:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-27 21:34:55 (UTC) |
commit | 9c88346fc757fd1dc54b3fca151a2a610159d8cf (patch) (side-by-side diff) | |
tree | 4a5de97ba71ce66eea914d55923d88aff3515c93 | |
parent | 7f3cc07fab5f5f6ddd402c458341f1df3a144e2c (diff) | |
download | kdepimpi-9c88346fc757fd1dc54b3fca151a2a610159d8cf.zip kdepimpi-9c88346fc757fd1dc54b3fca151a2a610159d8cf.tar.gz kdepimpi-9c88346fc757fd1dc54b3fca151a2a610159d8cf.tar.bz2 |
several fixes
-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 @@ -1921,38 +1921,39 @@ void KABCore::addActionsManually() -#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()); @@ -1970,4 +1971,4 @@ 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 ); @@ -2023,4 +2024,4 @@ void KABCore::addActionsManually() 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(); @@ -2044,9 +2045,9 @@ void KABCore::addActionsManually() 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); } diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp index 3cbcc9a..db123da 100644 --- a/kaddressbook/kabprefs.cpp +++ b/kaddressbook/kabprefs.cpp @@ -69,2 +69,7 @@ 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 ); diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h index cc8413e..1e3b48f 100644 --- a/kaddressbook/kabprefs.h +++ b/kaddressbook/kabprefs.h @@ -67,2 +67,3 @@ class KABPrefs : public KPimPrefs // GUI + bool mFullMenuBarVisible; bool mJumpButtonBarVisible; diff --git a/kaddressbook/kaddressbookview.h b/kaddressbook/kaddressbookview.h index c134e96..2e91cbc 100644 --- a/kaddressbook/kaddressbookview.h +++ b/kaddressbook/kaddressbookview.h @@ -69,2 +69,3 @@ class KAddressBookView : public QWidget 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 @@ -121,2 +121,4 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * 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" ); @@ -167,2 +169,3 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * + connect( mMenuBarBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); @@ -194,3 +197,3 @@ void KABConfigWidget::usrReadConfig() blockSignals( true ); - + mMenuBarBox->setChecked( prefs->mFullMenuBarVisible); mNameParsing->setChecked( prefs->mAutomaticNameParsing ); @@ -212,3 +215,3 @@ void KABConfigWidget::usrWriteConfig() KABPrefs* prefs = KABPrefs::instance(); - + prefs->mFullMenuBarVisible = mMenuBarBox->isChecked(); prefs->mAutomaticNameParsing = mNameParsing->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 @@ -68,3 +68,3 @@ class KABConfigWidget : public KPrefsWidget 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 @@ -108,3 +108,3 @@ void ViewManager::restoreSettings() mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter ); - + mActionSelectFilter->setComboWidth( 100 ); // Tell the views to reread their config, since they may have @@ -305,3 +305,3 @@ void ViewManager::setFocusAV() if ( mActiveView ) - mActiveView->setFocus(); + mActiveView->setFocusAV(); } @@ -599,2 +599,3 @@ void ViewManager::configureFilters() setActiveFilter( pos ); + //mActionSelectFilter->setComboWidth( 150 ); } @@ -694,3 +695,2 @@ void ViewManager::initActions() mActionSelectFilter = new KSelectAction( i18n( "Select Filter" ), "filter", mCore->actionCollection(), "select_filter" ); - #if KDE_VERSION >= 309 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 @@ -171,3 +171,8 @@ 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 @@ -64,2 +64,3 @@ class KAddressBookCardView : public KAddressBookView virtual void scrollDOWN(); + virtual void setFocusAV(); 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 @@ -213,2 +213,8 @@ KAddressBookIconView::~KAddressBookIconView() } +void KAddressBookIconView::setFocusAV() +{ + if ( mIconView ) + mIconView->setFocus(); +} + 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 @@ -65,2 +65,3 @@ class KAddressBookIconView : public KAddressBookView virtual void scrollDOWN(); + virtual void setFocusAV(); 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 @@ -53,2 +53,8 @@ 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 @@ -67,2 +67,3 @@ friend class ContactListView; virtual void scrollDOWN(); + virtual void setFocusAV(); diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index 7ad4ec8..c931e45 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp @@ -104,3 +104,3 @@ void EditAccounts::slotNewAccount( const QString &type ) { - if ( type.compare( "IMAP" ) == 0 ) + if ( type.compare( i18n("IMAP") ) == 0 ) { @@ -120,3 +120,3 @@ void EditAccounts::slotNewAccount( const QString &type ) } - else if ( type.compare( "POP3" ) == 0 ) + else if ( type.compare( i18n("POP3") ) == 0 ) { @@ -135,3 +135,3 @@ void EditAccounts::slotNewAccount( const QString &type ) } - else if ( type.compare( "SMTP" ) == 0 ) + else if ( type.compare( i18n("SMTP") ) == 0 ) { @@ -151,3 +151,3 @@ void EditAccounts::slotNewAccount( const QString &type ) } - else if ( type.compare( "NNTP" ) == 0 ) + else if ( type.compare( i18n("NNTP") ) == 0 ) { |