From 43a79fcbc6dae096a8cbdc6d0441b7b2594c7252 Mon Sep 17 00:00:00 2001 From: Uriziel Date: Wed, 16 Jan 2013 17:11:53 +0100 Subject: [PATCH] Player path is now properly set on first gui run --- syncplay/ui/ConfigurationGetter.py | 1 + syncplay/ui/GuiConfiguration.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/syncplay/ui/ConfigurationGetter.py b/syncplay/ui/ConfigurationGetter.py index 563217b..681635f 100644 --- a/syncplay/ui/ConfigurationGetter.py +++ b/syncplay/ui/ConfigurationGetter.py @@ -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): diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index 3190860..0d6ffa9 100644 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -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())