createStandardKWindow()

Benjamin Meyer ben at meyerhome.net
Mon Jun 7 18:03:18 BST 2004


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

On Monday 07 June 2004 8:36 am, David Faure wrote:
> On Monday 07 June 2004 02:13, Benjamin Meyer wrote:
> > 1) Rather than a number of bools for params have only two params.  The
> > first being params disabled, and the second being enabled ones (or'd
> > together). This way you can turn off one or two things you don't want,
> > but in the future as new things are added they will work by default.
>
> Yes. A series of bools is difficult to read ("false, true, false, false" ==
> ??), and difficult to extend. I would have suggested a simple bitfield enum
> though. Having two bitfields is a bit strange - if something is not
> specified in the disabled list nor in the enabled list, what does it mean?
> That KMainWindow can choose what to do about it? Sounds a bit undefined.

Yah, it is simple that way.  Changed with docs (it is suprising how many enums 
in kdelibs don't have docs)

> > 2) Rather than looking for options_configure_keybinding if keys is true
> > and actions->count() > 0 add?
>
> i.e. not looking whether the action exists already? Since the addition of
> the action is controlled by a bool/flag already, I guess it's not needed
> indeed.

changed.

> > 3) createStandardKWindow() Name it something else? createKMainWindow()
> > createStandardKMainWindow()  createStandardWindow()  ?
>
> It's in the KMainWindow namespace already, so no need for KMainWindow in
> the name. But in fact this isn't "creating"... That's what the constructor
> did. This is more about activating a number of automatic features....
> setWindowFeatures? enableMainWindowFeatures?

Well if you have something that is "enable" you might think you can disable 
it.  I removing the K and changed it to createStandardWindow()  sense it can 
create actions and it could create the GUI  if Create is passed.

Attached is a new patch with the above changes and adds a mission param, 
notifications.

- -Benjamin Meyer

P.S.  Why can't the KeyDialog and Toolbar dialog be modal?

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

iD8DBQFAxJ/Z1rZ3LTw38vIRAiYgAJ4vKjsiiSLhV0+amGvZckxEDPzlLgCeOYNw
cTMq1gGe9FiMqPNMQUtSfJE=
=aqXH
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: text/x-diff
Size: 7170 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040607/eb9c2c9e/attachment.diff>


More information about the kde-core-devel mailing list