ktoolbar and index value

Benjamin Meyer ben at meyerhome.net
Mon Jul 19 15:06:56 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 19 July 2004 5:59 am, David Faure wrote:
> On Monday 19 July 2004 03:50, Benjamin Meyer wrote:
> > Hmm, but that would only work for apps with one toolbar and not in the
> > general case.
>
> In the general case we need to store all indexes unless the toolbars are in
> the same order as the order in which they get created. This would require a
> check in KMainWindow itself, iterating over the toolbars and checking that
> index == lastindex+1. Unless I'm wrong and the toolbar iterator follows the
> index order anyway, in which case we have no way to know in which order the
> toolbars were created, so there's no way out. I don't think it's a big
> problem though, to always save a set of indexes. It's not like that setting
> can override a global setting [which was the reason for this whole
> deleteEntry thing, like for iconSize/iconText etc.].

How about this?  If there is only 1 toolbar don't store the Index.  I added 
another parameter to KToolBar::saveSettings with a default value.  And then 
in KMainWindow it passes the arg stating if it is a lone toolbar or not.

- -Benjamin Meyer



- -- 
aka icefox
Public Key: http://www.csh.rit.edu/~benjamin/public_key.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFA+9WA1rZ3LTw38vIRAm76AJ9njHd313hVsZm6pp8OoQd4kNKjsQCeLB6K
l1a14DqQNSNwh8z5cmnXZJo=
=iF5H
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: text/x-diff
Size: 2542 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040719/d8ee19a2/attachment.diff>


More information about the kde-core-devel mailing list