Merge pull request #13 from rdswift/save_last_backup_dir

Modify maintenance options page label text and layout
This commit is contained in:
Laurent Monin
2024-04-24 22:01:32 +02:00
committed by GitHub
2 changed files with 61 additions and 49 deletions

View File

@@ -39,6 +39,23 @@ class Ui_MaintenanceOptionsPage(object):
self.open_folder_button.setObjectName("open_folder_button")
self.horizontalLayout_3.addWidget(self.open_folder_button)
self.vboxlayout.addLayout(self.horizontalLayout_3)
self.label_2 = QtWidgets.QLabel(parent=MaintenanceOptionsPage)
self.label_2.setObjectName("label_2")
self.vboxlayout.addWidget(self.label_2)
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
self.autobackup_dir = QtWidgets.QLineEdit(parent=MaintenanceOptionsPage)
self.autobackup_dir.setObjectName("autobackup_dir")
self.horizontalLayout_6.addWidget(self.autobackup_dir)
self.browse_autobackup_dir = QtWidgets.QToolButton(parent=MaintenanceOptionsPage)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.browse_autobackup_dir.sizePolicy().hasHeightForWidth())
self.browse_autobackup_dir.setSizePolicy(sizePolicy)
self.browse_autobackup_dir.setObjectName("browse_autobackup_dir")
self.horizontalLayout_6.addWidget(self.browse_autobackup_dir)
self.vboxlayout.addLayout(self.horizontalLayout_6)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setContentsMargins(-1, -1, -1, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
@@ -61,23 +78,11 @@ class Ui_MaintenanceOptionsPage(object):
self.save_backup_button.setObjectName("save_backup_button")
self.horizontalLayout.addWidget(self.save_backup_button)
self.vboxlayout.addLayout(self.horizontalLayout)
self.label_2 = QtWidgets.QLabel(parent=MaintenanceOptionsPage)
self.label_2.setObjectName("label_2")
self.vboxlayout.addWidget(self.label_2)
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
self.autobackup_dir = QtWidgets.QLineEdit(parent=MaintenanceOptionsPage)
self.autobackup_dir.setObjectName("autobackup_dir")
self.horizontalLayout_6.addWidget(self.autobackup_dir)
self.browse_autobackup_dir = QtWidgets.QToolButton(parent=MaintenanceOptionsPage)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.browse_autobackup_dir.sizePolicy().hasHeightForWidth())
self.browse_autobackup_dir.setSizePolicy(sizePolicy)
self.browse_autobackup_dir.setObjectName("browse_autobackup_dir")
self.horizontalLayout_6.addWidget(self.browse_autobackup_dir)
self.vboxlayout.addLayout(self.horizontalLayout_6)
self.line_2 = QtWidgets.QFrame(parent=MaintenanceOptionsPage)
self.line_2.setFrameShape(QtWidgets.QFrame.Shape.HLine)
self.line_2.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
self.line_2.setObjectName("line_2")
self.vboxlayout.addWidget(self.line_2)
self.option_counts = QtWidgets.QLabel(parent=MaintenanceOptionsPage)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred)
sizePolicy.setHorizontalStretch(0)
@@ -121,11 +126,11 @@ class Ui_MaintenanceOptionsPage(object):
QtCore.QMetaObject.connectSlotsByName(MaintenanceOptionsPage)
def retranslateUi(self, MaintenanceOptionsPage):
self.label.setText(_("Configuration File:"))
self.open_folder_button.setText(_("Open folder"))
self.load_backup_button.setText(_("Load Backup"))
self.save_backup_button.setText(_("Save Backup"))
self.label_2.setText(_("Automatic backups directory"))
self.label.setText(_("Configuration file:"))
self.open_folder_button.setText(_("Open folder"))
self.label_2.setText(_("Automatic configuration backups directory:"))
self.browse_autobackup_dir.setText(_("Browse…"))
self.load_backup_button.setText(_("Load backup…"))
self.save_backup_button.setText(_("Save backup…"))
self.enable_cleanup.setText(_("Remove selected options"))
self.select_all.setText(_("Select all"))

View File

@@ -14,7 +14,7 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Configuration File:</string>
<string>Configuration file:</string>
</property>
</widget>
</item>
@@ -39,7 +39,34 @@
</sizepolicy>
</property>
<property name="text">
<string>Open folder</string>
<string>Open folder</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Automatic configuration backups directory:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLineEdit" name="autobackup_dir"/>
</item>
<item>
<widget class="QToolButton" name="browse_autobackup_dir">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Browse…</string>
</property>
</widget>
</item>
@@ -72,7 +99,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Load Backup</string>
<string>Load backup</string>
</property>
</widget>
</item>
@@ -85,39 +112,19 @@
</sizepolicy>
</property>
<property name="text">
<string>Save Backup</string>
<string>Save backup</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Automatic backups directory</string>
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLineEdit" name="autobackup_dir"/>
</item>
<item>
<widget class="QToolButton" name="browse_autobackup_dir">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Browse…</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="option_counts">
<property name="sizePolicy">