GUI starts properly when ConfigurationWindow wasn't executed
This commit is contained in:
parent
ed4c8d1674
commit
c925515249
@ -8,6 +8,8 @@ from syncplay.players.playerFactory import PlayerFactory
|
||||
import codecs
|
||||
try:
|
||||
from syncplay.ui.GuiConfiguration import GuiConfiguration
|
||||
from PySide import QtGui #@UnresolvedImport
|
||||
from PySide.QtCore import Qt, QCoreApplication
|
||||
except ImportError:
|
||||
GuiConfiguration = None
|
||||
|
||||
@ -243,6 +245,8 @@ class ConfigurationGetter(object):
|
||||
self._loadRelativeConfiguration()
|
||||
if(not self._config['noGui']):
|
||||
from syncplay.vendor import qt4reactor
|
||||
if QCoreApplication.instance() is None:
|
||||
self.app = QtGui.QApplication(sys.argv)
|
||||
qt4reactor.install()
|
||||
return self._config
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide.QtCore import QSettings, Qt
|
||||
from PySide.QtCore import QSettings, Qt, QCoreApplication
|
||||
from PySide.QtGui import QApplication, QLineEdit, QCursor, QLabel, QCheckBox, QDesktopServices, QIcon
|
||||
|
||||
import os
|
||||
@ -12,7 +12,8 @@ class GuiConfiguration:
|
||||
self._availablePlayerPaths = []
|
||||
|
||||
def run(self):
|
||||
self.app = QtGui.QApplication(sys.argv)
|
||||
if QCoreApplication.instance() is None:
|
||||
self.app = QtGui.QApplication(sys.argv)
|
||||
dialog = ConfigDialog(self.config, self._availablePlayerPaths)
|
||||
dialog.exec_()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user