Skip to content

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

Open
tmszi wants to merge 7 commits intoOSGeo:mainfrom
tmszi:wxgui-make-loc-download-dial-background
Open

wxGUI/locdownload: show progress of downloading new location as Data Catalog info bar message#3287
tmszi wants to merge 7 commits intoOSGeo:mainfrom
tmszi:wxgui-make-loc-download-dial-background

Conversation

@tmszi
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Comment thread gui/wxpython/startup/locdownload.py Outdated
@tmszi tmszi force-pushed the wxgui-make-loc-download-dial-background branch from 109df44 to 179ca1e Compare August 8, 2025 19:04
@tmszi
Copy link
Copy Markdown
Member Author

tmszi commented Aug 9, 2025

I'm testing this PR again, without mentioned error in comment above. Could @neteler and @echoix join into testing, please (if you have some free time)?

@tmszi tmszi force-pushed the wxgui-make-loc-download-dial-background branch from 179ca1e to 1ca2ef6 Compare August 11, 2025 07:35
@echoix
Copy link
Copy Markdown
Member

echoix commented Aug 13, 2025

I wasn't set up to do some GUI testing last weekend, sorry

@tmszi tmszi force-pushed the wxgui-make-loc-download-dial-background branch from 1ca2ef6 to 270a38b Compare September 18, 2025 07:24
@tmszi tmszi force-pushed the wxgui-make-loc-download-dial-background branch from 270a38b to a418a5d Compare October 2, 2025 05:31
…Catalog info bar message

And hide Download Location dialog during progress of downloading.
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

5 participants