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

Method __init__

python/mainwindow.py:175–493  ·  view source on GitHub ↗
(self, parent, id, title)

Source from the content-addressed store, hash-verified

173
174class MainWindow(wx.Frame):
175 def __init__(self, parent, id, title):
176
177 wx.Frame.__init__(self, parent, 1000, title, size=(515, 450))
178 self.SetMinSize((400, 400))
179 self.SetIcon(wx.Icon(Variables.playonlinux_env + "/etc/playonlinux.png", wx.BITMAP_TYPE_ANY))
180
181 self.windowList = {}
182 self.registeredPid = []
183 self.windowOpened = 0
184
185 # Manage updater
186 self.updater = POLWeb()
187 self.updater.start()
188
189 # These lists contain the dock links and images
190 self.menuElem = {}
191 self.menuImage = {}
192
193 # Catch CTRL+C
194 signal.signal(signal.SIGINT, self.ForceClose)
195
196 # Window size
197 try:
198 self.windowWidth = int(playonlinux.GetSettings("MAINWINDOW_WIDTH"))
199 self.windowHeight = int(playonlinux.GetSettings("MAINWINDOW_HEIGHT"))
200 self.SetSize((self.windowWidth, self.windowHeight))
201 except:
202 self.windowWidth = 500
203 self.windowHeight = 450
204
205 # Window position
206 try:
207 self.windowx = int(playonlinux.GetSettings("MAINWINDOW_X"))
208 self.windowy = int(playonlinux.GetSettings("MAINWINDOW_Y"))
209 self.screen_width = wx.Display().GetGeometry()[2]
210 self.screen_height = wx.Display().GetGeometry()[3]
211
212 if (self.screen_width >= self.windowx and self.screen_height >= self.windowy):
213 self.SetPosition((self.windowx, self.windowy))
214 else:
215 self.Center(wx.BOTH)
216 except:
217 self.Center(wx.BOTH)
218
219 try:
220 self.iconSize = int(playonlinux.GetSettings("ICON_SIZE"))
221 except:
222 self.iconSize = 32
223
224 self.images = wx.ImageList(self.iconSize, self.iconSize)
225 self.imagesEmpty = wx.ImageList(1, 1)
226
227 self.sendAlertStr = None
228
229 ## Fonts
230 if (os.environ["POL_OS"] == "Mac"):
231 self.fontTitre = wx.Font(14, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False, "",
232 wx.FONTENCODING_DEFAULT)

Callers

nothing calls this directly

Calls 8

UpdateSearchHackSizeMethod · 0.95
ReloadMethod · 0.95
POLWebClass · 0.85
PanelManagerClass · 0.85
DisplayMethod · 0.80
AddPaneMethod · 0.80
restorePositionMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected