From 9f1198531fbb68a86b9a26d106514988d0ddd3fb Mon Sep 17 00:00:00 2001 From: Flavio Date: Sat, 19 Jul 2014 00:39:35 +0200 Subject: [PATCH] Show Mark as Watched only when there are unwatched videos --- src/channelview.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/channelview.cpp b/src/channelview.cpp index 318f666..f5cb3ac 100644 --- a/src/channelview.cpp +++ b/src/channelview.cpp @@ -239,11 +239,12 @@ void ChannelView::showContextMenu(const QPoint &point) { QMenu menu; - QAction *markAsWatchedAction = menu.addAction(tr("Mark as Watched"), user, SLOT(updateWatched())); - connect(markAsWatchedAction, SIGNAL(triggered()), - ChannelAggregator::instance(), SLOT(updateUnwatchedCount())); - - menu.addSeparator(); + if (user->getNotifyCount() > 0) { + QAction *markAsWatchedAction = menu.addAction(tr("Mark as Watched"), user, SLOT(updateWatched())); + connect(markAsWatchedAction, SIGNAL(triggered()), + ChannelAggregator::instance(), SLOT(updateUnwatchedCount())); + menu.addSeparator(); + } /* // TODO -- 2.39.5