MCPcopy Create free account
hub / github.com/PlayOnLinux/POL-POM-4 / POL_SetupFrame

Class POL_SetupFrame

python/setupwindow/POL_SetupFrame.py:41–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39from setupwindow.Downloader import Downloader
40
41class POL_SetupFrame(PlayOnLinuxWindow):
42 def __init__(self, parent, title, POL_SetupWindowID, Arg1, Arg2, Arg3):
43 PlayOnLinuxWindow.__init__(self, None, -1, title=title,
44 style=wx.CLOSE_BOX | wx.CAPTION | wx.MINIMIZE_BOX | wx.RESIZE_BORDER,
45 size=(520, 390 + Variables.windows_add_size))
46 self.bash_pid = int(POL_SetupWindowID)
47 self.last_time = int(round(time.time() * 1000))
48 self.ProtectedWindow = False
49
50 # Le fichier de lecture
51
52 if (Arg1 == "None"):
53 self.small_image = wx.Bitmap(Variables.playonlinux_env + "/resources/images/setups/default/top.png")
54 else:
55 self.small_image = wx.Bitmap(Arg1)
56
57 self.small_x = 520 - self.small_image.GetWidth()
58
59 if (Arg2 == "None"):
60 if (os.environ["POL_OS"] != "Mac"):
61 self.big_image = wx.Bitmap(
62 Variables.playonlinux_env + "/resources/images/setups/default/playonlinux.jpg")
63 else:
64 self.big_image = wx.Bitmap(Variables.playonlinux_env + "/resources/images/setups/default/playonmac.jpg")
65 else:
66 self.big_image = wx.Bitmap(Arg2)
67
68 if (Arg3 == "protect"):
69 self.ProtectedWindow = True
70
71 self._createUI()
72
73 self.Bind(wx.EVT_CLOSE, self.Cancel)
74
75 def _createHeader(self):
76 self.header = wx.Panel(self, -1, size=(522, 65))
77 self.header.SetBackgroundColour((255, 255, 255))
78 self.top_image = wx.StaticBitmap(self.header, -1, self.small_image, (self.small_x, 0), wx.DefaultSize)
79 self.titre_header = wx.StaticText(self.header, -1, _('{0} Wizard').format(os.environ["APPLICATION_TITLE"]),
80 pos=(5, 5), size=(340, 356), style=wx.ST_NO_AUTORESIZE)
81 self.titre_header.SetFont(self.fontTitle)
82 self.titre_header.SetForegroundColour((0, 0, 0))
83 self.mainSizer.Add(self.header, 0, wx.EXPAND)
84 self.titre = wx.StaticText(self.header, -1, "", pos=(20, 30), size=(340, 356), style=wx.ST_NO_AUTORESIZE)
85 self.titre.SetForegroundColour((0, 0, 0))
86
87 def _createFooter(self):
88 self.footer = wx.Panel(self, -1)
89 self.footerSizer = wx.BoxSizer(wx.HORIZONTAL)
90 self.footer.SetSizer(self.footerSizer)
91
92 self.mainSizer.Add(self.footer, 0, wx.EXPAND)
93 self.mainSizer.AddSpacer(10)
94
95 # Buttons
96 self.footerSizer.AddSpacer(10)
97
98

Callers 1

readActionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected