notifications-winrt: Fix all uses of "" to L"".
The API uses Platform::String^. String's constructor takes in char16*. Fixes #1755
This commit is contained in:
parent
c12f33aa4c
commit
a1d2272dc0
@ -46,7 +46,7 @@ extern "C"
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
auto toastTemplate = ToastNotificationManager::GetTemplateContent (ToastTemplateType::ToastText02);
|
auto toastTemplate = ToastNotificationManager::GetTemplateContent (ToastTemplateType::ToastText02);
|
||||||
auto node_list = toastTemplate->GetElementsByTagName ("text");
|
auto node_list = toastTemplate->GetElementsByTagName (L"text");
|
||||||
UINT node_count = node_list->Length;
|
UINT node_count = node_list->Length;
|
||||||
|
|
||||||
auto wtitle = widen (title);
|
auto wtitle = widen (title);
|
||||||
@ -58,9 +58,9 @@ extern "C"
|
|||||||
toastTemplate->CreateTextNode (Platform::StringReference (wtext.c_str (), wtext.size ())));
|
toastTemplate->CreateTextNode (Platform::StringReference (wtext.c_str (), wtext.size ())));
|
||||||
|
|
||||||
// Mute sound, we already play our own
|
// Mute sound, we already play our own
|
||||||
auto node = toastTemplate->SelectSingleNode ("/toast");
|
auto node = toastTemplate->SelectSingleNode (L"/toast");
|
||||||
auto audio_elem = toastTemplate->CreateElement ("audio");
|
auto audio_elem = toastTemplate->CreateElement (L"audio");
|
||||||
audio_elem->SetAttribute ("silent", "true");
|
audio_elem->SetAttribute (L"silent", L"true");
|
||||||
static_cast<XmlElement^>(node)->AppendChild (audio_elem);
|
static_cast<XmlElement^>(node)->AppendChild (audio_elem);
|
||||||
|
|
||||||
notifier->Show (ref new ToastNotification (toastTemplate));
|
notifier->Show (ref new ToastNotification (toastTemplate));
|
||||||
@ -77,7 +77,7 @@ extern "C"
|
|||||||
notification_backend_init (void)
|
notification_backend_init (void)
|
||||||
{
|
{
|
||||||
if (!notifier)
|
if (!notifier)
|
||||||
notifier = ToastNotificationManager::CreateToastNotifier ("HexChat.Desktop.Notify");
|
notifier = ToastNotificationManager::CreateToastNotifier (L"HexChat.Desktop.Notify");
|
||||||
|
|
||||||
if (FAILED (Windows::Foundation::Initialize (RO_INIT_SINGLETHREADED)))
|
if (FAILED (Windows::Foundation::Initialize (RO_INIT_SINGLETHREADED)))
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user