Ticket #199: channelgroup.4.diff
| File channelgroup.4.diff, 66.0 KB (added by , 17 years ago) |
|---|
-
libs/libmythtv/channelgroup.cpp
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/channelgroup.cpp mythtv/libs/libmythtv/channelgroup.cpp
old new 1 #include "mythcontext.h" 2 #include "libmythdb/mythdbcon.h" 3 #include <qsqldatabase.h> 4 #include <qcursor.h> 5 #include <qlayout.h> 6 #include <iostream> 7 #include "mythstorage.h" 8 #include "mythdb.h" 9 #include "channelutil.h" 10 #include "channelgroup.h" 11 12 #define LOC QString("Channel Group: ") 13 #define LOC_ERR QString("Channel Group, Error: ") 14 15 ChannelGroupItem& ChannelGroupItem::operator=(const ChannelGroupItem &other) 16 { 17 grpid = other.grpid; 18 name = (other.name); 19 20 return *this; 21 } 22 23 ChannelGroupItem::ChannelGroupItem(const ChannelGroupItem &other) 24 { 25 (*this) = other; 26 } 27 28 inline bool lt_group(const ChannelGroupItem &a, const ChannelGroupItem &b) 29 { 30 return QString::localeAwareCompare(a.name, b.name) < 0; 31 } 32 33 bool ChannelGroup::ToggleChannel(uint chanid, int changrpid, int delete_chan) 34 { 35 // Check if it already exists for that chanid... 36 MSqlQuery query(MSqlQuery::InitCon()); 37 query.prepare( 38 "SELECT channelgroup.id " 39 "FROM channelgroup " 40 "WHERE channelgroup.chanid = :CHANID AND " 41 "channelgroup.grpid = :GRPID " 42 "LIMIT 1"); 43 query.bindValue(":CHANID", chanid); 44 query.bindValue(":GRPID", changrpid); 45 46 if (!query.exec() || !query.isActive()) 47 { 48 MythDB::DBError("ChannelGroup::ToggleChannel", query); 49 return false; 50 } 51 else if ((query.size() > 0) && delete_chan) 52 { 53 // We have a record...Remove it to toggle... 54 query.next(); 55 QString id = query.value(0).toString(); 56 query.prepare( 57 QString("DELETE FROM channelgroup " 58 "WHERE id = '%1'").arg(id)); 59 query.exec(); 60 VERBOSE(VB_IMPORTANT, LOC + QString("Removing channel with id=%1.").arg(id)); 61 } 62 else if (query.size() == 0) 63 { 64 // We have no record...Add one to toggle... 65 query.prepare( 66 QString("INSERT INTO channelgroup (chanid,grpid) " 67 "VALUES ('%1','%2')").arg(chanid).arg(changrpid)); 68 query.exec(); 69 VERBOSE(VB_IMPORTANT, LOC + QString("Adding channel %1 to group %2.").arg(chanid).arg(changrpid)); 70 } 71 72 return true; 73 } 74 75 bool ChannelGroup::AddChannel(uint chanid, int changrpid) 76 { 77 // Check if it already exists for that chanid... 78 MSqlQuery query(MSqlQuery::InitCon()); 79 query.prepare( 80 "SELECT channelgroup.id " 81 "FROM channelgroup " 82 "WHERE channelgroup.chanid = :CHANID AND " 83 "channelgroup.grpid = :GRPID " 84 "LIMIT 1"); 85 query.bindValue(":CHANID", chanid); 86 query.bindValue(":GRPID", changrpid); 87 88 if (!query.exec() || !query.isActive()) 89 { 90 MythDB::DBError("ChannelGroup::ToggleChannel", query); 91 return false; 92 } 93 else if (query.size() == 0) 94 { 95 // We have no record...Add one to toggle... 96 query.prepare( 97 QString("INSERT INTO channelgroup (chanid,grpid) " 98 "VALUES ('%1','%2')").arg(chanid).arg(changrpid)); 99 query.exec(); 100 VERBOSE(VB_IMPORTANT, LOC + QString("Adding channel %1 to group %2.").arg(chanid).arg(changrpid)); 101 } 102 103 return true; 104 } 105 106 bool ChannelGroup::DeleteChannel(uint chanid, int changrpid) 107 { 108 // Check if it already exists for that chanid... 109 MSqlQuery query(MSqlQuery::InitCon()); 110 query.prepare( 111 "SELECT channelgroup.id " 112 "FROM channelgroup " 113 "WHERE channelgroup.chanid = :CHANID AND " 114 "channelgroup.grpid = :GRPID " 115 "LIMIT 1"); 116 query.bindValue(":CHANID", chanid); 117 query.bindValue(":GRPID", changrpid); 118 119 if (!query.exec() || !query.isActive()) 120 { 121 MythDB::DBError("ChannelGroup::ToggleChannel", query); 122 return false; 123 } 124 else if (query.size() > 0) 125 { 126 // We have a record...Remove it to toggle... 127 query.next(); 128 QString id = query.value(0).toString(); 129 query.prepare( 130 QString("DELETE FROM channelgroup " 131 "WHERE id = '%1'").arg(id)); 132 query.exec(); 133 VERBOSE(VB_IMPORTANT, LOC + QString("Removing channel with id=%1.").arg(id)); 134 } 135 136 return true; 137 } 138 139 ChannelGroupList ChannelGroup::GetChannelGroups(void) 140 { 141 ChannelGroupList list; 142 143 MSqlQuery query(MSqlQuery::InitCon()); 144 145 QString qstr = "SELECT grpid, name FROM channelgroupnames order by name"; 146 147 query.prepare(qstr); 148 149 if (!query.exec() || !query.isActive()) 150 MythDB::DBError("ChannelGroup::GetChannelGroups", query); 151 else 152 { 153 while (query.next()) 154 { 155 ChannelGroupItem group(query.value(0).toUInt(), 156 query.value(1).toString()); 157 list.push_back(group); 158 } 159 } 160 161 // stable_sort(list.begin(), list.end(), lt_group); 162 163 return list; 164 } 165 166 // Cycle through the available groups, then all channels 167 // Will cycle through to end then return -1 168 // To signify all channels. 169 int ChannelGroup::GetNextChannelGroup(const ChannelGroupList &sorted, int grpid) 170 { 171 // If no groups return -1 for all channels 172 if (sorted.empty()) 173 return -1; 174 175 // If grpid is all channels (-1), then return the first grpid 176 if (grpid == -1) 177 return sorted[0].grpid; 178 179 ChannelGroupList::const_iterator it = find(sorted.begin(), sorted.end(), grpid); 180 181 // If grpid is not in the list, return -1 for all channels 182 if (it == sorted.end()) 183 return -1; 184 185 ++it; 186 187 // If we reached the end, the next option is all channels (-1) 188 if (it == sorted.end()) 189 return -1; 190 191 return it->grpid; 192 } 193 194 QString ChannelGroup::GetChannelGroupName(int grpid) 195 { 196 // All Channels 197 if (grpid == -1) 198 return "All Channels"; 199 200 MSqlQuery query(MSqlQuery::InitCon()); 201 202 QString qstr = QString("SELECT name FROM channelgroupnames where grpid='%1'") 203 .arg(grpid); 204 205 query.prepare(qstr); 206 207 if (!query.exec() || !query.isActive()) 208 MythDB::DBError("ChannelGroup::GetChannelGroups", query); 209 else if (query.size() > 0) 210 { 211 query.next(); 212 return query.value(0).toString(); 213 } 214 215 return ""; 216 } 217 218 int ChannelGroup::GetChannelGroupId(QString changroupname) 219 { 220 // All Channels 221 if (changroupname == "All Channels") 222 return -1; 223 224 MSqlQuery query(MSqlQuery::InitCon()); 225 226 QString qstr = QString("SELECT grpid FROM channelgroupnames where name='%1'") 227 .arg(changroupname); 228 229 query.prepare(qstr); 230 231 if (!query.exec() || !query.isActive()) 232 MythDB::DBError("ChannelGroup::GetChannelGroups", query); 233 else if (query.size() > 0) 234 { 235 query.next(); 236 return query.value(0).toUInt(); 237 } 238 239 return 0; 240 } 241 No newline at end of file -
libs/libmythtv/channelgroup.h
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/channelgroup.h mythtv/libs/libmythtv/channelgroup.h
old new 1 #ifndef CHANNELGROUP_H 2 #define CHANNELGROUP_H 3 4 class ChannelGroupItem 5 { 6 public: 7 ChannelGroupItem(const ChannelGroupItem&); 8 ChannelGroupItem(const uint _grpid, 9 const QString &_name) : 10 grpid(_grpid), name(_name) {} 11 12 bool operator == (uint _grpid) const 13 { return grpid == _grpid; } 14 15 ChannelGroupItem& operator=(const ChannelGroupItem&); 16 17 public: 18 uint grpid; 19 QString name; 20 }; 21 typedef vector<ChannelGroupItem> ChannelGroupList; 22 23 /** \class ChannelGroup 24 */ 25 class MPUBLIC ChannelGroup 26 { 27 public: 28 // ChannelGroup 29 static ChannelGroupList GetChannelGroups(void); 30 static bool ToggleChannel(uint chanid, int changrpid, int delete_chan); 31 static bool AddChannel(uint chanid, int changrpid); 32 static bool DeleteChannel(uint chanid, int changrpid); 33 static int GetNextChannelGroup(const ChannelGroupList &sorted, int grpid); 34 static QString GetChannelGroupName(int grpid); 35 static int GetChannelGroupId(QString changroupname); 36 37 private: 38 39 }; 40 41 #endif -
libs/libmythtv/channelgroupsettings.cpp
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/channelgroupsettings.cpp mythtv/libs/libmythtv/channelgroupsettings.cpp
old new 1 #include "mythcontext.h" 2 #include "libmythdb/mythdbcon.h" 3 #include <qsqldatabase.h> 4 #include <qcursor.h> 5 #include <qlayout.h> 6 #include <iostream> 7 #include "mythstorage.h" 8 #include "mythdb.h" 9 #include "channelutil.h" 10 #include "channelgroup.h" 11 #include "channelgroupsettings.h" 12 13 #define LOC QString("Channel Group Settings: ") 14 #define LOC_ERR QString("Channel Group Settings, Error: ") 15 16 // Storage class for channel group editor in settings 17 class ChannelGroupStorage : public Storage 18 { 19 public: 20 ChannelGroupStorage(Setting *_setting, 21 uint _chanid, QString _grpname) : 22 setting(_setting), chanid(_chanid), grpname(_grpname) {} 23 virtual ~ChannelGroupStorage() {}; 24 25 virtual void Load(void); 26 virtual void Save(void); 27 virtual void Save(QString destination); 28 29 protected: 30 Setting *setting; 31 uint chanid; 32 QString grpname; 33 int grpid; 34 }; 35 36 void ChannelGroupStorage::Load(void) 37 { 38 setting->setValue("0"); 39 40 MSqlQuery query(MSqlQuery::InitCon()); 41 42 QString qstr = "SELECT grpid FROM channelgroupnames WHERE name = :GRPNAME"; 43 44 query.prepare(qstr); 45 query.bindValue(":GRPNAME", grpname); 46 47 if (!query.exec() || !query.isActive()) 48 MythDB::DBError("ChannelGroupStorage::Load", query); 49 else 50 { 51 query.next(); 52 grpid = query.value(0).toUInt(); 53 54 qstr = "SELECT * FROM channelgroup WHERE grpid = :GRPID AND chanid = :CHANID"; 55 query.prepare(qstr); 56 query.bindValue(":GRPID", grpid); 57 query.bindValue(":CHANID", chanid); 58 59 if (!query.exec() || !query.isActive()) 60 MythDB::DBError("ChannelGroupStorage::Load", query); 61 else if (query.size() > 0) 62 setting->setValue("1"); 63 } 64 } 65 66 void ChannelGroupStorage::Save(void) 67 { 68 QString value = setting->getValue(); 69 70 if (value == "1") 71 ChannelGroup::AddChannel(chanid, grpid); 72 else 73 ChannelGroup::DeleteChannel(chanid, grpid); 74 } 75 76 void ChannelGroupStorage::Save(QString destination) 77 { 78 Save(); 79 } 80 81 class ChannelCheckBox : public CheckBoxSetting, public ChannelGroupStorage 82 { 83 public: 84 ChannelCheckBox(const ChannelGroupConfig& _parent, const uint chanid, const QString channum, 85 const QString channame, const QString grpname): 86 CheckBoxSetting(this), 87 ChannelGroupStorage(this, chanid, grpname) 88 { 89 setLabel(QString("%1 %2").arg(channum).arg(channame)); 90 setHelpText(QObject::tr("Select/Unselect channels for this channel group")); 91 }; 92 }; 93 94 ChannelGroupConfig::ChannelGroupConfig(QString _name) 95 : name(_name) 96 { 97 VerticalConfigurationGroup *cgroup; 98 HorizontalConfigurationGroup *columns; 99 100 DBChanList chanlist = ChannelUtil::GetChannels(0, true, "channum, callsign"); 101 ChannelUtil::SortChannels(chanlist, "channum", true); 102 103 DBChanList::iterator it = chanlist.begin(); 104 int i,j = 0; 105 int p = 1; 106 int pages = (int)((float)chanlist.size() / 8.0 / 3.0 + 0.5); 107 108 do 109 { 110 columns = new HorizontalConfigurationGroup(false,false,false,false); 111 columns->setLabel(getName() + " " + 112 QObject::tr("Channel Group - Page ") + QString("%1").arg(p) + 113 QObject::tr("of") + QString("%1").arg(pages)); 114 115 for (j = 0; ((j < 3) && (it < chanlist.end())); ++j) 116 { 117 cgroup = new VerticalConfigurationGroup(false,false,false,false); 118 119 for (i = 0; ((i < 8) && (it < chanlist.end())); ++i) 120 { 121 cgroup->addChild(new ChannelCheckBox(*this, it->chanid, it->channum, it->name, _name)); 122 ++it; 123 } 124 columns->addChild(cgroup); 125 } 126 127 ++p; 128 addChild(columns); 129 } while (it < chanlist.end()); 130 131 } 132 133 ChannelGroupEditor::ChannelGroupEditor(void) : 134 listbox(new ListBoxSetting(this)), lastValue("__CREATE_NEW_GROUP__") 135 { 136 listbox->setLabel(tr("Channel Groups")); 137 addChild(listbox); 138 } 139 140 void ChannelGroupEditor::open(QString name) 141 { 142 lastValue = name; 143 bool created = false; 144 145 if (name == "__CREATE_NEW_GROUP__") 146 { 147 name = ""; 148 149 bool ok = MythPopupBox::showGetTextPopup(gContext->GetMainWindow(), 150 tr("Create New Channel Group"), 151 tr("Enter group name or press SELECT to enter text via the " 152 "On Screen Keyboard"), name); 153 if (!ok) 154 return; 155 156 MSqlQuery query(MSqlQuery::InitCon()); 157 query.prepare("INSERT INTO channelgroupnames (name) VALUES (:NAME);"); 158 query.bindValue(":NAME", name); 159 if (!query.exec()) 160 MythDB::DBError("ChannelGroupEditor::open", query); 161 else 162 created = true; 163 } 164 165 ChannelGroupConfig group(name); 166 167 if (group.exec() == QDialog::Accepted || !created) 168 lastValue = name; 169 170 }; 171 172 void ChannelGroupEditor::doDelete(void) 173 { 174 QString name = listbox->getValue(); 175 if (name == "__CREATE_NEW_GROUP__") 176 return; 177 178 QString message = tr("Delete '%1' Channel group?").arg(name); 179 180 DialogCode value = MythPopupBox::Show2ButtonPopup( 181 gContext->GetMainWindow(), 182 "", message, 183 tr("Yes, delete group"), 184 tr("No, Don't delete group"), kDialogCodeButton1); 185 186 if (kDialogCodeButton0 == value) 187 { 188 MSqlQuery query(MSqlQuery::InitCon()); 189 190 // Find out channel group id 191 query.prepare("SELECT grpid FROM channelgroupnames WHERE name = :NAME;"); 192 query.bindValue(":NAME", name); 193 if (!query.exec()) 194 MythDB::DBError("ChannelGroupEditor::doDelete", query); 195 query.next(); 196 uint grpid = query.value(0).toUInt(); 197 198 // Delete channels from this group 199 query.prepare("DELETE FROM channelgroup WHERE grpid = :GRPID;"); 200 query.bindValue(":GRPID", grpid); 201 if (!query.exec()) 202 MythDB::DBError("ChannelGroupEditor::doDelete", query); 203 204 // Now delete the group from channelgroupnames 205 query.prepare("DELETE FROM channelgroupnames WHERE name = :NAME;"); 206 query.bindValue(":NAME", name); 207 if (!query.exec()) 208 MythDB::DBError("ChannelGroupEditor::doDelete", query); 209 210 lastValue = "__CREATE_NEW_GROUP__"; 211 Load(); 212 } 213 214 listbox->setFocus(); 215 } 216 217 void ChannelGroupEditor::Load(void) 218 { 219 listbox->clearSelections(); 220 221 ChannelGroupList changrplist; 222 223 changrplist = ChannelGroup::GetChannelGroups(); 224 225 ChannelGroupList::iterator it; 226 227 for (it = changrplist.begin(); it < changrplist.end(); ++it) 228 listbox->addSelection(it->name); 229 230 listbox->addSelection(tr("(Create new group)"), "__CREATE_NEW_GROUP__"); 231 232 listbox->setValue(lastValue); 233 } 234 235 DialogCode ChannelGroupEditor::exec(void) 236 {VERBOSE(VB_IMPORTANT, "ChannelGroupEditor::exec"); 237 while (ConfigurationDialog::exec() == kDialogCodeAccepted) 238 open(listbox->getValue()); 239 240 return kDialogCodeRejected; 241 } 242 243 MythDialog* ChannelGroupEditor::dialogWidget(MythMainWindow* parent, 244 const char* widgetName) 245 { 246 dialog = ConfigurationDialog::dialogWidget(parent, widgetName); 247 connect(dialog, SIGNAL(menuButtonPressed()), this, SLOT(doDelete())); 248 connect(dialog, SIGNAL(deleteButtonPressed()), this, SLOT(doDelete())); 249 return dialog; 250 } -
libs/libmythtv/channelgroupsettings.h
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/channelgroupsettings.h mythtv/libs/libmythtv/channelgroupsettings.h
old new 1 #ifndef CHANNELGROUPSETTINGS_H 2 #define CHANNELGROUPSETTINGS_H 3 4 #include "libmyth/settings.h" 5 6 class MPUBLIC ChannelGroupConfig: public ConfigurationWizard 7 { 8 public: 9 ChannelGroupConfig(QString _name); 10 QString getName(void) const { return name; } 11 12 private: 13 QString name; 14 }; 15 16 class MPUBLIC ChannelGroupEditor : public QObject, public ConfigurationDialog 17 { 18 Q_OBJECT 19 20 public: 21 ChannelGroupEditor(void); 22 virtual DialogCode exec(void); 23 virtual void Load(void); 24 virtual void Save(void) { }; 25 virtual void Save(QString) { }; 26 virtual MythDialog* dialogWidget(MythMainWindow* parent, 27 const char* widgetName=0); 28 29 protected slots: 30 void open(QString name); 31 void doDelete(void); 32 33 protected: 34 ListBoxSetting *listbox; 35 QString lastValue; 36 }; 37 38 #endif -
libs/libmythtv/channelutil.cpp
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/channelutil.cpp mythtv/libs/libmythtv/channelutil.cpp
old new bool ChannelUtil::GetChannelSettings(int 1570 1570 return true; 1571 1571 } 1572 1572 1573 DBChanList ChannelUtil::GetChannels(uint sourceid, bool vis_only, QString grp )1573 DBChanList ChannelUtil::GetChannels(uint sourceid, bool vis_only, QString grp, int changrpid) 1574 1574 { 1575 1575 DBChanList list; 1576 QMap<uint,uint> favorites;1576 1577 1577 MSqlQuery query(MSqlQuery::InitCon()); 1578 query.prepare(1579 "SELECT chanid, favid "1580 "FROM favorites");1581 if (!query.exec() || !query.isActive())1582 MythDB::DBError("get channels -- favorites", query);1583 else1584 {1585 while (query.next())1586 favorites[query.value(0).toUInt()] = query.value(1).toUInt();1587 }1588 1578 1589 1579 QString qstr = 1590 "SELECT channum, callsign, chan id, "1580 "SELECT channum, callsign, channel.chanid, " 1591 1581 " atsc_major_chan, atsc_minor_chan, " 1592 1582 " name, icon, mplexid, visible " 1593 1583 "FROM channel "; 1594 1584 1585 // Select only channels from the specified channel group 1586 if (changrpid > -1) 1587 qstr += QString(",channelgroup "); 1588 1595 1589 if (sourceid) 1596 1590 qstr += QString("WHERE sourceid='%1' ").arg(sourceid); 1597 1591 else … … DBChanList ChannelUtil::GetChannels(uint 1599 1593 "WHERE cardinput.sourceid = channel.sourceid AND " 1600 1594 " cardinput.cardid = capturecard.cardid "; 1601 1595 1596 if (changrpid > -1) 1597 { 1598 qstr += QString("AND channel.chanid = channelgroup.chanid " 1599 "AND channelgroup.grpid ='%1' ").arg(changrpid); 1600 } 1601 1602 1602 if (vis_only) 1603 1603 qstr += "AND visible=1 "; 1604 1604 … … DBChanList ChannelUtil::GetChannels(uint 1623 1623 query.value(2).toUInt(), /* chanid */ 1624 1624 query.value(3).toUInt(), /* ATSC major */ 1625 1625 query.value(4).toUInt(), /* ATSC minor */ 1626 favorites[query.value(2).toUInt()], /* favid */1627 1626 query.value(7).toUInt(), /* mplexid */ 1628 1627 query.value(8).toBool(), /* visible */ 1629 1628 query.value(5).toString(), /* name */ … … uint ChannelUtil::GetNextChannel( 1806 1805 (mplexid_restriction && 1807 1806 (mplexid_restriction != it->mplexid)))); 1808 1807 } 1809 else if ( CHANNEL_DIRECTION_UP == direction)1808 else if ((CHANNEL_DIRECTION_UP == direction) || (CHANNEL_DIRECTION_FAVORITE == direction)) 1810 1809 { 1811 1810 do 1812 1811 { … … uint ChannelUtil::GetNextChannel( 1819 1818 (mplexid_restriction && 1820 1819 (mplexid_restriction != it->mplexid)))); 1821 1820 } 1822 else if (CHANNEL_DIRECTION_FAVORITE == direction)1823 {1824 do1825 {1826 it++;1827 if (it == sorted.end())1828 it = sorted.begin();1829 }1830 while ((it != start) &&1831 (!it->favorite ||1832 (skip_non_visible && !it->visible) ||1833 (mplexid_restriction &&1834 (mplexid_restriction != it->mplexid))));1835 }1836 1821 1837 1822 return it->chanid; 1838 1823 } -
libs/libmythtv/channelutil.h
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/channelutil.h mythtv/libs/libmythtv/channelutil.h
old new class MPUBLIC ChannelUtil 168 168 static QString GetVideoFilters(uint sourceid, const QString &channum) 169 169 { return GetChannelValueStr("videofilters", sourceid, channum); } 170 170 171 static DBChanList GetChannels(uint srcid, bool vis_only, QString grp="" );171 static DBChanList GetChannels(uint srcid, bool vis_only, QString grp="", int changrpid=-1); 172 172 static void SortChannels(DBChanList &list, const QString &order, 173 173 bool eliminate_duplicates = false); 174 174 static void EliminateDuplicateChanNum(DBChanList &list); -
libs/libmythtv/dbchannelinfo.cpp
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/dbchannelinfo.cpp mythtv/libs/libmythtv/dbchannelinfo.cpp
old new DBChannel::DBChannel(const DBChannel &ot 16 16 DBChannel::DBChannel( 17 17 const QString &_channum, const QString &_callsign, 18 18 uint _chanid, uint _major_chan, uint _minor_chan, 19 uint _ favorite, uint _mplexid, bool _visible,19 uint _mplexid, bool _visible, 20 20 const QString &_name, const QString &_icon) : 21 21 channum(_channum), 22 22 callsign(_callsign), chanid(_chanid), 23 23 major_chan(_major_chan), minor_chan(_minor_chan), 24 favorite(_favorite),mplexid(_mplexid), visible(_visible),24 mplexid(_mplexid), visible(_visible), 25 25 name(_name), icon(_icon) 26 26 { 27 27 channum.detach(); … … DBChannel &DBChannel::operator=(const DB 39 39 chanid = other.chanid; 40 40 major_chan = other.major_chan; 41 41 minor_chan = other.minor_chan; 42 favorite = other.favorite;43 42 mplexid = (other.mplexid == 32767) ? 0 : other.mplexid; 44 43 visible = other.visible; 45 44 name = other.name; name.detach(); -
libs/libmythtv/dbchannelinfo.h
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/dbchannelinfo.h mythtv/libs/libmythtv/dbchannelinfo.h
old new class MPUBLIC DBChannel 23 23 DBChannel(const DBChannel&); 24 24 DBChannel(const QString &_channum, const QString &_callsign, 25 25 uint _chanid, uint _major_chan, uint _minor_chan, 26 uint _ favorite, uint _mplexid, bool _visible,26 uint _mplexid, bool _visible, 27 27 const QString &_name, const QString &_icon); 28 28 DBChannel& operator=(const DBChannel&); 29 29 … … class MPUBLIC DBChannel 36 36 uint chanid; 37 37 uint major_chan; 38 38 uint minor_chan; 39 uint favorite;40 39 uint mplexid; 41 40 bool visible; 42 41 QString name; -
libs/libmythtv/remoteencoder.cpp
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/remoteencoder.cpp mythtv/libs/libmythtv/remoteencoder.cpp
old new QString RemoteEncoder::SetInput(QString 402 402 return (lastinput.isEmpty()) ? "Error" : lastinput; 403 403 } 404 404 405 void RemoteEncoder::ToggleChannelFavorite( void)405 void RemoteEncoder::ToggleChannelFavorite(QString changroupname) 406 406 { 407 407 QStringList strlist( QString("QUERY_RECORDER %1").arg(recordernum) ); 408 408 strlist << "TOGGLE_CHANNEL_FAVORITE"; 409 strlist << changroupname; 409 410 410 411 SendReceiveStringList(strlist); 411 412 } -
libs/libmythtv/remoteencoder.h
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/remoteencoder.h mythtv/libs/libmythtv/remoteencoder.h
old new class MPUBLIC RemoteEncoder 50 50 PictureAdjustType type, PictureAttribute attr, bool up); 51 51 void ChangeChannel(int channeldirection); 52 52 void ChangeDeinterlacer(int deint_mode); 53 void ToggleChannelFavorite( void);53 void ToggleChannelFavorite(QString); 54 54 void SetChannel(QString channel); 55 55 int SetSignalMonitoringRate(int msec, bool notifyFrontend = true); 56 56 uint GetSignalLockTimeout(QString input); -
libs/libmythtv/tvosdmenuentry.cpp
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/tvosdmenuentry.cpp mythtv/libs/libmythtv/tvosdmenuentry.cpp
old new void TVOSDMenuEntryList::InitDefaultEntr 202 202 curMenuEntries.append( 203 203 new TVOSDMenuEntry("JUMPREC", 1, 1, 1, 0, "List of Recorded Shows")); 204 204 curMenuEntries.append( 205 new TVOSDMenuEntry("CHANNELGROUP", 1, 1, 0, 0, "Channel Groups")); 206 curMenuEntries.append( 205 207 new TVOSDMenuEntry("TOGGLEBROWSE", 1, -1, -1, -1, "Live TV Browse Mode")); 206 208 curMenuEntries.append( 207 209 new TVOSDMenuEntry("PREVCHAN", 1, -1, -1, -1, "Previous TV Channel")); -
libs/libmythtv/tv_play.cpp
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/tv_play.cpp mythtv/libs/libmythtv/tv_play.cpp
old new bool TV::StartTV(ProgramInfo *tvrec, boo 357 357 358 358 bool allowrerecord = tv->getAllowRerecord(); 359 359 bool deleterecording = tv->getRequestDelete(); 360 361 tv->SaveChannelGroup(); 360 362 361 363 delete tv; 362 364 … … void TV::InitKeys(void) 436 438 "in the program guide", "0"); 437 439 REG_KEY("TV Frontend", "GUIDE", "Show the Program Guide", "S"); 438 440 REG_KEY("TV Frontend", "FINDER", "Show the Program Finder", "#"); 439 REG_KEY("TV Frontend", "NEXTFAV", " Toggle showing all channels or just"440 " favorites in the program guide.", "/");441 REG_KEY("TV Frontend", "NEXTFAV", "Cycle through channel groups and all channels " 442 "in the program guide.", "/,S"); 441 443 REG_KEY("TV Frontend", "CHANUPDATE", "Switch channels without exiting " 442 444 "guide in Live TV mode.", "X"); 443 445 REG_KEY("TV Frontend", "VOLUMEDOWN", "Volume down", "[,{,F10,Volume Down"); … … bool TV::Init(bool createWindow) 803 805 osd_general_timeout = gContext->GetNumSetting("OSDGeneralTimeout", 2); 804 806 osd_prog_info_timeout= gContext->GetNumSetting("OSDProgramInfoTimeout", 3); 805 807 tryUnflaggedSkip = gContext->GetNumSetting("TryUnflaggedSkip", 0); 808 channel_group_id = gContext->GetNumSetting("ChannelGroupDefault", -1); 809 browse_changrp = gContext->GetNumSetting("BrowseChannelGroup", 0); 806 810 smartForward = gContext->GetNumSetting("SmartForward", 0); 807 811 stickykeys = gContext->GetNumSetting("StickyKeys"); 808 812 ff_rew_repos = gContext->GetNumSetting("FFRewReposTime", 100)/100.0; … … bool TV::Init(bool createWindow) 817 821 if (!feVBI.isEmpty()) 818 822 vbimode = VBIMode::Parse(gContext->GetSetting(feVBI)); 819 823 824 channel_group_id = gContext->GetNumSetting("ChannelGroupDefault", -1); 825 browse_changrp = gContext->GetNumSetting("BrowseChannelGroup", 0); 826 827 if (browse_changrp && (channel_group_id > -1)) 828 { 829 m_channellist = ChannelUtil::GetChannels(0, true, "channum, callsign", channel_group_id); 830 ChannelUtil::SortChannels(m_channellist, "channum", true); 831 } 832 833 m_changrplist = ChannelGroup::GetChannelGroups(); 834 820 835 if (createWindow) 821 836 { 822 837 bool fullscreen = !gContext->GetNumSetting("GuiSizeForTV", 0); … … TV::~TV(void) 985 1000 } 986 1001 987 1002 /** 1003 * \brief save channel group setting to database 1004 */ 1005 void TV::SaveChannelGroup(void) 1006 { 1007 int remember_last_changrp = gContext->GetNumSetting("ChannelGroupRememberLast", 0); 1008 1009 if (remember_last_changrp) 1010 gContext->SaveSetting("ChannelGroupDefault", channel_group_id); 1011 } 1012 1013 /** 988 1014 * \brief get tv state of active player context 989 1015 */ 990 1016 TVState TV::GetState(int player_idx) const … … bool TV::ToggleHandleAction(PlayerContex 4280 4306 ToggleSleepTimer(ctx); 4281 4307 else if (has_action("TOGGLERECORD", actions) && islivetv) 4282 4308 ToggleRecord(ctx); 4283 else if (has_action("TOGGLEFAV", actions) && islivetv)4284 ToggleChannelFavorite(ctx);4309 // else if (has_action("TOGGLEFAV", actions) && islivetv) 4310 // ToggleChannelFavorite(ctx); 4285 4311 else if (has_action("TOGGLECHANCONTROLS", actions) && islivetv) 4286 4312 DoTogglePictureAttribute(ctx, kAdjustingPicture_Channel); 4287 4313 else if (has_action("TOGGLERECCONTROLS", actions) && islivetv) … … void TV::ToggleInputs(PlayerContext *ctx 6256 6282 UpdateOSDInput(ctx, inputname); 6257 6283 } 6258 6284 6259 void TV::ToggleChannelFavorite(PlayerContext *ctx )6285 void TV::ToggleChannelFavorite(PlayerContext *ctx, QString changroup_name) 6260 6286 { 6261 6287 if (ctx->recorder) 6262 ctx->recorder->ToggleChannelFavorite( );6288 ctx->recorder->ToggleChannelFavorite(changroup_name); 6263 6289 } 6264 6290 6265 6291 QString TV::GetQueuedInput(void) const … … void TV::ChangeChannel(PlayerContext *ct 6514 6540 { 6515 6541 bool muted = false; 6516 6542 6543 if ((browse_changrp || (direction == CHANNEL_DIRECTION_FAVORITE)) && 6544 (channel_group_id > -1) && (direction != CHANNEL_DIRECTION_SAME)) 6545 { 6546 uint chanid; 6547 6548 ctx->LockPlayingInfo(__FILE__, __LINE__); 6549 if (!ctx->playingInfo) 6550 { 6551 VERBOSE(VB_IMPORTANT, 6552 LOC_ERR + "ChangeChannel(): no active ctx playingInfo."); 6553 ctx->UnlockPlayingInfo(__FILE__, __LINE__); 6554 ReturnPlayerLock(ctx); 6555 return; 6556 } 6557 6558 // Collect channel info 6559 const ProgramInfo pginfo(*ctx->playingInfo); 6560 uint old_chanid = pginfo.chanid.toUInt(); 6561 ctx->UnlockPlayingInfo(__FILE__, __LINE__); 6562 6563 chanid = ChannelUtil::GetNextChannel(m_channellist, old_chanid, 0, direction); 6564 6565 ChangeChannel(ctx, chanid, ""); 6566 return; 6567 } else if (direction == CHANNEL_DIRECTION_FAVORITE) 6568 direction = CHANNEL_DIRECTION_UP; 6569 6517 6570 QString oldinputname = ctx->recorder->GetInput(); 6518 6571 6519 6572 ctx->LockDeleteNVP(__FILE__, __LINE__); … … void TV::DoEditSchedule(int editType) 7636 7689 const ProgramInfo pginfo(*actx->playingInfo); 7637 7690 uint chanid = pginfo.chanid.toUInt(); 7638 7691 QString channum = pginfo.chanstr; 7692 int changrpid = channel_group_id; 7639 7693 actx->UnlockPlayingInfo(__FILE__, __LINE__); 7640 7694 7641 7695 ClearOSD(actx); … … void TV::DoEditSchedule(int editType) 7695 7749 { 7696 7750 TV *player = (pause_active) ? NULL : this; 7697 7751 isEmbedded = (isLiveTV && player && allowEPG); 7698 RunProgramGuidePtr(chanid, channum, player, true );7752 RunProgramGuidePtr(chanid, channum, player, true, changrpid); 7699 7753 ignoreKeyPresses = true; 7700 7754 break; 7701 7755 } … … void TV::DoEditSchedule(int editType) 7749 7803 actx = GetPlayerReadLock(-1, __FILE__, __LINE__); 7750 7804 StopEmbedding(actx); // Undo any embedding 7751 7805 DoSetPauseState(actx, saved_pause); // Restore pause states 7806 7752 7807 // If user selected a new channel in the EPG, change to that channel 7753 7808 if (isLiveTV && changeChannel.size()) 7754 7809 ChangeChannel(actx, changeChannel); … … void TV::BrowseDispInfo(PlayerContext *c 8643 8698 if (!browsemode) 8644 8699 BrowseStart(ctx); 8645 8700 8701 // if browsing channel groups is enabled or direction if BROWSE_FAVORITES 8702 // Then pick the next channel in the channel group list to browse 8703 // If channel group is ALL CHANNELS (-1), then bypass picking from 8704 // the channel group list 8705 if ((browse_changrp || (direction == BROWSE_FAVORITE)) && 8706 (channel_group_id > -1) && (direction != BROWSE_SAME) && 8707 (direction != BROWSE_RIGHT) && (direction != BROWSE_LEFT)) 8708 { 8709 uint chanid; 8710 int dir; 8711 8712 if ( (direction == BROWSE_UP) || (direction == BROWSE_FAVORITE) ) 8713 dir = CHANNEL_DIRECTION_UP; 8714 else if (direction == BROWSE_DOWN) 8715 dir = CHANNEL_DIRECTION_DOWN; 8716 else // this should never happen, but just in case 8717 dir = direction; 8718 8719 chanid = ChannelUtil::GetNextChannel(m_channellist, browsechanid, 0, dir); 8720 VERBOSE(VB_IMPORTANT, QString("Get channel: %1").arg(chanid)); 8721 browsechanid = chanid; 8722 browsechannum = QString::null; 8723 direction = BROWSE_SAME; 8724 } 8725 else if ((channel_group_id == -1) && (direction == BROWSE_FAVORITE)) 8726 direction = BROWSE_UP; 8727 8646 8728 OSD *osd = GetOSDLock(ctx); 8647 8729 if (ctx->paused || !osd) 8648 8730 { … … void TV::TreeMenuSelected(OSDListTreeTyp 9546 9628 } 9547 9629 else if (action == "GUIDE") 9548 9630 EditSchedule(actx, kScheduleProgramGuide); 9631 else if (action.left(10) == "CHANGROUP_") 9632 { 9633 if (action == "CHANGROUP_ALL_CHANNELS") 9634 channel_group_id = -1; 9635 else 9636 { 9637 action.remove("CHANGROUP_"); 9638 channel_group_id = action.toInt(); 9639 9640 if (browse_changrp) 9641 { 9642 m_channellist = ChannelUtil::GetChannels(0, true, "channum, callsign", channel_group_id); 9643 ChannelUtil::SortChannels(m_channellist, "channum", true); 9644 } 9645 } 9646 } 9549 9647 else if (action == "FINDER") 9550 9648 EditSchedule(actx, kScheduleProgramFinder); 9551 9649 else if (action == "SCHEDULE") … … void TV::FillOSDTreeMenu( 9743 9841 if (lastProgram != NULL) 9744 9842 new OSDGenericTree(jtp_item, lastProgram->title, "JUMPPREV"); 9745 9843 } 9844 else if (category == "CHANNELGROUP") 9845 { 9846 FillMenuChanGroups(ctx, treeMenu); 9847 } 9746 9848 else if (category == "TOGGLEBROWSE") 9747 9849 { 9748 9850 if (!db_browse_always) … … void TV::FillOSDTreeMenu( 9797 9899 FillMenuSleepMode(ctx, treeMenu); 9798 9900 } 9799 9901 9902 void TV::FillMenuChanGroups( 9903 const PlayerContext *ctx, OSDGenericTree *treeMenu) const 9904 { 9905 OSDGenericTree *cg_item = new OSDGenericTree(treeMenu, tr("Channel Groups"), 9906 "CHANGROUP"); 9907 new OSDGenericTree(cg_item, tr("All Channels"), "CHANGROUP_ALL_CHANNELS", 9908 (channel_group_id == -1) ? 1 : 0, 9909 NULL, "CHANNELGROUP"); 9910 9911 ChannelGroupList::const_iterator it; 9912 9913 for (it = m_changrplist.begin(); it != m_changrplist.end(); ++it) 9914 { 9915 QString name = QString("CHANGROUP_%1").arg(it->grpid); 9916 new OSDGenericTree(cg_item, it->name, name, 9917 ((int)(it->grpid) == channel_group_id) ? 1 : 0, 9918 NULL, "CHANNELGROUP"); 9919 } 9920 } 9921 9800 9922 void TV::FillMenuPlaying( 9801 9923 const PlayerContext *ctx, OSDGenericTree *treeMenu, 9802 9924 QString category) const -
libs/libmythtv/tv_play.h
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/tv_play.h mythtv/libs/libmythtv/tv_play.h
old new 25 25 #include "videoouttypes.h" 26 26 #include "volumebase.h" 27 27 #include "inputinfo.h" 28 #include "channelgroup.h" 28 29 29 30 #include <qobject.h> 30 31 … … typedef QMap<QString,InfoMap> DDValue 52 53 typedef QMap<QString,DDValueMap> DDKeyMap; 53 54 typedef ProgramInfo * (*EMBEDRETURNPROGRAM)(void *, bool); 54 55 typedef void (*EMBEDRETURNVOID) (void *, bool); 55 typedef void (*EMBEDRETURNVOIDEPG) (uint, const QString &, TV *, bool );56 typedef void (*EMBEDRETURNVOIDEPG) (uint, const QString &, TV *, bool, int); 56 57 typedef void (*EMBEDRETURNVOIDFINDER) (TV *, bool); 57 58 58 59 // Locking order … … class MPUBLIC TV : public QThread 276 277 bool HasUDPNotifyEvent(void) const; 277 278 void HandleUDPNotifyEvent(void); 278 279 280 // Channel Groups 281 void SaveChannelGroup(void); 282 279 283 public slots: 280 284 void HandleOSDClosed(int osdType); 281 285 void timerEvent(QTimerEvent*); … … class MPUBLIC TV : public QThread 346 350 void StopStuff(PlayerContext *mctx, PlayerContext *ctx, 347 351 bool stopRingbuffers, bool stopPlayers, bool stopRecorders); 348 352 349 void ToggleChannelFavorite(PlayerContext* );353 void ToggleChannelFavorite(PlayerContext*, QString); 350 354 void ChangeChannel(PlayerContext*, int direction); 351 355 void ChangeChannel(PlayerContext*, uint chanid, const QString &channum); 352 356 void PauseLiveTV(PlayerContext*); … … class MPUBLIC TV : public QThread 527 531 void FillMenuTimeStretch( const PlayerContext*, OSDGenericTree*) const; 528 532 void FillMenuSleepMode( const PlayerContext*, OSDGenericTree*) const; 529 533 bool FillMenuTracks( const PlayerContext*, OSDGenericTree*, uint type) const; 534 void FillMenuChanGroups( const PlayerContext *ctx, OSDGenericTree *treeMenu) const; 530 535 531 536 void UpdateLCD(void); 532 537 bool HandleLCDTimerEvent(void); … … class MPUBLIC TV : public QThread 762 767 QMap<int,int> recorderPlaybackInfoTimerId; 763 768 QMap<int,ProgramInfo> recorderPlaybackInfo; 764 769 770 // Channel favorite group stuff 771 int channel_group_id; 772 uint browse_changrp; 773 ChannelGroupList m_changrplist; 774 DBChanList m_channellist; 775 765 776 // Network Control stuff 766 777 MythDeque<QString> networkControlCommands; 767 778 -
libs/libmythtv/tv_rec.cpp
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/tv_rec.cpp mythtv/libs/libmythtv/tv_rec.cpp
old new using namespace std; 59 59 #include "iptvrecorder.h" 60 60 #include "firewirerecorder.h" 61 61 62 #include "channelgroup.h" 63 62 64 #ifdef USING_V4L 63 65 #include "v4lchannel.h" 64 66 #endif … … void TVRec::RecorderPaused(void) 2915 2917 /** \fn TVRec::ToggleChannelFavorite() 2916 2918 * \brief Toggles whether the current channel should be on our favorites list. 2917 2919 */ 2918 void TVRec::ToggleChannelFavorite( void)2920 void TVRec::ToggleChannelFavorite(QString changroupname) 2919 2921 { 2920 2922 QMutexLocker lock(&stateChangeLock); 2921 2923 … … void TVRec::ToggleChannelFavorite(void) 2935 2937 "\t\t\tCould not toggle favorite.").arg(channum)); 2936 2938 return; 2937 2939 } 2938 2939 // Check if favorite exists for that chanid... 2940 MSqlQuery query(MSqlQuery::InitCon()); 2941 query.prepare( 2942 "SELECT favorites.favid " 2943 "FROM favorites " 2944 "WHERE favorites.chanid = :CHANID " 2945 "LIMIT 1"); 2946 query.bindValue(":CHANID", chanid); 2947 2948 if (!query.exec() || !query.isActive()) 2949 { 2950 MythDB::DBError("togglechannelfavorite", query); 2951 } 2952 else if (query.size() > 0) 2953 { 2954 // We have a favorites record...Remove it to toggle... 2955 query.next(); 2956 QString favid = query.value(0).toString(); 2957 query.prepare( 2958 QString("DELETE FROM favorites " 2959 "WHERE favid = '%1'").arg(favid)); 2960 query.exec(); 2961 VERBOSE(VB_RECORD, LOC + "Removing Favorite."); 2962 } 2940 2941 int changrpid; 2942 bool result; 2943 2944 changrpid = ChannelGroup::GetChannelGroupId(changroupname); 2945 2946 if (changrpid <1) 2947 { 2948 VERBOSE(VB_RECORD, LOC + QString("ToggleChannelFavorite: Invalid " 2949 "channel group name %1, ").arg(changroupname)); 2950 } 2963 2951 else 2964 2952 { 2965 // We have no favorites record...Add one to toggle... 2966 query.prepare( 2967 QString("INSERT INTO favorites (chanid) " 2968 "VALUES ('%1')").arg(chanid)); 2969 query.exec(); 2970 VERBOSE(VB_RECORD, LOC + "Adding Favorite."); 2953 result = ChannelGroup::ToggleChannel(chanid, changrpid, true); 2954 2955 if (!result) 2956 VERBOSE(VB_RECORD, LOC + "Unable to toggle channel favorite."); 2957 else 2958 VERBOSE(VB_RECORD, LOC + QString("Toggled channel favorite." 2959 "channum %1, chan group %2").arg(channum).arg(changroupname)); 2971 2960 } 2972 2961 } 2973 2962 -
libs/libmythtv/tv_rec.h
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/libs/libmythtv/tv_rec.h mythtv/libs/libmythtv/tv_rec.h
old new class MPUBLIC TVRec : public SignalMonit 203 203 QString GetChainID(void); 204 204 void StopLiveTV(void); 205 205 void PauseRecorder(void); 206 void ToggleChannelFavorite( void);206 void ToggleChannelFavorite(QString); 207 207 208 208 void SetLiveRecording(int recording); 209 209 -
programs/mythbackend/encoderlink.cpp
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/programs/mythbackend/encoderlink.cpp mythtv/programs/mythbackend/encoderlink.cpp
old new QString EncoderLink::SetInput(QString in 728 728 * <b>This only works on local recorders.</b> 729 729 * \return -1 if query does not succeed, otherwise. 730 730 */ 731 void EncoderLink::ToggleChannelFavorite( void)731 void EncoderLink::ToggleChannelFavorite(QString changroup) 732 732 { 733 733 if (local) 734 tv->ToggleChannelFavorite( );734 tv->ToggleChannelFavorite(changroup); 735 735 else 736 736 VERBOSE(VB_IMPORTANT, "Should be local only query: ToggleChannelFavorite"); 737 737 } -
programs/mythbackend/encoderlink.h
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/programs/mythbackend/encoderlink.h mythtv/programs/mythbackend/encoderlink.h
old new class EncoderLink 111 111 vector<InputInfo> GetFreeInputs(const vector<uint> &excluded_cards) const; 112 112 QString GetInput(void) const; 113 113 QString SetInput(QString); 114 void ToggleChannelFavorite( void);114 void ToggleChannelFavorite(QString); 115 115 void ChangeChannel(int channeldirection); 116 116 void SetChannel(const QString &name); 117 117 int GetPictureAttribute(PictureAttribute attr); -
programs/mythbackend/mainserver.cpp
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/programs/mythbackend/mainserver.cpp mythtv/programs/mythbackend/mainserver.cpp
old new void MainServer::HandleRecorderQuery(QSt 3259 3259 } 3260 3260 else if (command == "TOGGLE_CHANNEL_FAVORITE") 3261 3261 { 3262 enc->ToggleChannelFavorite(); 3262 QString changroup = slist[2]; 3263 enc->ToggleChannelFavorite(changroup); 3263 3264 retlist << "ok"; 3264 3265 } 3265 3266 else if (command == "CHANGE_CHANNEL") -
programs/mythfrontend/globalsettings.cpp
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/programs/mythfrontend/globalsettings.cpp mythtv/programs/mythfrontend/globalsettings.cpp
old new static HostCheckBox *EPGShowChannelIcon( 3121 3121 return gc; 3122 3122 } 3123 3123 3124 static HostCheckBox *EPGShowFavorites()3125 {3126 HostCheckBox *gc = new HostCheckBox("EPGShowFavorites");3127 gc->setLabel(QObject::tr("Only display 'favorite' channels"));3128 gc->setHelpText(QObject::tr("If enabled, the EPG will initially display "3129 "only the channels marked as favorites. Pressing "3130 "\"4\" will toggle between displaying favorites and all "3131 "channels."));3132 gc->setValue(false);3133 return gc;3134 }3135 3124 3136 3125 static GlobalCheckBox *EPGEnableJumpToChannel() 3137 3126 { … … static GlobalCheckBox *EPGEnableJumpToCh 3143 3132 return gc; 3144 3133 } 3145 3134 3135 static HostCheckBox *ChannelGroupRememberLast() 3136 { 3137 HostCheckBox *gc = new HostCheckBox("ChannelGroupRememberLast"); 3138 gc->setLabel(QObject::tr("Remember last channel group")); 3139 gc->setHelpText(QObject::tr("If enabled, the EPG will initially display " 3140 "only the channels from the last channel group selected. Pressing " 3141 "\"4\" will toggle channel group.")); 3142 gc->setValue(false); 3143 return gc; 3144 } 3145 3146 static HostComboBox *ChannelGroupDefault() 3147 { 3148 HostComboBox *gc = new HostComboBox("ChannelGroupDefault"); 3149 gc->setLabel(QObject::tr("Default channel group")); 3150 3151 ChannelGroupList changrplist; 3152 3153 changrplist = ChannelGroup::GetChannelGroups(); 3154 3155 gc->addSelection(QObject::tr("All Channels"), "-1"); 3156 3157 ChannelGroupList::iterator it; 3158 3159 for (it = changrplist.begin(); it < changrplist.end(); ++it) 3160 gc->addSelection(it->name, QString("%1").arg(it->grpid)); 3161 3162 gc->setHelpText(QObject::tr("Default channel group to be shown in the the EPG" 3163 "Pressing GUIDE key will toggle channel group.")); 3164 gc->setValue(false); 3165 return gc; 3166 } 3167 3168 static HostCheckBox *BrowseChannelGroup() 3169 { 3170 HostCheckBox *gc = new HostCheckBox("BrowseChannelGroup"); 3171 gc->setLabel(QObject::tr("Browse/Change channels from Channel Group")); 3172 gc->setHelpText(QObject::tr("If enabled, LiveTV will browse or change channels " 3173 "from the selected channel group. \"All Channels\" " 3174 "channel group may be selected to browse all channels.")); 3175 gc->setValue(false); 3176 return gc; 3177 } 3178 3179 // Channel Group Settings 3180 class ChannelGroupSettings : public TriggeredConfigurationGroup 3181 { 3182 public: 3183 ChannelGroupSettings() : TriggeredConfigurationGroup(false, true, false, false) 3184 { 3185 setLabel(QObject::tr("Remember last channel group")); 3186 setUseLabel(false); 3187 3188 Setting* RememberChanGrpEnabled = ChannelGroupRememberLast(); 3189 addChild(RememberChanGrpEnabled); 3190 setTrigger(RememberChanGrpEnabled); 3191 3192 ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false); 3193 settings->addChild(ChannelGroupDefault()); 3194 addTarget("0", settings); 3195 3196 // show nothing if RememberChanGrpEnabled is on 3197 addTarget("1", new VerticalConfigurationGroup(true,false)); 3198 }; 3199 }; 3200 3146 3201 // General RecPriorities settings 3147 3202 3148 3203 static GlobalCheckBox *GRSchedMoveHigher() … … GeneralSettings::GeneralSettings() 4909 4964 general2->addChild(RecordOverTime()); 4910 4965 general2->addChild(CategoryOverTimeSettings()); 4911 4966 addChild(general2); 4912 4967 4968 VerticalConfigurationGroup* changrp = new VerticalConfigurationGroup(false); 4969 changrp->setLabel(QObject::tr("General (Channel Groups)")); 4970 ChannelGroupSettings *changroupsettings = new ChannelGroupSettings(); 4971 changrp->addChild(changroupsettings); 4972 changrp->addChild(BrowseChannelGroup()); 4973 addChild(changrp); 4913 4974 } 4914 4975 4915 4976 EPGSettings::EPGSettings() … … EPGSettings::EPGSettings() 4919 4980 epg->addChild(EPGShowCategoryColors()); 4920 4981 epg->addChild(EPGShowCategoryText()); 4921 4982 epg->addChild(EPGShowChannelIcon()); 4922 epg->addChild(EPGShowFavorites());4923 4983 epg->addChild(WatchTVGuide()); 4924 4984 addChild(epg); 4925 4985 -
programs/mythfrontend/guidegrid.cpp
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/programs/mythfrontend/guidegrid.cpp mythtv/programs/mythfrontend/guidegrid.cpp
old new bool JumpToChannel::Update(void) 174 174 } 175 175 176 176 void GuideGrid::RunProgramGuide(uint chanid, const QString &channum, 177 TV *player, bool allowFinder )177 TV *player, bool allowFinder, int changrpid) 178 178 { 179 179 MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); 180 180 GuideGrid *gg = new GuideGrid(mainStack, 181 181 chanid, channum, 182 player, allowFinder );182 player, allowFinder, changrpid); 183 183 184 184 if (gg->Create()) 185 185 mainStack->AddScreen(gg, (player == NULL)); … … void GuideGrid::RunProgramGuide(uint cha 189 189 190 190 GuideGrid::GuideGrid(MythScreenStack *parent, 191 191 uint chanid, QString channum, 192 TV *player, bool allowFinder )192 TV *player, bool allowFinder, int changrpid) 193 193 : MythScreenType(parent, "guidegrid"), 194 194 m_allowFinder(allowFinder), 195 195 m_player(player), … … GuideGrid::GuideGrid(MythScreenStack *pa 207 207 m_channelCount = 5; 208 208 m_timeCount = 30; 209 209 m_currentStartChannel = 0; 210 m_changrpid = changrpid; 211 m_changrplist = ChannelGroup::GetChannelGroups(); 210 212 211 213 m_jumpToChannelEnabled = gContext->GetNumSetting("EPGEnableJumpToChannel", 1); 212 m_showFavorites = gContext->GetNumSetting("EPGShowFavorites", 0);213 214 m_sortReverse = gContext->GetNumSetting("EPGSortReverse", 0); 214 215 m_selectChangesChannel = gContext->GetNumSetting("SelectChangesChannel", 0); 215 216 m_selectRecThreshold = gContext->GetNumSetting("SelChangeRecThreshold", 16); … … bool GuideGrid::Create() 258 259 UIUtilE::Assign(this, m_channelList, "channellist", &err); 259 260 UIUtilE::Assign(this, m_guideGrid, "guidegrid", &err); 260 261 UIUtilW::Assign(this, m_dateText, "datetext"); 262 UIUtilW::Assign(this, m_changroupname, "channelgroup"); 261 263 UIUtilW::Assign(this, m_channelImage, "channelicon"); 262 264 UIUtilW::Assign(this, m_jumpToText, "jumptotext"); 263 265 … … bool GuideGrid::Create() 300 302 301 303 if (m_dateText) 302 304 m_dateText->SetText(m_currentStartTime.toString(m_dateFormat)); 305 306 QString changrpname = ChannelGroup::GetChannelGroupName(m_changrpid); 307 308 if (m_changroupname) 309 m_changroupname->SetText(changrpname); 303 310 304 311 gContext->addListener(this); 305 312 … … bool GuideGrid::keyPressEvent(QKeyEvent 490 497 else if (action == "TOGGLERECORD") 491 498 quickRecord(); 492 499 else if (action == "TOGGLEFAV") 493 toggleChannelFavorite(); 500 { 501 if (m_changrpid == -1) 502 ChannelGroupMenu(0); 503 else 504 toggleChannelFavorite(); 505 } 494 506 else if (action == "CHANUPDATE") 495 507 channelUpdate(); 496 508 else if (action == "VOLUMEUP") … … void GuideGrid::showMenu(void) 540 552 541 553 menuPopup->AddButton(tr("Reverse Channel Order")); 542 554 543 if (m_showFavorites) 544 menuPopup->AddButton(tr("Show All Channels")); 545 else 546 menuPopup->AddButton(tr("Show Favourite Channels")); 555 menuPopup->AddButton(tr("Choose Channel Group")); 547 556 548 557 menuPopup->AddButton(tr("Cancel")); 549 558 … … void GuideGrid::fillChannelInfos(bool go 728 737 m_channelInfoIdx.clear(); 729 738 m_currentStartChannel = 0; 730 739 731 DBChanList channels = ChannelUtil::GetChannels(0, true );740 DBChanList channels = ChannelUtil::GetChannels(0, true, "", m_changrpid); 732 741 ChannelUtil::SortChannels(channels, m_channelOrdering, false); 733 742 734 if (m_showFavorites)735 {736 DBChanList tmp;737 for (uint i = 0; i < channels.size(); i++)738 {739 if (channels[i].favorite)740 tmp.push_back(channels[i]);741 }742 743 if (!tmp.empty())744 channels = tmp;745 }746 747 743 typedef vector<uint> uint_list_t; 748 744 QMap<QString,uint_list_t> channum_to_index_map; 749 745 QMap<QString,uint_list_t> callsign_to_index_map; … … void GuideGrid::customEvent(QEvent *even 1268 1264 } 1269 1265 else if (resulttext == tr("Toggle Favourite Channel")) 1270 1266 { 1271 toggleChannelFavorite(); 1267 if (m_changrpid == -1) 1268 ChannelGroupMenu(0); 1269 else 1270 toggleChannelFavorite(); 1272 1271 } 1273 else if (resulttext == tr(" Show All Channels"))1272 else if (resulttext == tr("Choose Channel Group")) 1274 1273 { 1275 m_showFavorites = false; 1276 generateListings(); 1277 updateChannels(); 1274 ChannelGroupMenu(1); 1278 1275 } 1279 else if (resulttext == tr("Show Favourite Channels")) 1276 } 1277 else if (resultid == "channelgrouptogglemenu") 1278 { 1279 if (resulttext != tr("Cancel")) 1280 1280 { 1281 m_showFavorites = true; 1282 generateListings(); 1283 updateChannels(); 1281 int changroupid; 1282 changroupid = ChannelGroup::GetChannelGroupId(resulttext); 1283 1284 if (changroupid > 0) 1285 toggleChannelFavorite(changroupid); 1286 } 1287 } 1288 else if (resultid == "channelgroupmenu") 1289 { 1290 if (resulttext != tr("Cancel")) 1291 { 1292 int changroupid; 1293 changroupid = ChannelGroup::GetChannelGroupId(resulttext); 1294 1295 if (changroupid > 0) 1296 { 1297 m_changrpid = changroupid; 1298 generateListings(); 1299 updateChannels(); 1300 1301 QString changrpname; 1302 changrpname = ChannelGroup::GetChannelGroupName(m_changrpid); 1303 1304 if (m_changroupname) 1305 m_changroupname->SetText(changrpname); 1306 } 1284 1307 } 1285 1308 } 1286 1309 } … … void GuideGrid::updateChannels(void) 1346 1369 m_channelList, chinfo->GetFormatted(m_channelFormat)); 1347 1370 1348 1371 QString state = ""; 1349 1350 if (chinfo->favorite > 0)1351 {1352 if (unavailable)1353 state = "favunavailable";1354 else1355 state = "favourite";1356 }1357 else if (unavailable)1358 state = "unavailable";1359 1360 1372 item->SetText(chinfo->GetFormatted(m_channelFormat), "buttontext", state); 1361 1373 1362 1374 if (showChannelIcon && !chinfo->icon.isEmpty()) … … void GuideGrid::updateInfo(void) 1431 1443 1432 1444 void GuideGrid::toggleGuideListing() 1433 1445 { 1434 m_showFavorites = (!m_showFavorites); 1435 generateListings(); 1446 int oldchangrpid = m_changrpid; 1447 1448 m_changrpid = ChannelGroup::GetNextChannelGroup(m_changrplist, oldchangrpid); 1449 1450 if (oldchangrpid != m_changrpid) 1451 generateListings(); 1452 1436 1453 updateChannels(); 1454 1455 QString changrpname = ChannelGroup::GetChannelGroupName(m_changrpid); 1456 1457 if (m_changroupname) 1458 m_changroupname->SetText(changrpname); 1437 1459 } 1438 1460 1439 1461 void GuideGrid::generateListings() … … void GuideGrid::generateListings() 1450 1472 fillProgramInfos(); 1451 1473 } 1452 1474 1453 void GuideGrid::toggleChannelFavorite() 1475 void GuideGrid::ChannelGroupMenu(int mode) 1476 { 1477 if (m_changrplist.empty()) 1478 { 1479 QString message = tr("You don't have any channel groups defined"); 1480 1481 MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); 1482 1483 MythConfirmationDialog *okPopup = new MythConfirmationDialog(popupStack, 1484 message, false); 1485 if (okPopup->Create()) 1486 popupStack->AddScreen(okPopup); 1487 else 1488 delete okPopup; 1489 1490 return; 1491 } 1492 1493 QString label = tr("Select Channel Group"); 1494 1495 MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); 1496 MythDialogBox *menuPopup = new MythDialogBox(label, popupStack, "menuPopup"); 1497 1498 if (menuPopup->Create()) 1499 { 1500 if (mode == 0) 1501 menuPopup->SetReturnEvent(this, "channelgrouptogglemenu"); 1502 else 1503 menuPopup->SetReturnEvent(this, "channelgroupmenu"); 1504 1505 for (uint i = 0; i < m_changrplist.size(); i++) 1506 menuPopup->AddButton(m_changrplist[i].name); 1507 1508 menuPopup->AddButton(tr("Cancel")); 1509 1510 popupStack->AddScreen(menuPopup); 1511 } 1512 else 1513 { 1514 delete menuPopup; 1515 } 1516 } 1517 1518 void GuideGrid::toggleChannelFavorite(int grpid) 1454 1519 { 1455 1520 MSqlQuery query(MSqlQuery::InitCon()); 1521 1522 if (grpid == -1) 1523 { 1524 if (m_changrpid == -1) 1525 return; 1526 else 1527 grpid = m_changrpid; 1528 } 1456 1529 1457 1530 // Get current channel id, and make sure it exists... 1458 1531 int chanNum = m_currentRow + m_currentStartChannel; … … void GuideGrid::toggleChannelFavorite() 1464 1537 chanNum = 0; 1465 1538 1466 1539 PixmapChannel *ch = GetChannelInfo(chanNum); 1467 uint favid = ch->favorite;1468 1540 uint chanid = ch->chanid; 1469 1541 1470 if (favid > 0) 1471 { 1472 query.prepare("DELETE FROM favorites WHERE favid = :FAVID ;"); 1473 query.bindValue(":FAVID", favid); 1474 query.exec(); 1475 } 1542 if (m_changrpid == -1) 1543 // If currently viewing all channels, allow to add only not delete 1544 ChannelGroup::ToggleChannel(chanid, grpid, false); 1476 1545 else 1546 // Only allow delete if viewing the favorite group in question 1547 ChannelGroup::ToggleChannel(chanid, grpid, true); 1548 1549 // If viewing favorites, refresh because a channel was removed 1550 if (m_changrpid != -1) 1477 1551 { 1478 // We have no favorites record...Add one to toggle...1479 query.prepare("INSERT INTO favorites (chanid) VALUES (:FAVID);");1480 query.bindValue(":FAVID", chanid);1481 query.exec();1482 }1483 1484 if (m_showFavorites)1485 1552 generateListings(); 1486 else1487 {1488 int maxchannel = 0;1489 m_channelCount = m_guideGrid->getChannelCount();1490 fillChannelInfos(false);1491 maxchannel = max((int)GetChannelCount() - 1, 0);1492 m_channelCount = min(m_channelCount, maxchannel + 1);1493 1553 updateChannels(); 1494 1554 } 1495 1555 } -
programs/mythfrontend/guidegrid.h
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/programs/mythfrontend/guidegrid.h mythtv/programs/mythfrontend/guidegrid.h
old new 19 19 #include "mythscreentype.h" 20 20 #include "programinfo.h" 21 21 #include "programlist.h" 22 #include "channelgroup.h" 22 23 #include "channelutil.h" 23 24 24 25 using namespace std; … … class MPUBLIC GuideGrid : public MythScr 86 87 static void RunProgramGuide(uint startChanId, 87 88 const QString &startChanNum, 88 89 TV *player = NULL, 89 bool allowFinder = true); 90 bool allowFinder = true, 91 int changrpid = -1); 90 92 91 93 DBChanList GetSelection(void) const; 92 94 … … class MPUBLIC GuideGrid : public MythScr 117 119 void pageDown(); 118 120 void pageUp(); 119 121 void toggleGuideListing(); 120 void toggleChannelFavorite(); 122 void toggleChannelFavorite(int grpid = -1); 123 void ChannelGroupMenu(int mode = 0); 121 124 void generateListings(); 122 125 123 126 void enter(); … … class MPUBLIC GuideGrid : public MythScr 141 144 protected: 142 145 GuideGrid(MythScreenStack *parentStack, 143 146 uint chanid = 0, QString channum = "", 144 TV *player = NULL, bool allowFinder = true); 147 TV *player = NULL, bool allowFinder = true, 148 int changrpid=-1); 145 149 ~GuideGrid(); 146 150 147 151 private slots: … … class MPUBLIC GuideGrid : public MythScr 195 199 int m_currentRow; 196 200 int m_currentCol; 197 201 198 bool m_showFavorites;199 202 bool m_sortReverse; 200 203 QString m_channelFormat; 201 204 … … class MPUBLIC GuideGrid : public MythScr 221 224 222 225 QTimer *m_updateTimer; 223 226 227 int m_changrpid; 228 ChannelGroupList m_changrplist; 229 224 230 QMutex m_jumpToChannelLock; 225 231 JumpToChannel *m_jumpToChannel; 226 232 bool m_jumpToChannelEnabled; … … class MPUBLIC GuideGrid : public MythScr 230 236 MythUIGuideGrid *m_guideGrid; 231 237 MythUIText *m_dateText; 232 238 MythUIText *m_jumpToText; 239 MythUIText *m_changroupname; 233 240 MythUIImage *m_channelImage; 234 241 }; 235 242 -
programs/mythfrontend/main.cpp
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/programs/mythfrontend/main.cpp mythtv/programs/mythfrontend/main.cpp
old new using namespace std; 51 51 #include "lcddevice.h" 52 52 #include "langsettings.h" 53 53 #include "mythcommandlineparser.h" 54 #include "channelgroupsettings.h" 54 55 55 56 #include "myththemedmenu.h" 56 57 #include "myththemebase.h" … … void TVMenuCallback(void *data, QString 523 524 EPGSettings settings; 524 525 settings.exec(); 525 526 } 527 else if (sel == "settings channelgroups") 528 { 529 ChannelGroupEditor editor; 530 editor.exec(); 531 } 526 532 else if (sel == "settings generalrecpriorities") 527 533 { 528 534 GeneralRecPrioritiesSettings settings; -
themes/classic/tv_settings.xml
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/themes/classic/tv_settings.xml mythtv/themes/classic/tv_settings.xml
old new 99 99 </button> 100 100 101 101 <button> 102 <type>TV_SETTINGS_CHANNEL_GROUP</type> 103 <text>Channel Groups</text> 104 <action>SETTINGS CHANNELGROUPS</action> 105 </button> 106 107 <button> 102 108 <type>TV_SETTINGS_RECORDING_PROFILES</type> 103 109 <text>Recording Profiles</text> 104 110 <text lang="IT">Registrazione</text> -
themes/defaultmenu/tv_settings.xml
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/themes/defaultmenu/tv_settings.xml mythtv/themes/defaultmenu/tv_settings.xml
old new 123 123 </button> 124 124 125 125 <button> 126 <type>TV_SETTINGS_CHANNEL_GROUP</type> 127 <text>Channel Groups</text> 128 <action>SETTINGS CHANNELGROUPS</action> 129 </button> 130 131 <button> 126 132 <type>TV_SETTINGS_RECORDING_PROFILES</type> 127 133 <text>Recording Profiles</text> 128 134 <text lang="IT">Registrazioni</text> -
themes/default-wide/schedule-ui.xml
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/themes/default-wide/schedule-ui.xml mythtv/themes/default-wide/schedule-ui.xml
old new 37 37 <cornerradius>15</cornerradius> 38 38 </shape> 39 39 40 <textarea name="channelgroup" from="basetextarea"> 41 <area>25,245,190,25</area> 42 <align>allcenter</align> 43 </textarea> 44 40 45 <textarea name="datetext" from="basetextarea"> 41 <area>25,2 55,190,25</area>46 <area>25,265,190,25</area> 42 47 <align>allcenter</align> 43 48 </textarea> 44 49 … … 255 260 </imagetype> 256 261 257 262 <textarea name="datetext" from="basetextarea"> 258 <area>25,255,190,25</area> 263 <area>25,265,190,25</area> 264 <align>allcenter</align> 265 </textarea> 266 267 <textarea name="channelgroup" from="basetextarea"> 268 <area>25,245,190,25</area> 259 269 <align>allcenter</align> 260 270 </textarea> 261 271 -
themes/DVR/tv_settings.xml
diff -Naurp -x '*.o' -x '*.lib' -x Makefile -x '*.log' -x '*.pro' -x i18n -x '*.so' -x 'moc*' -x '*.pm' -x '*.old' -x '*.ep' mythtv-orig/themes/DVR/tv_settings.xml mythtv/themes/DVR/tv_settings.xml
old new 99 99 </button> 100 100 101 101 <button> 102 <type>TV_SETTINGS_CHANNEL_GROUP</type> 103 <text>Channel Groups</text> 104 <action>SETTINGS CHANNELGROUPS</action> 105 </button> 106 107 <button> 102 108 <type>TV_SETTINGS_RECORDING_PROFILES</type> 103 109 <text>Recording Profiles</text> 104 110 <text lang="IT">Registrazione</text>
