author | zautrix <zautrix> | 2004-10-28 07:46:21 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-28 07:46:21 (UTC) |
commit | aada2527dee908aa96bfc16f5faddd3b29372bee (patch) (unidiff) | |
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 | |||
@@ -1925,61 +1925,63 @@ void KABCore::initActions() | |||
1925 | // KDE uses a XML format to plug the actions, but we work her without this overhead. | 1925 | // KDE uses a XML format to plug the actions, but we work her without this overhead. |
1926 | void KABCore::addActionsManually() | 1926 | void KABCore::addActionsManually() |
1927 | { | 1927 | { |
1928 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 1928 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
1929 | 1929 | ||
1930 | #ifdef KAB_EMBEDDED | 1930 | #ifdef KAB_EMBEDDED |
1931 | QPopupMenu *fileMenu = new QPopupMenu( this ); | 1931 | QPopupMenu *fileMenu = new QPopupMenu( this ); |
1932 | QPopupMenu *editMenu = new QPopupMenu( this ); | 1932 | QPopupMenu *editMenu = new QPopupMenu( this ); |
1933 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 1933 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
1934 | 1934 | ||
1935 | KToolBar* tb = mMainWindow->toolBar(); | 1935 | KToolBar* tb = mMainWindow->toolBar(); |
1936 | 1936 | ||
1937 | 1937 | #ifndef DESKTOP_VERSION | |
1938 | if ( KABPrefs::instance()->mFullMenuBarVisible ) { | 1938 | if ( KABPrefs::instance()->mFullMenuBarVisible ) { |
1939 | #endif | ||
1939 | QMenuBar* mb = mMainWindow->menuBar(); | 1940 | QMenuBar* mb = mMainWindow->menuBar(); |
1940 | 1941 | ||
1941 | //US setup menubar. | 1942 | //US setup menubar. |
1942 | //Disable the following block if you do not want to have a menubar. | 1943 | //Disable the following block if you do not want to have a menubar. |
1943 | mb->insertItem( "&File", fileMenu ); | 1944 | mb->insertItem( "&File", fileMenu ); |
1944 | mb->insertItem( "&Edit", editMenu ); | 1945 | mb->insertItem( "&Edit", editMenu ); |
1945 | mb->insertItem( "&View", viewMenu ); | 1946 | mb->insertItem( "&View", viewMenu ); |
1946 | mb->insertItem( "&Settings", settingsMenu ); | 1947 | mb->insertItem( "&Settings", settingsMenu ); |
1947 | mb->insertItem( i18n("Synchronize"), syncMenu ); | 1948 | mb->insertItem( i18n("Synchronize"), syncMenu ); |
1948 | mb->insertItem( "&Change selected", changeMenu ); | 1949 | mb->insertItem( "&Change selected", changeMenu ); |
1949 | mb->insertItem( "&Help", helpMenu ); | 1950 | mb->insertItem( "&Help", helpMenu ); |
1950 | mIncSearchWidget = new IncSearchWidget( tb ); | 1951 | mIncSearchWidget = new IncSearchWidget( tb ); |
1951 | // tb->insertWidget(-1, 0, mIncSearchWidget); | 1952 | // tb->insertWidget(-1, 0, mIncSearchWidget); |
1952 | 1953 | #ifndef DESKTOP_VERSION | |
1953 | } else { | 1954 | } else { |
1954 | //US setup toolbar | 1955 | //US setup toolbar |
1955 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); | 1956 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); |
1956 | QPopupMenu *popupBarTB = new QPopupMenu( this ); | 1957 | QPopupMenu *popupBarTB = new QPopupMenu( this ); |
1957 | menuBarTB->insertItem( "ME", popupBarTB); | 1958 | menuBarTB->insertItem( "ME", popupBarTB); |
1958 | tb->insertWidget(-1, 0, menuBarTB); | 1959 | tb->insertWidget(-1, 0, menuBarTB); |
1959 | mIncSearchWidget = new IncSearchWidget( tb ); | 1960 | mIncSearchWidget = new IncSearchWidget( tb ); |
1960 | 1961 | ||
1961 | tb->enableMoving(false); | 1962 | tb->enableMoving(false); |
1962 | popupBarTB->insertItem( "&File", fileMenu ); | 1963 | popupBarTB->insertItem( "&File", fileMenu ); |
1963 | popupBarTB->insertItem( "&Edit", editMenu ); | 1964 | popupBarTB->insertItem( "&Edit", editMenu ); |
1964 | popupBarTB->insertItem( "&View", viewMenu ); | 1965 | popupBarTB->insertItem( "&View", viewMenu ); |
1965 | popupBarTB->insertItem( "&Settings", settingsMenu ); | 1966 | popupBarTB->insertItem( "&Settings", settingsMenu ); |
1966 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); | 1967 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); |
1967 | mViewManager->getFilterAction()->plug ( popupBarTB); | 1968 | mViewManager->getFilterAction()->plug ( popupBarTB); |
1968 | popupBarTB->insertItem( "&Change selected", changeMenu ); | 1969 | popupBarTB->insertItem( "&Change selected", changeMenu ); |
1969 | popupBarTB->insertItem( "&Help", helpMenu ); | 1970 | popupBarTB->insertItem( "&Help", helpMenu ); |
1970 | if (QApplication::desktop()->width() > 320 ) { | 1971 | if (QApplication::desktop()->width() > 320 ) { |
1971 | // mViewManager->getFilterAction()->plug ( tb); | 1972 | // mViewManager->getFilterAction()->plug ( tb); |
1972 | } | 1973 | } |
1973 | } | 1974 | } |
1975 | #endif | ||
1974 | // mActionQuit->plug ( mMainWindow->toolBar()); | 1976 | // mActionQuit->plug ( mMainWindow->toolBar()); |
1975 | 1977 | ||
1976 | 1978 | ||
1977 | 1979 | ||
1978 | //US Now connect the actions with the menue entries. | 1980 | //US Now connect the actions with the menue entries. |
1979 | mActionPrint->plug( fileMenu ); | 1981 | mActionPrint->plug( fileMenu ); |
1980 | mActionMail->plug( fileMenu ); | 1982 | mActionMail->plug( fileMenu ); |
1981 | fileMenu->insertSeparator(); | 1983 | fileMenu->insertSeparator(); |
1982 | 1984 | ||
1983 | mActionNewContact->plug( fileMenu ); | 1985 | mActionNewContact->plug( fileMenu ); |
1984 | mActionNewContact->plug( tb ); | 1986 | mActionNewContact->plug( tb ); |
1985 | 1987 | ||
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 3d0c275..0d91c12 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp | |||
@@ -97,25 +97,25 @@ void ViewManager::scrollDOWN() | |||
97 | } | 97 | } |
98 | void ViewManager::restoreSettings() | 98 | void ViewManager::restoreSettings() |
99 | { | 99 | { |
100 | mViewNameList = KABPrefs::instance()->mViewNames; | 100 | mViewNameList = KABPrefs::instance()->mViewNames; |
101 | QString activeViewName = KABPrefs::instance()->mCurrentView; | 101 | QString activeViewName = KABPrefs::instance()->mCurrentView; |
102 | 102 | ||
103 | mActionSelectView->setItems( mViewNameList ); | 103 | mActionSelectView->setItems( mViewNameList ); |
104 | 104 | ||
105 | // Filter | 105 | // Filter |
106 | mFilterList = Filter::restore( mCore->config(), "Filter" ); | 106 | mFilterList = Filter::restore( mCore->config(), "Filter" ); |
107 | mActionSelectFilter->setItems( filterNames() ); | 107 | mActionSelectFilter->setItems( filterNames() ); |
108 | mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter ); | 108 | mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter ); |
109 | mActionSelectFilter->setComboWidth( 100 ); | 109 | mActionSelectFilter->setComboWidth( 150 ); |
110 | // Tell the views to reread their config, since they may have | 110 | // Tell the views to reread their config, since they may have |
111 | // been modified by global settings | 111 | // been modified by global settings |
112 | QString _oldgroup = mCore->config()->group(); | 112 | QString _oldgroup = mCore->config()->group(); |
113 | 113 | ||
114 | QDictIterator<KAddressBookView> it( mViewDict ); | 114 | QDictIterator<KAddressBookView> it( mViewDict ); |
115 | for ( it.toFirst(); it.current(); ++it ) { | 115 | for ( it.toFirst(); it.current(); ++it ) { |
116 | KConfigGroupSaver saver( mCore->config(), it.currentKey() ); | 116 | KConfigGroupSaver saver( mCore->config(), it.currentKey() ); |
117 | it.current()->readConfig( mCore->config() ); | 117 | it.current()->readConfig( mCore->config() ); |
118 | } | 118 | } |
119 | setActiveView( activeViewName ); | 119 | setActiveView( activeViewName ); |
120 | 120 | ||
121 | mActionDeleteView->setEnabled( mViewNameList.count() > 1 ); | 121 | mActionDeleteView->setEnabled( mViewNameList.count() > 1 ); |
@@ -588,25 +588,25 @@ void ViewManager::configureFilters() | |||
588 | { | 588 | { |
589 | FilterDialog dlg( this ); | 589 | FilterDialog dlg( this ); |
590 | 590 | ||
591 | dlg.setFilters( mFilterList ); | 591 | dlg.setFilters( mFilterList ); |
592 | 592 | ||
593 | if ( dlg.exec() ) | 593 | if ( dlg.exec() ) |
594 | mFilterList = dlg.filters(); | 594 | mFilterList = dlg.filters(); |
595 | 595 | ||
596 | uint pos = mActionSelectFilter->currentItem(); | 596 | uint pos = mActionSelectFilter->currentItem(); |
597 | mActionSelectFilter->setItems( filterNames() ); | 597 | mActionSelectFilter->setItems( filterNames() ); |
598 | mActionSelectFilter->setCurrentItem( pos ); | 598 | mActionSelectFilter->setCurrentItem( pos ); |
599 | setActiveFilter( pos ); | 599 | setActiveFilter( pos ); |
600 | //mActionSelectFilter->setComboWidth( 150 ); | 600 | mActionSelectFilter->setComboWidth( 150 ); |
601 | } | 601 | } |
602 | 602 | ||
603 | QStringList ViewManager::filterNames() const | 603 | QStringList ViewManager::filterNames() const |
604 | { | 604 | { |
605 | QStringList names( i18n( "No Filter" ) ); | 605 | QStringList names( i18n( "No Filter" ) ); |
606 | 606 | ||
607 | Filter::List::ConstIterator it; | 607 | Filter::List::ConstIterator it; |
608 | for ( it = mFilterList.begin(); it != mFilterList.end(); ++it ) | 608 | for ( it = mFilterList.begin(); it != mFilterList.end(); ++it ) |
609 | names.append( (*it).name() ); | 609 | names.append( (*it).name() ); |
610 | 610 | ||
611 | return names; | 611 | return names; |
612 | } | 612 | } |