commit
a73a2155af
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -1,8 +1,11 @@
|
|||
# python
|
||||
*.pyc
|
||||
*.pyo
|
||||
__pycache__
|
||||
|
||||
/images/
|
||||
/.idea/
|
||||
/Rare/__pycache__/
|
||||
/Scripts/CountLines.sh
|
||||
*/__pycache__/
|
||||
/build/
|
||||
/dist/
|
||||
/Rare.egg-info/
|
||||
|
|
|
@ -46,7 +46,7 @@ def main():
|
|||
main()
|
||||
|
||||
except ValueError:
|
||||
logger.info("You ar not logged in. Open Login Window")
|
||||
logger.info("You are not logged in. Open Login Window")
|
||||
login_window = LoginWindow(core)
|
||||
if not login_window.login():
|
||||
return
|
||||
|
|
|
@ -5,11 +5,11 @@ from Rare.Tabs import SettingsTab, UpdateTab, GameListInstalled, GameListUninsta
|
|||
|
||||
class MainWindow(QMainWindow):
|
||||
|
||||
def __init__(self, core):
|
||||
def __init__(self, core, offline):
|
||||
super().__init__()
|
||||
self.setWindowTitle("Rare - GUI for legendary-gl")
|
||||
self.setGeometry(0, 0, 1200, 900)
|
||||
self.setCentralWidget(TabWidget(core))
|
||||
self.setCentralWidget(TabWidget(core, offline))
|
||||
self.show()
|
||||
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ class UninstalledGameWidget(QWidget):
|
|||
pixmap = pixmap.scaled(120, 160)
|
||||
self.image = QLabel()
|
||||
self.image.setPixmap(pixmap)
|
||||
self.layout.addWidget(self.image)
|
||||
|
||||
self.child_layout = QVBoxLayout()
|
||||
|
||||
|
@ -62,7 +63,6 @@ class UninstalledGameWidget(QWidget):
|
|||
self.child_layout.addWidget(self.version_label)
|
||||
self.child_layout.addWidget(self.install_button)
|
||||
self.child_layout.addStretch(1)
|
||||
self.layout.addWidget(self.image)
|
||||
self.layout.addLayout(self.child_layout)
|
||||
|
||||
self.layout.addStretch(1)
|
||||
|
|
|
@ -87,5 +87,5 @@ def get_lang():
|
|||
logger.info("Found locale in Legendary config: " + legendaryConfig.get_config()["Legendary"]["locale"])
|
||||
return legendaryConfig.get_config()["Legendary"]["locale"].split("-")[0]
|
||||
else:
|
||||
logger.info("Found locale in Legendary config: " + QLocale.system().name())
|
||||
return locale.getdefaultlocale()
|
||||
logger.info("Found locale in system config: " + QLocale.system().name())
|
||||
return QLocale.system().name()
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
import configparser
|
||||
import os
|
||||
|
||||
config_path = os.path.expanduser("~") + "/.config/legendary/"
|
||||
lgd_config = configparser.ConfigParser()
|
||||
lgd_config.optionxform = str
|
||||
from legendary.lfs.lgndry import LGDLFS
|
||||
|
||||
lgd = LGDLFS()
|
||||
|
||||
def get_config() -> {}:
|
||||
lgd_config.read(config_path + "config.ini")
|
||||
lgd_config.optionxform = str
|
||||
return lgd_config
|
||||
|
||||
return lgd.config
|
||||
|
||||
def set_config(new_config: {}):
|
||||
lgd_config = new_config
|
||||
lgd_config.write(open(config_path + "config.ini", "w"))
|
||||
lgd.config = new_config
|
||||
with open(os.path.join(lgd.path, 'config.ini'), "w") as cf:
|
||||
lgd.config.write(cf)
|
||||
|
|
Loading…
Reference in a new issue