本文整理汇总了C++中CGUIDialogKaiToast::ResetTimer方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIDialogKaiToast::ResetTimer方法的具体用法?C++ CGUIDialogKaiToast::ResetTimer怎么用?C++ CGUIDialogKaiToast::ResetTimer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIDialogKaiToast
的用法示例。
在下文中一共展示了CGUIDialogKaiToast::ResetTimer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnPostInstall
void CAddonInstallJob::OnPostInstall(bool reloadAddon)
{
if (m_addon->Type() < ADDON_VIZ_LIBRARY && g_settings.m_bAddonNotifications)
{
CGUIDialogKaiToast::QueueNotification(m_addon->Icon(),
m_addon->Name(),
g_localizeStrings.Get(m_update ? 24065 : 24064),
TOAST_DISPLAY_TIME,false,
TOAST_DISPLAY_TIME);
}
if (m_addon->Type() == ADDON_SKIN)
{
if (reloadAddon || (!m_update && CGUIDialogYesNo::ShowAndGetInput(m_addon->Name(),
g_localizeStrings.Get(24099),"","")))
{
g_guiSettings.SetString("lookandfeel.skin",m_addon->ID().c_str());
CGUIDialogKaiToast *toast = (CGUIDialogKaiToast *)g_windowManager.GetWindow(WINDOW_DIALOG_KAI_TOAST);
if (toast)
{
toast->ResetTimer();
toast->Close(true);
}
g_application.getApplicationMessenger().ExecBuiltIn("ReloadSkin");
}
}
}
示例2: OnPostInstall
void CAddonInstallJob::OnPostInstall(bool reloadAddon)
{
if (m_addon->Type() < ADDON_VIZ_LIBRARY && CSettings::Get().GetBool("general.addonnotifications"))
{
CGUIDialogKaiToast::QueueNotification(m_addon->Icon(),
m_addon->Name(),
g_localizeStrings.Get(m_update ? 24065 : 24064),
TOAST_DISPLAY_TIME,false,
TOAST_DISPLAY_TIME);
}
if (m_addon->Type() == ADDON_SKIN)
{
if (reloadAddon || (!m_update && CGUIDialogYesNo::ShowAndGetInput(m_addon->Name(),
g_localizeStrings.Get(24099),"","")))
{
CGUIDialogKaiToast *toast = (CGUIDialogKaiToast *)g_windowManager.GetWindow(WINDOW_DIALOG_KAI_TOAST);
if (toast)
{
toast->ResetTimer();
toast->Close(true);
}
if (CSettings::Get().GetString("lookandfeel.skin") == m_addon->ID())
CApplicationMessenger::Get().ExecBuiltIn("ReloadSkin", true);
else
CSettings::Get().SetString("lookandfeel.skin",m_addon->ID().c_str());
}
}
if (m_addon->Type() == ADDON_SERVICE)
{
CAddonMgr::Get().DisableAddon(m_addon->ID(),!reloadAddon); //return it into state it was before OnPreInstall()
if (reloadAddon) // reload/start it if it was running
{
// regrab from manager to have the correct path set
AddonPtr addon;
CAddonMgr::Get().GetAddon(m_addon->ID(), addon);
boost::shared_ptr<CService> service = boost::dynamic_pointer_cast<CService>(addon);
if (service)
service->Start();
}
}
if (m_addon->Type() == ADDON_REPOSITORY)
{
VECADDONS addons;
addons.push_back(m_addon);
CJobManager::GetInstance().AddJob(new CRepositoryUpdateJob(addons), &CAddonInstaller::Get());
}
if (m_addon->Type() == ADDON_PVRDLL)
{
// (re)start the pvr manager
PVR::CPVRManager::Get().Start(true);
}
}
示例3: OnPostInstall
void CLanguageResource::OnPostInstall(bool update, bool modal)
{
if (IsInUse() ||
(!update && !modal && CGUIDialogYesNo::ShowAndGetInput(Name(), 24132)))
{
CGUIDialogKaiToast *toast = (CGUIDialogKaiToast *)g_windowManager.GetWindow(WINDOW_DIALOG_KAI_TOAST);
if (toast)
{
toast->ResetTimer();
toast->Close(true);
}
if (IsInUse())
g_langInfo.SetLanguage(ID());
else
CSettings::Get().SetString(LANGUAGE_SETTING, ID());
}
}
示例4: OnPostInstall
void CLanguageResource::OnPostInstall(bool update, bool modal)
{
if (IsInUse() ||
(!update && !modal &&
(HELPERS::ShowYesNoDialogText(CVariant{Name()}, CVariant{24132}) == DialogResponse::YES)))
{
CGUIDialogKaiToast *toast = (CGUIDialogKaiToast *)g_windowManager.GetWindow(WINDOW_DIALOG_KAI_TOAST);
if (toast)
{
toast->ResetTimer();
toast->Close(true);
}
if (IsInUse())
g_langInfo.SetLanguage(ID());
else
CServiceBroker::GetSettings().SetString(CSettings::SETTING_LOCALE_LANGUAGE, ID());
}
}