mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 04:35:54 +08:00
Wifi config file explanation text.
This commit is contained in:
parent
e2cbc3d4e4
commit
e0331d1351
@ -2448,7 +2448,7 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
|
|||||||
// TODO: for when we're able to flash dictionaries
|
// TODO: for when we're able to flash dictionaries
|
||||||
// local_menu->Append(config_id_base + FirmwareMenuDict, _L("Flash Language File"), _L("Upload a language dictionary file into a Prusa printer"));
|
// local_menu->Append(config_id_base + FirmwareMenuDict, _L("Flash Language File"), _L("Upload a language dictionary file into a Prusa printer"));
|
||||||
}
|
}
|
||||||
local_menu->Append(config_id_base + ConfigMenuWifiConfigFile, _L("Wi-Fi Configuration File"), _L("Generate a file to be loaded by a Prusa printer to configure a Wi-Fi connection."));
|
local_menu->Append(config_id_base + ConfigMenuWifiConfigFile, _L("Wi-Fi Configuration File"), _L("Generate a file to be loaded by a Prusa printer to configure its Wi-Fi connection."));
|
||||||
|
|
||||||
local_menu->Bind(wxEVT_MENU, [this, config_id_base](wxEvent &event) {
|
local_menu->Bind(wxEVT_MENU, [this, config_id_base](wxEvent &event) {
|
||||||
switch (event.GetId() - config_id_base) {
|
switch (event.GetId() - config_id_base) {
|
||||||
|
@ -28,6 +28,15 @@ WifiConfigDialog::WifiConfigDialog(wxWindow* parent, std::string& file_path, Rem
|
|||||||
wxBoxSizer* vsizer = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* vsizer = new wxBoxSizer(wxVERTICAL);
|
||||||
panel->SetSizer(vsizer);
|
panel->SetSizer(vsizer);
|
||||||
|
|
||||||
|
// TRN Wifi config dialog explanation line 1.
|
||||||
|
wxStaticText* explain_label1 = new wxStaticText(panel, wxID_ANY, _L("Generate a file to be loaded by a Prusa printer to configure its Wi-Fi connection."));
|
||||||
|
// TRN Wifi config dialog explanation line 2.
|
||||||
|
wxStaticText* explain_label2 = new wxStaticText(panel, wxID_ANY, _L("Write this file on a USB flash drive. Its name will be prusa_printer_settings.ini."));
|
||||||
|
// TRN Wifi config dialog explanation line 3.
|
||||||
|
wxStaticText* explain_label3 = new wxStaticText(panel, wxID_ANY, _L("Your Prusa Printer should load this file automatically."));
|
||||||
|
// TRN Wifi config dialog explanation line 4.
|
||||||
|
wxStaticText* explain_label4 = new wxStaticText(panel, wxID_ANY, _L("Note: This file will contains SSID and password in plain text."));
|
||||||
|
|
||||||
auto* ssid_sizer = new wxBoxSizer(wxHORIZONTAL);
|
auto* ssid_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
// TRN SSID of WiFi network.
|
// TRN SSID of WiFi network.
|
||||||
wxStaticText* ssid_label = new wxStaticText(panel, wxID_ANY, GUI::format_wxstr("%1%:", _L("SSID")));
|
wxStaticText* ssid_label = new wxStaticText(panel, wxID_ANY, GUI::format_wxstr("%1%:", _L("SSID")));
|
||||||
@ -81,6 +90,10 @@ WifiConfigDialog::WifiConfigDialog(wxWindow* parent, std::string& file_path, Rem
|
|||||||
grid->Add(drive_label, 0, wxALIGN_CENTER_VERTICAL);
|
grid->Add(drive_label, 0, wxALIGN_CENTER_VERTICAL);
|
||||||
grid->Add(drive_sizer, 0, wxEXPAND);
|
grid->Add(drive_sizer, 0, wxEXPAND);
|
||||||
|
|
||||||
|
vsizer->Add(explain_label1, 0, wxALIGN_CENTER_VERTICAL);
|
||||||
|
vsizer->Add(explain_label2, 0, wxALIGN_CENTER_VERTICAL);
|
||||||
|
vsizer->Add(explain_label3, 0, wxALIGN_CENTER_VERTICAL);
|
||||||
|
vsizer->Add(explain_label4, 0, wxALIGN_CENTER_VERTICAL);
|
||||||
vsizer->Add(grid, 0, wxEXPAND | wxTOP | wxBOTTOM, 15);
|
vsizer->Add(grid, 0, wxEXPAND | wxTOP | wxBOTTOM, 15);
|
||||||
|
|
||||||
wxBoxSizer* buttons_sizer = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* buttons_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
@ -144,7 +144,6 @@ void fill_wifi_map(Slic3r::WifiSsidPskMap& wifi_map, std::string& connected_ssid
|
|||||||
wxString xml(xmlstr);
|
wxString xml(xmlstr);
|
||||||
boost::property_tree::ptree pt;
|
boost::property_tree::ptree pt;
|
||||||
std::stringstream ss(boost::nowide::narrow(xml));
|
std::stringstream ss(boost::nowide::narrow(xml));
|
||||||
BOOST_LOG_TRIVIAL(error) << ss.str();
|
|
||||||
boost::property_tree::read_xml(ss, pt);
|
boost::property_tree::read_xml(ss, pt);
|
||||||
std::string password;
|
std::string password;
|
||||||
std::string psk_protected;
|
std::string psk_protected;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user