summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp87
-rw-r--r--kaddressbook/kabprefs.cpp5
-rw-r--r--kaddressbook/kabprefs.h1
-rw-r--r--kaddressbook/kaddressbookview.h1
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.cpp7
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.h2
-rw-r--r--kaddressbook/viewmanager.cpp6
-rw-r--r--kaddressbook/views/kaddressbookcardview.cpp5
-rw-r--r--kaddressbook/views/kaddressbookcardview.h1
-rw-r--r--kaddressbook/views/kaddressbookiconview.cpp6
-rw-r--r--kaddressbook/views/kaddressbookiconview.h1
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp6
-rw-r--r--kaddressbook/views/kaddressbooktableview.h1
-rw-r--r--kmicromail/editaccounts.cpp8
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
@@ -1910,75 +1910,76 @@ void KABCore::initActions()
1910// KDE uses a XML format to plug the actions, but we work her without this overhead. 1910// KDE uses a XML format to plug the actions, but we work her without this overhead.
1911void KABCore::addActionsManually() 1911void KABCore::addActionsManually()
1912{ 1912{
1913//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 1913//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
1914 1914
1915#ifdef KAB_EMBEDDED 1915#ifdef KAB_EMBEDDED
1916 QPopupMenu *fileMenu = new QPopupMenu( this ); 1916 QPopupMenu *fileMenu = new QPopupMenu( this );
1917 QPopupMenu *editMenu = new QPopupMenu( this ); 1917 QPopupMenu *editMenu = new QPopupMenu( this );
1918 QPopupMenu *helpMenu = new QPopupMenu( this ); 1918 QPopupMenu *helpMenu = new QPopupMenu( this );
1919 1919
1920 KToolBar* tb = mMainWindow->toolBar(); 1920 KToolBar* tb = mMainWindow->toolBar();
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());
1959 1960
1960 1961
1961 1962
1962 //US Now connect the actions with the menue entries. 1963 //US Now connect the actions with the menue entries.
1963 mActionPrint->plug( fileMenu ); 1964 mActionPrint->plug( fileMenu );
1964 mActionMail->plug( fileMenu ); 1965 mActionMail->plug( fileMenu );
1965 fileMenu->insertSeparator(); 1966 fileMenu->insertSeparator();
1966 1967
1967 mActionNewContact->plug( fileMenu ); 1968 mActionNewContact->plug( fileMenu );
1968 mActionNewContact->plug( tb ); 1969 mActionNewContact->plug( tb );
1969 1970
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 );
1974 1975
1975 fileMenu->insertSeparator(); 1976 fileMenu->insertSeparator();
1976 mActionSave->plug( fileMenu ); 1977 mActionSave->plug( fileMenu );
1977 fileMenu->insertItem( "&Import", ImportMenu ); 1978 fileMenu->insertItem( "&Import", ImportMenu );
1978 fileMenu->insertItem( "&Export", ExportMenu ); 1979 fileMenu->insertItem( "&Export", ExportMenu );
1979 fileMenu->insertSeparator(); 1980 fileMenu->insertSeparator();
1980 mActionMailVCard->plug( fileMenu ); 1981 mActionMailVCard->plug( fileMenu );
1981#ifndef DESKTOP_VERSION 1982#ifndef DESKTOP_VERSION
1982 if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu ); 1983 if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu );
1983 if ( Ir::supported() ) mActionBeam->plug(fileMenu ); 1984 if ( Ir::supported() ) mActionBeam->plug(fileMenu );
1984#endif 1985#endif
@@ -2012,52 +2013,52 @@ void KABCore::addActionsManually()
2012 //mActionConfigShortcuts->plug( settingsMenu ); 2013 //mActionConfigShortcuts->plug( settingsMenu );
2013 //mActionConfigureToolbars->plug( settingsMenu ); 2014 //mActionConfigureToolbars->plug( settingsMenu );
2014 2015
2015 } else { 2016 } else {
2016 //US not implemented yet 2017 //US not implemented yet
2017 //mActionKeyBindings->plug( settingsMenu ); 2018 //mActionKeyBindings->plug( settingsMenu );
2018 } 2019 }
2019 2020
2020 settingsMenu->insertSeparator(); 2021 settingsMenu->insertSeparator();
2021 2022
2022 mActionJumpBar->plug( settingsMenu ); 2023 mActionJumpBar->plug( settingsMenu );
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();
2027 mActionBR->plug(settingsMenu ); 2028 mActionBR->plug(settingsMenu );
2028 settingsMenu->insertSeparator(); 2029 settingsMenu->insertSeparator();
2029 2030
2030 mActionWhoAmI->plug( settingsMenu ); 2031 mActionWhoAmI->plug( settingsMenu );
2031 mActionCategories->plug( settingsMenu ); 2032 mActionCategories->plug( settingsMenu );
2032 2033
2033 2034
2034 mActionWN->plug( helpMenu ); 2035 mActionWN->plug( helpMenu );
2035 mActionSyncHowto->plug( helpMenu ); 2036 mActionSyncHowto->plug( helpMenu );
2036 mActionLicence->plug( helpMenu ); 2037 mActionLicence->plug( helpMenu );
2037 mActionFaq->plug( helpMenu ); 2038 mActionFaq->plug( helpMenu );
2038 mActionAboutKAddressbook->plug( helpMenu ); 2039 mActionAboutKAddressbook->plug( helpMenu );
2039 2040
2040 if (KGlobal::getDesktopSize() > KGlobal::Small ) { 2041 if (KGlobal::getDesktopSize() > KGlobal::Small ) {
2041 2042
2042 mActionSave->plug( tb ); 2043 mActionSave->plug( tb );
2043 mViewManager->getFilterAction()->plug ( tb); 2044 mViewManager->getFilterAction()->plug ( tb);
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 }
2053 //mActionQuit->plug ( tb ); 2054 //mActionQuit->plug ( tb );
2054 // tb->insertWidget(-1, 0, mIncSearchWidget, 6); 2055 // tb->insertWidget(-1, 0, mIncSearchWidget, 6);
2055 2056
2056 //US link the searchwidget first to this. 2057 //US link the searchwidget first to this.
2057 // The real linkage to the toolbar happens later. 2058 // The real linkage to the toolbar happens later.
2058//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); 2059//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE);
2059//US tb->insertItem( mIncSearchWidget ); 2060//US tb->insertItem( mIncSearchWidget );
2060/*US 2061/*US
2061 mIncSearchWidget = new IncSearchWidget( tb ); 2062 mIncSearchWidget = new IncSearchWidget( tb );
2062 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 2063 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
2063 SLOT( incrementalSearch( const QString& ) ) ); 2064 SLOT( incrementalSearch( const QString& ) ) );
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp
index 3cbcc9a..db123da 100644
--- a/kaddressbook/kabprefs.cpp
+++ b/kaddressbook/kabprefs.cpp
@@ -58,24 +58,29 @@ KABPrefs::KABPrefs()
58 58
59#ifdef KAB_EMBEDDED 59#ifdef KAB_EMBEDDED
60 addItemBool("AskForQuit",&mAskForQuit,true); 60 addItemBool("AskForQuit",&mAskForQuit,true);
61 addItemBool("ToolBarHor",&mToolBarHor, true ); 61 addItemBool("ToolBarHor",&mToolBarHor, true );
62 addItemBool("ToolBarUp",&mToolBarUp, false ); 62 addItemBool("ToolBarUp",&mToolBarUp, false );
63 addItemBool("SearchWithReturn",&mSearchWithReturn, true ); 63 addItemBool("SearchWithReturn",&mSearchWithReturn, true );
64 addItemFont("DetailsFont",&mDetailsFont); 64 addItemFont("DetailsFont",&mDetailsFont);
65 65
66 66
67#endif //KAB_EMBEDDED 67#endif //KAB_EMBEDDED
68 68
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 );
71 addItemBool( "DetailsPageVisible", &mDetailsPageVisible, true ); 76 addItemBool( "DetailsPageVisible", &mDetailsPageVisible, true );
72 addItemIntList( "ExtensionsSplitter", &mExtensionsSplitter ); 77 addItemIntList( "ExtensionsSplitter", &mExtensionsSplitter );
73 addItemIntList( "DetailsSplitter", &mDetailsSplitter ); 78 addItemIntList( "DetailsSplitter", &mDetailsSplitter );
74 addItemBool( "MultipleViewsAtOnce", &mMultipleViewsAtOnce, true ); 79 addItemBool( "MultipleViewsAtOnce", &mMultipleViewsAtOnce, true );
75 80
76 81
77 KPrefs::setCurrentGroup( "Extensions_General" ); 82 KPrefs::setCurrentGroup( "Extensions_General" );
78 QStringList defaultExtensions; 83 QStringList defaultExtensions;
79 defaultExtensions << "merge"; 84 defaultExtensions << "merge";
80 defaultExtensions << "distribution_list_editor"; 85 defaultExtensions << "distribution_list_editor";
81 addItemInt( "CurrentExtension", &mCurrentExtension, 0 ); 86 addItemInt( "CurrentExtension", &mCurrentExtension, 0 );
diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h
index cc8413e..1e3b48f 100644
--- a/kaddressbook/kabprefs.h
+++ b/kaddressbook/kabprefs.h
@@ -56,24 +56,25 @@ class KABPrefs : public KPimPrefs
56// void usrSetDefaults(); 56// void usrSetDefaults();
57 57
58 /** Read preferences from config file */ 58 /** Read preferences from config file */
59// void usrReadConfig(); 59// void usrReadConfig();
60 60
61 /** Write preferences to config file */ 61 /** Write preferences to config file */
62// void usrWriteConfig(); 62// void usrWriteConfig();
63#endif //KAB_EMBEDDED 63#endif //KAB_EMBEDDED
64 void usrReadConfig(); 64 void usrReadConfig();
65 65
66 66
67 // GUI 67 // GUI
68 bool mFullMenuBarVisible;
68 bool mJumpButtonBarVisible; 69 bool mJumpButtonBarVisible;
69 bool mDetailsPageVisible; 70 bool mDetailsPageVisible;
70 bool mMultipleViewsAtOnce; 71 bool mMultipleViewsAtOnce;
71 bool mSearchWithReturn; 72 bool mSearchWithReturn;
72 QValueList<int> mExtensionsSplitter; 73 QValueList<int> mExtensionsSplitter;
73 QValueList<int> mDetailsSplitter; 74 QValueList<int> mDetailsSplitter;
74 75
75 // Extensions stuff 76 // Extensions stuff
76 int mCurrentExtension; 77 int mCurrentExtension;
77 QStringList mActiveExtensions; 78 QStringList mActiveExtensions;
78 79
79 // Views stuff 80 // Views stuff
diff --git a/kaddressbook/kaddressbookview.h b/kaddressbook/kaddressbookview.h
index c134e96..2e91cbc 100644
--- a/kaddressbook/kaddressbookview.h
+++ b/kaddressbook/kaddressbookview.h
@@ -58,24 +58,25 @@ class KAddressBookView : public QWidget
58 58
59 KAddressBookView( KABC::AddressBook *ab, QWidget *parent, const char *name ); 59 KAddressBookView( KABC::AddressBook *ab, QWidget *parent, const char *name );
60 virtual ~KAddressBookView(); 60 virtual ~KAddressBookView();
61 61
62 /** 62 /**
63 Must be overloaded in subclasses. Should return a list of 63 Must be overloaded in subclasses. Should return a list of
64 all the uids of selected contacts. 64 all the uids of selected contacts.
65 */ 65 */
66 virtual QStringList selectedUids() = 0; 66 virtual QStringList selectedUids() = 0;
67 virtual void doSearch( const QString& s ,KABC::Field *field ) = 0; 67 virtual void doSearch( const QString& s ,KABC::Field *field ) = 0;
68 virtual void scrollUP() = 0; 68 virtual void scrollUP() = 0;
69 virtual void scrollDOWN() = 0; 69 virtual void scrollDOWN() = 0;
70 virtual void setFocusAV() = 0;
70 71
71 /** 72 /**
72 Called whenever this view should read the config. This can be used 73 Called whenever this view should read the config. This can be used
73 as a sign that the config has changed, therefore the view should 74 as a sign that the config has changed, therefore the view should
74 assume the worst and rebuild itself if necessary. For example, 75 assume the worst and rebuild itself if necessary. For example,
75 in a table view this method may be called when the user adds or 76 in a table view this method may be called when the user adds or
76 removes columns from the view. 77 removes columns from the view.
77 78
78 If overloaded in the subclass, do not forget to call super class's 79 If overloaded in the subclass, do not forget to call super class's
79 method. 80 method.
80 81
81 @param config The KConfig object to read from. The group will already 82 @param config The KConfig object to read from. The group will already
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
@@ -110,24 +110,26 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
110 hboxLayout->addWidget(detailsFont->button()); 110 hboxLayout->addWidget(detailsFont->button());
111 hboxLayout->setMargin(KDialog::marginHintSmall() ); 111 hboxLayout->setMargin(KDialog::marginHintSmall() );
112 hboxLayout->setSpacing(KDialog::spacingHintSmall()); 112 hboxLayout->setSpacing(KDialog::spacingHintSmall());
113 //hBox->setBackgroundColor( black); 113 //hBox->setBackgroundColor( black);
114 layout->addWidget( hBox ); 114 layout->addWidget( hBox );
115 115
116 //general groupbox 116 //general groupbox
117 QWidget *vBox = new QWidget( generalPage, "qvbox" ); 117 QWidget *vBox = new QWidget( generalPage, "qvbox" );
118 QVBoxLayout *boxLayout = new QVBoxLayout( vBox ); 118 QVBoxLayout *boxLayout = new QVBoxLayout( vBox );
119 boxLayout->setAlignment( Qt::AlignTop ); 119 boxLayout->setAlignment( Qt::AlignTop );
120 boxLayout->setMargin(KDialog::marginHintSmall() ); 120 boxLayout->setMargin(KDialog::marginHintSmall() );
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" );
123 boxLayout->addWidget( mSearchReturnBox ); 125 boxLayout->addWidget( mSearchReturnBox );
124 mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); 126 mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" );
125 boxLayout->addWidget( mViewsSingleClickBox ); 127 boxLayout->addWidget( mViewsSingleClickBox );
126 128
127 mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" ); 129 mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" );
128 boxLayout->addWidget( mNameParsing ); 130 boxLayout->addWidget( mNameParsing );
129 131
130 mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), vBox, "mdisplay" ); 132 mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), vBox, "mdisplay" );
131 boxLayout->addWidget( mMultipleViewsAtOnce ); 133 boxLayout->addWidget( mMultipleViewsAtOnce );
132 134
133 mAskForQuit = new QCheckBox( i18n( "Ask for quit when closing Ka/Pi" ), vBox, "mquit" ); 135 mAskForQuit = new QCheckBox( i18n( "Ask for quit when closing Ka/Pi" ), vBox, "mquit" );
@@ -156,24 +158,25 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
156 mExtensionView->addColumn( i18n( "Name" ) ); 158 mExtensionView->addColumn( i18n( "Name" ) );
157 mExtensionView->addColumn( i18n( "Description" ) ); 159 mExtensionView->addColumn( i18n( "Description" ) );
158 mExtensionView->setMaximumHeight(80); 160 mExtensionView->setMaximumHeight(80);
159 161
160 boxLayout->addWidget( mExtensionView ); 162 boxLayout->addWidget( mExtensionView );
161 163
162 mConfigureButton = new QPushButton( i18n( "Configure..." ), groupBox ); 164 mConfigureButton = new QPushButton( i18n( "Configure..." ), groupBox );
163 mConfigureButton->setEnabled( false ); 165 mConfigureButton->setEnabled( false );
164 boxLayout->addWidget( mConfigureButton ); 166 boxLayout->addWidget( mConfigureButton );
165 167
166 extensionLayout->addWidget( groupBox ); 168 extensionLayout->addWidget( groupBox );
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() ) );
169 connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 172 connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
170 connect( mSearchReturnBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 173 connect( mSearchReturnBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
171 connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 174 connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
172 connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 175 connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
173 connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), 176 connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ),
174 SLOT( selectionChanged( QListViewItem* ) ) ); 177 SLOT( selectionChanged( QListViewItem* ) ) );
175 connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), 178 connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ),
176 SLOT( itemClicked( QListViewItem* ) ) ); 179 SLOT( itemClicked( QListViewItem* ) ) );
177 connect( mConfigureButton, SIGNAL( clicked() ), 180 connect( mConfigureButton, SIGNAL( clicked() ),
178 SLOT( configureExtension() ) ); 181 SLOT( configureExtension() ) );
179 182
@@ -183,43 +186,43 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
183 mAddresseeWidget = new AddresseeWidget( this ); 186 mAddresseeWidget = new AddresseeWidget( this );
184 tabWidget->addTab( mAddresseeWidget, i18n( "Contact" ) ); 187 tabWidget->addTab( mAddresseeWidget, i18n( "Contact" ) );
185 connect( mAddresseeWidget, SIGNAL( modified() ), SLOT( modified() ) ); 188 connect( mAddresseeWidget, SIGNAL( modified() ), SLOT( modified() ) );
186 189
187} 190}
188 191
189void KABConfigWidget::usrReadConfig() 192void KABConfigWidget::usrReadConfig()
190{ 193{
191 KABPrefs* prefs = KABPrefs::instance(); 194 KABPrefs* prefs = KABPrefs::instance();
192 195
193 bool blocked = signalsBlocked(); 196 bool blocked = signalsBlocked();
194 blockSignals( true ); 197 blockSignals( true );
195 198 mMenuBarBox->setChecked( prefs->mFullMenuBarVisible);
196 mNameParsing->setChecked( prefs->mAutomaticNameParsing ); 199 mNameParsing->setChecked( prefs->mAutomaticNameParsing );
197 mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick ); 200 mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick );
198 mSearchReturnBox->setChecked( prefs->mSearchWithReturn ); 201 mSearchReturnBox->setChecked( prefs->mSearchWithReturn );
199 mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce ); 202 mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce );
200 mAskForQuit->setChecked( prefs->mAskForQuit ); 203 mAskForQuit->setChecked( prefs->mAskForQuit );
201 204
202 mAddresseeWidget->restoreSettings(); 205 mAddresseeWidget->restoreSettings();
203 206
204 restoreExtensionSettings(); 207 restoreExtensionSettings();
205 208
206 blockSignals( blocked ); 209 blockSignals( blocked );
207 210
208} 211}
209 212
210void KABConfigWidget::usrWriteConfig() 213void KABConfigWidget::usrWriteConfig()
211{ 214{
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();
215 prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked(); 218 prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked();
216 prefs->mSearchWithReturn = mSearchReturnBox->isChecked(); 219 prefs->mSearchWithReturn = mSearchReturnBox->isChecked();
217 prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked(); 220 prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked();
218 prefs->mAskForQuit = mAskForQuit->isChecked(); 221 prefs->mAskForQuit = mAskForQuit->isChecked();
219 222
220 mAddresseeWidget->saveSettings(); 223 mAddresseeWidget->saveSettings();
221 224
222 saveExtensionSettings(); 225 saveExtensionSettings();
223 226
224} 227}
225 228
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
@@ -57,19 +57,19 @@ class KABConfigWidget : public KPrefsWidget
57 void itemClicked( QListViewItem* ); 57 void itemClicked( QListViewItem* );
58 58
59 private: 59 private:
60 void restoreExtensionSettings(); 60 void restoreExtensionSettings();
61 void saveExtensionSettings(); 61 void saveExtensionSettings();
62 62
63 KListView *mExtensionView; 63 KListView *mExtensionView;
64 QCheckBox *mSearchReturnBox; 64 QCheckBox *mSearchReturnBox;
65 QCheckBox *mNameParsing; 65 QCheckBox *mNameParsing;
66 QCheckBox *mViewsSingleClickBox; 66 QCheckBox *mViewsSingleClickBox;
67 QCheckBox *mMultipleViewsAtOnce; 67 QCheckBox *mMultipleViewsAtOnce;
68 QCheckBox *mAskForQuit; 68 QCheckBox *mAskForQuit;
69 69 QCheckBox *mMenuBarBox;
70 QPushButton *mConfigureButton; 70 QPushButton *mConfigureButton;
71 71
72 AddresseeWidget *mAddresseeWidget; 72 AddresseeWidget *mAddresseeWidget;
73}; 73};
74 74
75#endif 75#endif
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index 81e0d99..3d0c275 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -97,25 +97,25 @@ void ViewManager::scrollDOWN()
97} 97}
98void ViewManager::restoreSettings() 98void 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 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
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 );
@@ -294,25 +294,25 @@ void ViewManager::refreshView()
294 refreshView( QString::null ); 294 refreshView( QString::null );
295} 295}
296 296
297void ViewManager::refreshView( const QString &uid ) 297void ViewManager::refreshView( const QString &uid )
298{ 298{
299 if ( mActiveView ) 299 if ( mActiveView )
300 mActiveView->refresh( uid ); 300 mActiveView->refresh( uid );
301} 301}
302 302
303void ViewManager::setFocusAV() 303void ViewManager::setFocusAV()
304{ 304{
305 if ( mActiveView ) 305 if ( mActiveView )
306 mActiveView->setFocus(); 306 mActiveView->setFocusAV();
307} 307}
308void ViewManager::editView() 308void ViewManager::editView()
309{ 309{
310 if ( !mActiveView ) 310 if ( !mActiveView )
311 return; 311 return;
312 312
313 ViewFactory *factory = mViewFactoryDict.find( mActiveView->type() ); 313 ViewFactory *factory = mViewFactoryDict.find( mActiveView->type() );
314 ViewConfigureWidget *wdg = 0; 314 ViewConfigureWidget *wdg = 0;
315 ViewConfigureDialog* dlg = 0; 315 ViewConfigureDialog* dlg = 0;
316 if ( factory ) { 316 if ( factory ) {
317 // Save the filters so the dialog has the latest set 317 // Save the filters so the dialog has the latest set
318 Filter::save( mCore->config(), "Filter", mFilterList ); 318 Filter::save( mCore->config(), "Filter", mFilterList );
@@ -588,24 +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} 601}
601 602
602QStringList ViewManager::filterNames() const 603QStringList ViewManager::filterNames() const
603{ 604{
604 QStringList names( i18n( "No Filter" ) ); 605 QStringList names( i18n( "No Filter" ) );
605 606
606 Filter::List::ConstIterator it; 607 Filter::List::ConstIterator it;
607 for ( it = mFilterList.begin(); it != mFilterList.end(); ++it ) 608 for ( it = mFilterList.begin(); it != mFilterList.end(); ++it )
608 names.append( (*it).name() ); 609 names.append( (*it).name() );
609 610
610 return names; 611 return names;
611} 612}
@@ -683,25 +684,24 @@ void ViewManager::initActions()
683 action = new KAction( i18n( "Refresh View" ), "reload", 0, this, 684 action = new KAction( i18n( "Refresh View" ), "reload", 0, this,
684 SLOT( refreshView()), mCore->actionCollection(), 685 SLOT( refreshView()), mCore->actionCollection(),
685 "view_refresh" ); 686 "view_refresh" );
686 action->plug(viewmenu); 687 action->plug(viewmenu);
687 viewmenu->insertSeparator(); 688 viewmenu->insertSeparator();
688#endif //KAB_EMBEDDED 689#endif //KAB_EMBEDDED
689 690
690 action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this, 691 action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this,
691 SLOT( configureFilters() ), mCore->actionCollection(), 692 SLOT( configureFilters() ), mCore->actionCollection(),
692 "options_edit_filters" ); 693 "options_edit_filters" );
693 694
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
697 mActionSelectFilter->setMenuAccelsEnabled( false ); 697 mActionSelectFilter->setMenuAccelsEnabled( false );
698#endif 698#endif
699 connect( mActionSelectFilter, SIGNAL( activated( int ) ), 699 connect( mActionSelectFilter, SIGNAL( activated( int ) ),
700 SLOT( setActiveFilter( int ) ) ); 700 SLOT( setActiveFilter( int ) ) );
701 701
702#ifdef KAB_EMBEDDED 702#ifdef KAB_EMBEDDED
703 action->plug(settingsmenu); 703 action->plug(settingsmenu);
704 mActionSelectFilter->plug(viewmenu); 704 mActionSelectFilter->plug(viewmenu);
705#endif //KAB_EMBEDDED 705#endif //KAB_EMBEDDED
706 706
707} 707}
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
@@ -160,25 +160,30 @@ KAddressBookCardView::KAddressBookCardView( KABC::AddressBook *ab,
160 this, SLOT(addresseeExecuted(CardViewItem *))); 160 this, SLOT(addresseeExecuted(CardViewItem *)));
161 connect(mCardView, SIGNAL(selectionChanged()), 161 connect(mCardView, SIGNAL(selectionChanged()),
162 this, SLOT(addresseeSelected())); 162 this, SLOT(addresseeSelected()));
163 connect(mCardView, SIGNAL(addresseeDropped(QDropEvent*)), 163 connect(mCardView, SIGNAL(addresseeDropped(QDropEvent*)),
164 this, SIGNAL(dropped(QDropEvent*))); 164 this, SIGNAL(dropped(QDropEvent*)));
165 connect(mCardView, SIGNAL(startAddresseeDrag()), 165 connect(mCardView, SIGNAL(startAddresseeDrag()),
166 this, SIGNAL(startDrag())); 166 this, SIGNAL(startDrag()));
167} 167}
168 168
169KAddressBookCardView::~KAddressBookCardView() 169KAddressBookCardView::~KAddressBookCardView()
170{ 170{
171} 171}
172void KAddressBookCardView::setFocusAV()
173{
174 if ( mCardView )
175 mCardView->setFocus();
172 176
177}
173void KAddressBookCardView::scrollUP() 178void KAddressBookCardView::scrollUP()
174{ 179{
175 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Up, 0,0 ); 180 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Up, 0,0 );
176 QApplication::postEvent( mCardView, ev ); 181 QApplication::postEvent( mCardView, ev );
177 182
178} 183}
179void KAddressBookCardView::scrollDOWN() 184void KAddressBookCardView::scrollDOWN()
180{ 185{
181 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Down, 0,0 ); 186 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Down, 0,0 );
182 QApplication::postEvent( mCardView, ev ); 187 QApplication::postEvent( mCardView, ev );
183} 188}
184void KAddressBookCardView::readConfig(KConfig *config) 189void KAddressBookCardView::readConfig(KConfig *config)
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
@@ -53,24 +53,25 @@ class KAddressBookCardView : public KAddressBookView
53 public: 53 public:
54 KAddressBookCardView( KABC::AddressBook *ab, QWidget *parent, 54 KAddressBookCardView( KABC::AddressBook *ab, QWidget *parent,
55 const char *name = 0 ); 55 const char *name = 0 );
56 virtual ~KAddressBookCardView(); 56 virtual ~KAddressBookCardView();
57 void doSearch( const QString& s,KABC::Field *field ); 57 void doSearch( const QString& s,KABC::Field *field );
58 virtual QStringList selectedUids(); 58 virtual QStringList selectedUids();
59 virtual QString type() const { return "Card"; } 59 virtual QString type() const { return "Card"; }
60 60
61 virtual void readConfig(KConfig *config); 61 virtual void readConfig(KConfig *config);
62 virtual void writeConfig(KConfig *); 62 virtual void writeConfig(KConfig *);
63 virtual void scrollUP(); 63 virtual void scrollUP();
64 virtual void scrollDOWN(); 64 virtual void scrollDOWN();
65 virtual void setFocusAV();
65 66
66 public slots: 67 public slots:
67 void refresh(QString uid = QString::null); 68 void refresh(QString uid = QString::null);
68 void setSelected(QString uid/*US = QString::null*/, bool selected/*US = true*/); 69 void setSelected(QString uid/*US = QString::null*/, bool selected/*US = true*/);
69//US added an additional method without parameter 70//US added an additional method without parameter
70 void setSelected(); 71 void setSelected();
71 72
72 protected slots: 73 protected slots:
73 void addresseeExecuted(CardViewItem *item); 74 void addresseeExecuted(CardViewItem *item);
74 void addresseeSelected(); 75 void addresseeSelected();
75 76
76 private: 77 private:
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
@@ -202,24 +202,30 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab,
202 202
203 connect(mIconView, SIGNAL(selectionChanged()), 203 connect(mIconView, SIGNAL(selectionChanged()),
204 this, SLOT(addresseeSelected())); 204 this, SLOT(addresseeSelected()));
205 connect(mIconView, SIGNAL(addresseeDropped(QDropEvent*)), 205 connect(mIconView, SIGNAL(addresseeDropped(QDropEvent*)),
206 this, SIGNAL(dropped(QDropEvent*))); 206 this, SIGNAL(dropped(QDropEvent*)));
207 connect(mIconView, SIGNAL(startAddresseeDrag()), 207 connect(mIconView, SIGNAL(startAddresseeDrag()),
208 this, SIGNAL(startDrag())); 208 this, SIGNAL(startDrag()));
209} 209}
210 210
211KAddressBookIconView::~KAddressBookIconView() 211KAddressBookIconView::~KAddressBookIconView()
212{ 212{
213} 213}
214void KAddressBookIconView::setFocusAV()
215{
216 if ( mIconView )
217 mIconView->setFocus();
218}
219
214 220
215void KAddressBookIconView::scrollUP() 221void KAddressBookIconView::scrollUP()
216{ 222{
217 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Up, 0,0 ); 223 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Up, 0,0 );
218 QApplication::postEvent( mIconView, ev ); 224 QApplication::postEvent( mIconView, ev );
219} 225}
220void KAddressBookIconView::scrollDOWN() 226void KAddressBookIconView::scrollDOWN()
221{ 227{
222 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Down, 0,0 ); 228 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Down, 0,0 );
223 QApplication::postEvent( mIconView, ev ); 229 QApplication::postEvent( mIconView, ev );
224} 230}
225void KAddressBookIconView::readConfig(KConfig *config) 231void KAddressBookIconView::readConfig(KConfig *config)
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
@@ -54,24 +54,25 @@ class KAddressBookIconView : public KAddressBookView
54 public: 54 public:
55 KAddressBookIconView( KABC::AddressBook *ab, QWidget *parent, 55 KAddressBookIconView( KABC::AddressBook *ab, QWidget *parent,
56 const char *name = 0 ); 56 const char *name = 0 );
57 virtual ~KAddressBookIconView(); 57 virtual ~KAddressBookIconView();
58 58
59 virtual QStringList selectedUids(); 59 virtual QStringList selectedUids();
60 virtual QString type() const { return "Icon"; } 60 virtual QString type() const { return "Icon"; }
61 void doSearch( const QString& s ,KABC::Field *field ); 61 void doSearch( const QString& s ,KABC::Field *field );
62 62
63 virtual void readConfig(KConfig *config); 63 virtual void readConfig(KConfig *config);
64 virtual void scrollUP(); 64 virtual void scrollUP();
65 virtual void scrollDOWN(); 65 virtual void scrollDOWN();
66 virtual void setFocusAV();
66 67
67 public slots: 68 public slots:
68 void refresh(QString uid = QString::null); 69 void refresh(QString uid = QString::null);
69#ifndef KAB_EMBEDDED 70#ifndef KAB_EMBEDDED
70//MOC_SKIP_BEGIN 71//MOC_SKIP_BEGIN
71 void setSelected(QString uid = QString::null, bool selected = true); 72 void setSelected(QString uid = QString::null, bool selected = true);
72//MOC_SKIP_END 73//MOC_SKIP_END
73#else //KAB_EMBEDDED 74#else //KAB_EMBEDDED
74//US my MOC do not like default parameters ??? 75//US my MOC do not like default parameters ???
75 void setSelected(QString uid, bool selected); 76 void setSelected(QString uid, bool selected);
76#endif //KAB_EMBEDDED 77#endif //KAB_EMBEDDED
77 78
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
@@ -42,24 +42,30 @@ KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab,
42 QWidget *parent, const char *name ) 42 QWidget *parent, const char *name )
43 : KAddressBookView( ab, parent, name ) 43 : KAddressBookView( ab, parent, name )
44{ 44{
45 mainLayout = new QVBoxLayout( viewWidget(), 2 ); 45 mainLayout = new QVBoxLayout( viewWidget(), 2 );
46 46
47 // The list view will be created when the config is read. 47 // The list view will be created when the config is read.
48 mListView = 0; 48 mListView = 0;
49} 49}
50 50
51KAddressBookTableView::~KAddressBookTableView() 51KAddressBookTableView::~KAddressBookTableView()
52{ 52{
53} 53}
54void KAddressBookTableView::setFocusAV()
55{
56 if ( mListView )
57 mListView->setFocus();
58
59}
54void KAddressBookTableView::scrollUP() 60void KAddressBookTableView::scrollUP()
55{ 61{
56 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Up, 0,0 ); 62 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Up, 0,0 );
57 QApplication::postEvent( mListView, ev ); 63 QApplication::postEvent( mListView, ev );
58} 64}
59void KAddressBookTableView::scrollDOWN() 65void KAddressBookTableView::scrollDOWN()
60{ 66{
61 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Down, 0,0 ); 67 QKeyEvent * ev = new QKeyEvent ( QEvent::KeyPress, Qt::Key_Down, 0,0 );
62 QApplication::postEvent( mListView, ev ); 68 QApplication::postEvent( mListView, ev );
63} 69}
64void KAddressBookTableView::reconstructListView() 70void KAddressBookTableView::reconstructListView()
65{ 71{
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
@@ -56,24 +56,25 @@ friend class ContactListView;
56 const char *name = 0 ); 56 const char *name = 0 );
57 virtual ~KAddressBookTableView(); 57 virtual ~KAddressBookTableView();
58 58
59 virtual void refresh(QString uid = QString::null); 59 virtual void refresh(QString uid = QString::null);
60 virtual QStringList selectedUids(); 60 virtual QStringList selectedUids();
61 virtual void setSelected(QString uid = QString::null, bool selected = false); 61 virtual void setSelected(QString uid = QString::null, bool selected = false);
62 virtual void readConfig(KConfig *config); 62 virtual void readConfig(KConfig *config);
63 virtual void writeConfig(KConfig *config); 63 virtual void writeConfig(KConfig *config);
64 virtual QString type() const { return "Table"; } 64 virtual QString type() const { return "Table"; }
65 void doSearch( const QString& s ,KABC::Field *field ); 65 void doSearch( const QString& s ,KABC::Field *field );
66 virtual void scrollUP(); 66 virtual void scrollUP();
67 virtual void scrollDOWN(); 67 virtual void scrollDOWN();
68 virtual void setFocusAV();
68 69
69 public slots: 70 public slots:
70 virtual void reconstructListView(); 71 virtual void reconstructListView();
71 72
72 protected slots: 73 protected slots:
73 /** Called whenever the user selects an addressee in the list view. 74 /** Called whenever the user selects an addressee in the list view.
74 */ 75 */
75 void addresseeSelected(); 76 void addresseeSelected();
76 void addresseeDeleted(); 77 void addresseeDeleted();
77 78
78 /** Called whenever the user executes an addressee. In terms of the 79 /** Called whenever the user executes an addressee. In terms of the
79 * list view, this is probably a double click 80 * list view, this is probably a double click
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index 7ad4ec8..c931e45 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -93,72 +93,72 @@ void EditAccounts::slotNewMail()
93{ 93{
94 QString *selection = new QString(); 94 QString *selection = new QString();
95 SelectMailType selType( selection, this, 0, true ); 95 SelectMailType selType( selection, this, 0, true );
96 selType.show(); 96 selType.show();
97 if ( QDialog::Accepted == selType.exec() ) 97 if ( QDialog::Accepted == selType.exec() )
98 { 98 {
99 slotNewAccount( *selection ); 99 slotNewAccount( *selection );
100 } 100 }
101} 101}
102 102
103void EditAccounts::slotNewAccount( const QString &type ) 103void EditAccounts::slotNewAccount( const QString &type )
104{ 104{
105 if ( type.compare( "IMAP" ) == 0 ) 105 if ( type.compare( i18n("IMAP") ) == 0 )
106 { 106 {
107 IMAPaccount *account = new IMAPaccount(); 107 IMAPaccount *account = new IMAPaccount();
108 IMAPconfig imap( account, this, 0, true ); 108 IMAPconfig imap( account, this, 0, true );
109 imap.showMaximized(); 109 imap.showMaximized();
110 if ( QDialog::Accepted == imap.exec() ) 110 if ( QDialog::Accepted == imap.exec() )
111 { 111 {
112 settings->addAccount( account ); 112 settings->addAccount( account );
113 account->save(); 113 account->save();
114 slotFillLists(); 114 slotFillLists();
115 } 115 }
116 else 116 else
117 { 117 {
118 account->remove(); 118 account->remove();
119 } 119 }
120 } 120 }
121 else if ( type.compare( "POP3" ) == 0 ) 121 else if ( type.compare( i18n("POP3") ) == 0 )
122 { 122 {
123 POP3account *account = new POP3account(); 123 POP3account *account = new POP3account();
124 POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); 124 POP3config pop3( account, this, 0, true, WStyle_ContextHelp );
125 if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) 125 if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) )
126 { 126 {
127 settings->addAccount( account ); 127 settings->addAccount( account );
128 account->save(); 128 account->save();
129 slotFillLists(); 129 slotFillLists();
130 } 130 }
131 else 131 else
132 { 132 {
133 account->remove(); 133 account->remove();
134 } 134 }
135 } 135 }
136 else if ( type.compare( "SMTP" ) == 0 ) 136 else if ( type.compare( i18n("SMTP") ) == 0 )
137 { 137 {
138 SMTPaccount *account = new SMTPaccount(); 138 SMTPaccount *account = new SMTPaccount();
139 SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); 139 SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp );
140 if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) 140 if ( QDialog::Accepted == KApplication::execDialog( &smtp ) )
141 { 141 {
142 settings->addAccount( account ); 142 settings->addAccount( account );
143 account->save(); 143 account->save();
144 slotFillLists(); 144 slotFillLists();
145 145
146 } 146 }
147 else 147 else
148 { 148 {
149 account->remove(); 149 account->remove();
150 } 150 }
151 } 151 }
152 else if ( type.compare( "NNTP" ) == 0 ) 152 else if ( type.compare( i18n("NNTP") ) == 0 )
153 { 153 {
154 NNTPaccount *account = new NNTPaccount(); 154 NNTPaccount *account = new NNTPaccount();
155 NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); 155 NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp );
156 if ( QDialog::Accepted == KApplication::execDialog( &nntp ) ) 156 if ( QDialog::Accepted == KApplication::execDialog( &nntp ) )
157 { 157 {
158 settings->addAccount( account ); 158 settings->addAccount( account );
159 account->save(); 159 account->save();
160 slotFillLists(); 160 slotFillLists();
161 } 161 }
162 else 162 else
163 { 163 {
164 account->remove(); 164 account->remove();