Skip to content

Commit 1ad19bf

Browse files
committed
chore: hide legendary login
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
1 parent 98f07a9 commit 1ad19bf

1 file changed

Lines changed: 70 additions & 70 deletions

File tree

portprotonqt/main_window.py

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,36 +1341,36 @@ def createPortProtonTab(self):
13411341
self.gamepadRumbleCheckBox.setChecked(current_rumble_state)
13421342
formLayout.addRow(self.gamepadRumbleTitle, self.gamepadRumbleCheckBox)
13431343

1344-
# 8. Legendary Authentication
1345-
self.legendaryAuthButton = AutoSizeButton(
1346-
_("Open Legendary Login"),
1347-
icon=self.theme_manager.get_icon("login")
1348-
)
1349-
self.legendaryAuthButton.setStyleSheet(self.theme.ACTION_BUTTON_STYLE)
1350-
self.legendaryAuthButton.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
1351-
self.legendaryAuthButton.clicked.connect(self.openLegendaryLogin)
1352-
self.legendaryAuthTitle = QLabel(_("Legendary Authentication:"))
1353-
self.legendaryAuthTitle.setStyleSheet(self.theme.PARAMS_TITLE_STYLE)
1354-
self.legendaryAuthTitle.setFocusPolicy(Qt.FocusPolicy.NoFocus)
1355-
formLayout.addRow(self.legendaryAuthTitle, self.legendaryAuthButton)
1356-
1357-
self.legendaryCodeEdit = CustomLineEdit(self, theme=self.theme)
1358-
self.legendaryCodeEdit.setPlaceholderText(_("Enter Legendary Authorization Code"))
1359-
self.legendaryCodeEdit.setStyleSheet(self.theme.PROXY_INPUT_STYLE)
1360-
self.legendaryCodeEdit.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
1361-
self.legendaryCodeTitle = QLabel(_("Authorization Code:"))
1362-
self.legendaryCodeTitle.setStyleSheet(self.theme.PARAMS_TITLE_STYLE)
1363-
self.legendaryCodeTitle.setFocusPolicy(Qt.FocusPolicy.NoFocus)
1364-
formLayout.addRow(self.legendaryCodeTitle, self.legendaryCodeEdit)
1365-
1366-
self.submitCodeButton = AutoSizeButton(
1367-
_("Submit Code"),
1368-
icon=self.theme_manager.get_icon("save")
1369-
)
1370-
self.submitCodeButton.setStyleSheet(self.theme.ACTION_BUTTON_STYLE)
1371-
self.submitCodeButton.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
1372-
self.submitCodeButton.clicked.connect(self.submitLegendaryCode)
1373-
formLayout.addRow(QLabel(""), self.submitCodeButton)
1344+
# # 8. Legendary Authentication
1345+
# self.legendaryAuthButton = AutoSizeButton(
1346+
# _("Open Legendary Login"),
1347+
# icon=self.theme_manager.get_icon("login")
1348+
# )
1349+
# self.legendaryAuthButton.setStyleSheet(self.theme.ACTION_BUTTON_STYLE)
1350+
# self.legendaryAuthButton.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
1351+
# self.legendaryAuthButton.clicked.connect(self.openLegendaryLogin)
1352+
# self.legendaryAuthTitle = QLabel(_("Legendary Authentication:"))
1353+
# self.legendaryAuthTitle.setStyleSheet(self.theme.PARAMS_TITLE_STYLE)
1354+
# self.legendaryAuthTitle.setFocusPolicy(Qt.FocusPolicy.NoFocus)
1355+
# formLayout.addRow(self.legendaryAuthTitle, self.legendaryAuthButton)
1356+
#
1357+
# self.legendaryCodeEdit = CustomLineEdit(self, theme=self.theme)
1358+
# self.legendaryCodeEdit.setPlaceholderText(_("Enter Legendary Authorization Code"))
1359+
# self.legendaryCodeEdit.setStyleSheet(self.theme.PROXY_INPUT_STYLE)
1360+
# self.legendaryCodeEdit.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
1361+
# self.legendaryCodeTitle = QLabel(_("Authorization Code:"))
1362+
# self.legendaryCodeTitle.setStyleSheet(self.theme.PARAMS_TITLE_STYLE)
1363+
# self.legendaryCodeTitle.setFocusPolicy(Qt.FocusPolicy.NoFocus)
1364+
# formLayout.addRow(self.legendaryCodeTitle, self.legendaryCodeEdit)
1365+
#
1366+
# self.submitCodeButton = AutoSizeButton(
1367+
# _("Submit Code"),
1368+
# icon=self.theme_manager.get_icon("save")
1369+
# )
1370+
# self.submitCodeButton.setStyleSheet(self.theme.ACTION_BUTTON_STYLE)
1371+
# self.submitCodeButton.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
1372+
# self.submitCodeButton.clicked.connect(self.submitLegendaryCode)
1373+
# formLayout.addRow(QLabel(""), self.submitCodeButton)
13741374

13751375
layout.addLayout(formLayout)
13761376

@@ -1412,46 +1412,46 @@ def createPortProtonTab(self):
14121412
layout.addStretch(1)
14131413
self.stackedWidget.addWidget(self.portProtonWidget)
14141414

1415-
def openLegendaryLogin(self):
1416-
"""Opens the Legendary login page in the default web browser."""
1417-
login_url = "https://legendary.gl/epiclogin"
1418-
try:
1419-
QDesktopServices.openUrl(QUrl(login_url))
1420-
self.statusBar().showMessage(_("Opened Legendary login page in browser"), 3000)
1421-
except Exception as e:
1422-
logger.error(f"Failed to open Legendary login page: {e}")
1423-
self.statusBar().showMessage(_("Failed to open Legendary login page"), 3000)
1424-
1425-
def submitLegendaryCode(self):
1426-
"""Submits the Legendary authorization code using the legendary CLI."""
1427-
auth_code = self.legendaryCodeEdit.text().strip()
1428-
if not auth_code:
1429-
QMessageBox.warning(self, _("Error"), _("Please enter an authorization code"))
1430-
return
1431-
1432-
try:
1433-
# Execute legendary auth command
1434-
result = subprocess.run(
1435-
[self.legendary_path, "auth", "--code", auth_code],
1436-
capture_output=True,
1437-
text=True,
1438-
check=True
1439-
)
1440-
logger.info("Legendary authentication successful: %s", result.stdout)
1441-
self.statusBar().showMessage(_("Successfully authenticated with Legendary"), 3000)
1442-
self.legendaryCodeEdit.clear()
1443-
# Reload Epic Games Store games after successful authentication
1444-
self.games = self.loadGames()
1445-
self.updateGameGrid()
1446-
except subprocess.CalledProcessError as e:
1447-
logger.error("Legendary authentication failed: %s", e.stderr)
1448-
self.statusBar().showMessage(_("Legendary authentication failed: {0}").format(e.stderr), 5000)
1449-
except FileNotFoundError:
1450-
logger.error("Legendary executable not found at %s", self.legendary_path)
1451-
self.statusBar().showMessage(_("Legendary executable not found"), 5000)
1452-
except Exception as e:
1453-
logger.error("Unexpected error during Legendary authentication: %s", str(e))
1454-
self.statusBar().showMessage(_("Unexpected error during authentication"), 5000)
1415+
# def openLegendaryLogin(self):
1416+
# """Opens the Legendary login page in the default web browser."""
1417+
# login_url = "https://legendary.gl/epiclogin"
1418+
# try:
1419+
# QDesktopServices.openUrl(QUrl(login_url))
1420+
# self.statusBar().showMessage(_("Opened Legendary login page in browser"), 3000)
1421+
# except Exception as e:
1422+
# logger.error(f"Failed to open Legendary login page: {e}")
1423+
# self.statusBar().showMessage(_("Failed to open Legendary login page"), 3000)
1424+
#
1425+
# def submitLegendaryCode(self):
1426+
# """Submits the Legendary authorization code using the legendary CLI."""
1427+
# auth_code = self.legendaryCodeEdit.text().strip()
1428+
# if not auth_code:
1429+
# QMessageBox.warning(self, _("Error"), _("Please enter an authorization code"))
1430+
# return
1431+
#
1432+
# try:
1433+
# # Execute legendary auth command
1434+
# result = subprocess.run(
1435+
# [self.legendary_path, "auth", "--code", auth_code],
1436+
# capture_output=True,
1437+
# text=True,
1438+
# check=True
1439+
# )
1440+
# logger.info("Legendary authentication successful: %s", result.stdout)
1441+
# self.statusBar().showMessage(_("Successfully authenticated with Legendary"), 3000)
1442+
# self.legendaryCodeEdit.clear()
1443+
# # Reload Epic Games Store games after successful authentication
1444+
# self.games = self.loadGames()
1445+
# self.updateGameGrid()
1446+
# except subprocess.CalledProcessError as e:
1447+
# logger.error("Legendary authentication failed: %s", e.stderr)
1448+
# self.statusBar().showMessage(_("Legendary authentication failed: {0}").format(e.stderr), 5000)
1449+
# except FileNotFoundError:
1450+
# logger.error("Legendary executable not found at %s", self.legendary_path)
1451+
# self.statusBar().showMessage(_("Legendary executable not found"), 5000)
1452+
# except Exception as e:
1453+
# logger.error("Unexpected error during Legendary authentication: %s", str(e))
1454+
# self.statusBar().showMessage(_("Unexpected error during authentication"), 5000)
14551455

14561456
def resetSettings(self):
14571457
"""Сбрасывает настройки и перезапускает приложение."""

0 commit comments

Comments
 (0)