added xmlFlags and -i option to turn off wxXRC_USE_LOCALE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -7,6 +7,8 @@ Dealing with non-specified required values (set to defaults, if exist).
|
|||||||
|
|
||||||
Added 'minsize' parameter of sizeritem.
|
Added 'minsize' parameter of sizeritem.
|
||||||
|
|
||||||
|
Added '-i' option to turn off translations and use international characters.
|
||||||
|
|
||||||
0.0.9-5
|
0.0.9-5
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
# RCS-ID: $Id$
|
# RCS-ID: $Id$
|
||||||
|
|
||||||
from wxPython.wx import *
|
from wxPython.wx import *
|
||||||
|
from wxPython.xrc import *
|
||||||
|
|
||||||
# Global constants
|
# Global constants
|
||||||
|
|
||||||
@@ -28,5 +29,6 @@ class Globals:
|
|||||||
testWin = None
|
testWin = None
|
||||||
testWinPos = wxDefaultPosition
|
testWinPos = wxDefaultPosition
|
||||||
currentXXX = None
|
currentXXX = None
|
||||||
|
xmlFlags = wxXRC_USE_LOCALE | wxXRC_NO_SUBCLASSING
|
||||||
|
|
||||||
g = Globals()
|
g = Globals()
|
||||||
|
@@ -11,21 +11,19 @@ xrced -- Simple resource editor for XRC format used by wxWindows/wxPython
|
|||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
xrced [ -h ] [ -v ] [ XRC-file ]
|
xrced [ -h ] [ -i ] [ -v ] [ XRC-file ]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
-h Print short usage info.
|
-h output short usage info and exit
|
||||||
|
|
||||||
-v Print version info.
|
-i use international character set instead of translations
|
||||||
|
|
||||||
|
-v output version info and exit
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
from globals import *
|
from globals import *
|
||||||
|
|
||||||
# Additional wx modules
|
|
||||||
from wxPython.xrc import *
|
|
||||||
from wxPython.html import wxHtmlWindow
|
|
||||||
import os, sys, getopt, re, traceback
|
import os, sys, getopt, re, traceback
|
||||||
|
|
||||||
# Local modules
|
# Local modules
|
||||||
@@ -917,14 +915,14 @@ Homepage: http://xrced.sourceforge.net\
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
def usage():
|
def usage():
|
||||||
print >> sys.stderr, 'usage: xrced [-dvh] [file]'
|
print >> sys.stderr, 'usage: xrced [-dhlv] [file]'
|
||||||
|
|
||||||
class App(wxApp):
|
class App(wxApp):
|
||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
global debug
|
global debug
|
||||||
# Process comand-line
|
# Process comand-line
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(sys.argv[1:], 'dvh')
|
opts, args = getopt.getopt(sys.argv[1:], 'dhiv')
|
||||||
except getopt.GetoptError:
|
except getopt.GetoptError:
|
||||||
if wxPlatform != '__WXMAC__': # macs have some extra parameters
|
if wxPlatform != '__WXMAC__': # macs have some extra parameters
|
||||||
print >> sys.stderr, 'Unknown option'
|
print >> sys.stderr, 'Unknown option'
|
||||||
@@ -936,6 +934,8 @@ class App(wxApp):
|
|||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
elif o == '-d':
|
elif o == '-d':
|
||||||
debug = True
|
debug = True
|
||||||
|
elif o == '-i':
|
||||||
|
g.xmlFlags &= ~wxXRC_USE_LOCALE
|
||||||
elif o == '-v':
|
elif o == '-v':
|
||||||
print 'XRCed version', version
|
print 'XRCed version', version
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
@@ -990,7 +990,7 @@ class App(wxApp):
|
|||||||
wc.WriteInt('sashPos', conf.sashPos)
|
wc.WriteInt('sashPos', conf.sashPos)
|
||||||
wc.WriteInt('panelWidth', conf.panelWidth)
|
wc.WriteInt('panelWidth', conf.panelWidth)
|
||||||
wc.WriteInt('panelHeight', conf.panelHeight)
|
wc.WriteInt('panelHeight', conf.panelHeight)
|
||||||
wc.WriteInt('nopanic', 1)
|
wc.WriteInt('nopanic', True)
|
||||||
wc.Flush()
|
wc.Flush()
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
Reference in New Issue
Block a user