1
0
Fork 0
mirror of synced 2024-06-26 18:20:50 +12:00

EGLSync: Descriptive names

This commit is contained in:
Stelios Tsampas 2021-11-21 15:57:43 +02:00
parent 325e7df004
commit 8ec321b41f
No known key found for this signature in database
GPG key ID: 2FAEBF7B5BE5FD7C
3 changed files with 21 additions and 21 deletions

View file

@ -48,12 +48,12 @@ class EGLSyncGroup(QGroupBox, Ui_EGLSyncGroup):
path=egl_path,
ph_text=self.tr('Path to the Wine prefix where EGL is installed, or the Manifests folder'),
file_type=QFileDialog.DirectoryOnly,
edit_func=self.egl_path_edit_cb,
save_func=self.egl_path_save_cb,
edit_func=self.egl_path_edit_edit_cb,
save_func=self.egl_path_edit_save_cb,
parent=self
)
self.egl_path_edit.textChanged.connect(self.egl_path_changed)
self.egl_path_layout.addWidget(self.egl_path_edit)
self.egl_path_edit_layout.addWidget(self.egl_path_edit)
if platform.system() == "Windows":
self.egl_path_label.setVisible(False)
@ -84,7 +84,7 @@ class EGLSyncGroup(QGroupBox, Ui_EGLSyncGroup):
'Create it or configure it in Settings -> Linux'))
@staticmethod
def egl_path_edit_cb(path) -> Tuple[bool, str]:
def egl_path_edit_edit_cb(path) -> Tuple[bool, str]:
if not path:
return True, path
if platform.system() != "Windows":
@ -99,7 +99,7 @@ class EGLSyncGroup(QGroupBox, Ui_EGLSyncGroup):
return False, path
@staticmethod
def egl_path_save_cb(path):
def egl_path_edit_save_cb(path):
if not path or not os.path.exists(path):
# This is the same as "--unlink"
shared.core.egl.programdata_path = None
@ -145,7 +145,7 @@ class EGLSyncGroup(QGroupBox, Ui_EGLSyncGroup):
if have_path := bool(shared.core.egl.programdata_path) and self.egl_path_edit.is_valid:
# NOTE: need to clear known manifests to force refresh
shared.core.egl.manifests.clear()
self.egl_sync_label.setEnabled(have_path)
self.egl_sync_check_label.setEnabled(have_path)
self.egl_sync_check.setEnabled(have_path)
self.import_list.populate(have_path)
self.import_list.setEnabled(have_path)

View file

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'rare/ui/components/tabs/games/import_sync/egl_sync_group.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
@ -21,12 +21,12 @@ class Ui_EGLSyncGroup(object):
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.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_layout = QtWidgets.QHBoxLayout()
self.egl_path_layout.setObjectName("egl_path_layout")
self.egl_sync_layout.setLayout(0, QtWidgets.QFormLayout.FieldRole, self.egl_path_layout)
self.egl_path_edit_label = QtWidgets.QLabel(EGLSyncGroup)
self.egl_path_edit_label.setObjectName("egl_path_edit_label")
self.egl_sync_layout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.egl_path_edit_label)
self.egl_path_edit_layout = QtWidgets.QHBoxLayout()
self.egl_path_edit_layout.setObjectName("egl_path_edit_layout")
self.egl_sync_layout.setLayout(0, QtWidgets.QFormLayout.FieldRole, self.egl_path_edit_layout)
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)
@ -42,9 +42,9 @@ class Ui_EGLSyncGroup(object):
self.import_export_layout = QtWidgets.QVBoxLayout()
self.import_export_layout.setObjectName("import_export_layout")
self.egl_sync_layout.setLayout(3, QtWidgets.QFormLayout.SpanningRole, self.import_export_layout)
self.egl_sync_label = QtWidgets.QLabel(EGLSyncGroup)
self.egl_sync_label.setObjectName("egl_sync_label")
self.egl_sync_layout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.egl_sync_label)
self.egl_sync_check_label = QtWidgets.QLabel(EGLSyncGroup)
self.egl_sync_check_label.setObjectName("egl_sync_check_label")
self.egl_sync_layout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.egl_sync_check_label)
self.retranslateUi(EGLSyncGroup)
QtCore.QMetaObject.connectSlotsByName(EGLSyncGroup)
@ -52,9 +52,9 @@ class Ui_EGLSyncGroup(object):
def retranslateUi(self, EGLSyncGroup):
_translate = QtCore.QCoreApplication.translate
EGLSyncGroup.setTitle(_translate("EGLSyncGroup", "Sync with Epic Games Launcher"))
self.egl_path_label.setText(_translate("EGLSyncGroup", "Prefix/Manifest path"))
self.egl_path_edit_label.setText(_translate("EGLSyncGroup", "Prefix/Manifest path"))
self.egl_path_info_label.setText(_translate("EGLSyncGroup", "Estimated path"))
self.egl_sync_label.setText(_translate("EGLSyncGroup", "Enable automatic sync"))
self.egl_sync_check_label.setText(_translate("EGLSyncGroup", "Enable automatic sync"))
if __name__ == "__main__":

View file

@ -27,14 +27,14 @@
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<item row="0" column="0">
<widget class="QLabel" name="egl_path_label">
<widget class="QLabel" name="egl_path_edit_label">
<property name="text">
<string>Prefix/Manifest path</string>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="egl_path_layout"/>
<layout class="QHBoxLayout" name="egl_path_edit_layout"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="egl_path_info_label">
@ -64,7 +64,7 @@
<layout class="QVBoxLayout" name="import_export_layout"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="egl_sync_label">
<widget class="QLabel" name="egl_sync_check_label">
<property name="text">
<string>Enable automatic sync</string>
</property>