Skip to content

Instantly share code, notes, and snippets.

@theuni
Created June 28, 2011 05:22
Show Gist options
  • Save theuni/1050545 to your computer and use it in GitHub Desktop.
Save theuni/1050545 to your computer and use it in GitHub Desktop.
diff --git a/xbmc/linux/HALManager.cpp b/xbmc/linux/HALManager.cpp
index b409af8..baf2db3 100644
--- a/xbmc/linux/HALManager.cpp
+++ b/xbmc/linux/HALManager.cpp
@@ -30,6 +30,7 @@
#include "guilib/LocalizeStrings.h"
#include "powermanagement/PowerManager.h"
#include "settings/AdvancedSettings.h"
+#include "dialogs/GUIDialogKaiToast.h"
#ifdef HAS_SDL_JOYSTICK
#include <SDL/SDL.h>
@@ -396,7 +397,7 @@ void CHALManager::UpdateDevice(const char *udi)
if (g_advancedSettings.m_handleMounting) // If the device was mounted by XBMC before it's still mounted by XBMC.
dev.MountedByXBMC = m_Volumes[i].MountedByXBMC;
if (!dev.Mounted && m_Volumes[i].Mounted)
- g_application.m_guiDialogKaiToast.QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(13023), dev.FriendlyName.c_str(), TOAST_DISPLAY_TIME, false);
+ CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(13023), dev.FriendlyName.c_str(), TOAST_DISPLAY_TIME, false);
m_Volumes[i] = dev;
break;
@@ -462,7 +463,7 @@ void CHALManager::HandleNewVolume(CStorageDevice *dev)
{
CLog::Log(LOGINFO, "HAL: mounted %s on %s", dev->FriendlyName.c_str(), dev->MountPoint.c_str());
if (m_Notifications)
- g_application.m_guiDialogKaiToast.QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(13021), dev->FriendlyName.c_str(), TOAST_DISPLAY_TIME, false);
+ CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(13021), dev->FriendlyName.c_str(), TOAST_DISPLAY_TIME, false);
}
}
libhal_free_string_array(capability);
@@ -525,7 +526,7 @@ void CHALManager::AddDevice(const char *udi)
g_Joystick.Initialize();
if (m_Notifications)
- g_application.m_guiDialogKaiToast.QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(13024), dev.FriendlyName.c_str(), TOAST_DISPLAY_TIME, false);
+ CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(13024), dev.FriendlyName.c_str(), TOAST_DISPLAY_TIME, false);
}
}
}
@@ -561,7 +562,7 @@ bool CHALManager::RemoveDevice(const char *udi)
if (g_advancedSettings.m_handleMounting)
UnMount(m_Volumes[i]);
if (m_Notifications)
- g_application.m_guiDialogKaiToast.QueueNotification(CGUIDialogKaiToast::Warning, g_localizeStrings.Get(13022), m_Volumes[i].FriendlyName.c_str());
+ CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Warning, g_localizeStrings.Get(13022), m_Volumes[i].FriendlyName.c_str());
CLog::Log(LOGNOTICE, "HAL: Unsafe drive removal");
}
m_Volumes.erase(m_Volumes.begin() + i);
@@ -589,7 +590,7 @@ bool CHALManager::RemoveDevice(const char *udi)
}
g_Joystick.Initialize();
- g_application.m_guiDialogKaiToast.QueueNotification(CGUIDialogKaiToast::Warning, g_localizeStrings.Get(13025), m_Joysticks[i].FriendlyName.c_str(), TOAST_DISPLAY_TIME, false);
+ CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Warning, g_localizeStrings.Get(13025), m_Joysticks[i].FriendlyName.c_str(), TOAST_DISPLAY_TIME, false);
}
m_Joysticks.erase(m_Joysticks.begin() + i);
return true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment