-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 |
13 files changed, 80 insertions, 49 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() | |||
1921 | 1921 | ||
1922 | #ifdef DESKTOP_VERSION | ||
1923 | QMenuBar* mb = mMainWindow->menuBar(); | ||
1924 | |||
1925 | //US setup menubar. | ||
1926 | //Disable the following block if you do not want to have a menubar. | ||
1927 | mb->insertItem( "&File", fileMenu ); | ||
1928 | mb->insertItem( "&Edit", editMenu ); | ||
1929 | mb->insertItem( "&View", viewMenu ); | ||
1930 | mb->insertItem( "&Settings", settingsMenu ); | ||
1931 | mb->insertItem( i18n("Synchronize"), syncMenu ); | ||
1932 | mb->insertItem( "&Change selected", changeMenu ); | ||
1933 | mb->insertItem( "&Help", helpMenu ); | ||
1934 | mIncSearchWidget = new IncSearchWidget( tb ); | ||
1935 | // tb->insertWidget(-1, 0, mIncSearchWidget); | ||
1936 | |||
1937 | #else | ||
1938 | //US setup toolbar | ||
1939 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); | ||
1940 | QPopupMenu *popupBarTB = new QPopupMenu( this ); | ||
1941 | menuBarTB->insertItem( "ME", popupBarTB); | ||
1942 | tb->insertWidget(-1, 0, menuBarTB); | ||
1943 | mIncSearchWidget = new IncSearchWidget( tb ); | ||
1944 | 1922 | ||
1945 | tb->enableMoving(false); | 1923 | if ( KABPrefs::instance()->mFullMenuBarVisible ) { |
1946 | popupBarTB->insertItem( "&File", fileMenu ); | 1924 | QMenuBar* mb = mMainWindow->menuBar(); |
1947 | popupBarTB->insertItem( "&Edit", editMenu ); | 1925 | |
1948 | popupBarTB->insertItem( "&View", viewMenu ); | 1926 | //US setup menubar. |
1949 | popupBarTB->insertItem( "&Settings", settingsMenu ); | 1927 | //Disable the following block if you do not want to have a menubar. |
1950 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); | 1928 | mb->insertItem( "&File", fileMenu ); |
1951 | mViewManager->getFilterAction()->plug ( popupBarTB); | 1929 | mb->insertItem( "&Edit", editMenu ); |
1952 | popupBarTB->insertItem( "&Change selected", changeMenu ); | 1930 | mb->insertItem( "&View", viewMenu ); |
1953 | popupBarTB->insertItem( "&Help", helpMenu ); | 1931 | mb->insertItem( "&Settings", settingsMenu ); |
1954 | if (QApplication::desktop()->width() > 320 ) { | 1932 | mb->insertItem( i18n("Synchronize"), syncMenu ); |
1955 | // mViewManager->getFilterAction()->plug ( tb); | 1933 | mb->insertItem( "&Change selected", changeMenu ); |
1934 | mb->insertItem( "&Help", helpMenu ); | ||
1935 | mIncSearchWidget = new IncSearchWidget( tb ); | ||
1936 | // tb->insertWidget(-1, 0, mIncSearchWidget); | ||
1937 | |||
1938 | } else { | ||
1939 | //US setup toolbar | ||
1940 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); | ||
1941 | QPopupMenu *popupBarTB = new QPopupMenu( this ); | ||
1942 | menuBarTB->insertItem( "ME", popupBarTB); | ||
1943 | tb->insertWidget(-1, 0, menuBarTB); | ||
1944 | mIncSearchWidget = new IncSearchWidget( tb ); | ||
1945 | |||
1946 | tb->enableMoving(false); | ||
1947 | popupBarTB->insertItem( "&File", fileMenu ); | ||
1948 | popupBarTB->insertItem( "&Edit", editMenu ); | ||
1949 | popupBarTB->insertItem( "&View", viewMenu ); | ||
1950 | popupBarTB->insertItem( "&Settings", settingsMenu ); | ||
1951 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); | ||
1952 | mViewManager->getFilterAction()->plug ( popupBarTB); | ||
1953 | popupBarTB->insertItem( "&Change selected", changeMenu ); | ||
1954 | popupBarTB->insertItem( "&Help", helpMenu ); | ||
1955 | if (QApplication::desktop()->width() > 320 ) { | ||
1956 | // mViewManager->getFilterAction()->plug ( tb); | ||
1957 | } | ||
1956 | } | 1958 | } |
1957 | #endif | ||
1958 | // mActionQuit->plug ( mMainWindow->toolBar()); | 1959 | // mActionQuit->plug ( mMainWindow->toolBar()); |
@@ -1970,4 +1971,4 @@ void KABCore::addActionsManually() | |||
1970 | mActionEditAddressee->plug( fileMenu ); | 1971 | mActionEditAddressee->plug( fileMenu ); |
1971 | if ((KGlobal::getDesktopSize() > KGlobal::Small ) || | 1972 | // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || |
1972 | (!KABPrefs::instance()->mMultipleViewsAtOnce )) | 1973 | // (!KABPrefs::instance()->mMultipleViewsAtOnce )) |
1973 | mActionEditAddressee->plug( tb ); | 1974 | mActionEditAddressee->plug( tb ); |
@@ -2023,4 +2024,4 @@ void KABCore::addActionsManually() | |||
2023 | mActionDetails->plug( settingsMenu ); | 2024 | mActionDetails->plug( settingsMenu ); |
2024 | if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) | 2025 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) |
2025 | mActionDetails->plug( tb ); | 2026 | mActionDetails->plug( tb ); |
2026 | settingsMenu->insertSeparator(); | 2027 | settingsMenu->insertSeparator(); |
@@ -2044,9 +2045,9 @@ void KABCore::addActionsManually() | |||
2044 | if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { | 2045 | if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { |
2045 | mActionUndo->plug( tb ); | 2046 | mActionUndo->plug( tb ); |
2046 | mActionDelete->plug( tb ); | 2047 | mActionDelete->plug( tb ); |
2047 | mActionRedo->plug( tb ); | 2048 | mActionRedo->plug( tb ); |
2048 | } | 2049 | } |
2049 | } else { | 2050 | } else { |
2050 | if (KABPrefs::instance()->mMultipleViewsAtOnce ) | 2051 | mActionSave->plug( tb ); |
2051 | mActionSave->plug( tb ); | 2052 | tb->enableMoving(false); |
2052 | } | 2053 | } |
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() | |||
69 | KPrefs::setCurrentGroup( "MainWindow" ); | 69 | KPrefs::setCurrentGroup( "MainWindow" ); |
70 | bool m_visible = false; | ||
71 | #ifdef DESKTOP_VERSION | ||
72 | m_visible = true; | ||
73 | #endif | ||
74 | addItemBool( "FullMenuBarVisible", &mFullMenuBarVisible, m_visible ); | ||
70 | addItemBool( "JumpButtonBarVisible", &mJumpButtonBarVisible, false ); | 75 | 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 | |||
67 | // GUI | 67 | // GUI |
68 | bool mFullMenuBarVisible; | ||
68 | bool mJumpButtonBarVisible; | 69 | 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 | |||
69 | virtual void scrollDOWN() = 0; | 69 | virtual void scrollDOWN() = 0; |
70 | virtual void setFocusAV() = 0; | ||
70 | 71 | ||
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 * | |||
121 | boxLayout->setSpacing( KDialog::spacingHintSmall() ); | 121 | boxLayout->setSpacing( KDialog::spacingHintSmall() ); |
122 | mMenuBarBox = new QCheckBox( i18n( "Full Menu bar (restart)" ), vBox, "mremenuturn" ); | ||
123 | boxLayout->addWidget( mMenuBarBox ); | ||
122 | mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" ); | 124 | mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" ); |
@@ -167,2 +169,3 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * | |||
167 | 169 | ||
170 | connect( mMenuBarBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | ||
168 | connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 171 | connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
@@ -194,3 +197,3 @@ void KABConfigWidget::usrReadConfig() | |||
194 | blockSignals( true ); | 197 | blockSignals( true ); |
195 | 198 | mMenuBarBox->setChecked( prefs->mFullMenuBarVisible); | |
196 | mNameParsing->setChecked( prefs->mAutomaticNameParsing ); | 199 | mNameParsing->setChecked( prefs->mAutomaticNameParsing ); |
@@ -212,3 +215,3 @@ void KABConfigWidget::usrWriteConfig() | |||
212 | KABPrefs* prefs = KABPrefs::instance(); | 215 | KABPrefs* prefs = KABPrefs::instance(); |
213 | 216 | prefs->mFullMenuBarVisible = mMenuBarBox->isChecked(); | |
214 | prefs->mAutomaticNameParsing = mNameParsing->isChecked(); | 217 | 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 | |||
68 | QCheckBox *mAskForQuit; | 68 | QCheckBox *mAskForQuit; |
69 | 69 | QCheckBox *mMenuBarBox; | |
70 | QPushButton *mConfigureButton; | 70 | 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() | |||
108 | mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter ); | 108 | mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter ); |
109 | 109 | mActionSelectFilter->setComboWidth( 100 ); | |
110 | // Tell the views to reread their config, since they may have | 110 | // Tell the views to reread their config, since they may have |
@@ -305,3 +305,3 @@ void ViewManager::setFocusAV() | |||
305 | if ( mActiveView ) | 305 | if ( mActiveView ) |
306 | mActiveView->setFocus(); | 306 | mActiveView->setFocusAV(); |
307 | } | 307 | } |
@@ -599,2 +599,3 @@ void ViewManager::configureFilters() | |||
599 | setActiveFilter( pos ); | 599 | setActiveFilter( pos ); |
600 | //mActionSelectFilter->setComboWidth( 150 ); | ||
600 | } | 601 | } |
@@ -694,3 +695,2 @@ void ViewManager::initActions() | |||
694 | mActionSelectFilter = new KSelectAction( i18n( "Select Filter" ), "filter", mCore->actionCollection(), "select_filter" ); | 695 | mActionSelectFilter = new KSelectAction( i18n( "Select Filter" ), "filter", mCore->actionCollection(), "select_filter" ); |
695 | |||
696 | #if KDE_VERSION >= 309 | 696 | #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() | |||
171 | } | 171 | } |
172 | void KAddressBookCardView::setFocusAV() | ||
173 | { | ||
174 | if ( mCardView ) | ||
175 | mCardView->setFocus(); | ||
172 | 176 | ||
177 | } | ||
173 | void KAddressBookCardView::scrollUP() | 178 | 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 | |||
64 | virtual void scrollDOWN(); | 64 | virtual void scrollDOWN(); |
65 | virtual void setFocusAV(); | ||
65 | 66 | ||
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() | |||
213 | } | 213 | } |
214 | void KAddressBookIconView::setFocusAV() | ||
215 | { | ||
216 | if ( mIconView ) | ||
217 | mIconView->setFocus(); | ||
218 | } | ||
219 | |||
214 | 220 | ||
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 | |||
65 | virtual void scrollDOWN(); | 65 | virtual void scrollDOWN(); |
66 | virtual void setFocusAV(); | ||
66 | 67 | ||
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() | |||
53 | } | 53 | } |
54 | void KAddressBookTableView::setFocusAV() | ||
55 | { | ||
56 | if ( mListView ) | ||
57 | mListView->setFocus(); | ||
58 | |||
59 | } | ||
54 | void KAddressBookTableView::scrollUP() | 60 | 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; | |||
67 | virtual void scrollDOWN(); | 67 | virtual void scrollDOWN(); |
68 | virtual void setFocusAV(); | ||
68 | 69 | ||