Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
merged: r33253-r33255 from trunk
changed: move cached fanart resolving to the appthread.  Resolves slow cached fanart loading in very long directories at the expense of slightly slower dir retrieval.  Ticket xbmc#9819. (cherry picked from commit 29ffbd46cf00f778426b9ab651dbb4f9783eb715)
changed: Switch "arial.ttf" to a combination of DejaVuSans and DroidSansFallback.  Ticket xbmc#6397, thanks to s7mx1. (cherry picked from commit 4156b3dcc8892326833d41dab0494f2ea1fc8729)
fixed: Ensure ShortenPath is done at render time rather than during FrameMove, as it requires our scaling to be setup.  Fixes xbmc#10003. (cherry picked from commit 08ff51d439823d21e015af2551e82403a97cfaa8)

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@33276 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information
jmarshallnz committed Aug 28, 2010
1 parent b6a16e0 commit 6b1d905
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 3 additions & 5 deletions guilib/GUILabelControl.cpp
Expand Up @@ -91,6 +91,8 @@ void CGUILabelControl::UpdateInfo(const CGUIListItem *item)
label.Mid(m_startHighlight, m_endHighlight - m_startHighlight), (color_t)m_label.GetLabelInfo().disabledColor, label.Mid(m_endHighlight));
label = colorLabel;
}
else if (m_bHasPath)
label = ShortenPath(label);

m_label.SetMaxRect(m_posX, m_posY, m_width, m_height);
m_label.SetText(label);
Expand All @@ -112,11 +114,7 @@ bool CGUILabelControl::CanFocus() const

void CGUILabelControl::SetLabel(const string &strLabel)
{
// shorten the path label
if ( m_bHasPath )
m_infoLabel.SetLabel(ShortenPath(strLabel), "");
else // parse the label for info tags
m_infoLabel.SetLabel(strLabel, "");
m_infoLabel.SetLabel(strLabel, "");
if (m_iCursorPos > (int)strLabel.size())
m_iCursorPos = strLabel.size();
}
Expand Down
Binary file modified media/Fonts/arial.ttf
Binary file not shown.
14 changes: 14 additions & 0 deletions xbmc/GUIWindowVideoBase.cpp
Expand Up @@ -1679,6 +1679,20 @@ void CGUIWindowVideoBase::OnPrepareFileItems(CFileItemList &items)
{
if (!items.m_strPath.Equals("plugin://video/"))
items.SetCachedVideoThumbs();

if (items.GetContent() != "episodes")
{ // we don't set cached fanart for episodes, as this requires a db fetch per episode
for (int i = 0; i < items.Size(); ++i)
{
CFileItemPtr item = items[i];
if (!item->HasProperty("fanart_image"))
{
CStdString art = item->GetCachedFanart();
if (CFile::Exists(art))
item->SetProperty("fanart_image", art);
}
}
}
}

void CGUIWindowVideoBase::AddToDatabase(int iItem)
Expand Down

0 comments on commit 6b1d905

Please sign in to comment.