From: Flavio Date: Fri, 18 Jul 2014 22:39:35 +0000 (+0200) Subject: Show Mark as Watched only when there are unwatched videos X-Git-Tag: 2.2~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9f1198531fbb68a86b9a26d106514988d0ddd3fb;p=minitube Show Mark as Watched only when there are unwatched videos --- 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