Brian Kirsch wrote: > Sure, I was talking about the AccountPreference dialogs and the need for > them to be centered on the parent.
Actually, on Ubuntu (default window manager etc.), this happens
automatically like you'd expect.
I changed AccountsPreferencesDialog.py like so:
def OnTestAccount(self, evt):
+ win = Util.promptUserDialog(self, -1, 'prompt',
'message','default')
+ win.ShowModal()
(the lines marked + are new lines) and when I hit the Test button I get
a dialog centered on the accounts dialog. promptUserDialog is a custom
dialog deriving from wx.Dialog and the promptUserDialog does not call
any Center* methods.
If I change self above to None, the dialog is centered on the main
Chandler window.
So I believe that as long as you pass in the the parent, the dialog will
automatically be centered on parent. And if you didn't have the parent,
you would not be able to CenterOnParent() anyway. This behavior would
have to be checked on Windows and Mac.
So, I am still advocating not calling any Center* methods on any dialogs.
--
Heikki Toivonen
signature.asc
Description: OpenPGP digital signature
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Open Source Applications Foundation "Design" mailing list http://lists.osafoundation.org/mailman/listinfo/design
