Player path is now properly set on first gui run

This commit is contained in:
Uriziel 2013-01-16 17:11:53 +01:00
parent c0c890936d
commit 43a79fcbc6
2 changed files with 4 additions and 2 deletions

View File

@ -148,6 +148,7 @@ class ConfigurationGetter(object):
elif(GuiConfiguration):
gc = GuiConfiguration(self._config)
gc.setAvailablePaths(self._playerFactory.getAvailablePlayerPaths())
gc.run()
return gc.getProcessedConfiguration()
def __wasOptionChanged(self, parser, section, option):

View File

@ -11,14 +11,15 @@ class GuiConfiguration:
self.config = config
self._availablePlayerPaths = []
self.closedAndNotSaved = False
def run(self):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_title(getMessage("en", "config-window-title"))
self.window.connect("delete_event", lambda w, e: self._windowClosed())
vbox = gtk.VBox(False, 0)
self.window.add(vbox)
vbox.show()
self._addLabeledEntries(config, vbox)
self._addLabeledEntries(self.config, vbox)
self.hostEntry.select_region(0, len(self.hostEntry.get_text()))
button = gtk.Button(stock=gtk.STOCK_SAVE)
button.connect("clicked", lambda w: self._saveDataAndLeave())