[mythtv] [PATCH] Manage recordings screen

Kevin Kuphal kuphal at dls.net
Wed Jul 7 02:30:19 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 only of Play and Cancel now
- Manage Recordings INFO menu consists of Stop Recording, toggle Auto 
Expire, Change Recording Group, Edit Recording Schedule, Start/Stop 
Transcode, and Start/Stop Commercial Flag.
- Play is only available on Watch and Delete is only available on Manage
- SELECT will Play on Watch and Delete on Manage

If this is acceptable and is applied, then I'll resubmit my patches for 
Play from Beginning and Clear Bookmarks on the Watch Recordings screen.  
Any suggestions as to other arrangements of buttons are of course 
welcome.  I think maybe it would be nice to see a "Jump to Manage" 
button from the Watch screen and visa-versa to ease the transition for 
users accustomed to all the items on one menu.

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	7 Jul 2004 05:27:44 -0000
@@ -1556,51 +1556,60 @@
 
     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()));
+    // 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	7 Jul 2004 05:27:44 -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