Skip to content

Commit

Permalink
Merge branch 'master' of github.com:MythTV/mythtv
Browse files Browse the repository at this point in the history
  • Loading branch information
NigelPearson committed Dec 31, 2010
2 parents 3ba2891 + 04353da commit f86d872
Show file tree
Hide file tree
Showing 9 changed files with 146 additions and 70 deletions.
2 changes: 1 addition & 1 deletion mythplugins/mythweather/mythweather/weather.cpp
Expand Up @@ -164,7 +164,7 @@ bool Weather::SetupScreens()
}
else
{
delete ssetup;
delete ssetup;
}

m_firstSetup = false;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/bindings/perl/MythTV.pm
Expand Up @@ -114,7 +114,7 @@ package MythTV;
# schema version supported in the main code. We need to check that the schema
# version in the database is as expected by the bindings, which are expected
# to be kept in sync with the main code.
our $SCHEMA_VERSION = "1265";
our $SCHEMA_VERSION = "1266";

# NUMPROGRAMLINES is defined in mythtv/libs/libmythtv/programinfo.h and is
# the number of items in a ProgramInfo QStringList group used by
Expand Down
2 changes: 1 addition & 1 deletion mythtv/bindings/python/MythTV/static.py
Expand Up @@ -5,7 +5,7 @@
"""

OWN_VERSION = (0,25,-1,1)
SCHEMA_VERSION = 1265
SCHEMA_VERSION = 1266
MVSCHEMA_VERSION = 1038
NVSCHEMA_VERSION = 1007
MUSICSCHEMA_VERSION = 1017
Expand Down
64 changes: 46 additions & 18 deletions mythtv/libs/libmythtv/dbcheck.cpp
Expand Up @@ -20,7 +20,7 @@ using namespace std;
mythtv/bindings/perl/MythTV.pm
*/
/// This is the DB schema version expected by the running MythTV instance.
const QString currentDatabaseVersion = "1265";
const QString currentDatabaseVersion = "1266";

static bool UpdateDBVersionNumber(const QString &newnumber, QString &dbver);
static bool performActualUpdate(
Expand Down Expand Up @@ -564,7 +564,8 @@ static bool doUpgradeTVDatabaseSchema(void)
const char *updates[] = {
"CREATE TABLE IF NOT EXISTS dvb_signal_quality ("
" id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,"
" sampletime TIMESTAMP NOT NULL,"
" sampletime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP "
" ON UPDATE CURRENT_TIMESTAMP,"
" cardid INT UNSIGNED NOT NULL,"
" fe_snr INT UNSIGNED NOT NULL,"
" fe_ss INT UNSIGNED NOT NULL,"
Expand Down Expand Up @@ -730,7 +731,8 @@ NULL
"ALTER TABLE people ADD UNIQUE name (name(41));",
"CREATE TABLE programgenres ( "
" chanid int unsigned NOT NULL, "
" starttime timestamp NOT NULL, "
" starttime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP "
" ON UPDATE CURRENT_TIMESTAMP, "
" relevance char(1) NOT NULL, "
" genre char(30), "
" PRIMARY KEY (chanid, starttime, relevance) "
Expand All @@ -746,7 +748,8 @@ NULL
const char *updates[] = {
"CREATE TABLE IF NOT EXISTS programgenres ( "
" chanid int unsigned NOT NULL, "
" starttime timestamp NOT NULL, "
" starttime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP "
" ON UPDATE CURRENT_TIMESTAMP, "
" relevance char(1) NOT NULL, "
" genre char(30), "
" PRIMARY KEY (chanid, starttime, relevance) "
Expand Down Expand Up @@ -949,7 +952,8 @@ NULL
const char *updates[] = {
"ALTER TABLE recorded CHANGE starttime starttime DATETIME NOT NULL;",
"ALTER TABLE recorded CHANGE endtime endtime DATETIME NOT NULL;",
"ALTER TABLE recorded ADD COLUMN lastmodified TIMESTAMP NOT NULL;",
"ALTER TABLE recorded ADD COLUMN lastmodified TIMESTAMP NOT NULL "
" DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;",
"ALTER TABLE recorded ADD COLUMN filesize BIGINT(20) DEFAULT 0 NOT NULL;",
"ALTER TABLE credits CHANGE starttime starttime DATETIME NOT NULL;",
"ALTER TABLE oldprogram CHANGE airdate airdate DATETIME NOT NULL;",
Expand Down Expand Up @@ -1036,7 +1040,8 @@ NULL
" cmds INTEGER NOT NULL DEFAULT 0,"
" flags INTEGER NOT NULL DEFAULT 0,"
" status INTEGER NOT NULL DEFAULT 0,"
" statustime TIMESTAMP NOT NULL,"
" statustime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP "
" ON UPDATE CURRENT_TIMESTAMP,"
" hostname varchar(64) NOT NULL DEFAULT '',"
" args BLOB NOT NULL DEFAULT '',"
" comment VARCHAR(128) NOT NULL DEFAULT '',"
Expand Down Expand Up @@ -1152,7 +1157,8 @@ NULL
" hp_code_rate varchar(10) default 'auto',"
" sistandard varchar(10) default 'dvb',"
" serviceversion smallint(6) default 33,"
" updatetimestamp timestamp(14) NOT NULL,"
" updatetimestamp timestamp(14) NOT NULL DEFAULT CURRENT_TIMESTAMP "
" ON UPDATE CURRENT_TIMESTAMP,"
" PRIMARY KEY (mplexid)"
");",
// These should be included in an update after the 0.17 release.
Expand Down Expand Up @@ -2730,7 +2736,8 @@ NULL
" audionum tinyint(4) NOT NULL default -1,"
" subtitlenum tinyint(4) NOT NULL default -1,"
" framenum bigint(20) NOT NULL default 0,"
" timestamp timestamp NOT NULL, "
" timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP "
" ON UPDATE CURRENT_TIMESTAMP, "
" PRIMARY KEY (serialid));",
NULL
};
Expand Down Expand Up @@ -5213,7 +5220,8 @@ NULL
" description TEXT NOT NULL,"
" commandline TEXT NOT NULL,"
" version DOUBLE NOT NULL,"
" updated TIMESTAMP NOT NULL,"
" updated TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP "
" ON UPDATE CURRENT_TIMESTAMP,"
" search BOOL NOT NULL,"
" tree BOOL NOT NULL,"
" podcast BOOL NOT NULL,"
Expand All @@ -5233,7 +5241,8 @@ NULL
" thumbnail TEXT NOT NULL,"
" mediaURL TEXT NOT NULL,"
" author VARCHAR(255) NOT NULL,"
" date TIMESTAMP NOT NULL,"
" date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP "
" ON UPDATE CURRENT_TIMESTAMP,"
" time INT NOT NULL,"
" rating VARCHAR(255) NOT NULL,"
" filesize BIGINT NOT NULL,"
Expand Down Expand Up @@ -5524,6 +5533,23 @@ NULL
return false;
}

if (dbver == "1265")
{
const char *updates[] = {
"ALTER TABLE dtv_multiplex MODIFY COLUMN updatetimestamp "
" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;",
"ALTER TABLE dvdbookmark MODIFY COLUMN `timestamp` "
" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;",
"ALTER TABLE jobqueue MODIFY COLUMN statustime "
" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;",
"ALTER TABLE recorded MODIFY COLUMN lastmodified "
" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;",
NULL
};
if (!performActualUpdate(updates, "1266", dbver))
return false;
}

return true;
}

Expand All @@ -5543,10 +5569,8 @@ NULL
* command to get the the initial database layout from an empty database:
*
* mysqldump --skip-comments --skip-opt --compact --skip-quote-names \
* --ignore-table=schemalock mythconverg | \
* sed '/^SET.*;$/d;s/^.*[^;]$/"&"/;s/^);$/");",/'
*
* don't forget to add auto_increment annotations
* --create-options --ignore-table=mythconverg.schemalock mythconverg | \
* sed '/^SET.*;$/d;/^\/\*!40101.*$/d;s/^.*[^;]$/"&"/;s/^);$/");",/'
*
* command to get the initial data:
*
Expand Down Expand Up @@ -5831,7 +5855,8 @@ tmp.constData(),
" hp_code_rate varchar(10) default 'auto',"
" sistandard varchar(10) default 'dvb',"
" serviceversion smallint(6) default '33',"
" updatetimestamp timestamp NOT NULL default CURRENT_TIMESTAMP,"
" updatetimestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP "
" ON UPDATE CURRENT_TIMESTAMP,"
" PRIMARY KEY (mplexid)"
");",
"CREATE TABLE dtv_privatetypes ("
Expand All @@ -5847,7 +5872,8 @@ tmp.constData(),
" audionum tinyint(4) NOT NULL default '-1',"
" subtitlenum tinyint(4) NOT NULL default '-1',"
" framenum bigint(20) NOT NULL default '0',"
" `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,"
" `timestamp` timestamp NOT NULL NOT NULL DEFAULT CURRENT_TIMESTAMP "
" ON UPDATE CURRENT_TIMESTAMP,"
" PRIMARY KEY (serialid)"
");",
"CREATE TABLE eit_cache ("
Expand Down Expand Up @@ -5889,7 +5915,8 @@ tmp.constData(),
" cmds int(11) NOT NULL default '0',"
" flags int(11) NOT NULL default '0',"
" `status` int(11) NOT NULL default '0',"
" statustime timestamp NOT NULL default CURRENT_TIMESTAMP,"
" statustime timestamp NOT NULL NOT NULL DEFAULT CURRENT_TIMESTAMP "
" ON UPDATE CURRENT_TIMESTAMP,"
" hostname varchar(64) NOT NULL default '',"
" args blob NOT NULL,"
" `comment` varchar(128) NOT NULL default '',"
Expand Down Expand Up @@ -6149,7 +6176,8 @@ tmp.constData(),
" recordid int(11) default NULL,"
" seriesid varchar(40) NOT NULL default '',"
" programid varchar(40) NOT NULL default '',"
" lastmodified timestamp NOT NULL default CURRENT_TIMESTAMP,"
" lastmodified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP "
" ON UPDATE CURRENT_TIMESTAMP,"
" filesize bigint(20) NOT NULL default '0',"
" stars float NOT NULL default '0',"
" previouslyshown tinyint(1) default '0',"
Expand Down
5 changes: 5 additions & 0 deletions mythtv/libs/libmythui/mythscreenstack.cpp
Expand Up @@ -33,6 +33,11 @@ MythScreenStack::MythScreenStack(MythMainWindow *parent, const QString &name,

MythScreenStack::~MythScreenStack()
{
while (!m_Children.isEmpty())
{
MythScreenType *child = m_Children.back();
PopScreen(child, false, true); // Don't fade, do delete
}
}

void MythScreenStack::EnableEffects(void)
Expand Down
44 changes: 37 additions & 7 deletions mythtv/libs/libmythui/mythuibuttontree.cpp
Expand Up @@ -196,6 +196,8 @@ bool MythUIButtonTree::UpdateList(MythUIButtonList *list, MythGenericTree *node)
SLOT(handleSelect(MythUIButtonListItem *)));
connect(list, SIGNAL(itemClicked(MythUIButtonListItem *)),
SLOT(handleClick(MythUIButtonListItem *)));
connect(list, SIGNAL(itemVisible(MythUIButtonListItem *)),
SLOT(handleVisible(MythUIButtonListItem *)));

return true;
}
Expand Down Expand Up @@ -505,6 +507,19 @@ MythUIButtonListItem* MythUIButtonTree::GetItemCurrent() const
return NULL;
}

/*!
* \brief Handle a list item becoming visible
*
* \param item The list item
*/
void MythUIButtonTree::handleVisible(MythUIButtonListItem *item)
{
if (!item)
return;

emit itemVisible(item);
}

/*!
* \copydoc MythUIType::keyPressEvent()
*/
Expand All @@ -518,17 +533,32 @@ bool MythUIButtonTree::keyPressEvent(QKeyEvent *event)
{
QString action = actions[i];
handled = true;

if (action == "RIGHT")
if (m_activeList && m_activeList->m_layout == MythUIButtonList::LayoutGrid)
{
SwitchList(true);
if (action == "SELECT" && m_currentNode->childCount() > 0)
{
SwitchList(true);
}
else if (action == "ESCAPE" && m_currentDepth > 1)
{
SwitchList(false);
}
else
handled = false;
}
else if (action == "LEFT")
else
{
SwitchList(false);
if (action == "RIGHT")
{
SwitchList(true);
}
else if (action == "LEFT")
{
SwitchList(false);
}
else
handled = false;
}
else
handled = false;
}

if (!handled && m_activeList)
Expand Down
2 changes: 2 additions & 0 deletions mythtv/libs/libmythui/mythuibuttontree.h
Expand Up @@ -39,10 +39,12 @@ class MPUBLIC MythUIButtonTree : public MythUIType
public slots:
void handleSelect(MythUIButtonListItem* item);
void handleClick(MythUIButtonListItem* item);
void handleVisible(MythUIButtonListItem* item);

signals:
void itemSelected(MythUIButtonListItem* item);
void itemClicked(MythUIButtonListItem* item);
void itemVisible(MythUIButtonListItem* item);
void nodeChanged(MythGenericTree* node);

protected:
Expand Down

0 comments on commit f86d872

Please sign in to comment.