Browse files

Merge remote-tracking branch 'origin/master' into Eden

  • Loading branch information...
2 parents cc49941 + 0406f1b commit 14feb096bcea1e434b5ab23888d6a4c62240f6e0 theuni committed Mar 21, 2012
View
6 addons/metadata.themoviedb.org/resources/language/Chinese (Simple)/strings.xml
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<strings>
<string id="30000">启用同人画</string>
- <string id="30001">启用HD-Trailers.net预告片</string>
+ <string id="30001">首选HD-Trailers.net预告片</string>
+ <string id="30002">首选语言</string>
+ <string id="30003">获取评价信息于</string>
+ <string id="30004">启用预告片(YouTube)</string>
+ <string id="30005">保留原片名</string>
</strings>
View
2 addons/metadata.themoviedb.org/resources/language/Dutch/strings.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<strings>
<string id="30000">Fanart inschakelen</string>
- <string id="30001">Trailer inschakelen (HD-Trailers.net)</string>
+ <string id="30001">Trailers van HD-Trailers.net inschakelen</string>
<string id="30002">Voorkeurstaal</string>
<string id="30003">Verkrijg waardering van IMDb</string>
<string id="30004">Trailer inschakelen (YouTube)</string>
View
4 addons/metadata.themoviedb.org/resources/language/English/strings.xml
@@ -2,8 +2,8 @@
<strings>
<string id="30000">Enable Fanart</string>
<string id="30004">Enable Trailer (YouTube)</string>
- <string id="30001">Enable Trailer (HD-Trailers.net)</string>
+ <string id="30001">Prefer Trailer from HD-Trailers.net</string>
<string id="30002">Preferred language</string>
- <string id="30003">Get rating from IMDb</string>
+ <string id="30003">Get rating from</string>
<string id="30005">Keep Original Title</string>
</strings>
View
4 addons/metadata.themoviedb.org/resources/language/Finnish/strings.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<strings>
<string id="30000">Fanitaide käytössä</string>
- <string id="30004">Trailerit käytössä (YouTube)</string>
- <string id="30001">Trailerit käytössä (HD-Trailers.net)</string>
+ <string id="30004">Trailerit käytössä</string>
+ <string id="30001">Valitse ensisijaisesti trailerit HD-Trailers.net -sivustolta</string>
<string id="30002">Ensisijainen kieli</string>
<string id="30003">Hae arvosana IMDb:stä</string>
<string id="30005">Näytä alkuperäinen nimi</string>
View
2 addons/metadata.themoviedb.org/resources/language/German/strings.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<strings>
<string id="30000">Aktiviere Fanart</string>
- <string id="30001">Aktiviere Trailer (HD-Trailers.net)</string>
+ <string id="30001">Aktiviere Trailer von HD-Trailers.net</string>
<string id="30002">Bevorzugte Sprache</string>
<string id="30003">Bewertung von IMDb nutzen</string>
<string id="30004">Aktiviere Trailer (YouTube)</string>
View
4 addons/metadata.themoviedb.org/resources/language/Hungarian/strings.xml
@@ -2,8 +2,8 @@
<strings>
<string id="30000">Fanartképek engedélyezése</string>
<string id="30004">Filmelőzetesek engedélyezése (YouTube)</string>
- <string id="30001">Filmelőzetesek engedélyezése (HD-Trailers.net)</string>
+ <string id="30001">Filmelőzetesek inkább a HD-Trailers.net-ről</string>
<string id="30002">Preferált nyelv</string>
- <string id="30003">Értékelés az IMDb-ről</string>
+ <string id="30003">Értékelés letöltése innen</string>
<string id="30005">Eredeti filmcím megtartása</string>
</strings>
View
2 addons/metadata.themoviedb.org/resources/language/Swedish/strings.xml
@@ -6,7 +6,7 @@
<!--$Revision$-->
<strings>
<string id="30000">Aktivera fanart</string>
- <string id="30001">Aktivera trailers (HD-Trailers.net)</string>
+ <string id="30001">Aktivera trailers från HD-Trailers.net</string>
<string id="30002">Föredraget språk</string>
<string id="30003">Hämta betyg från IMDb</string>
<string id="30004">Aktivera trailers (YouTube)</string>
View
11 lib/libdvd/libdvdnav/src/searching.c
@@ -224,14 +224,9 @@ dvdnav_status_t dvdnav_time_search(dvdnav_t *this,
if(found) {
- length = cell->last_sector - cell->first_sector + 1;
- if (target >= length) {
- target -= length;
- } else {
- /* convert the target sector from Cell-relative to absolute physical sector */
- target += cell->first_sector;
- break;
- }
+ if (target >= cell->first_sector
+ && target <= cell->last_sector)
+ break;
} else {
View
2 xbmc/cores/paplayer/CodecFactory.cpp
@@ -120,7 +120,7 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri
if( strContent.Equals("audio/mpeg")
|| strContent.Equals("audio/mp3") )
return new MP3Codec();
- else if (strContent.Left(9).Equals("audio/l16") == 0)
+ else if (strContent.Left(9).Equals("audio/l16"))
{
PCMCodec * pcm_codec = new PCMCodec();
pcm_codec->SetMimeParams(strContent);
View
120 xbmc/input/ButtonTranslator.cpp
@@ -363,7 +363,6 @@ CButtonTranslator& CButtonTranslator::GetInstance()
CButtonTranslator::CButtonTranslator()
{
- m_baseMap.clear();
m_deviceList.clear();
m_Loaded = false;
}
@@ -429,91 +428,74 @@ bool CButtonTranslator::Load(bool AlwaysLoad)
};
bool success = false;
- // If we've already loaded the m_baseMap we don't need to load it
- // again - this speeds up reloads caused by plugging and unplugging
- // HID devices. However if AlwaysLoad is true always load the keymaps
- // from scratch.
- if (m_Loaded && !AlwaysLoad)
+ for (unsigned int dirIndex = 0; dirIndex < sizeof(DIRS_TO_CHECK)/sizeof(DIRS_TO_CHECK[0]); ++dirIndex)
{
- m_translatorMap = m_baseMap;
- }
+ if (XFILE::CDirectory::Exists(DIRS_TO_CHECK[dirIndex]))
+ {
+ CFileItemList files;
+ XFILE::CDirectory::GetDirectory(DIRS_TO_CHECK[dirIndex], files, ".xml");
+ // Sort the list for filesystem based priorities, e.g. 01-keymap.xml, 02-keymap-overrides.xml
+ files.Sort(SORT_METHOD_FILE, SORT_ORDER_ASC);
+ for(int fileIndex = 0; fileIndex<files.Size(); ++fileIndex)
+ {
+ if (!files[fileIndex]->m_bIsFolder)
+ success |= LoadKeymap(files[fileIndex]->GetPath());
+ }
- // Else load the standard mappings
- else
- {
- for(unsigned int dirIndex = 0; dirIndex < sizeof(DIRS_TO_CHECK)/sizeof(DIRS_TO_CHECK[0]); ++dirIndex) {
- if( XFILE::CDirectory::Exists(DIRS_TO_CHECK[dirIndex]) )
+ // Load mappings for any HID devices we have connected
+ std::list<CStdString>::iterator it;
+ for (it = m_deviceList.begin(); it != m_deviceList.end(); it++)
{
- CFileItemList files;
- XFILE::CDirectory::GetDirectory(DIRS_TO_CHECK[dirIndex], files, "*.xml");
- // Sort the list for filesystem based priorities, e.g. 01-keymap.xml, 02-keymap-overrides.xml
- files.Sort(SORT_METHOD_FILE, SORT_ORDER_ASC);
- // In (at least) Windows the GetDirectory returns all files not just *.xml files
- for(int fileIndex = 0; fileIndex<files.Size(); ++fileIndex)
- if (files[fileIndex]->GetPath().Right(4) == ".xml")
- success |= LoadKeymap(files[fileIndex]->GetPath());
+ CStdString devicedir = DIRS_TO_CHECK[dirIndex];
+ devicedir.append(*it);
+ devicedir.append("/");
+ if( XFILE::CDirectory::Exists(devicedir) )
+ {
+ CFileItemList files;
+ XFILE::CDirectory::GetDirectory(devicedir, files, ".xml");
+ // Sort the list for filesystem based priorities, e.g. 01-keymap.xml, 02-keymap-overrides.xml
+ files.Sort(SORT_METHOD_FILE, SORT_ORDER_ASC);
+ for(int fileIndex = 0; fileIndex<files.Size(); ++fileIndex)
+ {
+ if (!files[fileIndex]->m_bIsFolder)
+ success |= LoadKeymap(files[fileIndex]->GetPath());
+ }
+ }
}
}
+ }
- if (!success)
- {
- CLog::Log(LOGERROR, "Error loading keymaps from: %s or %s or %s", DIRS_TO_CHECK[0], DIRS_TO_CHECK[1], DIRS_TO_CHECK[2]);
- return false;
- }
+ if (!success)
+ {
+ CLog::Log(LOGERROR, "Error loading keymaps from: %s or %s or %s", DIRS_TO_CHECK[0], DIRS_TO_CHECK[1], DIRS_TO_CHECK[2]);
+ return false;
+ }
#if defined(HAS_LIRC) || defined(HAS_IRSERVERSUITE)
#ifdef _LINUX
#define REMOTEMAP "Lircmap.xml"
#else
#define REMOTEMAP "IRSSmap.xml"
#endif
- CStdString lircmapPath;
- URIUtils::AddFileToFolder("special://xbmc/system/", REMOTEMAP, lircmapPath);
- lircRemotesMap.clear();
- if(CFile::Exists(lircmapPath))
- success |= LoadLircMap(lircmapPath);
- else
- CLog::Log(LOGDEBUG, "CButtonTranslator::Load - no system %s found, skipping", REMOTEMAP);
+ CStdString lircmapPath;
+ URIUtils::AddFileToFolder("special://xbmc/system/", REMOTEMAP, lircmapPath);
+ lircRemotesMap.clear();
+ if(CFile::Exists(lircmapPath))
+ success |= LoadLircMap(lircmapPath);
+ else
+ CLog::Log(LOGDEBUG, "CButtonTranslator::Load - no system %s found, skipping", REMOTEMAP);
- lircmapPath = g_settings.GetUserDataItem(REMOTEMAP);
- if(CFile::Exists(lircmapPath))
- success |= LoadLircMap(lircmapPath);
- else
- CLog::Log(LOGDEBUG, "CButtonTranslator::Load - no userdata %s found, skipping", REMOTEMAP);
+ lircmapPath = g_settings.GetUserDataItem(REMOTEMAP);
+ if(CFile::Exists(lircmapPath))
+ success |= LoadLircMap(lircmapPath);
+ else
+ CLog::Log(LOGDEBUG, "CButtonTranslator::Load - no userdata %s found, skipping", REMOTEMAP);
- if (!success)
- CLog::Log(LOGERROR, "CButtonTranslator::Load - unable to load remote map %s", REMOTEMAP);
- // don't return false - it is to only indicate a fatal error (which this is not)
+ if (!success)
+ CLog::Log(LOGERROR, "CButtonTranslator::Load - unable to load remote map %s", REMOTEMAP);
+ // don't return false - it is to only indicate a fatal error (which this is not)
#endif
- // Standard mappings have been loaded into m_translatorMap, copy them to
- // m_baseMap for future reuse.
- m_baseMap = m_translatorMap;
- }
-
- // Load mappings for any HID devices we have connected
- std::list<CStdString>::iterator it;
- for (it = m_deviceList.begin(); it != m_deviceList.end(); it++)
- {
- for(unsigned int dirIndex = 0; dirIndex < sizeof(DIRS_TO_CHECK)/sizeof(DIRS_TO_CHECK[0]); ++dirIndex)
- {
- CStdString devicedir = DIRS_TO_CHECK[dirIndex];
- devicedir.append(*it);
- devicedir.append("/");
- if( XFILE::CDirectory::Exists(devicedir) )
- {
- CFileItemList files;
- XFILE::CDirectory::GetDirectory(devicedir, files, "*.xml");
- // Sort the list for filesystem based priorities, e.g. 01-keymap.xml, 02-keymap-overrides.xml
- files.Sort(SORT_METHOD_FILE, SORT_ORDER_ASC);
- // In (at least) Windows the GetDirectory returns all files not just *.xml files
- for(int fileIndex = 0; fileIndex<files.Size(); ++fileIndex)
- if (files[fileIndex]->GetPath().Right(4) == ".xml")
- success |= LoadKeymap(files[fileIndex]->GetPath());
- }
- }
- }
-
// Done!
m_Loaded = true;
return true;
View
2 xbmc/input/ButtonTranslator.h
@@ -101,8 +101,6 @@ class CButtonTranslator
private:
typedef std::multimap<uint32_t, CButtonAction> buttonMap; // our button map to fill in
- // m_baseMap contains all the standard mappings
- std::map<int, buttonMap> m_baseMap;
// m_translatorMap contains all mappings i.e. m_BaseMap + HID device mappings
std::map<int, buttonMap> m_translatorMap;
// m_deviceList contains the list of connected HID devices
View
14 xbmc/interfaces/python/xbmcmodule/xbmcmodule.cpp
@@ -609,11 +609,15 @@ namespace PYXBMC
char *cLine = NULL;
if (!PyArg_ParseTuple(args, (char*)"s", &cLine)) return NULL;
- PyXBMCGUILock();
- int id = g_windowManager.GetTopMostModalDialogID();
- if (id == WINDOW_INVALID) id = g_windowManager.GetActiveWindow();
- bool ret = g_infoManager.EvaluateBool(cLine,id);
- PyXBMCGUIUnlock();
+ bool ret;
+ {
+ CPyThreadState gilRelease;
+ CSingleLock gc(g_graphicsContext);
+
+ int id = g_windowManager.GetTopMostModalDialogID();
+ if (id == WINDOW_INVALID) id = g_windowManager.GetActiveWindow();
+ ret = g_infoManager.EvaluateBool(cLine,id);
+ }
return Py_BuildValue((char*)"b", ret);
}

0 comments on commit 14feb09

Please sign in to comment.