diff options
author | spiff_ <spiff_@svn> | 2009-12-22 02:55:07 +0000 |
---|---|---|
committer | spiff_ <spiff_@svn> | 2009-12-22 02:55:07 +0000 |
commit | dd561760d348040387b8d999c1f22d9f4de414a9 (patch) | |
tree | c85bcd472b27789cb1919b7e35fb37cb4593fe0d | |
parent | 25a1e78271ffc303d6fca4bf01e273ad316bbe57 (diff) |
changed: get rid of old cruft
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@25952 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | xbmc/Application.cpp | 1 | ||||
-rw-r--r-- | xbmc/Application.h | 2 | ||||
-rw-r--r-- | xbmc/GUISettings.cpp | 3 | ||||
-rw-r--r-- | xbmc/GUIWindowSettingsCategory.cpp | 267 | ||||
-rw-r--r-- | xbmc/GUIWindowSettingsCategory.h | 2 | ||||
-rw-r--r-- | xbmc/Settings.h | 9 |
6 files changed, 1 insertions, 283 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index ff5496af12..9097519fa4 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -306,7 +306,6 @@ CApplication::CApplication(void) : m_itemCurrentFile(new CFileItem), m_progressT m_pXbmcHttp = NULL; m_prevMedia=""; #endif - m_pFileZilla = NULL; m_pPlayer = NULL; m_bScreenSave = false; m_dpms = NULL; diff --git a/xbmc/Application.h b/xbmc/Application.h index 008c925141..2d212a4f7a 100644 --- a/xbmc/Application.h +++ b/xbmc/Application.h @@ -61,7 +61,6 @@ class CFileItemList; #endif class CWebServer; -class CXBFileZilla; class CSNTPClient; class CKaraokeLyricsManager; class CApplicationMessenger; @@ -224,7 +223,6 @@ public: #endif CSNTPClient *m_psntpClient; CWebServer* m_pWebServer; - CXBFileZilla* m_pFileZilla; IPlayer* m_pPlayer; inline bool IsInScreenSaver() { return m_bScreenSave; }; diff --git a/xbmc/GUISettings.cpp b/xbmc/GUISettings.cpp index 2843f5475f..ac5e409a40 100644 --- a/xbmc/GUISettings.cpp +++ b/xbmc/GUISettings.cpp @@ -778,9 +778,6 @@ void CGUISettings::LoadMasterLock(TiXmlElement *pRootElement) it = settingsMap.find("masterlock.startuplock"); if (it != settingsMap.end()) LoadFromXML(pRootElement, it); - it = settingsMap.find("autodetect.nickname"); - if (it != settingsMap.end()) - LoadFromXML(pRootElement, it); } diff --git a/xbmc/GUIWindowSettingsCategory.cpp b/xbmc/GUIWindowSettingsCategory.cpp index 9eb4cf0261..48746096ef 100644 --- a/xbmc/GUIWindowSettingsCategory.cpp +++ b/xbmc/GUIWindowSettingsCategory.cpp @@ -433,17 +433,7 @@ void CGUIWindowSettingsCategory::CreateSettings() CSetting *pSetting = settings[i]; AddSetting(pSetting, group->GetWidth(), iControlID); CStdString strSetting = pSetting->GetSetting(); - if (strSetting.Equals("myprograms.ntscmode")) - { - CSettingInt *pSettingInt = (CSettingInt*)pSetting; - CGUISpinControlEx *pControl = (CGUISpinControlEx *)GetControl(GetSetting(strSetting)->GetID()); - for (int i = pSettingInt->m_iMin; i <= pSettingInt->m_iMax; i++) - { - pControl->AddLabel(g_localizeStrings.Get(16106 + i), i); - } - pControl->SetValue(pSettingInt->GetData()); - } - else if (strSetting.Equals("musicplayer.visualisation")) + if (strSetting.Equals("musicplayer.visualisation")) { FillInVisualisations(pSetting, GetSetting(pSetting->GetSetting())->GetID()); } @@ -467,22 +457,6 @@ void CGUIWindowSettingsCategory::CreateSettings() CGUISpinControlEx *pControl = (CGUISpinControlEx *)GetControl(GetSetting(pSetting->GetSetting())->GetID()); FillInScrapers(pControl, g_guiSettings.GetString("scrapers.musicvideodefault"), "musicvideos"); } - else if (strSetting.Equals("karaoke.port0voicemask")) - { - FillInVoiceMasks(0, pSetting); - } - else if (strSetting.Equals("karaoke.port1voicemask")) - { - FillInVoiceMasks(1, pSetting); - } - else if (strSetting.Equals("karaoke.port2voicemask")) - { - FillInVoiceMasks(2, pSetting); - } - else if (strSetting.Equals("karaoke.port3voicemask")) - { - FillInVoiceMasks(3, pSetting); - } else if (strSetting.Equals("audiooutput.mode")) { CSettingInt *pSettingInt = (CSettingInt*)pSetting; @@ -520,48 +494,6 @@ void CGUIWindowSettingsCategory::CreateSettings() pControl->AddLabel(g_localizeStrings.Get(603), CDDARIP_QUALITY_EXTREME); pControl->SetValue(pSettingInt->GetData()); } - else if (strSetting.Equals("harddisk.aamlevel")) - { - CSettingInt *pSettingInt = (CSettingInt*)pSetting; - CGUISpinControlEx *pControl = (CGUISpinControlEx *)GetControl(GetSetting(strSetting)->GetID()); - pControl->AddLabel(g_localizeStrings.Get(21388), AAM_QUIET); - pControl->AddLabel(g_localizeStrings.Get(21387), AAM_FAST); - pControl->SetValue(pSettingInt->GetData()); - } - else if (strSetting.Equals("harddisk.apmlevel")) - { - CSettingInt *pSettingInt = (CSettingInt*)pSetting; - CGUISpinControlEx *pControl = (CGUISpinControlEx *)GetControl(GetSetting(strSetting)->GetID()); - pControl->AddLabel(g_localizeStrings.Get(21391), APM_HIPOWER); - pControl->AddLabel(g_localizeStrings.Get(21392), APM_LOPOWER); - pControl->AddLabel(g_localizeStrings.Get(21393), APM_HIPOWER_STANDBY); - pControl->AddLabel(g_localizeStrings.Get(21394), APM_LOPOWER_STANDBY); - pControl->SetValue(pSettingInt->GetData()); - } - else if (strSetting.Equals("system.targettemperature")) - { - CSettingInt *pSettingInt = (CSettingInt*)pSetting; - CGUISpinControlEx *pControl = (CGUISpinControlEx *)GetControl(GetSetting(strSetting)->GetID()); - for (int i = pSettingInt->m_iMin; i <= pSettingInt->m_iMax; i++) - { - CTemperature temp=CTemperature::CreateFromCelsius(i); - pControl->AddLabel(temp.ToString(), i); - } - pControl->SetValue(pSettingInt->GetData()); - } - else if (strSetting.Equals("system.fanspeed") || strSetting.Equals("system.minfanspeed")) - { - CSettingInt *pSettingInt = (CSettingInt*)pSetting; - CGUISpinControlEx *pControl = (CGUISpinControlEx *)GetControl(GetSetting(strSetting)->GetID()); - CStdString strPercentMask = g_localizeStrings.Get(14047); - for (int i=pSettingInt->m_iMin; i <= pSettingInt->m_iMax; i += pSettingInt->m_iStep) - { - CStdString strLabel; - strLabel.Format(strPercentMask.c_str(), i*2); - pControl->AddLabel(strLabel, i); - } - pControl->SetValue(int(pSettingInt->GetData())); - } else if (strSetting.Equals("services.webserverusername")) { #ifdef HAS_WEB_SERVER @@ -1044,21 +976,6 @@ void CGUIWindowSettingsCategory::UpdateSettings() CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID()); if (pControl) pControl->SetEnabled(g_guiSettings.GetInt("musicplayer.crossfade") > 0); } - else if (strSetting.Left(12).Equals("karaoke.port") || strSetting.Equals("karaoke.volume")) - { - CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID()); - if (pControl) pControl->SetEnabled(g_guiSettings.GetBool("karaoke.voiceenabled")); - } - else if (strSetting.Equals("system.fanspeed")) - { // only visible if we have fancontrolspeed enabled - CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID()); - if (pControl) pControl->SetEnabled(g_guiSettings.GetBool("system.fanspeedcontrol")); - } - else if (strSetting.Equals("system.targettemperature") || strSetting.Equals("system.minfanspeed")) - { // only visible if we have autotemperature enabled - CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID()); - if (pControl) pControl->SetEnabled(g_guiSettings.GetBool("system.autotemperature")); - } else if (strSetting.Equals("services.webserverusername")) { CGUIEditControl *pControl = (CGUIEditControl *)GetControl(pSettingControl->GetID()); @@ -1180,11 +1097,6 @@ void CGUIWindowSettingsCategory::UpdateSettings() CGUIButtonControl *pControl = (CGUIButtonControl *)GetControl(pSettingControl->GetID()); pControl->SetEnabled(g_guiSettings.GetBool("postprocessing.enable")); } - else if (strSetting.Equals("VideoPlayer.InvertFieldSync")) - { - CGUIControl *pControl = (CGUIControl *)GetControl(GetSetting(strSetting)->GetID()); - pControl->SetEnabled(g_guiSettings.GetBool("VideoPlayer.FieldSync")); - } else if (strSetting.Equals("subtitles.color") || strSetting.Equals("subtitles.style") || strSetting.Equals("subtitles.charset")) { CGUIControl *pControl = (CGUIControl *)GetControl(GetSetting(strSetting)->GetID()); @@ -1257,21 +1169,6 @@ void CGUIWindowSettingsCategory::UpdateSettings() if (pControl) pControl->SetEnabled(g_guiSettings.GetBool("locale.timeserver")); } #endif - else if (strSetting.Equals("autodetect.nickname") || strSetting.Equals("autodetect.senduserpw")) - { - CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID()); - if (pControl) pControl->SetEnabled(g_guiSettings.GetBool("autodetect.onoff") && (g_settings.m_iLastLoadedProfileIndex == 0)); - } - else if ( strSetting.Equals("autodetect.popupinfo")) - { - CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID()); - if (pControl) pControl->SetEnabled(g_guiSettings.GetBool("autodetect.onoff")); - } - else if (strSetting.Equals("videoplayer.externaldvdplayer")) - { - CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID()); - if (pControl) pControl->SetEnabled(g_guiSettings.GetBool("videoplayer.useexternaldvdplayer")); - } else if (strSetting.Equals("audiocds.recordingpath") || strSetting.Equals("debug.screenshotpath")) { CGUIButtonControl *pControl = (CGUIButtonControl *)GetControl(pSettingControl->GetID()); @@ -1459,30 +1356,6 @@ void CGUIWindowSettingsCategory::OnSettingChanged(CBaseSettingControl *pSettingC { g_playlistPlayer.SetRepeat(PLAYLIST_MUSIC_TEMP, g_guiSettings.GetBool("musicfiles.repeat") ? PLAYLIST::REPEAT_ALL : PLAYLIST::REPEAT_NONE); }*/ - else if (strSetting.Equals("karaoke.port0voicemask")) - { - CGUISpinControlEx *pControl = (CGUISpinControlEx *)GetControl(pSettingControl->GetID()); - g_guiSettings.SetString("karaoke.port0voicemask", pControl->GetCurrentLabel()); - FillInVoiceMaskValues(0, g_guiSettings.GetSetting("karaoke.port0voicemask")); - } - else if (strSetting.Equals("karaoke.port1voicemask")) - { - CGUISpinControlEx *pControl = (CGUISpinControlEx *)GetControl(pSettingControl->GetID()); - g_guiSettings.SetString("karaoke.port1voicemask", pControl->GetCurrentLabel()); - FillInVoiceMaskValues(1, g_guiSettings.GetSetting("karaoke.port1voicemask")); - } - else if (strSetting.Equals("karaoke.port2voicemask")) - { - CGUISpinControlEx *pControl = (CGUISpinControlEx *)GetControl(pSettingControl->GetID()); - g_guiSettings.SetString("karaoke.port2voicemask", pControl->GetCurrentLabel()); - FillInVoiceMaskValues(2, g_guiSettings.GetSetting("karaoke.port2voicemask")); - } - else if (strSetting.Equals("karaoke.port2voicemask")) - { - CGUISpinControlEx *pControl = (CGUISpinControlEx *)GetControl(pSettingControl->GetID()); - g_guiSettings.SetString("karaoke.port3voicemask", pControl->GetCurrentLabel()); - FillInVoiceMaskValues(3, g_guiSettings.GetSetting("karaoke.port3voicemask")); - } else if (strSetting.Equals("musiclibrary.cleanup")) { CMusicDatabase musicdatabase; @@ -1713,16 +1586,6 @@ void CGUIWindowSettingsCategory::OnSettingChanged(CBaseSettingControl *pSettingC { // activate the test pattern g_windowManager.ActivateWindow(WINDOW_TEST_PATTERN); } - else if (strSetting.Equals("videoplayer.externaldvdplayer")) - { - CSettingString *pSettingString = (CSettingString *)pSettingControl->GetSetting(); - CStdString path = pSettingString->GetData(); - VECSOURCES shares; - g_mediaManager.GetLocalDrives(shares); - // TODO 2.0: Localize this - if (CGUIDialogFileBrowser::ShowAndGetFile(shares, ".xbe", g_localizeStrings.Get(655), path)) - pSettingString->SetData(path); - } else if (strSetting.Equals("subtitles.height")) { if (!CUtil::IsUsingTTFSubtitles()) @@ -2794,134 +2657,6 @@ void CGUIWindowSettingsCategory::FillInVisualisations(CSetting *pSetting, int iC } } -void CGUIWindowSettingsCategory::FillInVoiceMasks(DWORD dwPort, CSetting *pSetting) -{ - CSettingString *pSettingString = (CSettingString*)pSetting; - CGUISpinControlEx *pControl = (CGUISpinControlEx *)GetControl(GetSetting(pSetting->GetSetting())->GetID()); - pControl->SetShowRange(true); // show the range - int iCurrentMask = 0; - int iMask = 0; - vector<CStdString> vecMask; - - //find masks in xml... - TiXmlDocument xmlDoc; - CStdString fileName = "special://xbmc/system/voicemasks.xml"; - if ( !xmlDoc.LoadFile(fileName) ) return ; - TiXmlElement* pRootElement = xmlDoc.RootElement(); - CStdString strValue = pRootElement->Value(); - if ( strValue != "VoiceMasks") return ; - if (pRootElement) - { - const TiXmlNode *pChild = pRootElement->FirstChild("Name"); - while (pChild) - { - if (pChild->FirstChild()) - { - CStdString strName = pChild->FirstChild()->Value(); - vecMask.push_back(strName); - } - pChild = pChild->NextSibling("Name"); - } - } - xmlDoc.Clear(); - - - CStdString strDefaultMask = pSettingString->GetData(); - - sort(vecMask.begin(), vecMask.end(), sortstringbyname()); -// CStdString strCustom = "Custom"; - CStdString strNone = "None"; -// vecMask.insert(vecMask.begin(), strCustom); - vecMask.insert(vecMask.begin(), strNone); - for (int i = 0; i < (int) vecMask.size(); ++i) - { - CStdString strMask = vecMask[i]; - - if (strcmpi(strMask.c_str(), strDefaultMask.c_str()) == 0) - iCurrentMask = iMask; - - pControl->AddLabel(strMask, iMask++); - } - - pControl->SetValue(iCurrentMask); -} - -void CGUIWindowSettingsCategory::FillInVoiceMaskValues(DWORD dwPort, CSetting *pSetting) -{ - CStdString strCurMask = g_guiSettings.GetString(pSetting->GetSetting()); - if (strCurMask.CompareNoCase("None") == 0 || strCurMask.CompareNoCase("Custom") == 0 ) - { -#define XVOICE_MASK_PARAM_DISABLED (-1.0f) - g_settings.m_karaokeVoiceMask[dwPort].energy = XVOICE_MASK_PARAM_DISABLED; - g_settings.m_karaokeVoiceMask[dwPort].pitch = XVOICE_MASK_PARAM_DISABLED; - g_settings.m_karaokeVoiceMask[dwPort].whisper = XVOICE_MASK_PARAM_DISABLED; - g_settings.m_karaokeVoiceMask[dwPort].robotic = XVOICE_MASK_PARAM_DISABLED; - return; - } - - //find mask values in xml... - TiXmlDocument xmlDoc; - CStdString fileName = "special://xbmc/system/voicemasks.xml"; - if ( !xmlDoc.LoadFile( fileName ) ) return ; - TiXmlElement* pRootElement = xmlDoc.RootElement(); - CStdString strValue = pRootElement->Value(); - if ( strValue != "VoiceMasks") return ; - if (pRootElement) - { - const TiXmlNode *pChild = pRootElement->FirstChild("Name"); - while (pChild) - { - CStdString strMask = pChild->FirstChild()->Value(); - if (strMask.CompareNoCase(strCurMask) == 0) - { - for (int i = 0; i < 4;i++) - { - pChild = pChild->NextSibling(); - if (pChild) - { - CStdString strValue = pChild->Value(); - if (strValue.CompareNoCase("fSpecEnergyWeight") == 0) - { - if (pChild->FirstChild()) - { - CStdString strName = pChild->FirstChild()->Value(); - g_settings.m_karaokeVoiceMask[dwPort].energy = (float) atof(strName.c_str()); - } - } - else if (strValue.CompareNoCase("fPitchScale") == 0) - { - if (pChild->FirstChild()) - { - CStdString strName = pChild->FirstChild()->Value(); - g_settings.m_karaokeVoiceMask[dwPort].pitch = (float) atof(strName.c_str()); - } - } - else if (strValue.CompareNoCase("fWhisperValue") == 0) - { - if (pChild->FirstChild()) - { - CStdString strName = pChild->FirstChild()->Value(); - g_settings.m_karaokeVoiceMask[dwPort].whisper = (float) atof(strName.c_str()); - } - } - else if (strValue.CompareNoCase("fRoboticValue") == 0) - { - if (pChild->FirstChild()) - { - CStdString strName = pChild->FirstChild()->Value(); - g_settings.m_karaokeVoiceMask[dwPort].robotic = (float) atof(strName.c_str()); - } - } - } - } - break; - } - pChild = pChild->NextSibling("Name"); - } - } - xmlDoc.Clear(); -} - void CGUIWindowSettingsCategory::FillInResolutions(CSetting *pSetting, bool playbackSetting) { CSettingString *pSettingString = (CSettingString*)pSetting; diff --git a/xbmc/GUIWindowSettingsCategory.h b/xbmc/GUIWindowSettingsCategory.h index e5265c7cfa..1a06c5cce7 100644 --- a/xbmc/GUIWindowSettingsCategory.h +++ b/xbmc/GUIWindowSettingsCategory.h @@ -50,8 +50,6 @@ protected: void FillInSkins(CSetting *pSetting); void FillInSoundSkins(CSetting *pSetting); void FillInLanguages(CSetting *pSetting); - void FillInVoiceMasks(DWORD dwPort, CSetting *pSetting); // Karaoke patch (114097) - void FillInVoiceMaskValues(DWORD dwPort, CSetting *pSetting); // Karaoke patch (114097) void FillInResolutions(CSetting *pSetting, bool playbackSetting); void FillInVSyncs(CSetting *pSetting); void FillInScreenSavers(CSetting *pSetting); diff --git a/xbmc/Settings.h b/xbmc/Settings.h index 687a81740e..d6b7f4002c 100644 --- a/xbmc/Settings.h +++ b/xbmc/Settings.h @@ -88,13 +88,6 @@ public: bool value; }; -struct VOICE_MASK { - float energy; - float pitch; - float robotic; - float whisper; -}; - class CGUISettings; class TiXmlElement; class TiXmlNode; @@ -200,8 +193,6 @@ public: bool m_bMute; int m_iSystemTimeTotalUp; // Uptime in minutes! - VOICE_MASK m_karaokeVoiceMask[4]; - struct RssSet { bool rtl; |