Skip to content

Commit cc274c4

Browse files
committed
enh: improve 'anonymous' GUI experience (no busy cursor, disable tabs)
1 parent 4391d5e commit cc274c4

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
0.17.4
22
- fix: correctly handle dataset IDs and names in `DBExtract`
33
- fix: `get_datasets_user_shared` failed when many circles/collections exist
4+
- enh: improve "anonymous" GUI experience (no busy cursor, disable tabs)
45
- enh: allow to disable update check on startup via settings
56
- enh: apply button in upload settings only affects cache location
67
- enh: move "apply" button in downloads settings next to "browse" button

dcoraid/gui/main.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,13 @@ def __init__(self, *args, **kwargs):
113113
QtWidgets.QApplication.processEvents(
114114
QtCore.QEventLoop.ProcessEventsFlag.AllEvents, 300)
115115

116+
if self.settings.value("user scenario", "") == "anonymous":
117+
# disable tabs that an anonymous user cannot use
118+
self.tab_user.setEnabled(False)
119+
self.tab_maintain.setEnabled(False)
120+
self.tab_upload.setEnabled(False)
121+
self.tab_share.setEnabled(False)
122+
116123
# Run wizard if necessary
117124
if ((self.settings.value("user scenario", "") != "anonymous")
118125
and not self.settings.value("auth/api key", "")):

dcoraid/gui/upload/widget_upload.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from ...upload import queue, task
1717

1818
from ..api import get_ckan_api
19-
from ..tools import ShowWaitCursor, show_wait_cursor
19+
from ..tools import ShowWaitCursor
2020

2121
from . import circle_mgr
2222
from .dlg_upload import NoCircleSelectedError, UploadDialog
@@ -118,7 +118,6 @@ def dropEvent(self, e):
118118
elif pp.suffix == ".dcoraid-task":
119119
self.on_upload_task(pp)
120120

121-
@show_wait_cursor
122121
@QtCore.pyqtSlot()
123122
def initialize(self, retry_if_fail=True):
124123
if self._jobs is not None:

0 commit comments

Comments
 (0)