예제 #1
0
    def UpdateValues(self, selection):
        #print "Test"
        if(self.s_isPrefix == False):
            self.ChangeTitle(selection)
            #self.general_elements["wineversion"].SetValue(wine_versions.GetWineVersion(selection))
            #self.general_elements["wineversion"].Show()
            self.general_elements["wineprefix"].Show()
            self.general_elements["arguments"].Show()
            self.general_elements["arguments_text"].Show()

            #self.general_elements["name"].Show()
            #self.general_elements["wineversion_text"].Show()
            self.general_elements["wineprefix_text"].Show()
            self.general_elements["name"].SetEditable(True)

            #self.general_elements["name_text"].Show()
            self.general_elements["wineprefix"].SetValue(playonlinux.getPrefix(self.s_title))
            self.general_elements["arguments"].SetValue(playonlinux.getArgs(self.s_title))

            self.display_elements["folder_button"].SetLabel(_("Open program's directory"))
            if(os.path.exists(Variables.playonlinux_rep+"configurations/configurators/"+self.s_title)):
                self.configurator_title.Show()
                self.configurator_button.Show()
            else:
                self.configurator_title.Hide()
                self.configurator_button.Hide()
            self.configurator_title.SetLabel("{0} specific configuration".format(self.s_title.encode('utf-8','replace')))
            self.display_elements["pre_run_panel"].Show()
            self.display_elements["pre_run_text"].Show()
        else:
            self.s_prefix = selection
            self.s_title = selection
            #self.general_elements["wineversion"].Hide()
            self.general_elements["wineprefix"].Hide()
            #self.general_elements["name"].Hide()
            self.general_elements["name"].SetEditable(False)
            self.general_elements["name"].SetValue(self.s_prefix)
            self.general_elements["arguments"].Hide()
            self.general_elements["arguments_text"].Hide()
            #self.general_elements["wineversion_text"].Hide()
            self.general_elements["wineprefix_text"].Hide()
            #self.general_elements["name_text"].Hide()
            self.display_elements["folder_button"].SetLabel(_("Open virtual drive's directory"))
            self.configurator_title.Hide()
            self.configurator_button.Hide()
            self.display_elements["pre_run_panel"].Hide()
            self.display_elements["pre_run_text"].Hide()

        self.Refresh()
        self.elements = ["UseGLSL","DirectDrawRenderer","VideoMemorySize","OffscreenRenderingMode","RenderTargetModeLock","Multisampling","StrictDrawOrdering","MouseWarpOverride"]
        self.settings = wine.LoadRegValues(self.s_prefix,self.elements)
        #print self.settings
        self.get_current_settings("UseGLSL")
        self.get_current_settings("DirectDrawRenderer")
        self.get_current_settings("VideoMemorySize")
        self.get_current_settings("OffscreenRenderingMode")
        self.get_current_settings("RenderTargetModeLock")
        self.get_current_settings("Multisampling")
        self.get_current_settings("StrictDrawOrdering")
        self.get_current_settings("MouseWarpOverride")

        self.arch = playonlinux.GetSettings('ARCH',self.s_prefix)
        if(self.arch == ""):
            self.arch = "x86"

        self.UpdateVersions(self.arch)
        self.general_elements["winedebug"].SetValue(playonlinux.GetSettings("WINEDEBUG", self.s_prefix))
        try:
            self.display_elements["pre_run"].SetValue(open(os.environ["POL_USER_ROOT"]+"/configurations/pre_shortcut/"+self.s_title,'r').read())
        except:
            self.display_elements["pre_run"].SetValue("")
예제 #2
0
	def UpdateValues(self, selection):
		#print "Test"
		if(self.s_isPrefix == False):
			self.ChangeTitle(selection)
			#self.general_elements["wineversion"].SetValue(wine_versions.GetWineVersion(selection))
			#self.general_elements["wineversion"].Show()
			self.general_elements["wineprefix"].Show()
			self.general_elements["arguments"].Show()
			self.general_elements["arguments_text"].Show()
			
			#self.general_elements["name"].Show()
			#self.general_elements["wineversion_text"].Show()
			self.general_elements["wineprefix_text"].Show()
			self.general_elements["debug_text"].Show()
			self.general_elements["debug_check"].Show()
			self.general_elements["name"].SetEditable(True)
			
			#self.general_elements["name_text"].Show()
			self.general_elements["wineprefix"].SetValue(playonlinux.getPrefix(self.s_title))
			self.general_elements["arguments"].SetValue(playonlinux.getArgs(self.s_title))
			
			self.display_elements["folder_button"].SetLabel(_("Open program's directory"))
			self.general_elements["debug_check"].SetValue(playonlinux.GetDebugState(self.s_title))
			if(os.path.exists(Variables.playonlinux_rep+"configurations/configurators/"+self.s_title)):
				self.configurator_title.Show()
				self.configurator_button.Show()
			else:
				self.configurator_title.Hide()
				self.configurator_button.Hide()
			self.configurator_title.SetLabel(self.s_title+" specific configuration")
				
		else:
			self.s_prefix = selection
			self.s_title = selection
			#self.general_elements["wineversion"].Hide()
			self.general_elements["wineprefix"].Hide()
			#self.general_elements["name"].Hide()
			self.general_elements["name"].SetEditable(False)
			self.general_elements["name"].SetValue(self.s_prefix)
			self.general_elements["arguments"].Hide()
			self.general_elements["arguments_text"].Hide()			
			#self.general_elements["wineversion_text"].Hide()
			self.general_elements["wineprefix_text"].Hide()
			self.general_elements["debug_text"].Hide()
			self.general_elements["debug_check"].Hide()
			#self.general_elements["name_text"].Hide()
			self.display_elements["folder_button"].SetLabel(_("Open virtual drive's directory"))
			self.configurator_title.Hide()
			self.configurator_button.Hide()
		
		self.Refresh()
		self.elements = ["UseGLSL","DirectDrawRenderer","VideoMemorySize","OffscreenRenderingMode","RenderTargetModeLock","Multisampling","StrictDrawOrdering","MouseWarpOverride"]
		self.settings = wine.LoadRegValues(self.s_prefix,self.elements)
		#print self.settings
		self.get_current_settings("UseGLSL")
		self.get_current_settings("DirectDrawRenderer")
		self.get_current_settings("VideoMemorySize")
		self.get_current_settings("OffscreenRenderingMode")
		self.get_current_settings("RenderTargetModeLock")
		self.get_current_settings("Multisampling")
		self.get_current_settings("StrictDrawOrdering")
		self.get_current_settings("MouseWarpOverride")

		self.arch = playonlinux.GetSettings('ARCH',self.s_prefix)
		if(self.arch == ""):
			self.arch = "x86"
			
		self.UpdateVersions(self.arch)
예제 #3
0
    def UpdateValues(self, selection):
        # print "Test"
        if (self.s_isPrefix == False):
            self.ChangeTitle(selection)
            # self.general_elements["wineversion"].SetValue(wine_versions.GetWineVersion(selection))
            # self.general_elements["wineversion"].Show()
            self.general_elements["wineprefix"].Show()
            self.general_elements["arguments"].Show()
            self.general_elements["arguments_text"].Show()

            # self.general_elements["name"].Show()
            # self.general_elements["wineversion_text"].Show()
            self.general_elements["wineprefix_text"].Show()
            self.general_elements["name"].SetEditable(True)

            # self.general_elements["name_text"].Show()
            self.general_elements["wineprefix"].SetValue(
                playonlinux.getPrefix(self.s_title))
            self.general_elements["arguments"].SetValue(
                playonlinux.getArgs(self.s_title))

            self.display_elements["folder_button"].SetLabel(
                _("Open program's directory"))
            if not playonlinux.GetSettings("OPEN_IN", self.s_prefix):
                self.display_elements["open_in"].SetValue("xdg-open")
            else:
                self.display_elements["open_in"].SetValue(
                    playonlinux.GetSettings("OPEN_IN", self.s_prefix))

            if (os.path.exists(Variables.playonlinux_rep +
                               "configurations/configurators/" +
                               self.s_title)):
                self.configurator_title.Show()
                self.configurator_button.Show()
            else:
                self.configurator_title.Hide()
                self.configurator_button.Hide()
            self.configurator_title.SetLabel(
                "{0} specific configuration".format(self.s_title))
            self.display_elements["pre_run_panel"].Show()
            self.display_elements["pre_run_text"].Show()
        else:
            self.s_prefix = selection
            self.s_title = selection
            # self.general_elements["wineversion"].Hide()
            self.general_elements["wineprefix"].Hide()
            # self.general_elements["name"].Hide()
            self.general_elements["name"].SetEditable(False)
            self.general_elements["name"].SetValue(self.s_prefix)
            self.general_elements["arguments"].Hide()
            self.general_elements["arguments_text"].Hide()
            # self.general_elements["wineversion_text"].Hide()
            self.general_elements["wineprefix_text"].Hide()
            # self.general_elements["name_text"].Hide()
            self.display_elements["folder_button"].SetLabel(
                _("Open virtual drive's directory"))
            self.configurator_title.Hide()
            self.configurator_button.Hide()
            self.display_elements["pre_run_panel"].Hide()
            self.display_elements["pre_run_text"].Hide()

        self.Refresh()
        self.elements = [
            "UseGLSL", "DirectDrawRenderer", "VideoMemorySize",
            "OffscreenRenderingMode", "RenderTargetModeLock", "Multisampling",
            "StrictDrawOrdering", "MouseWarpOverride"
        ]
        self.settings = wine.LoadRegValues(self.s_prefix, self.elements)
        # print self.settings
        self.get_current_settings("UseGLSL")
        self.get_current_settings("DirectDrawRenderer")
        self.get_current_settings("VideoMemorySize")
        self.get_current_settings("OffscreenRenderingMode")
        self.get_current_settings("RenderTargetModeLock")
        self.get_current_settings("Multisampling")
        self.get_current_settings("StrictDrawOrdering")
        self.get_current_settings("MouseWarpOverride")

        self.arch = playonlinux.GetSettings('ARCH', self.s_prefix)
        if (self.arch == ""):
            self.arch = "x86"

        self.UpdateVersions(self.arch)
        self.general_elements["winedebug"].SetValue(
            playonlinux.GetSettings("WINEDEBUG", self.s_prefix))
        try:
            self.display_elements["pre_run"].SetValue(
                open(
                    os.environ["POL_USER_ROOT"] +
                    "/configurations/pre_shortcut/" + self.s_title,
                    'r').read())
        except:
            self.display_elements["pre_run"].SetValue("")
예제 #4
0
    def UpdateValues(self, selection):
        #print "Test"
        if (self.s_isPrefix == False):
            self.ChangeTitle(selection)
            #self.general_elements["wineversion"].SetValue(wine_versions.GetWineVersion(selection))
            #self.general_elements["wineversion"].Show()
            self.general_elements["wineprefix"].Show()
            self.general_elements["arguments"].Show()
            self.general_elements["arguments_text"].Show()

            #self.general_elements["name"].Show()
            #self.general_elements["wineversion_text"].Show()
            self.general_elements["wineprefix_text"].Show()
            self.general_elements["debug_text"].Show()
            self.general_elements["debug_check"].Show()
            self.general_elements["name"].SetEditable(True)

            #self.general_elements["name_text"].Show()
            self.general_elements["wineprefix"].SetValue(
                playonlinux.getPrefix(self.s_title))
            self.general_elements["arguments"].SetValue(
                playonlinux.getArgs(self.s_title))

            self.display_elements["folder_button"].SetLabel(
                _("Open program's directory"))
            self.general_elements["debug_check"].SetValue(
                playonlinux.GetDebugState(self.s_title))
            if (os.path.exists(Variables.playonlinux_rep +
                               "configurations/configurators/" +
                               self.s_title)):
                self.configurator_title.Show()
                self.configurator_button.Show()
            else:
                self.configurator_title.Hide()
                self.configurator_button.Hide()
            self.configurator_title.SetLabel(self.s_title +
                                             " specific configuration")

        else:
            self.s_prefix = selection
            self.s_title = selection
            #self.general_elements["wineversion"].Hide()
            self.general_elements["wineprefix"].Hide()
            #self.general_elements["name"].Hide()
            self.general_elements["name"].SetEditable(False)
            self.general_elements["name"].SetValue(self.s_prefix)
            self.general_elements["arguments"].Hide()
            self.general_elements["arguments_text"].Hide()
            #self.general_elements["wineversion_text"].Hide()
            self.general_elements["wineprefix_text"].Hide()
            self.general_elements["debug_text"].Hide()
            self.general_elements["debug_check"].Hide()
            #self.general_elements["name_text"].Hide()
            self.display_elements["folder_button"].SetLabel(
                _("Open virtual drive's directory"))
            self.configurator_title.Hide()
            self.configurator_button.Hide()

        self.Refresh()
        self.elements = [
            "UseGLSL", "DirectDrawRenderer", "VideoMemorySize",
            "OffscreenRenderingMode", "RenderTargetModeLock", "Multisampling",
            "StrictDrawOrdering", "MouseWarpOverride"
        ]
        self.settings = wine.LoadRegValues(self.s_prefix, self.elements)
        #print self.settings
        self.get_current_settings("UseGLSL")
        self.get_current_settings("DirectDrawRenderer")
        self.get_current_settings("VideoMemorySize")
        self.get_current_settings("OffscreenRenderingMode")
        self.get_current_settings("RenderTargetModeLock")
        self.get_current_settings("Multisampling")
        self.get_current_settings("StrictDrawOrdering")
        self.get_current_settings("MouseWarpOverride")

        self.arch = playonlinux.GetSettings('ARCH', self.s_prefix)
        if (self.arch == ""):
            self.arch = "x86"

        self.UpdateVersions(self.arch)