actions->insert("facebook", action);
connect(action, SIGNAL(triggered()), mediaView, SLOT(shareViaFacebook()));
+ action = new QAction("&Buffer", this);
+ action->setStatusTip(shareTip.arg("Buffer"));
+ actions->insert("buffer", action);
+ connect(action, SIGNAL(triggered()), mediaView, SLOT(shareViaBuffer()));
+
action = new QAction(tr("&Email"), this);
action->setStatusTip(shareTip.arg(tr("Email")));
actions->insert("email", action);
shareMenu->addSeparator();
shareMenu->addAction(The::globalActions()->value("twitter"));
shareMenu->addAction(The::globalActions()->value("facebook"));
+ shareMenu->addAction(The::globalActions()->value("buffer"));
+ shareMenu->addSeparator();
shareMenu->addAction(The::globalActions()->value("email"));
#ifdef APP_MAC
}
void MainWindow::startToolbarSearch(QString query) {
-
query = query.trimmed();
// check for empty query
QDesktopServices::openUrl(url);
}
+void MediaView::shareViaBuffer() {
+ Video* video = listModel->activeVideo();
+ if (!video) return;
+ QUrl url("http://bufferapp.com/add");
+ url.addQueryItem("via", "minitubeapp");
+ url.addQueryItem("text", video->title());
+ url.addQueryItem("url", video->webpage().toString());
+ if (!video->thumbnailUrls().isEmpty())
+ url.addQueryItem("picture", video->thumbnailUrls().first().toString());
+ QDesktopServices::openUrl(url);
+}
+
void MediaView::shareViaEmail() {
Video* video = listModel->activeVideo();
if (!video) return;
}
void PlaylistView::mouseMoveEvent(QMouseEvent *event) {
+ QListView::mouseMoveEvent(event);
QWidget::mouseMoveEvent(event);
if (isHoveringAuthor(event)) {