Permalink
Browse files

Disc stubs: Changes to the displayed title in the dialog

  • Loading branch information...
1 parent 7f7f20c commit 247bde189263db11bda15dd2b1db9a660095f322 @ScudLee committed Mar 28, 2012
Showing with 9 additions and 14 deletions.
  1. +9 −14 xbmc/dialogs/GUIDialogPlayEject.cpp
@@ -101,30 +101,25 @@ bool CGUIDialogPlayEject::ShowAndGetInput(const CFileItem & item,
if (!pDialog)
return false;
- // Figure out Line 1 of the dialog
- CStdString strLine1;
- if (item.GetVideoInfoTag())
- {
- strLine1 = item.GetVideoInfoTag()->m_strTitle;
- }
- else
- {
- strLine1 = URIUtils::GetFileName(item.GetPath());
- URIUtils::RemoveExtension(strLine1);
- }
-
- // Figure out Line 2 of the dialog
- CStdString strLine2;
+ // Figure out Lines 1 and 2 of the dialog
+ CStdString strLine1, strLine2;
TiXmlDocument discStubXML;
if (discStubXML.LoadFile(item.GetPath()))
{
TiXmlElement * pRootElement = discStubXML.RootElement();
if (!pRootElement || strcmpi(pRootElement->Value(), "discstub") != 0)
CLog::Log(LOGERROR, "Error loading %s, no <discstub> node", item.GetPath().c_str());
else
+ {
+ XMLUtils::GetString(pRootElement, "title", strLine1);
XMLUtils::GetString(pRootElement, "message", strLine2);
+ }
}
+ // Use the label for Line 1 if not defined
+ if (strLine1.IsEmpty())
+ strLine1 = item.GetLabel();
+
// Setup dialog parameters
pDialog->SetHeading(219);
pDialog->SetLine(0, 429);

0 comments on commit 247bde1

Please sign in to comment.