forked from geraldspreer/the-maker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makerErrorReport.py
executable file
·129 lines (108 loc) · 3.94 KB
/
makerErrorReport.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# This file was automatically generated by pywxrc, do not edit by hand.
# -*- coding: UTF-8 -*-
import wx
import wx.xrc as xrc
__res = None
def get_resources():
""" This function provides access to the XML resources in this module."""
global __res
if __res == None:
__init_resources()
return __res
class xrcErrorDialog(wx.Dialog):
def PreCreate(self, pre):
""" This function is called during the class's initialization.
Override it for custom setup before the window is created usually to
set additional window styles using SetWindowStyle() and SetExtraStyle()."""
pass
def __init__(self, parent):
# Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
pre = wx.PreDialog()
self.PreCreate(pre)
get_resources().LoadOnDialog(pre, parent, "ErrorDialog")
self.PostCreate(pre)
# create attributes for the named items in this container
self.Label1 = xrc.XRCCTRL(self, "Label1")
self.ErrorText = xrc.XRCCTRL(self, "ErrorText")
self.Report = xrc.XRCCTRL(self, "Report")
self.Cancel = xrc.XRCCTRL(self, "Cancel")
# ------------------------ Resource data ----------------------
def __init_resources():
global __res
__res = xrc.EmptyXmlResource()
wx.FileSystem.AddHandler(wx.MemoryFSHandler())
makerErrorDialog_xrc = '''\
<?xml version="1.0" ?><resource>
<object class="wxDialog" name="ErrorDialog">
<title>Error Report</title>
<centered>1</centered>
<pos>0,0</pos>
<size>640, 340</size>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxPanel">
<object class="wxStaticBitmap">
<bitmap stock_id="wxART_ERROR"/>
<pos>10, 2</pos>
</object>
<object class="wxStaticText" name="Label1">
<label>Here are the details:</label>
<pos>48, 5</pos>
<size>400, 30</size>
</object>
</object>
</object>
<object class="sizeritem">
<object class="wxTextCtrl" name="ErrorText">
<size>320, 240</size>
<style>wxTE_MULTILINE|wxSIMPLE_BORDER</style>
<fg>#C70202</fg>
</object>
<option>1</option>
<flag>wxGROW</flag>
<minsize>322, 200</minsize>
</object>
</object>
<option>1</option>
<flag>wxGROW</flag>
</object>
<object class="sizeritem">
<object class="wxPanel">
<object class="wxButton" name="Report">
<label>Report</label>
<default>0</default>
<pos>540, 0</pos>
<size>80, 40</size>
</object>
<object class="wxButton" name="Cancel">
<label>Close</label>
<default>1</default>
<pos>450, 0</pos>
<size>80, 40</size>
</object>
</object>
<option>0</option>
<flag>wxEXPAND</flag>
<minsize>640, 50</minsize>
</object>
</object>
</object>
</resource>'''
wx.MemoryFSHandler.AddFile('XRC/makerErrorDialog/makerErrorDialog_xrc', makerErrorDialog_xrc)
__res.Load('memory:XRC/makerErrorDialog/makerErrorDialog_xrc')
# ----------------------- Gettext strings ---------------------
def __gettext_strings():
# This is a dummy function that lists all the strings that are used in
# the XRC file in the _("a string") format to be recognized by GNU
# gettext utilities (specificaly the xgettext utility) and the
# mki18n.py script. For more information see:
# http://wiki.wxpython.org/index.cgi/Internationalization
def _(str): pass
_("Error Report")
_("Here are the details:")
_("Report")
_("Close")