Пример #1
0
    def apply_settings(self, event):
        playonlinux.SetSettings("PROXY_ENABLED",str(int(self.onglets.ProxyCheck.IsChecked())))
        if(self.onglets.ProxyCheck.IsChecked()):
            playonlinux.SetSettings("PROXY_URL",self.onglets.ProxyAdresse.GetValue().replace("http://",""))
            playonlinux.SetSettings("PROXY_PORT",self.onglets.ProxyPort.GetValue())
            playonlinux.SetSettings("PROXY_LOGIN",self.onglets.ProxyLogin.GetValue())
            playonlinux.SetSettings("PROXY_PASSWORD",self.onglets.ProxyPass.GetValue())


        wx.MessageBox(_("You must restart {0} for the changes to take effect.").format(os.environ["APPLICATION_TITLE"]), os.environ["APPLICATION_TITLE"], wx.OK)
        self.Destroy()
Пример #2
0
    def newExt(self, event):
        newext = wx.GetTextFromUser(_("What is the extension?"),
                                    os.environ["APPLICATION_TITLE"])
        re.sub(r'\W+', '', newext)
        playonlinux.SetSettings(newext, "", '_EXT_')

        self.generateExts()
Пример #3
0
    def installapp(self, event):
        if (self.live == 1):
            InstallApplication = "ExecLiveInstall"
        else:
            InstallApplication = self.list_apps.GetItemText(
                self.list_apps.GetSelection())

        if (InstallApplication == "about:creator"):
            self.EasterEgg = sp.egg(None, -1, "PlayOnLinux Conceptor")
            self.EasterEgg.Show()
            self.EasterEgg.Center(wx.BOTH)
        else:
            if (playonlinux.GetSettings("FIRST_INSTALL_DONE") == ""):
                wx.MessageBox(
                    _("When {0} installs a Windows program: \n\n - Leave the default location\n - Do not tick the checkbox 'Run the program' if asked."
                      ).format(os.environ["APPLICATION_TITLE"]),
                    _("Please read this"))
                playonlinux.SetSettings("FIRST_INSTALL_DONE", "TRUE")

            if (os.path.exists(Variables.playonlinux_rep +
                               "/configurations/listes/search")):
                content = codecs.open(
                    Variables.playonlinux_rep +
                    "/configurations/listes/search", "r",
                    "utf-8").read().split("\n")
                found = False
                for line in content:
                    split = line.split("~")
                    if (split[0] == InstallApplication):
                        found = True
                        break
                if (found == True):
                    if (len(split) <= 1):
                        self.UpdatePol(self)
                    else:
                        if (split[1] == "1"):
                            wx.MessageBox(
                                _("This program is currently in testing.\n\nIt might not work as expected. Your feedback, positive or negative, is specially important to improve this installer."
                                  ), _("Please read this"))
                        if (split[2] == "1"):
                            wx.MessageBox(
                                _("This program contains a protection against copy (DRM) incompatible with emulation.\nThe only workaround is to use a \"no-cd\" patch, but since those can also be used for piracy purposes we won't give any support on this matter."
                                  ), _("Please read this"))

            os.system("bash \"" + Variables.playonlinux_env +
                      "/bash/install\" \"" +
                      InstallApplication.encode("utf-8", "replace") + "\"&")

        self.Destroy()
        return
Пример #4
0
 def assign(self, event):
     old_version = playonlinux.GetSettings('VERSION',self.s_prefix)
     if old_version == '':
         old_version = 'System'
     version = self.general_elements["wineversion"].GetValue()
     if version != old_version:
         if (wx.YES == wx.MessageBox(_("Warning:\n\nAny program still running in this virtual drive will be terminated before Wine version is changed.\nAre you sure you want to continue?"), os.environ["APPLICATION_TITLE"], style = wx.YES_NO | wx.ICON_QUESTION)):
             self.evt_killall(event)
             if version != 'System':
                 playonlinux.SetSettings('VERSION',version,self.s_prefix)
             else:
                 playonlinux.DeleteSettings('VERSION',self.s_prefix)
         else:
             version = old_version
             self.general_elements["wineversion"].SetValue(old_version)
Пример #5
0
 def UpdatePol(self, event):
     self.DelApps()
     self.Parent.updater.check()
     playonlinux.SetSettings("LAST_TIMESTAMP", "0")
Пример #6
0
 def setwinedebug(self, event):
     new_winedebug = self.general_elements["winedebug"].GetValue()
     playonlinux.SetSettings('WINEDEBUG', new_winedebug, self.s_prefix)
Пример #7
0
 def set_open_in(self, event):
     new_open_in = self.display_elements["open_in"].GetValue()
     playonlinux.SetSettings('OPEN_IN', new_open_in, self.s_prefix)
Пример #8
0
    def reditExt(self, event):

        playonlinux.SetSettings(self.ext_selected,
                                self.app_installed.GetValue(), '_EXT_')
        self.generateExts()
Пример #9
0
 def assign(self, event):
     version = self.general_elements["wineversion"].GetValue()
     if (version != 'System'):
         playonlinux.SetSettings('VERSION', version, self.s_prefix)
     else:
         playonlinux.DeleteSettings('VERSION', self.s_prefix)