This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[RFC] tk_messageBox is evil...


Hi,

The following really makes me sad:

$ grep -r tk_messageBox * | wc -l
    103

Why? Because tk_messageBox is evil. It is application modal and does not
stay on top of all windows -- only its parent.

I have a basic reimplementation of tk_messageBox which is based on a
Dialog class, which plays nice with ManagedWin. This window is 100%
non-modal, and I think it should be used for all NON-modal dialogs (like
non-fatal errors and warnings).

Right now, it is pretty much the same as tk_messageBox, except that you
have to make your own dialog class. I've done a simple ErrorDialog which
is essentially "tk_messageBox -type ok -icon error -title TITLE -msg MSG",
where you can specify the MSG and TITLE (and icon, too).

Does this sound reasonable? Anyone want to see code? :-)
Keith


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]