Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI/locdownload: show progress of downloading new location as Data Catalog info bar message #3287

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Dec 4, 2023

Implementing/close feature #3278.

wxgui_locdownload_dialog_as_bg.mp4

@tmszi tmszi added enhancement New feature or request GUI wxGUI related labels Dec 4, 2023
@tmszi tmszi self-assigned this Dec 4, 2023
@tmszi tmszi added this to the 8.4.0 milestone Dec 4, 2023
@tmszi tmszi linked an issue Dec 4, 2023 that may be closed by this pull request
Copy link
Member

@landam landam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works nicely, thanks for improvement. @tmszi Some notes below:

  • would be nice to avoid blinking Abort button when progress is updated (minor issue)
  • when download process is finished Abort button does nothing - it should be automatically removed (major issue)

image

@github-actions github-actions bot added the Python Related code is in Python label Feb 9, 2024
@tmszi
Copy link
Member Author

tmszi commented Feb 9, 2024

Works nicely, thanks for improvement. @tmszi Some notes below:

* would be nice to avoid blinking `Abort` button when progress is updated (minor issue)

* when download process is finished `Abort` button does nothing - it should be automatically removed (major issue)

Thank for review and suggestions. Both issues are fixed with commit no. cfb83a5.

@landam
Copy link
Member

landam commented Feb 25, 2024

Thank for review and suggestions. Both issues are fixed with commit no.

Great, I tested updated PR and I can confirm that both issues are fixed.

@landam
Copy link
Member

landam commented Feb 25, 2024

@tmszi Small note: It make sense to me to show the dialog for selecting location to be downloaded when process of downloading is aborted. I am just not sure whether it make sense to show the dialog on successful download.

image

@landam
Copy link
Member

landam commented Feb 25, 2024

When testing multiple times I am getting error:

Traceback (most recent call last):
  File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/core/gthread.py", line 138, in OnDone

event.ondone(event)
  File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/startup/locdownload.py", line 411, in
download_complete_callback

self.parent.newLocationIsDownloaded.emit()
  File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/signal.py", line 233, in
emit

dispatcher.send(signal=self, *args, **kwargs)
  File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/dispatcher.py", line 343, in
send

response = robustapply.robustApply(
^
  File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/robustapply.py", line 60, in
robustApply

return receiver(*arguments, **named)
  File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/datacatalog/tree.py", line 1652, in
AddDownloadedNewLocation

self._reloadGrassDBNode(self.selected_grassdb[0])

@tmszi
Copy link
Member Author

tmszi commented Feb 26, 2024

@tmszi Small note: It make sense to me to show the dialog for selecting location to be downloaded when process of downloading is aborted. I am just not sure whether it make sense to show the dialog on successful download.

Fixed with 90e4a7c.

@tmszi
Copy link
Member Author

tmszi commented Feb 26, 2024

When testing multiple times I am getting error:

Traceback (most recent call last):
  File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/core/gthread.py", line 138, in OnDone

event.ondone(event)
  File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/startup/locdownload.py", line 411, in
download_complete_callback

self.parent.newLocationIsDownloaded.emit()
  File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/signal.py", line 233, in
emit

dispatcher.send(signal=self, *args, **kwargs)
  File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/dispatcher.py", line 343, in
send

response = robustapply.robustApply(
^
  File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/robustapply.py", line 60, in
robustApply

return receiver(*arguments, **named)
  File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/datacatalog/tree.py", line 1652, in
AddDownloadedNewLocation

self._reloadGrassDBNode(self.selected_grassdb[0])

I wasn't successfull to reproduce it.

@landam
Copy link
Member

landam commented Mar 22, 2024

I wasn't successfull to reproduce it.

I tested again with the same result:

image

@tmszi It seems to be related to multiple GRASS data dirs (databases). I tried to removed second data dir and download was successful then

image

@landam landam self-requested a review March 22, 2024 22:27
@landam
Copy link
Member

landam commented Mar 23, 2024

I was not able to reproduce this bug in the main branch. So it seems to be related to this PR.

@tmszi
Copy link
Member Author

tmszi commented Mar 24, 2024

I was not able to reproduce this bug in the main branch. So it seems to be related to this PR.

I can' reproduce it (I tried with 2 and 3 GRASS GIS database directories added). Could you send me exact follow steps to reproduce it, please?

Tested with Python/wxPython version:

GRASS fire_grass6data/demomapset:~ > python3 -c "import sys, wx; print(sys.version); print(wx.version())"
3.11.8 (main, Mar  1 2024, 19:20:20) [GCC 13.2.1 20240113]
4.2.1 gtk3 (phoenix) wxWidgets 3.2.2.1

@petrasovaa petrasovaa modified the milestones: 8.4.0, 8.4.1 May 9, 2024
@wenzeslaus wenzeslaus modified the milestones: 8.4.1, 8.5.0 Nov 5, 2024
@tmszi tmszi force-pushed the wxgui-make-loc-download-dial-background branch from cf24276 to 1b9482c Compare November 5, 2024 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GUI wxGUI related Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] GUI Location Download window should not be modal
4 participants