Matthieu Weber wrote:
Is it possible to make the ConfirmBox (and AlertBox, and so on) modal?
Meaning that the ConfirmBox.show() function doesn't return unless the
user has chosen between OK or Cancel?
...
So it seems that the eventhandlers are messed up at some point... It
would make my life sooo much easier if it was possible to have modal
dialogs (btw, dialogs are modal on most of the GUI I know, so it's not
unreasonable to ask this). Is it possible to do so?

I think with some work it should be possible to get Freevo dialoge boxes to behave this way. Perhaps we could have the show() method wait for an apropriate event. In any case, the way it is now you must use a callback function to continue in your code. Here is an example from src/directory.py, check_password_and_build() method:


pb = PasswordInputBox(text=_('Enter Password'), handler=self.pass_cmp_cp)
pb.show()
else:
self.build(arg=arg, menuw=menuw)



def pass_cmp_cb(self, word=None):


We pass a handler to the PasswordInputBox, then show() it. The check_password_and_build() method completes and does nothing else. When the user presses ENTER (or whatever) the callback function pass_cmp_cb() continues on with the code. This was the easiest way to impliment popups in Freevo. I am sure with some work it could be changed but I don't have the time or will for that. If anyone else feels like it go ahead. :) I would rather spend time on pyui integration or similar.

-Rob (tired of building a UI toolkit from scratch)



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to