[mythtv] [PATCH] Updated manage recordings screen

Kevin Kuphal kuphal at dls.net
Sat Jul 10 10:13:46 EDT 2004


This patch changes the Delete Recordings screen to Manage Recordings and 
modifies the action menus accordingly.

- The language translations for "Manage" need to be updated for all 
languages other than English

- Watch Recordings INFO menu consists of Play, Delete, and Cancel
- Manage Recordings INFO menu consists of Delete, Stop Recording, toggle 
Auto Expire, Change Recording Group, Edit Recording Schedule, Start/Stop 
Transcode, and Start/Stop Commercial Flag.

No other behavior of the Watch Recordings or Delete Recordings screens 
were changed other than the moving of buttons from the INFO menu.  If 
applied, I will submit further patches for Play from Beginning and Clear 
Bookmarks for consideration as well as probably a way to switch quickly 
between watch and manage.

Kevin
-------------- next part --------------
Index: mythtv/programs/mythfrontend/playbackbox.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/playbackbox.cpp,v
retrieving revision 1.161
diff -n -u -r1.161 playbackbox.cpp
--- mythtv/programs/mythfrontend/playbackbox.cpp	29 Jun 2004 02:56:29 -0000	1.161
+++ mythtv/programs/mythfrontend/playbackbox.cpp	10 Jul 2004 14:09:17 -0000
@@ -1556,51 +1556,61 @@
 
     QSqlDatabase *db = QSqlDatabase::database();
 
-    QButton *playButton = popup->addButton(tr("Play"), this, SLOT(doPlay()));
+    QButton *firstButton = NULL;
 
+    if (type == Delete) 
+    {
+        // Put items for managing recordings in this block
+        firstButton = popup->addButton(tr("Delete"), this, SLOT(askDelete()));
 
-    if (RemoteGetRecordingStatus(program, overrectime, underrectime) > 0)
-        popup->addButton(tr("Stop Recording"), this, SLOT(askStop()));
-
-    if (delitem && delitem->GetAutoExpireFromRecorded(db))
-        popup->addButton(tr("Don't Auto Expire"), this, SLOT(noAutoExpire()));
-    else
-        popup->addButton(tr("Auto Expire"), this, SLOT(doAutoExpire()));
-
-    popup->addButton(tr("Change Recording Group"), this,
-                     SLOT(showRecGroupChanger()));
-
-    popup->addButton(tr("Edit Recording Schedule"), this,
-                     SLOT(doEditScheduled()));
+        if (delitem && delitem->GetAutoExpireFromRecorded(db))
+            popup->addButton(tr("Don't Auto Expire"), this, SLOT(noAutoExpire()));
+        else
+            popup->addButton(tr("Auto Expire"), this, SLOT(doAutoExpire()));
 
-    QString query = QString("SELECT * FROM transcoding WHERE "
-                            "chanid = '%1' AND starttime = '%2';")
-                           .arg(curitem->chanid)
-                           .arg(curitem->startts.toString("yyyyMMddhhmmss"));
+        if (RemoteGetRecordingStatus(program, overrectime, underrectime) > 0)
+            popup->addButton(tr("Stop Recording"), this, SLOT(askStop()));
 
-    MythContext::KickDatabase(db);
-    QSqlQuery result = db->exec(query);
+        popup->addButton(tr("Change Recording Group"), this,
+                         SLOT(showRecGroupChanger()));
+   
+        popup->addButton(tr("Edit Recording Schedule"), this,
+                         SLOT(doEditScheduled()));
+
+        QString query = QString("SELECT * FROM transcoding WHERE "
+                                "chanid = '%1' AND starttime = '%2';")
+                               .arg(curitem->chanid)
+                               .arg(curitem->startts.toString("yyyyMMddhhmmss"));
+
+        MythContext::KickDatabase(db);
+        QSqlQuery result = db->exec(query);
+
+        if (result.isActive() && result.numRowsAffected() > 0)
+            popup->addButton(tr("Stop Transcoding"), this,
+                             SLOT(doBeginTranscoding()));
+        else
+            popup->addButton(tr("Begin Transcoding"), this,
+                             SLOT(doBeginTranscoding()));
 
-    if (result.isActive() && result.numRowsAffected() > 0)
-        popup->addButton(tr("Stop Transcoding"), this,
-                         SLOT(doBeginTranscoding()));
-    else
-        popup->addButton(tr("Begin Transcoding"), this,
-                         SLOT(doBeginTranscoding()));
+        if (curitem->IsCommProcessing(db))
+            popup->addButton(tr("Stop Commercial Flagging"), this,
+                             SLOT(doBeginFlagging()));
+        else
+            popup->addButton(tr("Begin Commercial Flagging"), this,
+                             SLOT(doBeginFlagging()));
 
-    if (curitem->IsCommProcessing(db))
-        popup->addButton(tr("Stop Commercial Flagging"), this,
-                         SLOT(doBeginFlagging()));
-    else
-        popup->addButton(tr("Begin Commercial Flagging"), this,
-                         SLOT(doBeginFlagging()));
+    } else {
+        // Put items for Watch Recordings screen here
+        firstButton = popup->addButton(tr("Play"), this, SLOT(doPlay()));
+        popup->addButton(tr("Delete"), this, SLOT(askDelete()));
+    }
 
-    popup->addButton(tr("Delete"), this, SLOT(askDelete()));
+    // Put items for both menus here
     popup->addButton(tr("Cancel"), this, SLOT(doCancel()));
 
     popup->ShowPopup(this, SLOT(doCancel()));
 
-    playButton->setFocus();
+    firstButton->setFocus();
 
     expectingPopup = true;
 }
Index: mythtv/programs/mythfrontend/tvmenu.xml
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/tvmenu.xml,v
retrieving revision 1.23
diff -n -u -r1.23 tvmenu.xml
--- mythtv/programs/mythfrontend/tvmenu.xml	27 Mar 2004 02:28:15 -0000	1.23
+++ mythtv/programs/mythfrontend/tvmenu.xml	10 Jul 2004 14:09:18 -0000
@@ -60,7 +60,7 @@
 
    <button>
       <type>TV_DELETE</type>
-      <text>Delete Recordings</text>
+      <text>Manage Recordings</text>
       <text lang="IT">Elimina una registrazione</text>
       <text lang="ES">Borrar Grabaciones</text>
       <text lang="CA">Esborrar Gravacions</text>


More information about the mythtv-dev mailing list