author | zautrix <zautrix> | 2005-08-17 17:09:57 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-17 17:09:57 (UTC) |
commit | b3de38d3c4c3935a3fa428eeb4ad97fa8c60c43a (patch) (unidiff) | |
tree | ed4d04abe2996cde745757632d8616b23a15670b | |
parent | c21edc19916722f5dd4e939f1522d311a86411fd (diff) | |
download | kdepimpi-b3de38d3c4c3935a3fa428eeb4ad97fa8c60c43a.zip kdepimpi-b3de38d3c4c3935a3fa428eeb4ad97fa8c60c43a.tar.gz kdepimpi-b3de38d3c4c3935a3fa428eeb4ad97fa8c60c43a.tar.bz2 |
view select fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 1 | ||||
-rw-r--r-- | kaddressbook/viewmanager.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/views/configuretableviewdialog.cpp | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 2e5cf50..18e94a7 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,21 +1,22 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.2.1 ************ | 3 | ********** VERSION 2.2.1 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Fixed a problem displaying very long allday events in agenda view in single day mode. | 6 | Fixed a problem displaying very long allday events in agenda view in single day mode. |
7 | 7 | ||
8 | KA/Pi: | 8 | KA/Pi: |
9 | Added a config option to turn on asking before a contact is deleted. | 9 | Added a config option to turn on asking before a contact is deleted. |
10 | Fixed a problem with the default view and view selection at startup. | ||
10 | 11 | ||
11 | ********** VERSION 2.2.0 ************ | 12 | ********** VERSION 2.2.0 ************ |
12 | 13 | ||
13 | New stable release! | 14 | New stable release! |
14 | Fixed some minor usability problems. | 15 | Fixed some minor usability problems. |
15 | Added writing of next alarm to a file for usage on pdaXrom. | 16 | Added writing of next alarm to a file for usage on pdaXrom. |
16 | 17 | ||
17 | 18 | ||
18 | ************************************* | 19 | ************************************* |
19 | 20 | ||
20 | You can find the complete changelog | 21 | You can find the complete changelog |
21 | from version 1.7.7 to 2.2.0 | 22 | from version 1.7.7 to 2.2.0 |
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index c738ad8..b5d9419 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp | |||
@@ -232,24 +232,27 @@ void ViewManager::setActiveView( const QString &name ) | |||
232 | 232 | ||
233 | KConfigGroupSaver saver( config, name ); | 233 | KConfigGroupSaver saver( config, name ); |
234 | 234 | ||
235 | QString type = config->readEntry( "Type", "Table" ); | 235 | QString type = config->readEntry( "Type", "Table" ); |
236 | 236 | ||
237 | kdDebug(5720) << "ViewManager::setActiveView: creating view - " << name << endl; | 237 | kdDebug(5720) << "ViewManager::setActiveView: creating view - " << name << endl; |
238 | 238 | ||
239 | ViewFactory *factory = mViewFactoryDict.find( type ); | 239 | ViewFactory *factory = mViewFactoryDict.find( type ); |
240 | if ( factory ) | 240 | if ( factory ) |
241 | view = factory->view( mCore->addressBook(), mViewWidgetStack ); | 241 | view = factory->view( mCore->addressBook(), mViewWidgetStack ); |
242 | 242 | ||
243 | if ( view ) { | 243 | if ( view ) { |
244 | if ( !mViewNameList.contains( name ) ) { | ||
245 | mViewNameList.append( name ); | ||
246 | } | ||
244 | view->setCaption( name ); | 247 | view->setCaption( name ); |
245 | mViewDict.insert( name, view ); | 248 | mViewDict.insert( name, view ); |
246 | //US my version needs an int as second parameter to addWidget | 249 | //US my version needs an int as second parameter to addWidget |
247 | mViewWidgetStack->addWidget( view, -1 ); | 250 | mViewWidgetStack->addWidget( view, -1 ); |
248 | view->readConfig( config ); | 251 | view->readConfig( config ); |
249 | 252 | ||
250 | // The manager just relays the signals | 253 | // The manager just relays the signals |
251 | connect( view, SIGNAL( selected( const QString& ) ), | 254 | connect( view, SIGNAL( selected( const QString& ) ), |
252 | SIGNAL( selected( const QString & ) ) ); | 255 | SIGNAL( selected( const QString & ) ) ); |
253 | connect( view, SIGNAL( executed( const QString& ) ), | 256 | connect( view, SIGNAL( executed( const QString& ) ), |
254 | SIGNAL( executed( const QString& ) ) ); | 257 | SIGNAL( executed( const QString& ) ) ); |
255 | 258 | ||
@@ -281,24 +284,28 @@ void ViewManager::setActiveView( const QString &name ) | |||
281 | uint pos = filterPosition( view->defaultFilterName() ); | 284 | uint pos = filterPosition( view->defaultFilterName() ); |
282 | mActionSelectFilter->setCurrentItem( pos ); | 285 | mActionSelectFilter->setCurrentItem( pos ); |
283 | setActiveFilter( pos ); | 286 | setActiveFilter( pos ); |
284 | } | 287 | } |
285 | //US qDebug("ViewManager::setActiveView 6" ); | 288 | //US qDebug("ViewManager::setActiveView 6" ); |
286 | 289 | ||
287 | // Update the inc search widget to show the fields in the new active | 290 | // Update the inc search widget to show the fields in the new active |
288 | // view. | 291 | // view. |
289 | mCore->setSearchFields( mActiveView->fields() ); | 292 | mCore->setSearchFields( mActiveView->fields() ); |
290 | 293 | ||
291 | //US performance optimization. setActiveFilter calls also mActiveView->refresh() | 294 | //US performance optimization. setActiveFilter calls also mActiveView->refresh() |
292 | //US mActiveView->refresh(); | 295 | //US mActiveView->refresh(); |
296 | |||
297 | mActionSelectView->setItems( mViewNameList ); | ||
298 | mActionSelectView->setCurrentItem( mViewNameList.findIndex( mActiveView->caption() ) ); | ||
299 | |||
293 | } | 300 | } |
294 | else | 301 | else |
295 | { | 302 | { |
296 | qDebug("ViewManager::setActiveView: unable to find view" ); | 303 | qDebug("ViewManager::setActiveView: unable to find view" ); |
297 | } | 304 | } |
298 | } | 305 | } |
299 | 306 | ||
300 | //US added another method with no parameter, since my moc compiler does not support default parameters. | 307 | //US added another method with no parameter, since my moc compiler does not support default parameters. |
301 | void ViewManager::refreshView() | 308 | void ViewManager::refreshView() |
302 | { | 309 | { |
303 | refreshView( QString::null ); | 310 | refreshView( QString::null ); |
304 | } | 311 | } |
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp index 0e36abd..c329cd9 100644 --- a/kaddressbook/views/configuretableviewdialog.cpp +++ b/kaddressbook/views/configuretableviewdialog.cpp | |||
@@ -98,25 +98,25 @@ void LookAndFeelPage::restoreSettings( KConfig *config ) | |||
98 | mLineButton->setChecked(config->readBoolEntry("SingleLine", false)); | 98 | mLineButton->setChecked(config->readBoolEntry("SingleLine", false)); |
99 | mToolTipBox->setChecked(config->readBoolEntry("ToolTips", true)); | 99 | mToolTipBox->setChecked(config->readBoolEntry("ToolTips", true)); |
100 | 100 | ||
101 | if (!mAlternateButton->isChecked() & !mLineButton->isChecked()) | 101 | if (!mAlternateButton->isChecked() & !mLineButton->isChecked()) |
102 | mNoneButton->setChecked(true); | 102 | mNoneButton->setChecked(true); |
103 | 103 | ||
104 | mBackgroundBox->setChecked(config->readBoolEntry("Background", false)); | 104 | mBackgroundBox->setChecked(config->readBoolEntry("Background", false)); |
105 | mBackgroundName->lineEdit()->setText(config->readEntry("BackgroundName")); | 105 | mBackgroundName->lineEdit()->setText(config->readEntry("BackgroundName")); |
106 | 106 | ||
107 | // colors | 107 | // colors |
108 | cbEnableCustomColors->setChecked( config->readBoolEntry( "EnableCustomColors", false ) ); | 108 | cbEnableCustomColors->setChecked( config->readBoolEntry( "EnableCustomColors", false ) ); |
109 | QColor c; | 109 | QColor c; |
110 | qDebug("LookAndFeelPage::restoreSettings make base color configurable"); | 110 | //qDebug("LookAndFeelPage::restoreSettings make base color configurable"); |
111 | 111 | ||
112 | #ifndef KAB_EMBEDDED | 112 | #ifndef KAB_EMBEDDED |
113 | c = KGlobalSettings::baseColor(); | 113 | c = KGlobalSettings::baseColor(); |
114 | #else //KAB_EMBEDDED | 114 | #else //KAB_EMBEDDED |
115 | c = QColor(0,0,0); | 115 | c = QColor(0,0,0); |
116 | #endif //KAB_EMBEDDED | 116 | #endif //KAB_EMBEDDED |
117 | 117 | ||
118 | c = colorGroup().background(); | 118 | c = colorGroup().background(); |
119 | lbColors->insertItem( new ColorListItem( i18n("Background Color"), | 119 | lbColors->insertItem( new ColorListItem( i18n("Background Color"), |
120 | config->readColorEntry( "BackgroundColor", &c ) ) ); | 120 | config->readColorEntry( "BackgroundColor", &c ) ) ); |
121 | c = colorGroup().foreground(); | 121 | c = colorGroup().foreground(); |
122 | lbColors->insertItem( new ColorListItem( i18n("Text Color"), | 122 | lbColors->insertItem( new ColorListItem( i18n("Text Color"), |