Permalink
Browse files

Merge mycrosssource with master. Change this database upgrade to sche…

…ma 1308.
  • Loading branch information...
root
root committed Jul 12, 2012
1 parent cb38d8b commit bb0fc58bd1f7128f48a20c57b1db9d404813faff
Showing 869 changed files with 116,591 additions and 9,143 deletions.
View
@@ -151,7 +151,7 @@ check_ld(){
test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f"
done
check_cc $($filter_cflags $flags) || return
- check_cmd $LD $LDFLAGS $flags -o $TMPE $TMPO $libs
+ check_cmd $LD $LDFLAGS $flags -o $TMPE $TMPO $libs $EXTRALIBS
}
check_header(){
@@ -555,6 +555,9 @@ CXXPPFLAGS=$(cat mythconfig.mak | grep -e "^CXXPPFLAGS=")
CXXPPFLAGS=${CXXPPFLAGS#CXXPPFLAGS=}
OPENGLV=$(cat mythconfig.mak | grep -e "^CONFIG_OPENGL_VIDEO=yes")
+EXTRALIBS=$(cat mythconfig.mak | grep -e "^EXTRALIBS=")
+EXTRALIBS=${EXTRALIBS#EXTRALIBS=}
+
if ! is_qmake4 $qmake; then
is_qmake4 qmake-qt4 && qmake=qmake-qt4 || die "qmake for Qt4.6 or newer not found.\nPlease specify the correct qmake with --qmake="
fi
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -7,6 +7,7 @@
// myth
#include <mythcontext.h>
#include <mythdirs.h>
+#include <mythdate.h>
// mytharchive
#include "archivesettings.h"
@@ -165,7 +166,7 @@ static HostComboBox *MythArchiveDateFormat()
HostComboBox *gc = new HostComboBox("MythArchiveDateFormat");
gc->setLabel(QObject::tr("Date format"));
- QDate sampdate = QDate::currentDate();
+ QDate sampdate = MythDate::current().toLocalTime().date();
QString sampleStr =
QObject::tr("Samples are shown using today's date.");
@@ -19,7 +19,7 @@ using namespace std;
#include <programinfo.h>
#include <mythmainwindow.h>
#include <mythdialogbox.h>
-#include <mythmiscutil.h>
+#include <mythdate.h>
#include <mythsystem.h>
#include <exitcodes.h>
#include <mythlogging.h>
@@ -191,7 +191,7 @@ ProgramInfo *getProgramInfoForFile(const QString &inFile)
if (bIsMythRecording)
{
uint chanid = chanID.toUInt();
- QDateTime recstartts = myth_dt_from_string(startTime);
+ QDateTime recstartts = MythDate::fromString(startTime);
pinfo = new ProgramInfo(chanid, recstartts);
if (pinfo->GetChanID())
{
@@ -18,6 +18,7 @@
#include <mythdialogbox.h>
#include <mythsystem.h>
#include <exitcodes.h>
+#include <mythdate.h>
// mytharchive
#include "importnative.h"
@@ -84,7 +85,7 @@ static bool loadDetailsFromXML(const QString &filename, FileDetails *details)
details->subtitle = e.text();
if (e.tagName() == "starttime")
- details->startTime = QDateTime::fromString(e.text(), Qt::ISODate);
+ details->startTime = MythDate::fromString(e.text());
if (e.tagName() == "description")
details->description = e.text();
@@ -253,7 +254,8 @@ void ArchiveFileSelector::itemSelected(MythUIButtonListItem *item)
m_xmlFile = m_curDirectory + "/" + fileData->filename;
m_progTitle->SetText(m_details.title);
m_progSubtitle->SetText(m_details.subtitle);
- m_progStartTime->SetText(m_details.startTime.toString("dd MMM yy (hh:mm)"));
+ m_progStartTime->SetText(m_details.startTime.toLocalTime()
+ .toString("dd MMM yy (hh:mm)"));
}
else
{
@@ -376,7 +378,8 @@ bool ImportNative::Create(void)
m_progTitle_text->SetText(m_details.title);
- m_progDateTime_text->SetText(m_details.startTime.toString("dd MMM yy (hh:mm)"));
+ m_progDateTime_text->SetText(m_details.startTime.toLocalTime()
+ .toString("dd MMM yy (hh:mm)"));
m_progDescription_text->SetText(
(m_details.subtitle == "" ? m_details.subtitle + "\n" : "") + m_details.description);
@@ -22,7 +22,7 @@ using namespace std;
#include <mythversion.h>
#include <mythplugin.h>
#include <mythcoreutil.h>
-#include <mythmiscutil.h>
+#include <mythsystem.h>
#include <myththemedmenu.h>
#include <mythuihelper.h>
#include <mythdialogbox.h>
@@ -25,8 +25,9 @@
#include <mythuicheckbox.h>
#include <mythuibuttonlist.h>
#include <mythuiprogressbar.h>
-#include <mythmiscutil.h>
+#include <mythdate.h>
#include <mythsystem.h>
+#include <mythmiscutil.h>
#include <exitcodes.h>
// mytharchive
@@ -25,7 +25,7 @@
#include <mythprogressdialog.h>
#include <mythdialogbox.h>
#include <mythlogging.h>
-#include <mythmiscutil.h>
+#include <mythdate.h>
#include <netutils.h>
// mytharchive
@@ -275,7 +275,7 @@ void RecordingSelector::titleChanged(MythUIButtonListItem *item)
m_titleText->SetText(p->GetTitle());
if (m_datetimeText)
- m_datetimeText->SetText(p->GetScheduledStartTime()
+ m_datetimeText->SetText(p->GetScheduledStartTime().toLocalTime()
.toString("dd MMM yy (hh:mm)"));
if (m_descriptionText)
@@ -373,8 +373,10 @@ void RecordingSelector::OKPressed()
a->title = p->GetTitle();
a->subtitle = p->GetSubtitle();
a->description = p->GetDescription();
- a->startDate = p->GetScheduledStartTime().toString("dd MMM yy");
- a->startTime = p->GetScheduledStartTime().toString("(hh:mm)");
+ a->startDate = p->GetScheduledStartTime()
+ .toLocalTime().toString("dd MMM yy");
+ a->startTime = p->GetScheduledStartTime()
+ .toLocalTime().toString("(hh:mm)");
a->size = p->GetFilesize();
a->filename = p->GetPlaybackURL(false, true);
a->hasCutlist = p->HasCutlist();
@@ -421,7 +423,8 @@ void RecordingSelector::updateRecordingList(void)
MythUIButtonListItem* item = new MythUIButtonListItem(
m_recordingButtonList,
p->GetTitle() + " ~ " +
- p->GetScheduledStartTime().toString("dd MMM yy (hh:mm)"));
+ p->GetScheduledStartTime().toLocalTime()
+ .toString("dd MMM yy (hh:mm)"));
item->setCheckable(true);
if (m_selectedList.indexOf((ProgramInfo *) p) != -1)
{
@@ -439,9 +442,8 @@ void RecordingSelector::updateRecordingList(void)
QDateTime recendts = p->GetScheduledEndTime();
QString timedate = QString("%1 - %2")
- .arg(MythDateTimeToString
- (recstartts, kDateTimeFull))
- .arg(MythDateTimeToString(recendts, kTime));
+ .arg(MythDate::toString(recstartts,MythDate::kDateTimeFull))
+ .arg(MythDate::toString(recendts, MythDate::kTime));
uint season = p->GetSeason();
uint episode = p->GetEpisode();
@@ -109,7 +109,6 @@ ThumbFinder::ThumbFinder(MythScreenStack *parent, ArchiveItem *archiveItem,
m_startPTS = -1;
m_currentPTS = -1;
m_firstIFramePTS = -1;
- m_image = NULL;
}
void ThumbFinder::Init(void)
@@ -124,12 +123,6 @@ ThumbFinder::~ThumbFinder()
m_thumbList.clear();
closeAVCodec();
-
- if (m_image)
- {
- m_image->DownRef();
- m_image = NULL;
- }
}
bool ThumbFinder::Create(void)
@@ -891,17 +884,11 @@ bool ThumbFinder::getFrameImage(bool needKeyFrame, int64_t requiredPTS)
if (m_updateFrame)
{
- if (m_image)
- {
- m_image->DownRef();
- m_image = NULL;
- }
-
- m_image = GetMythMainWindow()->GetCurrentPainter()->GetFormatImage();
- m_image->Assign(img);
- m_image->UpRef();
-
- m_frameImage->SetImage(m_image);
+ MythImage *mimage =
+ GetMythMainWindow()->GetCurrentPainter()->GetFormatImage();
+ mimage->Assign(img);
+ m_frameImage->SetImage(mimage);
+ mimage->DecrRef();
}
updateCurrentPos();
@@ -101,7 +101,6 @@ class ThumbFinder : public MythScreenType
int m_thumbCount;
QList<ThumbImage *> m_thumbList;
QString m_thumbDir;
- MythImage *m_image;
// GUI stuff
MythUIButton *m_frameButton;
@@ -411,14 +411,13 @@ vector<VideoInfo *> *VideoSelector::getVideoListFromDB(void)
}
}
- vector<VideoInfo*> *videoList = new vector<VideoInfo*>;
-
query.prepare("SELECT intid, title, plot, length, filename, coverfile, "
"category, showlevel, subtitle, season, episode "
"FROM videometadata ORDER BY title,season,episode");
if (query.exec() && query.size())
{
+ vector<VideoInfo*> *videoList = new vector<VideoInfo*>;
QString artist, genre, episode;
while (query.next())
{
@@ -449,14 +448,12 @@ vector<VideoInfo *> *VideoSelector::getVideoListFromDB(void)
info->category = "(None)";
videoList->push_back(info);
}
+ return videoList;
}
- else
- {
- LOG(VB_GENERAL, LOG_ERR, "VideoSelector: Failed to get any video's");
- return NULL;
- }
-
- return videoList;
+
+
+ LOG(VB_GENERAL, LOG_ERR, "VideoSelector: Failed to get any video's");
+ return NULL;
}
void VideoSelector::getVideoList(void)
@@ -53,16 +53,17 @@ using namespace std;
// MythTV headers
#include <mythcommandlineparser.h>
-#include <mythcontext.h>
+#include <mythmiscutil.h>
#include <mythcoreutil.h>
+#include <mythcontext.h>
#include <mythversion.h>
#include <exitcodes.h>
#include <mythdb.h>
#include <programinfo.h>
#include <mythdirs.h>
#include <mythconfig.h>
#include <mythsystem.h>
-#include <mythmiscutil.h>
+#include <mythdate.h>
#include <mythlogging.h>
extern "C" {
@@ -302,14 +303,16 @@ static int burnISOImage(int mediaType, bool bEraseDVDRW, bool nativeFormat)
static int doBurnDVD(int mediaType, bool bEraseDVDRW, bool nativeFormat)
{
- gCoreContext->SaveSetting("MythArchiveLastRunStart",
- QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm"));
+ gCoreContext->SaveSetting(
+ "MythArchiveLastRunStart",
+ MythDate::toString(MythDate::current(), MythDate::kDatabase));
gCoreContext->SaveSetting("MythArchiveLastRunStatus", "Running");
int res = burnISOImage(mediaType, bEraseDVDRW, nativeFormat);
- gCoreContext->SaveSetting("MythArchiveLastRunEnd",
- QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm"));
+ gCoreContext->SaveSetting(
+ "MythArchiveLastRunEnd",
+ MythDate::toString(MythDate::current(), MythDate::kDatabase));
gCoreContext->SaveSetting("MythArchiveLastRunStatus", "Success");
return res;
}
@@ -1790,13 +1793,18 @@ static void clearArchiveTable(void)
static int doNativeArchive(const QString &jobFile)
{
gCoreContext->SaveSetting("MythArchiveLastRunType", "Native Export");
- gCoreContext->SaveSetting("MythArchiveLastRunStart", QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm"));
+ gCoreContext->SaveSetting(
+ "MythArchiveLastRunStart",
+ MythDate::toString(MythDate::current(), MythDate::kDatabase));
gCoreContext->SaveSetting("MythArchiveLastRunStatus", "Running");
NativeArchive na;
int res = na.doNativeArchive(jobFile);
- gCoreContext->SaveSetting("MythArchiveLastRunEnd", QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm"));
- gCoreContext->SaveSetting("MythArchiveLastRunStatus", (res == 0 ? "Success" : "Failed"));
+ gCoreContext->SaveSetting(
+ "MythArchiveLastRunEnd",
+ MythDate::toString(MythDate::current(), MythDate::kDatabase));
+ gCoreContext->SaveSetting("MythArchiveLastRunStatus",
+ (res == 0 ? "Success" : "Failed"));
// clear the archiveitems table if succesful
if (res == 0)
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<mythburntheme>
<!-- Example theme for MythBurn 3 recordings per page, with scene selection submenu -->
+ <!-- try the bold fonts instead -->
<fonts>
- <font size="23">FreeSans.ttf</font>
- <font size="18">FreeSans.ttf</font>
- <font size="16">FreeSans.ttf</font>
+ <font size="23">FreeSansBold.ttf</font>
+ <font size="18">FreeSansBold.ttf</font>
+ <font size="16">FreeSansBold.ttf</font>
</fonts>
<intro filename="mythlogo_intro.mpg"/>
@@ -1,7 +1,7 @@
// myth
#include <mythmainwindow.h>
-#include <mythmiscutil.h>
+#include <mythdate.h>
#include <mythcontext.h>
#include <mythdbcon.h>
@@ -35,6 +35,11 @@ MythBrowser::~MythBrowser()
while (!m_browserList.isEmpty())
delete m_browserList.takeFirst();
GetMythMainWindow()->PauseIdleTimer(false);
+ if (m_defaultFavIcon)
+ {
+ m_defaultFavIcon->DecrRef();
+ m_defaultFavIcon = NULL;
+ }
}
bool MythBrowser::Create(void)
@@ -70,7 +75,6 @@ bool MythBrowser::Create(void)
QImage image(favIcon);
m_defaultFavIcon = GetMythPainter()->GetFormatImage();
m_defaultFavIcon->Assign(image);
- m_defaultFavIcon->UpRef();
}
// this is the template for all other browser tabs
@@ -27,7 +27,13 @@ class MythBrowser : public MythScreenType
void setDefaultSaveDirectory(const QString saveDir) { m_defaultSaveDir = saveDir; }
void setDefaultSaveFilename(const QString saveFile) { m_defaultSaveFilename = saveFile; }
- MythImage* getDefaultFavIcon(void) { return m_defaultFavIcon; }
+
+ MythImage *GetDefaultFavIcon(void)
+ {
+ if (m_defaultFavIcon)
+ m_defaultFavIcon->IncrRef();
+ return m_defaultFavIcon;
+ }
public slots:
void slotOpenURL(const QString &url);
Oops, something went wrong.

0 comments on commit bb0fc58

Please sign in to comment.