@@ -20,6 +20,8 @@ int get_hms_info_version(std::string& version)
2020 AppConfig* config = wxGetApp ().app_config ;
2121 if (!config)
2222 return -1 ;
23+ if (config->get_stealth_mode ())
24+ return -1 ;
2325 std::string hms_host = config->get_hms_host ();
2426 if (hms_host.empty ()) {
2527 BOOST_LOG_TRIVIAL (error) << " hms_host is empty" ;
@@ -58,6 +60,7 @@ int HMSQuery::download_hms_related(const std::string& hms_type, const std::strin
5860
5961 AppConfig* config = wxGetApp ().app_config ;
6062 if (!config) return -1 ;
63+ if (config->get_stealth_mode ()) return -1 ;
6164
6265 std::string hms_host = wxGetApp ().app_config ->get_hms_host ();
6366 std::string lang;
@@ -541,7 +544,11 @@ wxString HMSQuery::query_print_image_action(const MachineObject* obj, int print_
541544 char buf[32 ];
542545 ::sprintf (buf, " %08X" , print_error);
543546 // The first three digits of SN number
544- return _query_error_image_action (get_dev_id_type (obj),std::string (buf), button_action);
547+ const auto result = _query_error_image_action (get_dev_id_type (obj),std::string (buf), button_action);
548+ if (wxGetApp ().app_config ->get_stealth_mode () && result.Contains (" http" )) {
549+ return wxEmptyString;
550+ }
551+ return result;
545552}
546553
547554wxImage HMSQuery::query_image_from_local (const wxString& image_name)
@@ -629,6 +636,7 @@ std::string get_hms_wiki_url(std::string error_code)
629636{
630637 AppConfig* config = wxGetApp ().app_config ;
631638 if (!config) return " " ;
639+ if (config->get_stealth_mode ()) return " " ;
632640
633641 std::string hms_host = wxGetApp ().app_config ->get_hms_host ();
634642 std::string lang_code = HMSQuery::hms_language_code ();
@@ -654,6 +662,8 @@ std::string get_hms_wiki_url(std::string error_code)
654662
655663std::string get_error_message (int error_code)
656664{
665+ if (wxGetApp ().app_config ->get_stealth_mode ()) return " " ;
666+
657667 char buf[64 ];
658668 std::string result_str = " " ;
659669 std::sprintf (buf," %08X" ,error_code);
0 commit comments