forked from geraldspreer/the-maker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
newVersionDialog.py
executable file
·123 lines (102 loc) · 3.79 KB
/
newVersionDialog.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
# 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 xrcNewVersionDialog(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, "NewVersionDialog")
self.PostCreate(pre)
# create attributes for the named items in this container
self.StaticText = xrc.XRCCTRL(self, "StaticText")
self.InfoText = xrc.XRCCTRL(self, "InfoText")
self.Download = xrc.XRCCTRL(self, "Download")
self.Cancel = xrc.XRCCTRL(self, "Cancel")
# ------------------------ Resource data ----------------------
def __init_resources():
global __res
__res = xrc.EmptyXmlResource()
wx.FileSystem.AddHandler(wx.MemoryFSHandler())
newVersionDialog_xrc = '''\
<?xml version="1.0" ?><resource>
<object class="wxDialog" name="NewVersionDialog">
<title>Update Info</title>
<centered>1</centered>
<size>640, 320</size>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxPanel">
<object class="wxStaticText" name="StaticText">
<label/>
<pos>10,20</pos>
<size>500, 20</size>
</object>
</object>
<minsize>500,60</minsize>
</object>
<object class="sizeritem">
<object class="wxTextCtrl" name="InfoText">
<value>This is some information about the new features</value>
<style>wxTE_MULTILINE</style>
</object>
<option>1</option>
<flag>wxEXPAND|wxGROW</flag>
</object>
</object>
<option>1</option>
<flag>wxEXPAND|wxGROW</flag>
</object>
<object class="sizeritem">
<object class="wxPanel">
<object class="wxButton" name="Download">
<label>Download</label>
<default>1</default>
<pos>530, 10</pos>
<size/>
</object>
<object class="wxButton" name="Cancel">
<label>Cancel</label>
<default>0</default>
<pos>450, 10</pos>
</object>
</object>
<option>0</option>
<flag>wxEXPAND</flag>
<minsize>640, 40</minsize>
</object>
</object>
<exstyle/>
</object>
</resource>'''
wx.MemoryFSHandler.AddFile('XRC/newVersionDialog/newVersionDialog_xrc', newVersionDialog_xrc)
__res.Load('memory:XRC/newVersionDialog/newVersionDialog_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
_("Update Info")
_("This is some information about the new features")
_("Download")
_("Cancel")