Skip to content

Commit e9486e0

Browse files
committed
enh: move "apply" button in downloads settings next to "browse" button
1 parent 76623ec commit e9486e0

3 files changed

Lines changed: 8 additions & 24 deletions

File tree

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- fix: `get_datasets_user_shared` failed when many circles/collections exist
44
- enh: allow to disable update check on startup via settings
55
- enh: apply button in upload settings only affects cache location
6+
- enh: move "apply" button in downloads settings next to "browse" button
67
- ref: decorate PyQtSlots
78
- tests: restore previous users settings after testing
89
0.17.3

dcoraid/gui/preferences/dlg_preferences.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def __init__(self, *args, **kwargs):
5454
# downloads
5555
self.toolButton_downloads_browse.clicked.connect(
5656
self.on_downloads_browse)
57-
self.toolButton_downloads_apply.clicked.connect(
58-
self.on_downloads_apply)
57+
self.toolButton_downloads_path_apply.clicked.connect(
58+
self.on_downloads_path_apply)
5959
# account
6060
self.toolButton_user_update.clicked.connect(self.on_update_user)
6161

@@ -193,10 +193,6 @@ def on_api_token_revoke(self):
193193
self.logger.info("Exiting, because user revoked API token.")
194194
QtWidgets.QApplication.quit()
195195

196-
def on_downloads_apply(self):
197-
path = self.lineEdit_downloads_path.text()
198-
self.settings.setValue("downloads/default path", path)
199-
200196
def on_downloads_browse(self):
201197
default = self.settings.value("downloads/default path", ".")
202198
path = QtWidgets.QFileDialog.getExistingDirectory(
@@ -207,6 +203,10 @@ def on_downloads_browse(self):
207203
if path and pathlib.Path(path).exists():
208204
self.lineEdit_downloads_path.setText(path)
209205

206+
def on_downloads_path_apply(self):
207+
path = self.lineEdit_downloads_path.text()
208+
self.settings.setValue("downloads/default path", path)
209+
210210
def on_uploads_browse(self):
211211
default = self.settings.value("uploads/cache path", ".")
212212
path = QtWidgets.QFileDialog.getExistingDirectory(

dcoraid/gui/preferences/dlg_preferences.ui

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -304,25 +304,8 @@ dataset identifier assigned to it by CKAN/DCOR.</string>
304304
</property>
305305
</widget>
306306
</item>
307-
</layout>
308-
</item>
309-
<item>
310-
<layout class="QHBoxLayout" name="horizontalLayout_6">
311-
<item>
312-
<spacer name="horizontalSpacer_4">
313-
<property name="orientation">
314-
<enum>Qt::Orientation::Horizontal</enum>
315-
</property>
316-
<property name="sizeHint" stdset="0">
317-
<size>
318-
<width>40</width>
319-
<height>20</height>
320-
</size>
321-
</property>
322-
</spacer>
323-
</item>
324307
<item>
325-
<widget class="QToolButton" name="toolButton_downloads_apply">
308+
<widget class="QToolButton" name="toolButton_downloads_path_apply">
326309
<property name="text">
327310
<string>Apply</string>
328311
</property>

0 commit comments

Comments
 (0)