mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-08 08:45:43 +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_width = region_width
|
||||||
c_height = region_height - 20
|
c_height = region_height - 20
|
||||||
last_addr = ba.app.config.get('Last Manual Party Connect Address', '')
|
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 = c_height - 70
|
||||||
v -= 70
|
v -= 70
|
||||||
ba.textwidget(
|
ba.textwidget(
|
||||||
@ -275,7 +276,7 @@ class ManualGatherTab(GatherTab):
|
|||||||
parent=self._container,
|
parent=self._container,
|
||||||
editable=True,
|
editable=True,
|
||||||
description=ba.Lstr(resource='gatherWindow.' 'portText'),
|
description=ba.Lstr(resource='gatherWindow.' 'portText'),
|
||||||
text='43210',
|
text=str(last_port),
|
||||||
autoselect=True,
|
autoselect=True,
|
||||||
max_chars=5,
|
max_chars=5,
|
||||||
position=(c_width * 0.5 - 240 + 490, v - 30),
|
position=(c_width * 0.5 - 240 + 490, v - 30),
|
||||||
@ -811,6 +812,7 @@ class ManualGatherTab(GatherTab):
|
|||||||
# Store for later.
|
# Store for later.
|
||||||
config = ba.app.config
|
config = ba.app.config
|
||||||
config['Last Manual Party Connect Address'] = resolved_address
|
config['Last Manual Party Connect Address'] = resolved_address
|
||||||
|
config['Last Manual Party Connect Port'] = port
|
||||||
config.commit()
|
config.commit()
|
||||||
ba.internal.connect_to_party(resolved_address, port=port)
|
ba.internal.connect_to_party(resolved_address, port=port)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user