win.setWindowIcon(qt.QIcon("%s/starcal2.png" % pixDir)) vboxL = qt.QVBoxLayout() vboxL.setMargin(0) win.setLayout(vboxL) langHbox = HBox() langHbox.addWidget(qt.QLabel("Select Language:")) importCheckb = None oldVersion = getOldVersion() if oldVersion and "1.5.0" < oldVersion < "1.6.0": ## FIXME importCheckb = qt.QCheckBox("Import configurations from %s %s" % (APP_DESC, oldVersion)) importCheckb.connect( importCheckb, qc.SIGNAL("stateChanged (int)"), lambda state: langHbox.setEnabled(state != qc.Qt.Checked) ) importCheckb.setCheckState(qc.Qt.Checked) vboxL.addWidget(importCheckb) langCombo = qt.QComboBox() for fname in os.listdir(langDir): fpath = join(langDir, fname) if not os.path.isfile(fpath): continue text = open(fpath).read().strip() if fname == "default": langDefaultCode = text continue langName = text.split("\n")[0]