+void ChannelView::showContextMenu(const QPoint &point) {
+ const QModelIndex index = indexAt(point);
+ if (!index.isValid()) return;
+
+ YTUser *user = channelsModel->userForIndex(index);
+ if (!user) return;
+
+ unsetCursor();
+
+ QMenu menu;
+
+ QAction *markAsWatchedAction = menu.addAction(tr("Mark as Watched"), user, SLOT(updateWatched()));
+ connect(markAsWatchedAction, SIGNAL(triggered()),
+ ChannelAggregator::instance(), SLOT(updateUnwatchedCount()));
+
+ menu.addSeparator();
+
+ /*
+ // TODO
+ QAction *notificationsAction = menu.addAction(tr("Receive Notifications"), user, SLOT(unsubscribe()));
+ notificationsAction->setCheckable(true);
+ notificationsAction->setChecked(true);
+ */
+
+ QAction *unsubscribeAction = menu.addAction(tr("Unsubscribe"), user, SLOT(unsubscribe()));
+ connect(unsubscribeAction, SIGNAL(triggered()),
+ ChannelAggregator::instance(), SLOT(updateUnwatchedCount()));
+
+ menu.exec(mapToGlobal(point));
+}
+