X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a4c013b2b1c033e33da3f3bdfe03ab4f91eaf5c1..9896cf5ef76d288f30084786fe064c706002504a:/wxPython/wx/tools/XRCed/xrced.py?ds=sidebyside diff --git a/wxPython/wx/tools/XRCed/xrced.py b/wxPython/wx/tools/XRCed/xrced.py index 8b44b5e2cf..bdf5bedb59 100644 --- a/wxPython/wx/tools/XRCed/xrced.py +++ b/wxPython/wx/tools/XRCed/xrced.py @@ -65,10 +65,10 @@ class ScrolledMessageDialog(wxDialog): wxDialog.__init__(self, parent, -1, caption, pos, size) text = wxTextCtrl(self, -1, msg, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY) - text.SetFont(modernFont) + text.SetFont(g.modernFont()) dc = wxWindowDC(text) # !!! possible bug - GetTextExtent without font returns sysfont dims - w, h = dc.GetFullTextExtent(' ', modernFont)[:2] + w, h = dc.GetFullTextExtent(' ', g.modernFont())[:2] ok = wxButton(self, wxID_OK, "OK") text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok))) text.SetSize((w * 80 + 30, h * 40)) @@ -931,21 +931,23 @@ class App(wxApp): global debug # Process comand-line try: + opts = args = None opts, args = getopt.getopt(sys.argv[1:], 'dhiv') + for o,a in opts: + if o == '-h': + usage() + sys.exit(0) + elif o == '-d': + debug = True + elif o == '-v': + print 'XRCed version', version + sys.exit(0) + except getopt.GetoptError: if wxPlatform != '__WXMAC__': # macs have some extra parameters print >> sys.stderr, 'Unknown option' usage() sys.exit(1) - for o,a in opts: - if o == '-h': - usage() - sys.exit(0) - elif o == '-d': - debug = True - elif o == '-v': - print 'XRCed version', version - sys.exit(0) self.SetAppName('xrced') # Settings