Update Web Link Association in Preferences (#5791)

* Fix check_url_association return value

* Update Web Link Association Preferences

Uses a checkbox in place of button to show if the current instance is registered at a quick look
New function is added to build the link association item
Current association line shows "None" for no app associated, "Current Instance" if the current instance is associated, and the formatted path to the registered app (Removes quotes and other extra chars)

* Update to use localization

* Fix Linux Build

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Ocraftyone 2024-06-21 09:06:12 -04:00 committed by GitHub
parent 6c5cd0a31f
commit 5c9b82d6ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 88 additions and 26 deletions

View file

@ -6581,10 +6581,7 @@ bool GUI_App::check_url_association(std::wstring url_prefix, std::wstring& reg_b
reg_bin = key_full.QueryDefaultValue().ToStdWstring();
boost::filesystem::path binary_path(boost::filesystem::canonical(boost::dll::program_location()));
// wxString wbinary = wxString::FromUTF8(binary_path.string());
// std::string binary_string = (boost::format("%1%") % wbinary).str();
std::wstring key_string = L"\"" + binary_path.wstring() + L"\" L\"%1\"";
// return boost::iequals(key_string,(boost::format("%1%") % reg_bin).str());
std::wstring key_string = L"\"" + binary_path.wstring() + L"\" \"%1\"";
return key_string == reg_bin;
#else
return false;