]> git.sur5r.net Git - minitube/commitdiff
Show Mark as Watched only when there are unwatched videos
authorFlavio <flavio@odisseo.local>
Fri, 18 Jul 2014 22:39:35 +0000 (00:39 +0200)
committerFlavio <flavio@odisseo.local>
Fri, 18 Jul 2014 22:39:35 +0000 (00:39 +0200)
src/channelview.cpp

index 318f66694e8549531339e106a76fc1c2bf70dc97..f5cb3ac57913a2c5b1b98c291ea3b89ac692f306 100644 (file)
@@ -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