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

fix(main_event): Implement popup menu #218

Merged
merged 1 commit into from
Jun 25, 2022
Merged

Conversation

wb8tyw
Copy link
Owner

@wb8tyw wb8tyw commented Jun 25, 2022

Implement the Mouse Popup Menu for events.

d_rats/ui/event_popup_model.py:
New module for EventPopupModel class.

d_rats/ui/event_tab.py:
Use EventPopupModel to implement mouse popup menu.

d_rats/ui/message_list.py:
Fix broken Docstrings.

docs/source/d_rats.ui.rst:
Add new modules for message and event classes.

Implement the Mouse Popup Menu for events.

d_rats/ui/event_popup_model.py:
  New module for EventPopupModel class.

d_rats/ui/event_tab.py:
  Use EventPopupModel to implement mouse popup menu.

d_rats/ui/message_list.py:
  Fix broken Docstrings.

docs/source/d_rats.ui.rst:
  Add new modules for message and event classes.
@wb8tyw
Copy link
Owner Author

wb8tyw commented Jun 25, 2022

This implements the Event Popup menu on the event display.

This menu only seems to be available for File and Form transfer sessions while the session is in progress.

The existing code has some bugs in it that will need to be addressed later.

To test you need two d-rats clients that can communicate. Best works over a serial port, as internet may be too fast to catch.

With this fork, you can run multiple d-rats clients on the same computer with different -c options and use two serial ports connected via a Null Modem to simulate radios.

  1. Client 1: set display to event window.
  2. Client 2: In files tab, connect to client 1 and start a file transfer to client 1.
  3. Client 1: Find the file transfer in progress, and right click on it. Select "Stop".
  4. Transfer should stop.
  5. Client 1: Right click on menu should not have any options enabled as they will fail. Existing Bug.
  6. Client 2. In the event tab, find the stopped file transfer, right click on it, Select "Restart".
  7. File transfer should restart.

@wb8tyw wb8tyw linked an issue Jun 25, 2022 that may be closed by this pull request
@wb8tyw wb8tyw merged commit ef90dea into python3_tyw Jun 25, 2022
@wb8tyw wb8tyw deleted the wb8tyw_event_popup branch June 25, 2022 13:47
@maurizioandreotti
Copy link
Collaborator

Hi John
option "-c" seems not working:
i.e launching it to use a different config folder:
$ python3 ./d-rats.py --loglevel DEBUG -c C:\Users\mauri\AppData\Roaming\D-Rats-test

06/25/2022 19:18:18:INFO:D-Rats:main: re-config option found -- Reconfigure D-rats
06/25/2022 19:18:18:INFO:Mainapp:Enabled debug log for Win32 systems
06/25/2022 19:18:18:DEBUG:Version:HTTP_CLIENT_HEADERS={'User-Agent': 'd-rats/0.4.00 pre-release1'}
06/25/2022 19:18:18:INFO:QST:FeedParser not available

It keeps loading the standard one:

06/25/2022 19:18:18:INFO:DratsConfig:File C:/Users/mauri/AppData/Roaming/D-RATS-EV/d-rats.config

06/25/2022 19:18:18:INFO:MainApp:_refresh_lang: Loading locale `it'
06/25/2022 19:18:18:INFO:MainApp:_refresh_lang: Locale dir is: C:/msys64/home/mauri/D-Rats-python3_tyw/locale
06/25/2022 19:18:18:ERROR:MainApp:_refresh_lang: Messages catalog file missing for it. Need to use 'msgfmt tool to generate.
06/25/2022 19:18:18:INFO:MainApp:D-RATS v0.4.00 pre-release1 starting at Sat Jun 25 19:18:18 2022 on Platform Win32Platform:
base: C:/Users/mauri/AppData/Roaming/D-RATS-EV
source_dir: C:/msys64/home/mauri/D-Rats-python3_tyw
OS version: Windows 10 (10, 0, 19044, 2, '')
.........

@maurizioandreotti
Copy link
Collaborator

maurizioandreotti commented Jun 27, 2022

re-doing the test,

  • client to receive the file, software versione with "-c parameter" fixed , callsign: IZ2LXI-W
  • client to serve the file (and the one with "stop/resume"), callsign: IZ2LXI
  • the two clients run on same pc with windows 10
  • connected via internet on ratflector k3pdr.dstargateway.org-
  • size of file transferred is about 900KB so to require a enough time to to get to stop command :-)

when I click the contextual menu on the event transfer is difficult to get, some times i clicked and it was not showing or showed and immediately disappeared

once i was able to have it, clicking on "stop" i got the following error :

Traceback (most recent call last):

File "C:/msys64\home\mauri\D-Rats-wb8tyw_option/d_rats/mainapp.py", line 1255, in __user_stop_session
session = smgr.sessions[sid]

KeyError: 4

@wb8tyw
Copy link
Owner Author

wb8tyw commented Jun 27, 2022

That is part of an existing bug in the session manager and is #220

The transfers over a ratflector even for a 900Kb file are still probably still too fast to catch the transfer in a state that it can be stopped.

@maurizioandreotti
Copy link
Collaborator

maurizioandreotti commented Jun 27, 2022 via email

@wb8tyw
Copy link
Owner Author

wb8tyw commented Jun 27, 2022

Only the client that did not originate the transfer can do a stop or a cancel, and they can only do it once on that transfer. Attempting to do it more than once will trigger the known bug that you saw.
Issuing a stop command on the client that originated the transfer will also trigger the known bug.
If the transfer has already completed, even if the event has not updated, this will also trigger the known bug.

The stop and cancel are of limited use. The resume, which can only done on the system that originated the transfer is of more use if you can get that far, as that can be the case of having a radio link drop.

wb8tyw added a commit that referenced this pull request Sep 5, 2022
Implement the Mouse Popup Menu for events.

d_rats/ui/event_popup_model.py:
  New module for EventPopupModel class.

d_rats/ui/event_tab.py:
  Use EventPopupModel to implement mouse popup menu.

d_rats/ui/message_list.py:
  Fix broken Docstrings.

docs/source/d_rats.ui.rst:
  Add new modules for message and event classes.

Co-authored-by: John E. Malmberg <wb8tyw@gmail.com>
wb8tyw added a commit that referenced this pull request Sep 6, 2022
Implement the Mouse Popup Menu for events.

d_rats/ui/event_popup_model.py:
  New module for EventPopupModel class.

d_rats/ui/event_tab.py:
  Use EventPopupModel to implement mouse popup menu.

d_rats/ui/message_list.py:
  Fix broken Docstrings.

docs/source/d_rats.ui.rst:
  Add new modules for message and event classes.

Co-authored-by: John E. Malmberg <wb8tyw@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

main_event popup window does not work.
3 participants