about summary refs log tree commit diff stats
path: root/tracker_frame.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-05-03 15:13:14 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-05-03 15:13:14 -0400
commitf2a4553fa9d64cc39d138531d0a8d662af733ef8 (patch)
treeb2c7a0fe753fe2ea132b0582e8f1b7521303f3e1 /tracker_frame.cpp
parentdc4a14397ae226d91041389c2a47993f9c22f83d (diff)
downloadlingo-ap-tracker-f2a4553fa9d64cc39d138531d0a8d662af733ef8.tar.gz
lingo-ap-tracker-f2a4553fa9d64cc39d138531d0a8d662af733ef8.tar.bz2
lingo-ap-tracker-f2a4553fa9d64cc39d138531d0a8d662af733ef8.zip
Connection details are saved locally
Diffstat (limited to 'tracker_frame.cpp')
-rw-r--r--tracker_frame.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tracker_frame.cpp b/tracker_frame.cpp index 37a8281..774b710 100644 --- a/tracker_frame.cpp +++ b/tracker_frame.cpp
@@ -2,6 +2,7 @@
2 2
3#include "ap_state.h" 3#include "ap_state.h"
4#include "connection_dialog.h" 4#include "connection_dialog.h"
5#include "tracker_config.h"
5#include "tracker_panel.h" 6#include "tracker_panel.h"
6 7
7enum TrackerFrameIds { ID_CONNECT = 1 }; 8enum TrackerFrameIds { ID_CONNECT = 1 };
@@ -64,6 +65,11 @@ void TrackerFrame::OnConnect(wxCommandEvent &event) {
64 ConnectionDialog dlg; 65 ConnectionDialog dlg;
65 66
66 if (dlg.ShowModal() == wxID_OK) { 67 if (dlg.ShowModal() == wxID_OK) {
68 GetTrackerConfig().ap_server = dlg.GetServerValue();
69 GetTrackerConfig().ap_player = dlg.GetPlayerValue();
70 GetTrackerConfig().ap_password = dlg.GetPasswordValue();
71 GetTrackerConfig().Save();
72
67 GetAPState().Connect(dlg.GetServerValue(), dlg.GetPlayerValue(), 73 GetAPState().Connect(dlg.GetServerValue(), dlg.GetPlayerValue(),
68 dlg.GetPasswordValue()); 74 dlg.GetPasswordValue());
69 } 75 }