Skip to content

Commit

Permalink
Merge pull request #13 from rdswift/save_last_backup_dir
Browse files Browse the repository at this point in the history
Modify maintenance options page label text and layout
  • Loading branch information
zas authored Apr 24, 2024
2 parents f26a74f + 4643d18 commit 52462ec
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 49 deletions.
49 changes: 27 additions & 22 deletions picard/ui/ui_options_maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,23 @@ def setupUi(self, MaintenanceOptionsPage):
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")
Expand All @@ -61,23 +78,11 @@ def setupUi(self, MaintenanceOptionsPage):
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)
Expand Down Expand Up @@ -121,11 +126,11 @@ def setupUi(self, MaintenanceOptionsPage):
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"))
61 changes: 34 additions & 27 deletions ui/options_maintenance.ui
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Configuration File:</string>
<string>Configuration file:</string>
</property>
</widget>
</item>
Expand All @@ -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>
Expand Down Expand Up @@ -72,7 +99,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Load Backup</string>
<string>Load backup…</string>
</property>
</widget>
</item>
Expand All @@ -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">
Expand Down

0 comments on commit 52462ec

Please sign in to comment.