Skip to content

Commit

Permalink
MythVideo: Start to work on some of the redundancy/overcomplication i…
Browse files Browse the repository at this point in the history
…ssues.

"Mark as watched" appeared not one, but two spots in the menu.  The menu also contained a submenu with that option, as well as an option to mark something as non-browseable.  Since that's not going to be a commonly-invoked toggle, and since browseability is also toggleable from the edit metadata screen, remove the submenu entirely.

Also remove the "Manually enter video ID #" option in the metadata menu-- This can and should be done in the edit metadata menu.
  • Loading branch information
Robert McNamara committed Dec 9, 2010
1 parent 15b4278 commit be8deb0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 65 deletions.
61 changes: 0 additions & 61 deletions mythplugins/mythvideo/mythvideo/videodlg.cpp
Expand Up @@ -2437,7 +2437,6 @@ void VideoDialog::VideoMenu()
m_menuPopup->AddButton(tr("Mark as Watched"), SLOT(ToggleWatched())); m_menuPopup->AddButton(tr("Mark as Watched"), SLOT(ToggleWatched()));
m_menuPopup->AddButton(tr("Video Info"), SLOT(InfoMenu()), true); m_menuPopup->AddButton(tr("Video Info"), SLOT(InfoMenu()), true);
m_menuPopup->AddButton(tr("Change Video Details"), SLOT(ManageMenu()), true); m_menuPopup->AddButton(tr("Change Video Details"), SLOT(ManageMenu()), true);
m_menuPopup->AddButton(tr("Video Options"), SLOT(VideoOptionMenu()), true);
m_menuPopup->AddButton(tr("Delete"), SLOT(RemoveVideo())); m_menuPopup->AddButton(tr("Delete"), SLOT(RemoveVideo()));
} }
if (node && !(node->getInt() >= 0) && node->getInt() != kUpFolder) if (node && !(node->getInt() >= 0) && node->getInt() != kUpFolder)
Expand Down Expand Up @@ -2707,34 +2706,6 @@ void VideoDialog::InfoMenu()
} }
} }


/** \fn VideoDialog::VideoOptionMenu()
* \brief Pop up a MythUI Menu to toggle watched/browseable.
* \return void.
*/
void VideoDialog::VideoOptionMenu()
{
QString label = tr("Video Options");

m_menuPopup = new MythDialogBox(label, m_popupStack, "videomenupopup");

VideoMetadata *metadata = GetMetadata(GetItemCurrent());

if (m_menuPopup->Create())
m_popupStack->AddScreen(m_menuPopup);

m_menuPopup->SetReturnEvent(this, "option");

if (metadata->GetWatched())
m_menuPopup->AddButton(tr("Mark as Unwatched"), SLOT(ToggleWatched()));
else
m_menuPopup->AddButton(tr("Mark as Watched"), SLOT(ToggleWatched()));

if (metadata->GetBrowse())
m_menuPopup->AddButton(tr("Mark as Non-Browseable"), SLOT(ToggleBrowseable()));
else
m_menuPopup->AddButton(tr("Mark as Browseable"), SLOT(ToggleBrowseable()));
}

/** \fn VideoDialog::ManageMenu() /** \fn VideoDialog::ManageMenu()
* \brief Pop up a MythUI Menu for metadata management. * \brief Pop up a MythUI Menu for metadata management.
* \return void. * \return void.
Expand All @@ -2754,8 +2725,6 @@ void VideoDialog::ManageMenu()


m_menuPopup->AddButton(tr("Edit Details"), SLOT(EditMetadata())); m_menuPopup->AddButton(tr("Edit Details"), SLOT(EditMetadata()));
m_menuPopup->AddButton(tr("Retrieve Details"), SLOT(VideoSearch())); m_menuPopup->AddButton(tr("Retrieve Details"), SLOT(VideoSearch()));
m_menuPopup->AddButton(tr("Manually Enter Video #"),
SLOT(ManualVideoUID()));
if (metadata->GetProcessed()) if (metadata->GetProcessed())
m_menuPopup->AddButton(tr("Allow Updates"), SLOT(ToggleProcess())); m_menuPopup->AddButton(tr("Allow Updates"), SLOT(ToggleProcess()));
else else
Expand Down Expand Up @@ -3641,36 +3610,6 @@ void VideoDialog::OnParentalChange(int amount)
} }
} }


void VideoDialog::ManualVideoUID()
{
QString message = tr("Enter Video Unique ID:");

MythTextInputDialog *searchdialog =
new MythTextInputDialog(m_popupStack, message);

if (searchdialog->Create())
m_popupStack->AddScreen(searchdialog);

connect(searchdialog, SIGNAL(haveResult(QString)),
SLOT(OnManualVideoUID(QString)), Qt::QueuedConnection);
}

void VideoDialog::OnManualVideoUID(QString video_uid)
{
VideoMetadata *metadata = GetMetadata(GetItemCurrent());
MythGenericTree *node = GetNodePtrFromButton(GetItemCurrent());

if (video_uid.length() && node && metadata)
{
MetadataLookup *lookup = new MetadataLookup();
lookup->SetStep(GETDATA);
lookup->SetType(VID);
lookup->SetInetref(video_uid);
lookup->SetData(qVariantFromValue(node));
m_query->addLookup(lookup);
}
}

void VideoDialog::EditMetadata() void VideoDialog::EditMetadata()
{ {
VideoMetadata *metadata = GetMetadata(GetItemCurrent()); VideoMetadata *metadata = GetMetadata(GetItemCurrent());
Expand Down
4 changes: 0 additions & 4 deletions mythplugins/mythvideo/mythvideo/videodlg.h
Expand Up @@ -96,7 +96,6 @@ class VideoDialog : public MythScreenType
void VideoSearch(MythGenericTree *node = NULL, void VideoSearch(MythGenericTree *node = NULL,
bool automode = false); bool automode = false);
void VideoAutoSearch(MythGenericTree *node = NULL); void VideoAutoSearch(MythGenericTree *node = NULL);
void ManualVideoUID();
void ResetMetadata(); void ResetMetadata();
void ToggleBrowseable(); void ToggleBrowseable();
void ToggleWatched(); void ToggleWatched();
Expand All @@ -106,7 +105,6 @@ class VideoDialog : public MythScreenType


void VideoMenu(); void VideoMenu();
void InfoMenu(); void InfoMenu();
void VideoOptionMenu();
void ManageMenu(); void ManageMenu();
void PlayMenu(); void PlayMenu();
void DisplayMenu(); void DisplayMenu();
Expand All @@ -132,8 +130,6 @@ class VideoDialog : public MythScreenType
// Called when the underlying data for an item changes // Called when the underlying data for an item changes
void OnVideoSearchListSelection(MetadataLookup *lookup); void OnVideoSearchListSelection(MetadataLookup *lookup);


void OnManualVideoUID(QString video_uid);

void doVideoScan(); void doVideoScan();


protected slots: protected slots:
Expand Down

0 comments on commit be8deb0

Please sign in to comment.