(Do not) Remember expanded paths in GuiConfig [Rollback]

This commit is contained in:
Etoh 2013-10-14 02:09:12 +01:00
parent f94d60c837
commit fbeb69f5cd

View File

@ -81,18 +81,10 @@ class ConfigDialog(QtGui.QDialog):
playerpathlist = list(set([os.path.normcase(path) for path in set(playerpathlist + savedPlayers)])) playerpathlist = list(set([os.path.normcase(path) for path in set(playerpathlist + savedPlayers)]))
settings.endGroup() settings.endGroup()
foundpath = "" foundpath = ""
if playerpath != None and playerpath != "": if playerpath != None and playerpath != "" and os.path.isfile(playerpath):
if not os.path.isfile(playerpath): foundpath = playerpath
from syncplay.players.playerFactory import PlayerFactory self.executablepathCombobox.addItem(foundpath)
self._playerFactory = PlayerFactory()
expandedpath = self._playerFactory.getPlayerByPath(playerpath).getExpandedPath(playerpath)
if os.path.isfile(expandedpath):
playerpath = expandedpath
if os.path.isfile(playerpath):
foundpath = playerpath
self.executablepathCombobox.addItem(foundpath)
for path in playerpathlist: for path in playerpathlist:
if(os.path.isfile(path) and os.path.normcase(path) != os.path.normcase(foundpath)): if(os.path.isfile(path) and os.path.normcase(path) != os.path.normcase(foundpath)):