diff options
author | spiff_ <spiff_@svn> | 2010-10-20 19:08:25 +0000 |
---|---|---|
committer | spiff_ <spiff_@svn> | 2010-10-20 19:08:25 +0000 |
commit | 286c3d2aa89c89e5a8e9f291c5ec9aa7671b442b (patch) | |
tree | 0bd218b3a66a9453ec01f9f2bfcdf9cdd998708a | |
parent | 4d92c8cc0338a122d517abfefc9e142599aed38c (diff) |
added: option to shut up notifications from the add-on system. new string, sorry translators
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@34887 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | addons/skin.confluence/720p/AddonBrowser.xml | 13 | ||||
-rw-r--r-- | language/English/strings.xml | 1 | ||||
-rw-r--r-- | xbmc/GUIWindowAddonBrowser.cpp | 21 | ||||
-rw-r--r-- | xbmc/Settings.cpp | 3 | ||||
-rw-r--r-- | xbmc/Settings.h | 1 | ||||
-rw-r--r-- | xbmc/addons/Repository.cpp | 2 |
6 files changed, 33 insertions, 8 deletions
diff --git a/addons/skin.confluence/720p/AddonBrowser.xml b/addons/skin.confluence/720p/AddonBrowser.xml index 8ac54d5fc5..baf9190ddd 100644 --- a/addons/skin.confluence/720p/AddonBrowser.xml +++ b/addons/skin.confluence/720p/AddonBrowser.xml @@ -173,11 +173,22 @@ <onleft>50</onleft>
<onright>50</onright>
<onup>3</onup>
+ <ondown>6</ondown>
+ </control>
+ <control type="radiobutton" id ="6">
+ <description>No notifications</description>
+ <posx>0</posx>
+ <posy>170</posy>
+ <include>ButtonCommonValues</include>
+ <label>25000</label>
+ <onleft>50</onleft>
+ <onright>50</onright>
+ <onup>5</onup>
<ondown>610</ondown>
</control>
<control type="button" id="610">
<description>Fake Button to fix Player Controls Navigation</description>
- <onup>5</onup>
+ <onup>6</onup>
<ondown>603</ondown>
<visible>false</visible>
</control>
diff --git a/language/English/strings.xml b/language/English/strings.xml index 3778e0eab5..9f2f2119a9 100644 --- a/language/English/strings.xml +++ b/language/English/strings.xml @@ -2259,6 +2259,7 @@ <string id="24097">Would you like to disable it on your system?</string> <string id="24098">Broken</string> <string id="24099">Would you like to switch to this skin?</string> + <string id="25000">Notifications</string> <!-- strings 29800 thru 29998 reserved strings used only in the default Project Mayhem III skin and not c++ code --> <string id="29800">Library Mode</string> diff --git a/xbmc/GUIWindowAddonBrowser.cpp b/xbmc/GUIWindowAddonBrowser.cpp index 6929453bb8..464ce6901b 100644 --- a/xbmc/GUIWindowAddonBrowser.cpp +++ b/xbmc/GUIWindowAddonBrowser.cpp @@ -51,6 +51,7 @@ #include "GUISettings.h" #define CONTROL_AUTOUPDATE 5 +#define CONTROL_SHUTUP 6 using namespace ADDON; using namespace XFILE; @@ -104,6 +105,12 @@ bool CGUIWindowAddonBrowser::OnMessage(CGUIMessage& message) g_settings.Save(); return true; } + else if (iControl == CONTROL_SHUTUP) + { + g_settings.m_bAddonNotifications = !g_settings.m_bAddonNotifications; + g_settings.Save(); + return true; + } else if (m_viewControl.HasControl(iControl)) // list/thumb control { // get selected item @@ -352,7 +359,7 @@ void CGUIWindowAddonBrowser::OnJobComplete(unsigned int jobID, } if (addon->Type() >= ADDON_VIZ_LIBRARY) continue; - if (update) + if (update && g_settings.m_bAddonNotifications) { g_application.m_guiDialogKaiToast.QueueNotification( addon->Icon(), @@ -364,11 +371,12 @@ void CGUIWindowAddonBrowser::OnJobComplete(unsigned int jobID, { if (addon->Type() == ADDON_SKIN) m_prompt = addon; - g_application.m_guiDialogKaiToast.QueueNotification( - addon->Icon(), - addon->Name(), - g_localizeStrings.Get(24064), - TOAST_DISPLAY_TIME,false); + if (g_settings.m_bAddonNotifications) + g_application.m_guiDialogKaiToast.QueueNotification( + addon->Icon(), + addon->Name(), + g_localizeStrings.Get(24064), + TOAST_DISPLAY_TIME,false); } } else @@ -395,6 +403,7 @@ void CGUIWindowAddonBrowser::OnJobComplete(unsigned int jobID, void CGUIWindowAddonBrowser::UpdateButtons() { SET_CONTROL_SELECTED(GetID(),CONTROL_AUTOUPDATE,g_settings.m_bAddonAutoUpdate); + SET_CONTROL_SELECTED(GetID(),CONTROL_SHUTUP,g_settings.m_bAddonNotifications); CGUIMediaWindow::UpdateButtons(); } diff --git a/xbmc/Settings.cpp b/xbmc/Settings.cpp index c98c303581..f33622725a 100644 --- a/xbmc/Settings.cpp +++ b/xbmc/Settings.cpp @@ -95,6 +95,7 @@ void CSettings::Initialize() m_bMyVideoNavFlatten = false; m_bStartVideoWindowed = false; m_bAddonAutoUpdate = false; + m_bAddonNotifications = true; m_nVolumeLevel = 0; m_dynamicRangeCompressionLevel = 0; @@ -711,6 +712,7 @@ bool CSettings::LoadSettings(const CStdString& strSettingsFile) XMLUtils::GetBoolean(pElement, "autocrop", m_defaultVideoSettings.m_Crop); XMLUtils::GetBoolean(pElement, "nonlinstretch", m_defaultVideoSettings.m_CustomNonLinStretch); XMLUtils::GetBoolean(pElement, "addonautoupdate", m_bAddonAutoUpdate); + XMLUtils::GetBoolean(pElement, "addonnotifications", m_bAddonNotifications); m_defaultVideoSettings.m_SubtitleCached = false; } @@ -877,6 +879,7 @@ bool CSettings::SaveSettings(const CStdString& strSettingsFile, CGUISettings *lo XMLUtils::SetBoolean(pNode, "autocrop", m_defaultVideoSettings.m_Crop); XMLUtils::SetBoolean(pNode, "nonlinstretch", m_defaultVideoSettings.m_CustomNonLinStretch); XMLUtils::SetBoolean(pNode, "addonautoupdate", m_bAddonAutoUpdate); + XMLUtils::SetBoolean(pNode, "addonnotifications", m_bAddonNotifications); // audio settings diff --git a/xbmc/Settings.h b/xbmc/Settings.h index 6886dad3ee..0184d3ffda 100644 --- a/xbmc/Settings.h +++ b/xbmc/Settings.h @@ -199,6 +199,7 @@ public: bool m_bMyVideoNavFlatten; bool m_bStartVideoWindowed; bool m_bAddonAutoUpdate; + bool m_bAddonNotifications; int m_iVideoStartWindow; diff --git a/xbmc/addons/Repository.cpp b/xbmc/addons/Repository.cpp index 763fc7daa9..92864dcd64 100644 --- a/xbmc/addons/Repository.cpp +++ b/xbmc/addons/Repository.cpp @@ -200,7 +200,7 @@ bool CRepositoryUpdateJob::DoWork() return false; window->AddJob(addons[i]->Path()); } - else + else if (g_settings.m_bAddonNotifications) { g_application.m_guiDialogKaiToast.QueueNotification(addon->Icon(), g_localizeStrings.Get(24061), |