aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris "Koying" Browet <cbro@semperpax.com>2013-10-21 12:22:45 +0200
committerChris "Koying" Browet <cbro@semperpax.com>2013-10-21 18:14:16 +0200
commit5dd8fe0df777c102ae52b7bc496f5196fccbc237 (patch)
treef8fcba90d6ad92834c1f5201962439877314ca07
parenteb75f9cf324e508f9df4a7661ea811d6154a25d8 (diff)
fixup kaitoast
-rw-r--r--xbmc/dialogs/GUIDialogKaiToast.cpp9
-rw-r--r--xbmc/dialogs/GUIDialogKaiToast.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/xbmc/dialogs/GUIDialogKaiToast.cpp b/xbmc/dialogs/GUIDialogKaiToast.cpp
index 062d3697f4..d65162ecc4 100644
--- a/xbmc/dialogs/GUIDialogKaiToast.cpp
+++ b/xbmc/dialogs/GUIDialogKaiToast.cpp
@@ -38,6 +38,7 @@ CCriticalSection CGUIDialogKaiToast::m_critical;
CGUIDialogKaiToast::CGUIDialogKaiToast(void)
: CGUIDialog(WINDOW_DIALOG_KAI_TOAST, "DialogKaiToast.xml")
{
+ m_defaultIcon = "";
m_loadType = LOAD_ON_GUI_INIT;
m_timer = 0;
m_toastDisplayTime = 0;
@@ -71,6 +72,9 @@ bool CGUIDialogKaiToast::OnMessage(CGUIMessage& message)
void CGUIDialogKaiToast::OnWindowLoaded()
{
CGUIDialog::OnWindowLoaded();
+ CGUIImage *image = (CGUIImage *)GetControl(POPUP_ICON);
+ if (image)
+ m_defaultIcon = image->GetFileName();
}
void CGUIDialogKaiToast::QueueNotification(eMessageType eType, const CStdString& aCaption, const CStdString& aDescription, unsigned int displayTime /*= TOAST_DISPLAY_TIME*/, bool withSound /*= true*/, unsigned int messageTime /*= TOAST_MESSAGE_TIME*/)
@@ -148,11 +152,10 @@ bool CGUIDialogKaiToast::DoWork()
if (typeImage)
strTypeImage = typeImage->GetFileName();
else
- CLog::Log(LOGWARNING, "Missing control in DialogKaiToast: %d", toast.eType);
+ strTypeImage = m_defaultIcon;
}
- if (!strTypeImage.IsEmpty())
- image->SetFileName(strTypeImage);
+ image->SetFileName(strTypeImage);
}
// Play the window specific init sound for each notification queued
diff --git a/xbmc/dialogs/GUIDialogKaiToast.h b/xbmc/dialogs/GUIDialogKaiToast.h
index c9f5a4c1f5..d0f36efc51 100644
--- a/xbmc/dialogs/GUIDialogKaiToast.h
+++ b/xbmc/dialogs/GUIDialogKaiToast.h
@@ -66,6 +66,8 @@ protected:
unsigned int m_toastDisplayTime;
unsigned int m_toastMessageTime;
+ CStdString m_defaultIcon;
+
static TOASTQUEUE m_notifications;
static CCriticalSection m_critical;
};