Opened 17 years ago

Closed 17 years ago

#3885 closed defect (fixed)

mytharchive: can not deselect selected files

Reported by: Russell Mora <rd.mora@…> Owned by: paulh
Priority: trivial Milestone: 0.21
Component: mytharchive Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

The mytharchive video and recording file selector each individually enforce a "one file must be selected rule". The causes problems if I, say, select some video and recording files for archive but then decide I don't want to archive the video files. I will still be archiving some files (the recordings) however the UI does not let me deselect all the video files.

This patch removes this restriction from the video and recordings selectors. This is safe because the parent screen separately enforces the "one file must be selected rule".

Index: mytharchive/mytharchive/videoselector.cpp
===================================================================
--- mytharchive/mytharchive/videoselector.cpp   (revision 14309)
+++ mytharchive/mytharchive/videoselector.cpp   (working copy)
@@ -317,13 +317,6 @@

 void VideoSelector::OKPressed()
 {
-    if (selectedList.count() == 0)
-    {
-        MythPopupBox::showOkPopup(gContext->GetMainWindow(), tr("Myth Archive"),
-            tr("You need to select at least one video file!"));
-        return;
-    }
-
     // remove all videos from archivelist
     MSqlQuery query(MSqlQuery::InitCon());
     query.prepare("DELETE FROM archiveitems WHERE type = 'Video'");
Index: mytharchive/mytharchive/recordingselector.cpp
===================================================================
--- mytharchive/mytharchive/recordingselector.cpp       (revision 14309)
+++ mytharchive/mytharchive/recordingselector.cpp       (working copy)
@@ -312,13 +312,6 @@

 void RecordingSelector::OKPressed()
 {
-    if (selectedList.count() == 0)
-    {
-        MythPopupBox::showOkPopup(gContext->GetMainWindow(), tr("Myth Archive"),
-                                  tr("You need to select at least one recording!"));
-        return;
-    }
-
     // remove all recordings from archivelist
     MSqlQuery query(MSqlQuery::InitCon());
     query.prepare("DELETE FROM archiveitems WHERE type = 'Recording'");

Change History (3)

comment:1 Changed 17 years ago by Russell Mora <rd.mora@…>

Oh, the same goes for the file selector:

Index: mytharchive/mytharchive/fileselector.cpp
===================================================================
--- mytharchive/mytharchive/fileselector.cpp  (revision 13815)
+++ mytharchive/mytharchive/fileselector.cpp  (working copy)
@@ -247,13 +247,6 @@
 {
     if (m_selectorType == FSTYPE_FILELIST)
     {
-        if (m_selectedList.count() == 0)
-        {
-            MythPopupBox::showOkPopup(gContext->GetMainWindow(), tr("Myth Archive"),
-                                    tr("You need to select at least one file!"));
-            return;
-        }
-
         // loop though selected files and add them to the archiveitems table
         QString s;
         QStringList::iterator it;

comment:2 Changed 17 years ago by paulh

Milestone: unknown0.21

Could you please attach patches as files in the future. They are a lot easier to apply.

By the way you do know you can press MENU on the 'Select Archive Items' screen to remove the highlighted item?

comment:3 Changed 17 years ago by paulh

Resolution: fixed
Status: newclosed

(In [14312]) Remove the restriction that the recording, video and file selector screens had to have one item selected before allowing you to press OK to exit the screen. This meant that you couldn't de-select _all_ items on a screen and exit.

Also fixes a bug in the file selector screen that was causing files that were de-selected to not be removed from the archive list.

Closes #3885.

Note: See TracTickets for help on using tickets.