Ticket #435: rename_recordings.patch
File rename_recordings.patch, 5.3 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/programinfo.h
145 145 void FinishedRecording(bool prematurestop); 146 146 void UpdateRecordingEnd(void); 147 147 void ApplyRecordRecGroupChange(const QString &newrecgroup); 148 void ApplyRecordRecTitleChange(const QString &newTitle, 149 const QString &newSubtitle); 148 150 149 151 // Quick gets 150 152 QString CreateRecordBasename(const QString &ext) const; -
libs/libmythtv/programinfo.cpp
987 987 recgroup = newrecgroup; 988 988 } 989 989 990 /** \fn ProgramInfo::ApplyRecordRecTitleChange(const QString &newTitle, const QString &newSubtitle) 991 * \brief Sets the recording title and subtitle, both in this ProgramInfo 992 * and in the database. 993 * \param newTitle New recording title. 994 * \param newSubtitle New recording subtitle 995 */ 996 void ProgramInfo::ApplyRecordRecTitleChange(const QString &newTitle, const QString &newSubtitle) 997 { 998 MSqlQuery query(MSqlQuery::InitCon()); 999 1000 query.prepare("UPDATE recorded" 1001 " SET title = :TITLE, subtitle = :SUBTITLE" 1002 " WHERE chanid = :CHANID" 1003 " AND starttime = :START ;"); 1004 query.bindValue(":TITLE", newTitle.utf8()); 1005 query.bindValue(":SUBTITLE", newSubtitle.utf8()); 1006 query.bindValue(":CHANID", chanid); 1007 query.bindValue(":START", recstartts.toString("yyyyMMddhhmm00")); 1008 1009 if (!query.exec()) 1010 MythContext::DBError("RecTitle update", query); 1011 1012 title = newTitle; 1013 subtitle = newSubtitle; 1014 } 1015 1016 990 1017 /** \fn ProgramInfo::ToggleRecord() 991 1018 * \brief Cycles through recording types. 992 1019 * -
programs/mythfrontend/playbackbox.cpp
2381 2381 QButton *changeButton = popup->addButton(tr("Change Recording Group"), this, 2382 2382 SLOT(showRecGroupChanger())); 2383 2383 2384 popup->addButton(tr("Change Recording Title"), this, 2385 SLOT(showRecTitleChanger())); 2386 2384 2387 popup->addButton(tr("Edit Recording Schedule"), this, 2385 2388 SLOT(doEditScheduled())); 2386 2389 … … 3995 3998 closeRecGroupPopup(result == MythDialog::Accepted); 3996 3999 } 3997 4000 4001 void PlaybackBox::showRecTitleChanger() 4002 { 4003 if (!expectingPopup) 4004 return; 4005 4006 cancelPopup(); 4007 4008 initRecGroupPopup(tr("Change Recording Title"), "showRecTitleChanger"); 4009 4010 recGroupPopup->addLabel(tr("Title")); 4011 recGroupLineEdit = new MythLineEdit(recGroupPopup); 4012 recGroupLineEdit->setText(delitem->title); 4013 recGroupLineEdit->selectAll(); 4014 recGroupPopup->addWidget(recGroupLineEdit); 4015 4016 recGroupPopup->addLabel(tr("Subtitle")); 4017 recGroupLineEdit1 = new MythLineEdit(recGroupPopup); 4018 recGroupLineEdit1->setText(delitem->subtitle); 4019 recGroupLineEdit1->selectAll(); 4020 recGroupPopup->addWidget(recGroupLineEdit1); 4021 4022 recGroupLineEdit->setFocus(); 4023 4024 connect(recGroupLineEdit, SIGNAL(returnPressed()), recGroupPopup, SLOT(accept())); 4025 connect(recGroupLineEdit1, SIGNAL(returnPressed()), recGroupPopup, SLOT(accept())); 4026 4027 int result = recGroupPopup->ExecPopup(); 4028 4029 if (result == MythDialog::Accepted) 4030 setRecTitle(); 4031 4032 closeRecGroupPopup(result == MythDialog::Accepted); 4033 4034 delete delitem; 4035 delitem = NULL; 4036 } 4037 3998 4038 void PlaybackBox::setRecGroup(void) 3999 4039 { 4000 4040 QString newRecGroup = recGroupLineEdit->text(); … … 4022 4062 } 4023 4063 } 4024 4064 4065 void PlaybackBox::setRecTitle() 4066 { 4067 QString newRecTitle = recGroupLineEdit->text(); 4068 QString newRecSubtitle = recGroupLineEdit1->text(); 4069 4070 if (newRecTitle == "") 4071 return; 4072 4073 delitem->ApplyRecordRecTitleChange(newRecTitle, newRecSubtitle); 4074 4075 inTitle = gContext->GetNumSetting("PlaybackBoxStartInTitle", 0); 4076 titleIndex = 0; 4077 progIndex = 0; 4078 4079 connected = FillList(); 4080 skipUpdate = false; 4081 update(fullRect); 4082 } 4083 4025 4084 void PlaybackBox::recGroupChangerListBoxChanged(void) 4026 4085 { 4027 4086 if (!recGroupPopup || !recGroupListBox || !recGroupLineEdit) -
programs/mythfrontend/playbackbox.h
56 56 void showMenu(); 57 57 void showActionsSelected(); 58 58 void showRecGroupChanger(); 59 void showRecTitleChanger(); 59 60 void showRecGroupChooser(); 60 61 void showRecGroupPasswordChanger(); 61 62 void showPlayFromPopup(); … … 99 100 void recGroupChangerListBoxChanged(void); 100 101 void recGroupChooserListBoxChanged(void); 101 102 void setRecGroup(void); 103 void setRecTitle(void); 102 104 void setRecGroupPassword(); 103 105 void recGroupOldPasswordChanged(const QString &newText); 104 106 … … 293 295 MythPopupBox *recGroupPopup; 294 296 MythListBox *recGroupListBox; 295 297 MythLineEdit *recGroupLineEdit; 298 MythLineEdit *recGroupLineEdit1; 296 299 MythLineEdit *recGroupOldPassword; 297 300 MythLineEdit *recGroupNewPassword; 298 301 MythPushButton *recGroupOkButton;