mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-31 11:46:58 +08:00
Merge pull request #549 from ritiek/save-last-manual-connect-port-to-config
Commit Last Manual Party Connect Port to config
This commit is contained in:
commit
30d26bf976
@ -234,6 +234,7 @@ class ManualGatherTab(GatherTab):
|
||||
c_width = region_width
|
||||
c_height = region_height - 20
|
||||
last_addr = ba.app.config.get('Last Manual Party Connect Address', '')
|
||||
last_port = ba.app.config.get('Last Manual Party Connect Port', 43210)
|
||||
v = c_height - 70
|
||||
v -= 70
|
||||
ba.textwidget(
|
||||
@ -275,7 +276,7 @@ class ManualGatherTab(GatherTab):
|
||||
parent=self._container,
|
||||
editable=True,
|
||||
description=ba.Lstr(resource='gatherWindow.' 'portText'),
|
||||
text='43210',
|
||||
text=str(last_port),
|
||||
autoselect=True,
|
||||
max_chars=5,
|
||||
position=(c_width * 0.5 - 240 + 490, v - 30),
|
||||
@ -811,6 +812,7 @@ class ManualGatherTab(GatherTab):
|
||||
# Store for later.
|
||||
config = ba.app.config
|
||||
config['Last Manual Party Connect Address'] = resolved_address
|
||||
config['Last Manual Party Connect Port'] = port
|
||||
config.commit()
|
||||
ba.internal.connect_to_party(resolved_address, port=port)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user