1
0
Fork 0
mirror of synced 2024-06-02 02:34:40 +12:00
This commit is contained in:
Dummerle 2020-11-03 21:46:43 +01:00
parent d2f5b3c745
commit 5026f6f74a
4 changed files with 23 additions and 3 deletions

View file

@ -48,7 +48,6 @@ class GameWidget(QWidget):
self.childLayout.addWidget(self.settings)
self.childLayout.addStretch(1)
# self.layout.addWidget(QLabel(game.title))
self.layout.addLayout(self.childLayout)
self.setLayout(self.layout)

View file

@ -58,6 +58,7 @@ def main():
dia = LoginDialog()
if not dia.login():
main()
# TODO
app.exec_()

View file

@ -3,7 +3,7 @@ from PyQt5.QtWebEngineWidgets import QWebEngineView
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QScrollArea, QLineEdit, QPushButton
from Rare.GameWidget import GameWidget, UninstalledGameWidget
from Rare.utils.legendaryUtils import get_installed, get_not_installed, logout
from Rare.utils.legendaryUtils import get_installed, get_not_installed, logout, get_updates
class BrowserTab(QWebEngineView):
@ -22,6 +22,11 @@ class Settings(QWidget):
self.logout_button.clicked.connect(self.logout)
self.layout.addWidget(self.logout_button)
self.info_label = QLabel("<h2>Information</h2>")
self.infotext = QLabel("""Developers : Dummerle, CommandMC\nLicence: GPL v3""")
self.layout.addWidget(self.info_label)
self.layout.addWidget(self.infotext)
self.layout.addStretch(1)
self.setLayout(self.layout)
@ -72,5 +77,12 @@ class UpdateList(QWidget):
def __init__(self, parent):
super(UpdateList, self).__init__(parent=parent)
self.layout = QVBoxLayout()
self.layout.addWidget(QLabel("Updates"))
updates = get_updates()
if not updates:
for game in get_updates():
self.layout.addWidget(QLabel("Update available for " + game.title))
else:
self.layout.addWidget(QLabel("No updates available"))
self.layout.addStretch(1)
self.setLayout(self.layout)

View file

@ -136,6 +136,14 @@ def auth_import(lutris: bool = False, wine_prefix: str = None) -> bool:
return False
def get_updates():
update_games = []
for game in core.get_installed_list():
update_games.append(game) if get_game_by_name(game.app_name).app_version != game.version else None
return update_games
def logout():
core.lgd.invalidate_userdata()