Remember expanded paths in GuiConfig (v2)
This commit is contained in:
parent
1f1ef4cf1b
commit
8402a65c84
@ -1,6 +1,7 @@
|
|||||||
from PySide import QtCore, QtGui
|
from PySide import QtCore, QtGui
|
||||||
from PySide.QtCore import QSettings, Qt, QCoreApplication
|
from PySide.QtCore import QSettings, Qt, QCoreApplication
|
||||||
from PySide.QtGui import QApplication, QLineEdit, QCursor, QLabel, QCheckBox, QDesktopServices, QIcon
|
from PySide.QtGui import QApplication, QLineEdit, QCursor, QLabel, QCheckBox, QDesktopServices, QIcon
|
||||||
|
from syncplay.players.playerFactory import PlayerFactory
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@ -81,10 +82,16 @@ 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 != "" and os.path.isfile(playerpath):
|
if playerpath != None and playerpath != "":
|
||||||
foundpath = playerpath
|
if not os.path.isfile(playerpath):
|
||||||
self.executablepathCombobox.addItem(foundpath)
|
expandedpath = PlayerFactory().getExpandedPlayerPathByPath(playerpath)
|
||||||
|
if expandedpath != None and 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)):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user