changed: allow no weather add-on
authorspiff <spiff@xbmc.org>
Sat, 12 Nov 2011 09:47:41 +0000 (10:47 +0100)
committerspiff <spiff@xbmc.org>
Mon, 14 Nov 2011 11:07:11 +0000 (12:07 +0100)
addons/skin.confluence/720p/Home.xml
xbmc/settings/GUIWindowSettingsCategory.cpp

index 8e8fec8..8d4c9cc 100644 (file)
                                                <onclick>ActivateWindow(Weather)</onclick>
                                                <icon>special://skin/backgrounds/weather.jpg</icon>
                                                <thumb>$INFO[Skin.String(Home_Custom_Back_Weather_Folder)]</thumb>
-                                               <visible>!Skin.HasSetting(HomeMenuNoWeatherButton)</visible>
+                                               <visible>!Skin.HasSetting(HomeMenuNoWeatherButton)+!IsEmpty(Weather.Plugin)</visible>
                                        </item>
                                        <item id="4">
                                                <label>1</label>
index 309d516..753c2b8 100644 (file)
@@ -1003,7 +1003,7 @@ void CGUIWindowSettingsCategory::OnClick(CBaseSettingControl *pSettingControl)
   { // prompt for the addon
     CSettingAddon *setting = (CSettingAddon *)pSettingControl->GetSetting();
     CStdString addonID = setting->GetData();
-    if (CGUIWindowAddonBrowser::SelectAddonID(setting->m_type, addonID, setting->m_type == ADDON_SCREENSAVER || setting->m_type == ADDON_VIZ) == 1)
+    if (CGUIWindowAddonBrowser::SelectAddonID(setting->m_type, addonID, setting->m_type == ADDON_SCREENSAVER || setting->m_type == ADDON_VIZ || setting->m_type == ADDON_SCRIPT_WEATHER) == 1)
       setting->SetData(addonID);
     else
       return;