[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Saving and restoring toolbar settings
From:       David Faure <faure () kde ! org>
Date:       2005-12-05 12:21:36
Message-ID: 200512051321.36982.faure () kde ! org
[Download RAW message or body]

On Monday 05 December 2005 14:55, Benjamin Meyer wrote:
> On Sunday 04 December 2005 8:36 pm, David Jarvie wrote:
> > On Sunday 04 Dec 2005 21:01, David Faure wrote:
> > > On Sunday 04 December 2005 19:03, David Jarvie wrote:
> > > > In my application, there is a "Hide Toolbar" menu option, which appears
> > > > due to the StandardToolBarMenuHandler entry in its ui.rc file. Using
> > > > the menu option successfully toggles the toolbar on and off, but the
> > > > setting doesn't get carried over after quitting and restarting the
> > > > application. Similarly, if I change the text position setting via the
> > > > toolbar context menu, the new position is lost the next time I run the
> > > > application.
> > > >
> > > > Is there standard code to save and restore these settings?
> > >
> > > Call KMainWindow::setAutoSaveSettings() once in your constructor, and it
> > > will do it all for you (saving and restoring)
> >
> > I already had that, but it didn't save the toolbar hide state or text
> > position.
> 
> Use KMainWindow's setupGUI() and it will save it.

Funny... all setupGUI does is to call setAutoSaveSettings, so if it didn't work for him,
why should setupGUI work?

I wonder why setAutoSaveSettings didn't work though. Ah, probably due to the missing
save/apply calls in the kedittoolbar-related code, cf the kedittoolbar documentation.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic