204
207
self.Bind(wx.EVT_TIMER, self.AutoReload, self.timer)
205
208
self.timer.Start(200)
210
#Pop-up menu for game list: beginning
211
wx.EVT_TREE_ITEM_MENU(self, 105, self.RMBInGameList)
212
wx.EVT_MENU(self, 230, self.RWineConfigurator)
213
wx.EVT_MENU(self, 231, self.RRegistryEditor)
214
wx.EVT_MENU(self, 232, self.GoToAppDir)
215
wx.EVT_MENU(self, 233, self.ChangeIcon)
216
wx.EVT_MENU(self, 234, self.UninstallGame)
217
wx.EVT_MENU(self, 235, self.RKill)
218
wx.EVT_MENU(self, 500, self.donate)
220
def RMBInGameList(self, event):
221
self.GameListPopUpMenu = wx.Menu()
223
self.ConfigureWine = wx.MenuItem(self.GameListPopUpMenu, 230, _("Configure wine"))
224
self.ConfigureWine.SetBitmap(wx.Bitmap(Variables.playonlinux_env+"/etc/menu/run.png"))
225
self.GameListPopUpMenu.AppendItem(self.ConfigureWine)
227
self.RegistryEditor = wx.MenuItem(self.GameListPopUpMenu, 231, _("Registry Editor"))
228
self.RegistryEditor.SetBitmap(wx.Bitmap(Variables.playonlinux_env+"/etc/menu/regedit.png"))
229
self.GameListPopUpMenu.AppendItem(self.RegistryEditor)
231
self.GotoAppDir = wx.MenuItem(self.GameListPopUpMenu, 232, _("Go to the application directory"))
232
self.GotoAppDir.SetBitmap(wx.Bitmap(Variables.playonlinux_env+"/etc/onglet/user-desktop.png"))
233
self.GameListPopUpMenu.AppendItem(self.GotoAppDir)
235
self.ChangeIcon = wx.MenuItem(self.GameListPopUpMenu, 233, _("Set the icon"))
236
self.ChangeIcon.SetBitmap(wx.Bitmap(Variables.playonlinux_env+"/etc/playonlinux16.png"))
237
self.GameListPopUpMenu.AppendItem(self.ChangeIcon)
239
self.ChangeIcon = wx.MenuItem(self.GameListPopUpMenu, 234, _("Remove"))
240
self.ChangeIcon.SetBitmap(wx.Bitmap(Variables.playonlinux_env+"/etc/menu/options.png"))
241
self.GameListPopUpMenu.AppendItem(self.ChangeIcon)
243
self.ChangeIcon = wx.MenuItem(self.GameListPopUpMenu, 235, _("Close this application"))
244
self.ChangeIcon.SetBitmap(wx.Bitmap(Variables.playonlinux_env+"/etc/menu/wineserver.png"))
245
self.GameListPopUpMenu.AppendItem(self.ChangeIcon)
247
self.PopupMenu(self.GameListPopUpMenu, event.GetPoint())
249
def donate(self, event):
250
webbrowser.open("http://www.playonlinux.com/donate.html");
252
def RWineConfigurator(self, event):
253
self.RConfigure(_("Configure wine"), "nothing")
255
def RKill(self, event):
256
self.RConfigure(_("KillApp"), "nothing")
258
def RKillAll(self, event):
259
os.system("bash \""+Variables.playonlinux_env+"/bash/killall\"&")
261
def RRegistryEditor(self, event):
262
self.RConfigure(_("Registry Editor"), "nothing")
264
def GoToAppDir(self, event):
265
game_exec = self.list_game.GetItemText(self.list_game.GetSelection())
266
self.read = open(Variables.playonlinux_rep+"configurations/installed/"+game_exec,"r").readlines()
268
if not len(self.read):
269
print "err: Empty launcher"
273
while(self.i < len(self.read)):
274
if("cd \"" in self.read[self.i]):
278
if len(self.read) == (self.i):
279
print "err: No path in launcher"
282
AppDir = self.read[self.i][3:]
284
os.system("xdg-open "+AppDir)
286
def ChangeIcon(self, event):
287
self.IconDir = Variables.homedir+"/.local/share/icons/"
288
self.SupprotedIconExt = "All|*.xpm;*.XPM;*.png;*.PNG;*.ico;*.ICO;*.jpg;*.JPG;*.jpeg;*.JPEG;*.bmp;*.BMP\
289
\|XPM (*.xpm)|*.xpm;*.XPM\
290
\|PNG (*.png)|*.png;*.PNG\
291
\|ICO (*.ico)|*.ico;*.ICO\
292
\|JPG (*.jpg)|*.jpg;*.JPG\
293
\|BMP (*.bmp)|*.bmp;*.BMP\
294
\|JPEG (*.jpeg)|*.jpeg;*JPEG"
295
self.IconDialog = wx.FileDialog(self, "Choose a icon file", self.IconDir, "", self.SupprotedIconExt, wx.OPEN | wx.FD_PREVIEW)
296
if self.IconDialog.ShowModal() == wx.ID_OK:
297
self.IconFilename=self.IconDialog.GetFilename()
298
self.IconDirname=self.IconDialog.GetDirectory()
299
IconFile=os.path.join(self.IconDirname,self.IconFilename)
300
self.RConfigure("IconChange", IconFile)
301
self.IconDialog.Destroy()
302
#Pop-up menu for game list: ending
208
304
def Select(self, event):
209
305
game_exec = self.list_game.GetItemText(self.list_game.GetSelection())
319
424
self.aboutBox.SetDescription(_("Run your Windows programs on Linux !"))
320
425
self.aboutBox.SetCopyright(_("(C) PlayOnLinux team 2008\nUnder GPL licence version 3"))
321
426
self.aboutBox.AddDeveloper("Developer and Website : Tinou (Pâris Quentin)")
322
self.aboutBox.AddDeveloper("Scriptors : MulX (Petit Aymeric), GNU_Raziel")
427
self.aboutBox.AddDeveloper("Scriptors : MulX (Petit Aymeric), GNU_Raziel, NSLW")
323
428
self.aboutBox.AddDeveloper("Packager : MulX (Petit Aymeric)")
324
429
self.aboutBox.AddDeveloper("Script Creator : Zoloom (Cassarin-Grand Arthur)")
325
self.aboutBox.AddDeveloper("Helped for the program : kiplantt")
430
self.aboutBox.AddDeveloper("Helped for the program : kiplantt, NSLW")
326
431
self.aboutBox.AddArtist("Icons are provided by Tango Desktop Project")
327
432
self.aboutBox.SetWebSite("http://www.playonlinux.com")
328
433
self.aboutBox.SetLicence(open(Variables.playonlinux_env+"/LICENCE",'r').read())