Commit 2b96fd61 authored by Volker Krause's avatar Volker Krause
Browse files

SVN_MERGE

Merged revisions 1015934 via svnmerge from 
https://vkrause@svn.kde.org/home/kde/branches/work/akonadi-ports/kdepim

........
  r1015934 | vkrause | 2009-08-26 18:24:29 +0200 (Wed, 26 Aug 2009) | 3 lines
  
  I'm too lazy to expand my 4 levels of Kolab addressbooks after every
  restart, so let's use the ETM state saver here.
........

svn path=/trunk/KDE/kdepim/kaddressbook/; revision=1017714
parent e8b76c74
......@@ -36,6 +36,7 @@
#include <akonadi/entityfilterproxymodel.h>
#include <akonadi/itemview.h>
#include <akonadi/mimetypechecker.h>
#include <akonadi/entitytreeviewstatesaver.h>
#include <kaction.h>
#include <kactioncollection.h>
......@@ -186,11 +187,20 @@ MainWidget::MainWidget( KXMLGUIClient *guiClient, QWidget *parent )
mModelColumnManager = new ModelColumnManager( GlobalContactModel::instance()->model(), this );
mModelColumnManager->setWidget( mItemView->header() );
mModelColumnManager->load();
// restore previous state
const KConfigGroup cfg( Settings::self()->config(), "CollectionViewState" );
Akonadi::EntityTreeViewStateSaver *restorer = new Akonadi::EntityTreeViewStateSaver( mCollectionView );
restorer->restoreState( cfg );
}
MainWidget::~MainWidget()
{
mModelColumnManager->store();
KConfigGroup cfg( Settings::self()->config(), "CollectionViewState" );
Akonadi::EntityTreeViewStateSaver saver( mCollectionView );
saver.saveState( cfg );
cfg.sync();
Settings::self()->writeConfig();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment