Exemplo n.º 1
0
 def load(self):
   self.winePath.clear()
   self.winePath.addItem("System [%s]" % swinelib.getWineVersion(None), None)
   for path in config.getValue("wine_paths"):
     version = swinelib.getWineVersion(path)
     self.winePath.addItem("%s [%s]" % (path, version), path)
   self.winePath.setCurrentIndex(max(0, self.winePath.findData(self.slot.getWinePath())))
Exemplo n.º 2
0
 def _winePathsChanged(self):
   selected = self.defaultWinePath.currentText()
   self.defaultWinePath.clear()
   self.defaultWinePath.addItem("System [%s]" % swinelib.getWineVersion(None), None)
   for path, version in self._winePaths().iteritems():
     self.defaultWinePath.addItem("%s [%s]" % (path, version), path)
   self.defaultWinePath.setCurrentIndex(max(0, self.defaultWinePath.findText(selected)))
Exemplo n.º 3
0
 def addWinePath(self):
   path = QFileDialog.getExistingDirectory(self, self.tr("Wine path selection"), "/")
   if not path:
     return
   path = unicode(path)
   version = swinelib.getWineVersion(path)
   if not version:
     raise SwineException(self.tr("No wine binary found in %s") % path)
   self._addWinePath(path, version)
   self._winePathsChanged()
Exemplo n.º 4
0
 def load(self):
   self._addWinePath("System", swinelib.getWineVersion(None))
   for path, version in config.getValue("wine_paths").iteritems():
     self._addWinePath(path, version)
   self._winePathsChanged()
   self.defaultWinePath.setCurrentIndex(max(0, self.defaultWinePath.findData(config.getValue("default_wine_path"))))
   self.allowMenuEntryCreation.setChecked(config.getValue("allow_menu_entry_creation"))
   self.autoImportShortcuts.setChecked(config.getValue("auto_import_shortcuts"))
   self.debugLine.setText(config.getValue("debug_line"))
   self.architecture.setCurrentIndex(max(0, self.architecture.findText(config.getValue("architecture"))))
Exemplo n.º 5
0
 def findWinePaths(self):
   for path in swinelib.findWinePaths():
     version = swinelib.getWineVersion(path)
     self._addWinePath(path, version)
   self._winePathsChanged()