Add initial implementation of WineResolver
Remove borders from EGLSync lists. Color install/uninstall buttons correctly in DLC tab Adjust InstallDialog because the check function runs early now.
This commit is contained in:
parent
5bed54350d
commit
7156490952
|
@ -31,6 +31,10 @@ class InstallDialog(QDialog, Ui_InstallDialog):
|
|||
self.update = update
|
||||
self.silent = silent
|
||||
|
||||
self.options_changed = False
|
||||
self.worker_running = False
|
||||
self.reject_close = True
|
||||
|
||||
self.threadpool = QThreadPool(self)
|
||||
self.threadpool.setMaxThreadCount(1)
|
||||
|
||||
|
@ -38,16 +42,14 @@ class InstallDialog(QDialog, Ui_InstallDialog):
|
|||
self.install_dialog_label.setText(f"<h3>{header} \"{self.game.app_title}\"</h3>")
|
||||
self.setWindowTitle(f"{self.windowTitle()} - {header} \"{self.game.app_title}\"")
|
||||
|
||||
default_path = os.path.expanduser("~/legendary")
|
||||
if self.core.lgd.config.has_option("Legendary", "install_dir"):
|
||||
default_path = self.core.lgd.config.get("Legendary", "install_dir")
|
||||
else:
|
||||
default_path = os.path.expanduser("~/legendary")
|
||||
if not default_path:
|
||||
default_path = os.path.expanduser("~/legendary")
|
||||
|
||||
self.install_dir_edit = PathEdit(text=default_path,
|
||||
self.install_dir_edit = PathEdit(path=default_path,
|
||||
file_type=QFileDialog.DirectoryOnly,
|
||||
edit_func=self.option_changed)
|
||||
edit_func=self.option_changed,
|
||||
parent=self)
|
||||
self.install_dir_layout.addWidget(self.install_dir_edit)
|
||||
|
||||
if self.update:
|
||||
|
@ -91,10 +93,6 @@ class InstallDialog(QDialog, Ui_InstallDialog):
|
|||
self.verify_button.clicked.connect(self.verify_clicked)
|
||||
self.install_button.clicked.connect(self.install_clicked)
|
||||
|
||||
self.options_changed = False
|
||||
self.worker_running = False
|
||||
self.reject_close = True
|
||||
|
||||
self.resize(self.minimumSize())
|
||||
# self.setFixedSize(self.size())
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ class GameDlc(QWidget, Ui_GameDlc):
|
|||
super(GameDlc, self).__init__(parent=parent)
|
||||
self.setupUi(self)
|
||||
|
||||
self.available_dlc_scroll.setObjectName("noborder")
|
||||
self.installed_dlc_scroll.setObjectName("noborder")
|
||||
self.available_dlc_scroll.setProperty("noBorder", 1)
|
||||
self.installed_dlc_scroll.setProperty("noBorder", 1)
|
||||
self.signals = shared.signals
|
||||
self.core = shared.core
|
||||
|
||||
|
@ -95,19 +95,22 @@ class GameDlcWidget(QFrame, Ui_GameDlcWidget):
|
|||
self.app_name.setText(dlc.app_name)
|
||||
|
||||
if installed:
|
||||
self.install_button.clicked.connect(self.uninstall_dlc)
|
||||
self.action_button.setProperty("uninstall", 1)
|
||||
self.action_button.clicked.connect(self.uninstall_dlc)
|
||||
self.status.setText(self.tr("Installed"))
|
||||
self.install_button.setText("Uninstall")
|
||||
|
||||
self.action_button.setText(self.tr("Uninstall DLC"))
|
||||
else:
|
||||
self.install_button.clicked.connect(self.install_game)
|
||||
self.action_button.setProperty("install", 1)
|
||||
self.action_button.clicked.connect(self.install_game)
|
||||
self.status.setText(self.tr("Not installed"))
|
||||
self.install_button.setText("Install")
|
||||
self.action_button.setText(self.tr("Install DLC"))
|
||||
|
||||
def uninstall_dlc(self):
|
||||
self.action_button.setDisabled(True)
|
||||
self.action_button.setText(self.tr("Uninstalling"))
|
||||
self.uninstall.emit(self.dlc)
|
||||
|
||||
def install_game(self):
|
||||
self.install_button.setDisabled(True)
|
||||
self.install_button.setText(self.tr("Installing"))
|
||||
self.action_button.setDisabled(True)
|
||||
self.action_button.setText(self.tr("Installing"))
|
||||
self.install.emit(self.dlc.app_name)
|
||||
|
|
|
@ -73,8 +73,11 @@ class GameSettings(QWidget, Ui_GameSettings):
|
|||
self.proton_wrapper.addItems(self.possible_proton_wrappers)
|
||||
self.proton_wrapper.currentIndexChanged.connect(self.change_proton)
|
||||
|
||||
self.proton_prefix = PathEdit("None", QFileDialog.DirectoryOnly,
|
||||
edit_func=self.proton_prefix_edit, save_func=self.proton_prefix_save)
|
||||
self.proton_prefix = PathEdit(
|
||||
file_type=QFileDialog.DirectoryOnly,
|
||||
edit_func=self.proton_prefix_edit,
|
||||
save_func=self.proton_prefix_save
|
||||
)
|
||||
self.proton_prefix_layout.addWidget(self.proton_prefix)
|
||||
|
||||
self.linux_settings = LinuxAppSettings()
|
||||
|
|
|
@ -42,16 +42,16 @@ class GameListHeadBar(QWidget):
|
|||
self.egl_sync_clicked = self.egl_sync.clicked
|
||||
self.layout().addWidget(self.egl_sync)
|
||||
# FIXME: Until it is ready
|
||||
self.egl_sync.setEnabled(False)
|
||||
# self.egl_sync.setEnabled(False)
|
||||
|
||||
self.layout().addStretch(1)
|
||||
|
||||
self.search_bar = QLineEdit()
|
||||
self.search_bar.setObjectName("search_bar")
|
||||
self.search_bar.setFrame(False)
|
||||
icon_label = QLabel()
|
||||
icon_label.setPixmap(icon("fa.search").pixmap(QSize(20, 20)))
|
||||
self.layout().addWidget(icon_label)
|
||||
self.search_bar = QLineEdit()
|
||||
self.search_bar.setObjectName("search_bar")
|
||||
self.search_bar.setFrame(False)
|
||||
self.search_bar.setMinimumWidth(200)
|
||||
self.search_bar.setPlaceholderText(self.tr("Search Game"))
|
||||
self.layout().addWidget(self.search_bar)
|
||||
|
|
|
@ -26,7 +26,7 @@ class ImportSyncTabs(SideTabWidget):
|
|||
)
|
||||
self.addTab(self.egl_sync_widget, self.tr("Sync with EGL"))
|
||||
# FIXME: Until it is ready
|
||||
self.setTabEnabled(2, False)
|
||||
# self.setTabEnabled(2, False)
|
||||
|
||||
self.tabBar().setCurrentIndex(1)
|
||||
|
||||
|
|
|
@ -1,34 +1,54 @@
|
|||
import os
|
||||
import platform
|
||||
from glob import glob
|
||||
from logging import getLogger
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtCore import Qt, QThread
|
||||
from PyQt5.QtWidgets import QHBoxLayout, QVBoxLayout, QLabel, QGroupBox, \
|
||||
QCheckBox, QPushButton, QListWidgetItem, QDialog, QFileDialog
|
||||
|
||||
import rare.shared as shared
|
||||
from rare.ui.components.tabs.games.import_sync.egl_sync_widget import Ui_EGLSyncGroup
|
||||
from rare.utils.extra_widgets import PathEdit
|
||||
from rare.utils.utils import WineResolver
|
||||
|
||||
logger = getLogger("EGLSync")
|
||||
|
||||
appdata_path_spec = \
|
||||
r'%LOCALAPPDATA%\EpicGamesLauncher\Saved\Config\Windows'
|
||||
programdata_path_spec = \
|
||||
r'%PROGRAMDATA%\Epic\EpicGamesLauncher\Data\Manifests'
|
||||
|
||||
|
||||
class EGLSyncGroup(QGroupBox, Ui_EGLSyncGroup):
|
||||
importable_items = list()
|
||||
exportable_items = list()
|
||||
wine_resolver: QThread
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super(EGLSyncGroup, self).__init__(parent=parent)
|
||||
self.setupUi(self)
|
||||
self.export_list.setProperty("noBorder", 1)
|
||||
self.import_list.setProperty("noBorder", 1)
|
||||
|
||||
if platform.system() == "Windows":
|
||||
estimated_path = os.path.expandvars(programdata_path_spec)
|
||||
else:
|
||||
estimated_path = str()
|
||||
self.wine_resolver = WineResolver(programdata_path_spec, 'default', shared.legendary_core)
|
||||
self.wine_resolver.result_ready.connect(self.egl_path_info.setText)
|
||||
self.wine_resolver.finished.connect(self.wine_resolver.quit)
|
||||
self.wine_resolver.finished.connect(self.wine_resolver.deleteLater)
|
||||
self.wine_resolver.start()
|
||||
self.egl_path_info.setText(estimated_path)
|
||||
|
||||
self.egl_path_info.setText(
|
||||
self.tr("EGL path is at C:\\ProgramData\\Epic\\EpicGamesLauncher\\Data\\Manifests"))
|
||||
egl_path = os.path.expanduser("~/")
|
||||
if egl_path := shared.legendary_core.egl.programdata_path:
|
||||
pass
|
||||
elif egl_path := shared.legendary_core.lgd.config.get("default", "wine_prefix", fallback=""):
|
||||
egl_data_path = os.path.join(shared.legendary_core.lgd.config.get("default", "wine_prefix", fallback=""),
|
||||
'drive_c/ProgramData/Epic/EpicGamesLauncher/Data')
|
||||
egl_data_path = os.path.join(
|
||||
shared.legendary_core.lgd.config.get("default", "wine_prefix", fallback=""),
|
||||
'drive_c/ProgramData/Epic/EpicGamesLauncher/Data')
|
||||
egl_path = os.path.join(egl_data_path, 'Manifests')
|
||||
else:
|
||||
possible_wine_prefixes = [os.path.expanduser("~/.wine"),
|
||||
|
@ -37,7 +57,13 @@ class EGLSyncGroup(QGroupBox, Ui_EGLSyncGroup):
|
|||
if os.path.exists(p := os.path.join(i, "drive_c/ProgramData/Epic/EpicGamesLauncher/Data/Manifests")):
|
||||
egl_path = p
|
||||
|
||||
self.egl_path_edit = PathEdit(egl_path, QFileDialog.DirectoryOnly, save_func=self.save_egl_path)
|
||||
self.egl_path_edit = PathEdit(
|
||||
path=egl_path,
|
||||
file_type=QFileDialog.DirectoryOnly,
|
||||
edit_func=self.egl_path_edit_cb,
|
||||
save_func=self.egl_path_save_cb,
|
||||
parent=self
|
||||
)
|
||||
self.egl_path_layout.addWidget(self.egl_path_edit)
|
||||
if platform.system() != "Windows":
|
||||
shared.legendary_core.lgd.config.set('Legendary', 'egl_programdata', egl_path)
|
||||
|
@ -71,12 +97,18 @@ class EGLSyncGroup(QGroupBox, Ui_EGLSyncGroup):
|
|||
self.export_button.clicked.connect(self.export_selected)
|
||||
self.import_button.clicked.connect(self.import_selected)
|
||||
|
||||
def check_egl_path(self, path):
|
||||
pass
|
||||
def egl_path_edit_cb(self, path):
|
||||
if platform.system() != "Windows":
|
||||
if os.path.exists(os.path.join(path, "system.reg")) and os.path.exists(os.path.join(path, "dosdevices/c:")):
|
||||
# path is a wine prefix
|
||||
path = os.path.join(path, "dosdevices/c:", "ProgramData/Epic/EpicGamesLauncher/Data/Manifests")
|
||||
if os.path.exists(path) and glob(f"{path}/*.item"):
|
||||
return True, path
|
||||
return False, path
|
||||
|
||||
def save_egl_path(self):
|
||||
shared.legendary_core.lgd.config.set("Legendary", "egl_programdata", self.egl_path_edit.text())
|
||||
shared.legendary_core.egl.programdata_path = self.egl_path_edit.text()
|
||||
def egl_path_save_cb(self, path):
|
||||
shared.legendary_core.lgd.config.set("Legendary", "egl_programdata", path)
|
||||
shared.legendary_core.egl.programdata_path = path
|
||||
shared.legendary_core.lgd.save_config()
|
||||
self.update_lists()
|
||||
|
||||
|
|
|
@ -52,15 +52,15 @@ class LegendarySettings(QWidget, Ui_LegendarySettings):
|
|||
|
||||
self.locale_edit = IndicatorLineEdit(
|
||||
f"{self.core.language_code}-{self.core.country_code}",
|
||||
edit_func=self.locale_chck,
|
||||
save_func=self.locale_save,
|
||||
edit_func=self.locale_edit_cb,
|
||||
save_func=self.locale_save_cb,
|
||||
horiz_policy=QSizePolicy.Minimum,
|
||||
parent=self
|
||||
)
|
||||
self.locale_layout.addWidget(self.locale_edit)
|
||||
|
||||
@staticmethod
|
||||
def locale_chck(text: str) -> Tuple[bool, str]:
|
||||
def locale_edit_cb(text: str) -> Tuple[bool, str]:
|
||||
if text:
|
||||
if re.match("^[a-zA-Z]{2,3}[-_][a-zA-Z]{2,3}$", text):
|
||||
language, country = text.replace("_", "-").split("-")
|
||||
|
@ -69,7 +69,7 @@ class LegendarySettings(QWidget, Ui_LegendarySettings):
|
|||
else:
|
||||
return True, text
|
||||
|
||||
def locale_save(self, text: str):
|
||||
def locale_save_cb(self, text: str):
|
||||
if text:
|
||||
self.core.egs.language_code, self.core.egs.country_code = text.split("-")
|
||||
self.core.lgd.config.set("Legendary", "locale", text)
|
||||
|
|
|
@ -79,7 +79,8 @@ QToolButton {
|
|||
QFrame[frameShape="6"] {
|
||||
border-radius: 4px;
|
||||
}
|
||||
QScrollArea#noborder {
|
||||
QListView[noBorder="1"],
|
||||
QScrollArea[noBorder="1"] {
|
||||
border-color: transparent;
|
||||
}
|
||||
QComboBox {
|
||||
|
@ -268,21 +269,27 @@ QPushButton#menu_button {
|
|||
QPushButton:hover#menu_button {
|
||||
background-color: #334;
|
||||
}
|
||||
QPushButton[install="1"],
|
||||
QPushButton#install_button {
|
||||
background-color: #090;
|
||||
}
|
||||
QPushButton[install="1"]::hover,
|
||||
QPushButton::hover#install_button {
|
||||
background-color: #060;
|
||||
}
|
||||
QPushButton[install="1"]::disabled,
|
||||
QPushButton::disabled#install_button {
|
||||
background-color: #020;
|
||||
}
|
||||
QPushButton[uninstall="1"],
|
||||
QPushButton#uninstall_button {
|
||||
background-color: #900;
|
||||
}
|
||||
QPushButton[uninstall="1"]::hover,
|
||||
QPushButton::hover#uninstall_button {
|
||||
background-color: #600;
|
||||
}
|
||||
QPushButton[uninstall="1"]::disabled,
|
||||
QPushButton::disabled#uninstall_button {
|
||||
background-color: #200;
|
||||
}
|
||||
|
|
|
@ -100,16 +100,17 @@ class Ui_GameDlcWidget(object):
|
|||
self.actions_label.setFont(font)
|
||||
self.actions_label.setObjectName("actions_label")
|
||||
self.dlc_info_layout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.actions_label)
|
||||
self.install_button = QtWidgets.QPushButton(GameDlcWidget)
|
||||
self.action_button = QtWidgets.QPushButton(GameDlcWidget)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.install_button.sizePolicy().hasHeightForWidth())
|
||||
self.install_button.setSizePolicy(sizePolicy)
|
||||
self.install_button.setMinimumSize(QtCore.QSize(250, 0))
|
||||
self.install_button.setStyleSheet("")
|
||||
self.install_button.setObjectName("install_button")
|
||||
self.dlc_info_layout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.install_button)
|
||||
sizePolicy.setHeightForWidth(self.action_button.sizePolicy().hasHeightForWidth())
|
||||
self.action_button.setSizePolicy(sizePolicy)
|
||||
self.action_button.setMinimumSize(QtCore.QSize(250, 0))
|
||||
self.action_button.setStyleSheet("")
|
||||
self.action_button.setText("Action")
|
||||
self.action_button.setObjectName("action_button")
|
||||
self.dlc_info_layout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.action_button)
|
||||
self.app_name_label = QtWidgets.QLabel(GameDlcWidget)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
|
@ -140,7 +141,6 @@ class Ui_GameDlcWidget(object):
|
|||
self.version_label.setText(_translate("GameDlcWidget", "Version"))
|
||||
self.status_label.setText(_translate("GameDlcWidget", "Status"))
|
||||
self.actions_label.setText(_translate("GameDlcWidget", "Actions"))
|
||||
self.install_button.setText(_translate("GameDlcWidget", "Install DLC"))
|
||||
self.app_name_label.setText(_translate("GameDlcWidget", "Application"))
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">GameDlcWidget</string>
|
||||
<string notr="true">GameDlcWidget</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
|
@ -172,7 +172,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QPushButton" name="install_button">
|
||||
<widget class="QPushButton" name="action_button">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -189,7 +189,7 @@
|
|||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Install DLC</string>
|
||||
<string notr="true">Action</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -14,18 +14,10 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||
class Ui_EGLSyncGroup(object):
|
||||
def setupUi(self, EGLSyncGroup):
|
||||
EGLSyncGroup.setObjectName("EGLSyncGroup")
|
||||
EGLSyncGroup.resize(694, 440)
|
||||
self.egl_sync_layout = QtWidgets.QGridLayout(EGLSyncGroup)
|
||||
EGLSyncGroup.resize(680, 430)
|
||||
self.egl_sync_layout = QtWidgets.QFormLayout(EGLSyncGroup)
|
||||
self.egl_sync_layout.setLabelAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.egl_sync_layout.setObjectName("egl_sync_layout")
|
||||
self.refresh_button = QtWidgets.QPushButton(EGLSyncGroup)
|
||||
self.refresh_button.setObjectName("refresh_button")
|
||||
self.egl_sync_layout.addWidget(self.refresh_button, 2, 0, 1, 1)
|
||||
self.egl_sync_check = QtWidgets.QCheckBox(EGLSyncGroup)
|
||||
self.egl_sync_check.setObjectName("egl_sync_check")
|
||||
self.egl_sync_layout.addWidget(self.egl_sync_check, 3, 0, 1, 1)
|
||||
self.egl_path_info = QtWidgets.QLabel(EGLSyncGroup)
|
||||
self.egl_path_info.setObjectName("egl_path_info")
|
||||
self.egl_sync_layout.addWidget(self.egl_path_info, 1, 0, 1, 1)
|
||||
self.export_import_layout = QtWidgets.QHBoxLayout()
|
||||
self.export_import_layout.setObjectName("export_import_layout")
|
||||
self.export_group = QtWidgets.QGroupBox(EGLSyncGroup)
|
||||
|
@ -80,10 +72,30 @@ class Ui_EGLSyncGroup(object):
|
|||
self.import_buttons_layout.addWidget(self.import_button)
|
||||
self.import_layout.addLayout(self.import_buttons_layout)
|
||||
self.export_import_layout.addWidget(self.import_group)
|
||||
self.egl_sync_layout.addLayout(self.export_import_layout, 4, 0, 1, 1)
|
||||
self.egl_sync_layout.setLayout(4, QtWidgets.QFormLayout.SpanningRole, self.export_import_layout)
|
||||
self.egl_path_layout = QtWidgets.QVBoxLayout()
|
||||
self.egl_path_layout.setObjectName("egl_path_layout")
|
||||
self.egl_sync_layout.addLayout(self.egl_path_layout, 0, 0, 1, 1)
|
||||
self.egl_sync_layout.setLayout(0, QtWidgets.QFormLayout.FieldRole, self.egl_path_layout)
|
||||
self.egl_path_label = QtWidgets.QLabel(EGLSyncGroup)
|
||||
self.egl_path_label.setObjectName("egl_path_label")
|
||||
self.egl_sync_layout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.egl_path_label)
|
||||
self.egl_path_info_label = QtWidgets.QLabel(EGLSyncGroup)
|
||||
self.egl_path_info_label.setObjectName("egl_path_info_label")
|
||||
self.egl_sync_layout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.egl_path_info_label)
|
||||
self.egl_path_info = QtWidgets.QLabel(EGLSyncGroup)
|
||||
self.egl_path_info.setText("")
|
||||
self.egl_path_info.setObjectName("egl_path_info")
|
||||
self.egl_sync_layout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.egl_path_info)
|
||||
self.egl_auto_check = QtWidgets.QCheckBox(EGLSyncGroup)
|
||||
self.egl_auto_check.setText("")
|
||||
self.egl_auto_check.setObjectName("egl_auto_check")
|
||||
self.egl_sync_layout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.egl_auto_check)
|
||||
self.refresh_button = QtWidgets.QPushButton(EGLSyncGroup)
|
||||
self.refresh_button.setObjectName("refresh_button")
|
||||
self.egl_sync_layout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.refresh_button)
|
||||
self.egl_auto_check_label = QtWidgets.QLabel(EGLSyncGroup)
|
||||
self.egl_auto_check_label.setObjectName("egl_auto_check_label")
|
||||
self.egl_sync_layout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.egl_auto_check_label)
|
||||
|
||||
self.retranslateUi(EGLSyncGroup)
|
||||
QtCore.QMetaObject.connectSlotsByName(EGLSyncGroup)
|
||||
|
@ -92,9 +104,6 @@ class Ui_EGLSyncGroup(object):
|
|||
_translate = QtCore.QCoreApplication.translate
|
||||
EGLSyncGroup.setWindowTitle(_translate("EGLSyncGroup", "EGLSyncGroup"))
|
||||
EGLSyncGroup.setTitle(_translate("EGLSyncGroup", "Sync with Epic Games Launcher"))
|
||||
self.refresh_button.setText(_translate("EGLSyncGroup", "Refresh"))
|
||||
self.egl_sync_check.setText(_translate("EGLSyncGroup", "Enable automatic sync"))
|
||||
self.egl_path_info.setText(_translate("EGLSyncGroup", "TextLabel"))
|
||||
self.export_group.setTitle(_translate("EGLSyncGroup", "Exportable games"))
|
||||
self.export_label.setText(_translate("EGLSyncGroup", "No games to export to EGS"))
|
||||
self.export_list.setSortingEnabled(True)
|
||||
|
@ -107,6 +116,10 @@ class Ui_EGLSyncGroup(object):
|
|||
self.import_select_all_button.setText(_translate("EGLSyncGroup", "Select all"))
|
||||
self.import_select_none_button.setText(_translate("EGLSyncGroup", "Select none"))
|
||||
self.import_button.setText(_translate("EGLSyncGroup", "Import"))
|
||||
self.egl_path_label.setText(_translate("EGLSyncGroup", "Manifest path"))
|
||||
self.egl_path_info_label.setText(_translate("EGLSyncGroup", "Estimated path"))
|
||||
self.refresh_button.setText(_translate("EGLSyncGroup", "Refresh"))
|
||||
self.egl_auto_check_label.setText(_translate("EGLSyncGroup", "Enable automatic sync"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>694</width>
|
||||
<height>440</height>
|
||||
<width>680</width>
|
||||
<height>430</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -16,29 +16,11 @@
|
|||
<property name="title">
|
||||
<string>Sync with Epic Games Launcher</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="egl_sync_layout">
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="refresh_button">
|
||||
<property name="text">
|
||||
<string>Refresh</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="egl_sync_check">
|
||||
<property name="text">
|
||||
<string>Enable automatic sync</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="egl_path_info">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<layout class="QFormLayout" name="egl_sync_layout">
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="export_import_layout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="export_group">
|
||||
|
@ -170,9 +152,51 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<item row="0" column="1">
|
||||
<layout class="QVBoxLayout" name="egl_path_layout"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="egl_path_label">
|
||||
<property name="text">
|
||||
<string>Manifest path</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="egl_path_info_label">
|
||||
<property name="text">
|
||||
<string>Estimated path</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="egl_path_info">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="egl_auto_check">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="refresh_button">
|
||||
<property name="text">
|
||||
<string>Refresh</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="egl_auto_check_label">
|
||||
<property name="text">
|
||||
<string>Enable automatic sync</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
|
|
@ -14,7 +14,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||
class Ui_ImportGroup(object):
|
||||
def setupUi(self, ImportGroup):
|
||||
ImportGroup.setObjectName("ImportGroup")
|
||||
ImportGroup.resize(223, 128)
|
||||
ImportGroup.resize(223, 127)
|
||||
self.import_layout = QtWidgets.QFormLayout(ImportGroup)
|
||||
self.import_layout.setLabelAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.import_layout.setObjectName("import_layout")
|
||||
|
@ -49,8 +49,8 @@ class Ui_ImportGroup(object):
|
|||
def retranslateUi(self, ImportGroup):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
ImportGroup.setWindowTitle(_translate("ImportGroup", "ImportGroup"))
|
||||
ImportGroup.setTitle(_translate("ImportGroup", "Import EGL game from directory"))
|
||||
self.path_edit_label.setText(_translate("ImportGroup", "Select path"))
|
||||
ImportGroup.setTitle(_translate("ImportGroup", "Import EGL game from a directory"))
|
||||
self.path_edit_label.setText(_translate("ImportGroup", "Installation path"))
|
||||
self.app_name_label.setText(_translate("ImportGroup", "Override app name"))
|
||||
self.import_button.setText(_translate("ImportGroup", "Import Game"))
|
||||
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>223</width>
|
||||
<height>128</height>
|
||||
<height>127</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>ImportGroup</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Import EGL game from directory</string>
|
||||
<string>Import EGL game from a directory</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="import_layout">
|
||||
<property name="labelAlignment">
|
||||
|
@ -23,7 +23,7 @@
|
|||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="path_edit_label">
|
||||
<property name="text">
|
||||
<string>Select path</string>
|
||||
<string>Installation path</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -148,6 +148,7 @@ class IndicatorLineEdit(QWidget):
|
|||
self.indicator_label = QLabel()
|
||||
self.indicator_label.setPixmap(icon("ei.info-circle", color="gray").pixmap(16, 16))
|
||||
self.indicator_label.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
|
||||
self.__indicator(edit_func(text))
|
||||
self.layout.addWidget(self.indicator_label)
|
||||
|
||||
if not ph_text:
|
||||
|
@ -191,7 +192,7 @@ class IndicatorLineEdit(QWidget):
|
|||
|
||||
class PathEdit(IndicatorLineEdit):
|
||||
def __init__(self,
|
||||
text: str = "",
|
||||
path: str = "",
|
||||
file_type: QFileDialog.FileType = QFileDialog.AnyFile,
|
||||
type_filter: str = "",
|
||||
name_filter: str = "",
|
||||
|
@ -200,7 +201,7 @@ class PathEdit(IndicatorLineEdit):
|
|||
save_func: Callable[[str], None] = None,
|
||||
horiz_policy: QSizePolicy = QSizePolicy.Expanding,
|
||||
parent=None):
|
||||
super(PathEdit, self).__init__(text=text, ph_text=ph_text,
|
||||
super(PathEdit, self).__init__(text=path, ph_text=ph_text,
|
||||
edit_func=edit_func, save_func=save_func,
|
||||
horiz_policy=horiz_policy, parent=parent)
|
||||
self.setObjectName("PathEdit")
|
||||
|
|
Loading…
Reference in a new issue