Skip to content

Commit

Permalink
Merge branch 'fixes/0.24' of github.com:MythTV/mythtv into fixes/0.24
Browse files Browse the repository at this point in the history
  • Loading branch information
jyavenard committed Feb 2, 2011
2 parents 7c1312d + cd0acb0 commit d01c315
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 36 deletions.
5 changes: 2 additions & 3 deletions mythtv/libs/libmythdb/mythcorecontext.cpp
Expand Up @@ -613,9 +613,8 @@ QString MythCoreContext::GetMasterHostName(void)
{
QStringList strlist("QUERY_HOSTNAME");

SendReceiveStringList(strlist);

d->m_masterHostname = strlist[0];
if (SendReceiveStringList(strlist))
d->m_masterHostname = strlist[0];
}

QString ret = d->m_masterHostname;
Expand Down
10 changes: 8 additions & 2 deletions mythtv/libs/libmythdb/mythdownloadmanager.cpp
Expand Up @@ -628,10 +628,16 @@ bool MythDownloadManager::downloadNow(MythDownloadInfo *dlInfo, bool deleteInfo)
m_infoLock->unlock();
m_queueWaitCond.wakeAll();

// sleep for 200ms at a time for up to 10 seconds waiting for the download
// timeout myth:// RemoteFile transfers 20 seconds from now
// timeout non-myth:// QNetworkAccessManager transfers 10 seconds after
// their last progress update
QDateTime startedAt = QDateTime::currentDateTime();
m_infoLock->lock();
while ((!dlInfo->m_done) &&
(dlInfo->m_lastStat.secsTo(QDateTime::currentDateTime()) < 10))
(((!dlInfo->m_url.startsWith("myth://")) &&
(dlInfo->m_lastStat.secsTo(QDateTime::currentDateTime()) < 10)) ||
((dlInfo->m_url.startsWith("myth://")) &&
(startedAt.secsTo(QDateTime::currentDateTime()) < 20))))
{
m_infoLock->unlock();
m_queueWaitLock.lock();
Expand Down
2 changes: 2 additions & 0 deletions mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -988,7 +988,9 @@ int MythPlayer::OpenFile(uint retries, bool allow_libmpeg2)
deleteMap.TrackerReset(0, totalFrames);
}

// Determine the initial bookmark and update it for the cutlist
bookmarkseek = GetBookmark();
deleteMap.TrackerWantsToJump(bookmarkseek, totalFrames, bookmarkseek);

if (player_ctx->playingInfo->QueryAutoExpire() == kLiveTVAutoExpire)
gCoreContext->SaveSetting("DefaultChanid",
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mythplayer.h
Expand Up @@ -567,7 +567,7 @@ class MPUBLIC MythPlayer
int jumpchapter;

// Bookmark stuff
long long bookmarkseek;
uint64_t bookmarkseek;

// Seek
/// If fftime>0, number of frames to seek forward.
Expand Down
17 changes: 11 additions & 6 deletions mythtv/libs/libmythtv/subtitlescreen.cpp
Expand Up @@ -920,8 +920,11 @@ bool SubtitleScreen::InitialiseFont(int fontStretch)
QString font = gCoreContext->GetSetting("OSDSubFont", "FreeSans");
if (initialised)
{
if (gTextSubFont->face().family() == font)
return gTextSubFont;
if (gTextSubFont->face().family() == font &&
gTextSubFont->face().stretch() == fontStretch)
{
return true;
}
delete gTextSubFont;
}

Expand All @@ -948,13 +951,14 @@ bool SubtitleScreen::Initialise708Fonts(int fontStretch)
{
static bool initialised = false;
if (initialised)
{
foreach(MythFontProperties* font, gCC708Fonts)
font->face().setStretch(fontStretch);
return true;

initialised = true;
}

VERBOSE(VB_IMPORTANT, "Initialise708Fonts()");

// TODO remove extra fonts from settings page
QStringList fonts;
fonts.append("Droid Sans Mono"); // default
fonts.append("FreeMono"); // mono serif
Expand All @@ -979,8 +983,9 @@ bool SubtitleScreen::Initialise708Fonts(int fontStretch)
count++;
}
}
initialised = count > 0;
VERBOSE(VB_PLAYBACK, LOC + QString("Loaded %1 CEA-708 fonts").arg(count));
return true;
return initialised;
}

MythFontProperties* SubtitleScreen::Get708Font(CC708CharacterAttribute attr)
Expand Down
6 changes: 2 additions & 4 deletions mythtv/libs/libmythui/mythrender_opengl.cpp
Expand Up @@ -138,11 +138,9 @@ void MythRenderOpenGL::makeCurrent()

void MythRenderOpenGL::doneCurrent()
{
// we don't explicitly call QGlContext::doneCurrent() as it should be
// unnecessary (makeCurrent() will switch contexts as necessary), it
// appears to cause performance issues and breaks rendering in certain
// situations
m_lock_level--;
if (m_lock_level == 0)
QGLContext::doneCurrent();
if (m_lock_level < 0)
VERBOSE(VB_IMPORTANT, LOC_ERR + "Mis-matched calls to makeCurrent()");
m_lock->unlock();
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythscreentype.cpp
Expand Up @@ -121,8 +121,8 @@ bool MythScreenType::SetFocusWidget(MythUIType *widget)
m_CurrentFocusWidget = widget;
m_CurrentFocusWidget->TakeFocus();

if (helpText)
helpText->SetText(m_CurrentFocusWidget->GetHelpText());
if (helpText && !widget->GetHelpText().isEmpty())
helpText->SetText(widget->GetHelpText());

return true;
}
Expand Down
16 changes: 3 additions & 13 deletions mythtv/libs/libmythui/mythuistatetype.cpp
Expand Up @@ -51,12 +51,7 @@ bool MythUIStateType::AddObject(const QString &name, MythUIType *object)
else
objectArea.CalculateArea(GetMythMainWindow()->GetUIScreenRect());

if (objectArea.width() > m_Area.width() ||
objectArea.height() > m_Area.height())
{
m_Area.setWidth(objectArea.getWidth());
m_Area.setHeight(objectArea.getHeight());
}
ExpandArea(objectArea);

return true;
}
Expand Down Expand Up @@ -88,12 +83,7 @@ bool MythUIStateType::AddObject(StateType type, MythUIType *object)
else
objectArea.CalculateArea(GetMythMainWindow()->GetUIScreenRect());

if (objectArea.width() > m_Area.width() ||
objectArea.height() > m_Area.height())
{
m_Area.setWidth(objectArea.getWidth());
m_Area.setHeight(objectArea.getHeight());
}
ExpandArea(objectArea);

return true;
}
Expand All @@ -104,7 +94,7 @@ bool MythUIStateType::DisplayState(const QString &name)
return false;

MythUIType *old = m_CurrentState;

QMap<QString, MythUIType *>::Iterator i = m_ObjectsByName.find(name.toLower());
if (i != m_ObjectsByName.end())
m_CurrentState = i.value();
Expand Down
4 changes: 1 addition & 3 deletions mythtv/programs/mythfrontend/playbackbox.cpp
Expand Up @@ -4591,7 +4591,7 @@ void PlaybackBox::saveRecMetadata(const QString &newTitle,
QString groupname = m_groupList->GetItemCurrent()->GetData().toString();

if (groupname == pginfo->GetTitle().toLower() &&
newTitle != groupname)
newTitle != pginfo->GetTitle())
{
m_recordingList->RemoveItem(item);
}
Expand All @@ -4605,8 +4605,6 @@ void PlaybackBox::saveRecMetadata(const QString &newTitle,
item->SetText(tempSubTitle, "titlesubtitle");
item->SetText(newTitle, "title");
item->SetText(newSubtitle, "subtitle");

UpdateUIListItem(item, true); // Why?
}

RecordingInfo ri(*pginfo);
Expand Down
22 changes: 20 additions & 2 deletions mythtv/programs/mythfrontend/programrecpriority.cpp
Expand Up @@ -1111,12 +1111,30 @@ void ProgramRecPriority::changeRecPriority(int howMuch)
{
// No need to re-fill the entire list, just update this entry
int progRecPriority = pgRecInfo->GetRecordingPriority();
int autorecpri = pgRecInfo->autoRecPriority;
int finalRecPriority = progRecPriority +
pgRecInfo->autoRecPriority +
autorecpri +
pgRecInfo->recTypeRecPriority;

item->SetText(QString::number(progRecPriority), "progpriority");
item->SetText(QString::number(finalRecPriority), "finalpriority");

if (m_recPriorityText)
{
QString msg = QString::number(progRecPriority);

if(autorecpri != 0)
msg += tr(" + %1 automatic priority (%2hr)")
.arg(autorecpri).arg(pgRecInfo->avg_delay);
m_recPriorityText->SetText(msg);
}

if (m_recPriorityBText)
m_recPriorityBText->SetText(QString::number(progRecPriority +
autorecpri));

if (m_finalPriorityText)
m_finalPriorityText->SetText(QString::number(finalRecPriority));
}
}
}
Expand Down Expand Up @@ -1572,7 +1590,7 @@ void ProgramRecPriority::updateInfo(MythUIButtonListItem *item)

if(autorecpri != 0)
msg += tr(" + %1 automatic priority (%2hr)")
.arg(autorecpri).arg((pgRecInfo->avg_delay));
.arg(autorecpri).arg(pgRecInfo->avg_delay);
m_recPriorityText->SetText(msg);
}

Expand Down

0 comments on commit d01c315

Please sign in to comment.