summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt1
-rw-r--r--kaddressbook/viewmanager.cpp7
-rw-r--r--kaddressbook/views/configuretableviewdialog.cpp2
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,27 +1,28 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 2.2.1 ************
KO/Pi:
Fixed a problem displaying very long allday events in agenda view in single day mode.
KA/Pi:
Added a config option to turn on asking before a contact is deleted.
+Fixed a problem with the default view and view selection at startup.
********** VERSION 2.2.0 ************
New stable release!
Fixed some minor usability problems.
Added writing of next alarm to a file for usage on pdaXrom.
*************************************
You can find the complete changelog
from version 1.7.7 to 2.2.0
in the source package or on
http://www.pi-sync.net/html/changelog.html
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index c738ad8..b5d9419 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -220,48 +220,51 @@ void ViewManager::setActiveView( const QString &name )
return;
// At this point we know the view that should be active is not
// currently active. We will try to find the new on in the list. If
// we can't find it, it means it hasn't been instantiated, so we will
// create it on demand.
view = mViewDict.find( name );
// Check if we found the view. If we didn't, then we need to create it
if ( view == 0 ) {
KConfig *config = mCore->config();
KConfigGroupSaver saver( config, name );
QString type = config->readEntry( "Type", "Table" );
kdDebug(5720) << "ViewManager::setActiveView: creating view - " << name << endl;
ViewFactory *factory = mViewFactoryDict.find( type );
if ( factory )
view = factory->view( mCore->addressBook(), mViewWidgetStack );
if ( view ) {
+ if ( !mViewNameList.contains( name ) ) {
+ mViewNameList.append( name );
+ }
view->setCaption( name );
mViewDict.insert( name, view );
//US my version needs an int as second parameter to addWidget
mViewWidgetStack->addWidget( view, -1 );
view->readConfig( config );
// The manager just relays the signals
connect( view, SIGNAL( selected( const QString& ) ),
SIGNAL( selected( const QString & ) ) );
connect( view, SIGNAL( executed( const QString& ) ),
SIGNAL( executed( const QString& ) ) );
connect( view, SIGNAL( deleteRequest( ) ),
SIGNAL( deleteRequest( ) ) );
connect( view, SIGNAL( modified() ), SIGNAL( modified() ) );
connect( view, SIGNAL( dropped( QDropEvent* ) ),
SLOT( dropped( QDropEvent* ) ) );
connect( view, SIGNAL( startDrag() ), SLOT( startDrag() ) );
}
}
// If we found or created the view, raise it and refresh it
if ( view ) {
@@ -269,48 +272,52 @@ void ViewManager::setActiveView( const QString &name )
mViewWidgetStack->raiseWidget( view );
// Set the proper filter in the view. By setting the combo
// box, the activated slot will be called, which will push
// the filter to the view and refresh it.
if ( view->defaultFilterType() == KAddressBookView::None ) {
mActionSelectFilter->setCurrentItem( 0 );
setActiveFilter( 0 );
} else if ( view->defaultFilterType() == KAddressBookView::Active ) {
setActiveFilter( mActionSelectFilter->currentItem() );
} else {
uint pos = filterPosition( view->defaultFilterName() );
mActionSelectFilter->setCurrentItem( pos );
setActiveFilter( pos );
}
//US qDebug("ViewManager::setActiveView 6" );
// Update the inc search widget to show the fields in the new active
// view.
mCore->setSearchFields( mActiveView->fields() );
//US performance optimization. setActiveFilter calls also mActiveView->refresh()
//US mActiveView->refresh();
+
+ mActionSelectView->setItems( mViewNameList );
+ mActionSelectView->setCurrentItem( mViewNameList.findIndex( mActiveView->caption() ) );
+
}
else
{
qDebug("ViewManager::setActiveView: unable to find view" );
}
}
//US added another method with no parameter, since my moc compiler does not support default parameters.
void ViewManager::refreshView()
{
refreshView( QString::null );
}
void ViewManager::refreshView( const QString &uid )
{
if ( mActiveView )
mActiveView->refresh( uid );
}
void ViewManager::setFocusAV()
{
if ( mActiveView )
mActiveView->setFocusAV();
}
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
@@ -86,49 +86,49 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config )
LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name)
: QVBox(parent, name)
{
initGUI();
// Set initial state
enableBackgroundToggled(mBackgroundBox->isChecked());
}
void LookAndFeelPage::restoreSettings( KConfig *config )
{
mAlternateButton->setChecked(config->readBoolEntry("ABackground", true));
mLineButton->setChecked(config->readBoolEntry("SingleLine", false));
mToolTipBox->setChecked(config->readBoolEntry("ToolTips", true));
if (!mAlternateButton->isChecked() & !mLineButton->isChecked())
mNoneButton->setChecked(true);
mBackgroundBox->setChecked(config->readBoolEntry("Background", false));
mBackgroundName->lineEdit()->setText(config->readEntry("BackgroundName"));
// colors
cbEnableCustomColors->setChecked( config->readBoolEntry( "EnableCustomColors", false ) );
QColor c;
-qDebug("LookAndFeelPage::restoreSettings make base color configurable");
+ //qDebug("LookAndFeelPage::restoreSettings make base color configurable");
#ifndef KAB_EMBEDDED
c = KGlobalSettings::baseColor();
#else //KAB_EMBEDDED
c = QColor(0,0,0);
#endif //KAB_EMBEDDED
c = colorGroup().background();
lbColors->insertItem( new ColorListItem( i18n("Background Color"),
config->readColorEntry( "BackgroundColor", &c ) ) );
c = colorGroup().foreground();
lbColors->insertItem( new ColorListItem( i18n("Text Color"),
config->readColorEntry( "TextColor", &c ) ) );
c = colorGroup().button();
lbColors->insertItem( new ColorListItem( i18n("Header Background Color"),
config->readColorEntry( "HeaderBackgroundColor", &c ) ) );
c = colorGroup().buttonText();
lbColors->insertItem( new ColorListItem( i18n("Header Text Color"),
config->readColorEntry( "HeaderTextColor", &c ) ) );
c = colorGroup().highlight();
lbColors->insertItem( new ColorListItem( i18n("Highlight Color"),
config->readColorEntry( "HighlightColor", &c ) ) );
c = colorGroup().highlightedText();
lbColors->insertItem( new ColorListItem( i18n("Highlighted Text Color"),