#include "downloadview.h"
#include "spacer.h"
#include "constants.h"
-#include "utils.h"
+#include "iconutils.h"
#include "global.h"
#include "videodefinition.h"
#include "fontutils.h"
#include "searchparams.h"
#include "videosource.h"
#include "ytsearch.h"
-#ifdef Q_WS_X11
+#ifdef Q_OS_LINUX
#include "gnomeglobalshortcutbackend.h"
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include "mac_startup.h"
#include "macfullscreen.h"
#include "macsupport.h"
aboutView(0),
downloadView(0),
regionsView(0),
+ #ifdef APP_PHONON
mediaObject(0),
audioOutput(0),
+ #endif
m_fullscreen(false),
m_compact(false) {
}
void MainWindow::lazyInit() {
+#ifdef APP_PHONON
initPhonon();
+#endif
mediaView->initialize();
+#ifdef APP_PHONON
mediaView->setMediaObject(mediaObject);
+#endif
qApp->processEvents();
// CLI
// Global shortcuts
GlobalShortcuts &shortcuts = GlobalShortcuts::instance();
-#ifdef Q_WS_X11
+#ifdef Q_OS_LINUX
if (GnomeGlobalShortcutBackend::IsGsdAvailable())
shortcuts.setBackend(new GnomeGlobalShortcutBackend(&shortcuts));
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
mac::MacSetup();
#endif
connect(&shortcuts, SIGNAL(PlayPause()), pauseAct, SLOT(trigger()));
QHash<QString, QAction*> *actions = The::globalActions();
- stopAct = new QAction(Utils::icon("media-playback-stop"), tr("&Stop"), this);
+ stopAct = new QAction(IconUtils::icon("media-playback-stop"), tr("&Stop"), this);
stopAct->setStatusTip(tr("Stop playback and go back to the search view"));
stopAct->setShortcuts(QList<QKeySequence>() << QKeySequence(Qt::Key_Escape) << QKeySequence(Qt::Key_MediaStop));
stopAct->setEnabled(false);
actions->insert("stop", stopAct);
- connect(stopAct, SIGNAL(triggered()), this, SLOT(stop()));
+ connect(stopAct, SIGNAL(triggered()), SLOT(stop()));
skipBackwardAct = new QAction(
- Utils::icon("media-skip-backward"),
+ IconUtils::icon("media-skip-backward"),
tr("P&revious"), this);
skipBackwardAct->setStatusTip(tr("Go back to the previous track"));
skipBackwardAct->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Left));
actions->insert("previous", skipBackwardAct);
connect(skipBackwardAct, SIGNAL(triggered()), mediaView, SLOT(skipBackward()));
- skipAct = new QAction(Utils::icon("media-skip-forward"), tr("S&kip"), this);
+ skipAct = new QAction(IconUtils::icon("media-skip-forward"), tr("S&kip"), this);
skipAct->setStatusTip(tr("Skip to the next video"));
skipAct->setShortcuts(QList<QKeySequence>() << QKeySequence(Qt::CTRL + Qt::Key_Right) << QKeySequence(Qt::Key_MediaNext));
skipAct->setEnabled(false);
actions->insert("skip", skipAct);
connect(skipAct, SIGNAL(triggered()), mediaView, SLOT(skip()));
- pauseAct = new QAction(Utils::icon("media-playback-pause"), tr("&Pause"), this);
- pauseAct->setStatusTip(tr("Pause playback"));
+ pauseAct = new QAction(IconUtils::icon("media-playback-start"), tr("&Play"), this);
+ pauseAct->setStatusTip(tr("Resume playback"));
pauseAct->setShortcuts(QList<QKeySequence>() << QKeySequence(Qt::Key_Space) << QKeySequence(Qt::Key_MediaPlay));
pauseAct->setEnabled(false);
actions->insert("pause", pauseAct);
connect(pauseAct, SIGNAL(triggered()), mediaView, SLOT(pause()));
- fullscreenAct = new QAction(Utils::icon("view-fullscreen"), tr("&Full Screen"), this);
+ fullscreenAct = new QAction(IconUtils::icon("view-fullscreen"), tr("&Full Screen"), this);
fullscreenAct->setStatusTip(tr("Go full screen"));
QList<QKeySequence> fsShortcuts;
#ifdef APP_MAC
addAction(volumeDownAct);
volumeMuteAct = new QAction(this);
- volumeMuteAct->setIcon(Utils::icon("audio-volume-high"));
+ volumeMuteAct->setIcon(IconUtils::icon("audio-volume-high"));
volumeMuteAct->setStatusTip(tr("Mute volume"));
volumeMuteAct->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_K));
actions->insert("volume-mute", volumeMuteAct);
addAction(volumeMuteAct);
QAction *definitionAct = new QAction(this);
-#ifdef Q_WS_X11
- definitionAct->setIcon(Utils::tintedIcon("video-display", QColor(0, 0, 0),
+#ifdef Q_OS_LINUX
+ definitionAct->setIcon(IconUtils::tintedIcon("video-display", QColor(0, 0, 0),
QList<QSize>() << QSize(16, 16)));
#else
- definitionAct->setIcon(Utils::icon("video-display"));
+ definitionAct->setIcon(IconUtils::icon("video-display"));
#endif
definitionAct->setShortcuts(QList<QKeySequence>() << QKeySequence(Qt::CTRL + Qt::Key_D));
/*
QAction *action;
- action = new QAction(Utils::icon("media-playback-start"), tr("&Manually Start Playing"), this);
+ action = new QAction(IconUtils::icon("media-playback-start"), tr("&Manually Start Playing"), this);
action->setStatusTip(tr("Manually start playing videos"));
- action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_B));
+ action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_T));
action->setCheckable(true);
connect(action, SIGNAL(toggled(bool)), SLOT(setManualPlay(bool)));
actions->insert("manualplay", action);
action->setStatusTip(tr("Show details about video downloads"));
action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_J));
action->setCheckable(true);
- action->setIcon(Utils::icon("document-save"));
+ action->setIcon(IconUtils::icon("document-save"));
action->setVisible(false);
connect(action, SIGNAL(toggled(bool)), SLOT(toggleDownloads(bool)));
actions->insert("downloads", action);
action = new QAction(tr("&Download"), this);
action->setStatusTip(tr("Download the current video"));
action->setShortcut(QKeySequence::Save);
- action->setIcon(Utils::icon("document-save"));
+ action->setIcon(IconUtils::icon("document-save"));
action->setEnabled(false);
action->setVisible(false);
action->setPriority(QAction::LowPriority);
connect(action, SIGNAL(triggered()), mediaView, SLOT(downloadVideo()));
actions->insert("download", action);
- /*
- action = new QAction(tr("&Snapshot"), this);
- action->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_S));
+#ifdef APP_SNAPSHOT
+ action = new QAction(tr("Take &Snapshot"), this);
+ action->setShortcut(QKeySequence(Qt::Key_F9));
+ action->setEnabled(false);
actions->insert("snapshot", action);
connect(action, SIGNAL(triggered()), mediaView, SLOT(snapshot()));
- */
+#endif
action = new QAction(tr("&Subscribe to Channel"), this);
action->setProperty("originalText", action->text());
actions->insert("restore", action);
connect(action, SIGNAL(triggered()), SLOT(restore()));
- action = new QAction(Utils::icon("go-top"), tr("&Float on Top"), this);
+ action = new QAction(IconUtils::icon("go-top"), tr("&Float on Top"), this);
action->setCheckable(true);
actions->insert("ontop", action);
connect(action, SIGNAL(toggled(bool)), SLOT(floatOnTop(bool)));
- action = new QAction(Utils::icon("media-playback-stop"), tr("&Stop After This Video"), this);
+ action = new QAction(IconUtils::icon("media-playback-stop"), tr("&Stop After This Video"), this);
action->setShortcut(QKeySequence(Qt::SHIFT + Qt::Key_Escape));
action->setCheckable(true);
action->setEnabled(false);
action = new QAction(tr("More..."), this);
actions->insert("more-region", action);
- action = new QAction(Utils::icon(QStringList() << "view-list-symbolic" << "view-list" << "format-justify-fill"), tr("&Related Videos"), this);
+ action = new QAction(IconUtils::icon("view-list"), tr("&Related Videos"), this);
action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R));
action->setStatusTip(tr("Watch videos related to the current one"));
action->setEnabled(false);
actions->insert("related-videos", action);
action = new QAction(tr("Open in &Browser..."), this);
+ action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_B));
action->setEnabled(false);
actions->insert("open-in-browser", action);
connect(action, SIGNAL(triggered()), mediaView, SLOT(openInBrowser()));
+#ifdef APP_MAC_STORE
+ action = new QAction(tr("&Love %1? Rate it!").arg(Constants::NAME), this);
+ actions->insert("app-store", action);
+ connect(action, SIGNAL(triggered()), SLOT(rateOnAppStore()));
+#endif
+
#ifdef APP_ACTIVATION
Extra::createActivationAction(tr("Buy %1...").arg(Constants::NAME));
#endif
// add actions to the MainWindow so that they work
// when the menu is hidden
addAction(action);
- Utils::setupAction(action);
+ IconUtils::setupAction(action);
}
}
videoMenu->addAction(The::globalActions()->value("related-videos"));
videoMenu->addAction(findVideoPartsAct);
videoMenu->addSeparator();
- videoMenu->addAction(webPageAct);
- videoMenu->addSeparator();
videoMenu->addAction(The::globalActions()->value("subscribe-channel"));
+#ifdef APP_SNAPSHOT
videoMenu->addSeparator();
- videoMenu->addAction(The::globalActions()->value("download"));
+ videoMenu->addAction(The::globalActions()->value("snapshot"));
+#endif
+ videoMenu->addSeparator();
+ videoMenu->addAction(webPageAct);
videoMenu->addAction(copyLinkAct);
videoMenu->addAction(The::globalActions()->value("open-in-browser"));
- // videoMenu->addAction(The::globalActions()->value("snapshot"));
+ videoMenu->addAction(The::globalActions()->value("download"));
QMenu* viewMenu = menuBar()->addMenu(tr("&View"));
menus->insert("view", viewMenu);
#endif
helpMenu->addAction(The::globalActions()->value("report-issue"));
helpMenu->addAction(aboutAct);
+
+#ifdef APP_MAC_STORE
+ helpMenu->addSeparator();
+ helpMenu->addAction(The::globalActions()->value("app-store"));
+#endif
}
void MainWindow::createToolBars() {
mainToolBar->addAction(The::globalActions()->value("download"));
bool addFullScreenAct = true;
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
addFullScreenAct = !mac::CanGoFullScreen(winId());
#endif
if (addFullScreenAct) mainToolBar->addAction(fullscreenAct);
currentTime->setFont(smallerFont);
mainToolBar->addWidget(currentTime);
-#ifdef APP_PHONON_SEEK
mainToolBar->addWidget(new Spacer());
+
+#ifdef APP_PHONON_SEEK
seekSlider = new Phonon::SeekSlider(this);
- seekSlider->setVisible(false);
+ seekSlider->setTracking(true);
seekSlider->setIconVisible(false);
seekSlider->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
mainToolBar->addWidget(seekSlider);
-#endif
-
- mainToolBar->addWidget(new Spacer());
+#else
slider = new SeekSlider(this);
slider->setEnabled(false);
slider->setTracking(false);
slider->setOrientation(Qt::Horizontal);
slider->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
mainToolBar->addWidget(slider);
+#endif
+ /*
mainToolBar->addWidget(new Spacer());
-
totalTime = new QLabel(mainToolBar);
totalTime->setFont(smallerFont);
mainToolBar->addWidget(totalTime);
+ */
mainToolBar->addWidget(new Spacer());
-
mainToolBar->addAction(volumeMuteAct);
+#ifdef APP_PHONON
volumeSlider = new Phonon::VolumeSlider(this);
volumeSlider->setMuteVisible(false);
// qDebug() << volumeSlider->children();
// this makes the volume slider smaller
volumeSlider->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
mainToolBar->addWidget(volumeSlider);
+#endif
mainToolBar->addWidget(new Spacer());
#endif
toolbarSearch->setMinimumWidth(toolbarSearch->fontInfo().pixelSize()*15);
toolbarSearch->setSuggester(new YTSuggester(this));
- connect(toolbarSearch, SIGNAL(search(const QString&)), this, SLOT(startToolbarSearch(const QString&)));
- connect(toolbarSearch, SIGNAL(suggestionAccepted(const QString&)), SLOT(startToolbarSearch(const QString&)));
+ connect(toolbarSearch, SIGNAL(search(const QString&)), SLOT(search(const QString&)));
+ connect(toolbarSearch, SIGNAL(suggestionAccepted(Suggestion*)), SLOT(suggestionAccepted(Suggestion*)));
toolbarSearch->setStatusTip(searchFocusAct->statusTip());
#ifdef APP_MAC
mainToolBar->addWidget(searchWrapper);
#else
mainToolBar->addWidget(toolbarSearch);
- Spacer* spacer = new Spacer();
- // spacer->setWidth(4);
- mainToolBar->addWidget(spacer);
+ mainToolBar->addWidget(new Spacer());
#endif
addToolBar(mainToolBar);
settings.setValue("geometry", saveGeometry());
mediaView->saveSplitterState();
- settings.setValue("volume", audioOutput->volume());
- settings.setValue("volumeMute", audioOutput->isMuted());
+#ifdef APP_PHONON
+ if (audioOutput->volume() > 0.1)
+ settings.setValue("volume", audioOutput->volume());
+ // settings.setValue("volumeMute", audioOutput->isMuted());
+#endif
+
settings.setValue("manualplay", The::globalActions()->value("manualplay")->isChecked());
}
setUpdatesEnabled(true);
#ifdef APP_EXTRA
- if (transition && (oldWidget != mediaView ||
- !mediaView->getVideoArea()->isVideoShown()))
+ // if (transition && (oldWidget != mediaView || !mediaView->getVideoArea()->isVideoShown()))
+ if (transition)
Extra::fadeInWidget(oldWidget, widget);
#endif
void MainWindow::showHome(bool transition) {
showWidget(homeView, transition);
currentTime->clear();
- totalTime->clear();
+ // totalTime->clear();
}
void MainWindow::showMedia(SearchParams *searchParams) {
mediaView->setVideoSource(videoSource);
}
+#ifdef APP_PHONON
void MainWindow::stateChanged(Phonon::State newState, Phonon::State /* oldState */) {
// qDebug() << "Phonon state: " << newState;
case Phonon::PlayingState:
pauseAct->setEnabled(true);
- pauseAct->setIcon(Utils::icon("media-playback-pause"));
+ pauseAct->setIcon(IconUtils::icon("media-playback-pause"));
pauseAct->setText(tr("&Pause"));
pauseAct->setStatusTip(tr("Pause playback") + " (" + pauseAct->shortcut().toString(QKeySequence::NativeText) + ")");
// stopAct->setEnabled(true);
case Phonon::StoppedState:
pauseAct->setEnabled(false);
+ pauseAct->setIcon(IconUtils::icon("media-playback-start"));
+ pauseAct->setText(tr("&Play"));
+ pauseAct->setStatusTip(tr("Resume playback") + " (" + pauseAct->shortcut().toString(QKeySequence::NativeText) + ")");
// stopAct->setEnabled(false);
break;
case Phonon::PausedState:
pauseAct->setEnabled(true);
- pauseAct->setIcon(Utils::icon("media-playback-start"));
+ pauseAct->setIcon(IconUtils::icon("media-playback-start"));
pauseAct->setText(tr("&Play"));
pauseAct->setStatusTip(tr("Resume playback") + " (" + pauseAct->shortcut().toString(QKeySequence::NativeText) + ")");
// stopAct->setEnabled(true);
break;
case Phonon::BufferingState:
+ pauseAct->setEnabled(false);
+ pauseAct->setIcon(IconUtils::icon("content-loading"));
+ pauseAct->setText(tr("&Loading..."));
+ pauseAct->setStatusTip(QString());
+ break;
+
case Phonon::LoadingState:
pauseAct->setEnabled(false);
currentTime->clear();
- totalTime->clear();
+ // totalTime->clear();
// stopAct->setEnabled(true);
break;
;
}
}
+#endif
void MainWindow::stop() {
- mediaView->stop();
showHome();
+ mediaView->stop();
}
void MainWindow::resizeEvent(QResizeEvent*) {
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (mac::CanGoFullScreen(winId())) {
bool isFullscreen = mac::IsFullScreen(winId());
if (isFullscreen != m_fullscreen) {
if (compactViewAct->isChecked())
compactViewAct->toggle();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
WId handle = winId();
if (mac::CanGoFullScreen(handle)) {
mainToolBar->setVisible(true);
// geometry won't be saved
writeSettings();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
MacSupport::enterFullScreen(this, views);
#else
mainToolBar->hide();
} else {
// Exit full screen
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
MacSupport::exitFullScreen(this, views);
#else
mainToolBar->show();
fullscreenAct->setShortcuts(QList<QKeySequence>(fsShortcuts)
<< QKeySequence(Qt::Key_Escape));
fullscreenAct->setText(tr("Leave &Full Screen"));
- fullscreenAct->setIcon(Utils::icon("view-restore"));
+ fullscreenAct->setIcon(IconUtils::icon("view-restore"));
} else {
fullscreenAct->setShortcuts(fsShortcuts);
fullscreenAct->setText(fsText);
- fullscreenAct->setIcon(Utils::icon("view-fullscreen"));
+ fullscreenAct->setIcon(IconUtils::icon("view-fullscreen"));
}
// No compact view action when in full screen
stopAct->setShortcuts(QList<QKeySequence>() << QKeySequence(Qt::Key_Escape) << QKeySequence(Qt::Key_MediaStop));
}
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
MacSupport::fullScreenActions(The::globalActions()->values(), m_fullscreen);
#endif
}
bool MainWindow::isReallyFullScreen() {
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
WId handle = winId();
if (mac::CanGoFullScreen(handle)) return mac::IsFullScreen(handle);
else return isFullScreen();
if (enable) {
setMinimumSize(320, 180);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
mac::RemoveFullScreenWindow(winId());
#endif
writeSettings();
} else {
// unset minimum size
setMinimumSize(0, 0);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
mac::SetupFullScreenWindow(winId());
#endif
settings.setValue(key, saveGeometry());
// auto float on top
floatOnTop(enable);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
mac::compactMode(winId(), enable);
#endif
}
toolbarSearch->setFocus();
}
+#ifdef APP_PHONON
void MainWindow::initPhonon() {
// Phonon initialization
if (mediaObject) delete mediaObject;
audioOutput->setVolume(settings.value("volume", 1).toDouble());
// audioOutput->setMuted(settings.value("volumeMute").toBool());
}
+#endif
void MainWindow::tick(qint64 time) {
if (time <= 0) {
currentTime->setText(formatTime(time));
// remaining time
+#ifdef APP_PHONON
const qint64 remainingTime = mediaObject->remainingTime();
currentTime->setStatusTip(tr("Remaining time: %1").arg(formatTime(remainingTime)));
- slider->blockSignals(true);
+#ifndef APP_PHONON_SEEK
const qint64 totalTime = mediaObject->totalTime();
+ slider->blockSignals(true);
// qWarning() << totalTime << time << time * 100 / totalTime;
if (totalTime > 0 && time > 0 && !slider->isSliderDown() && mediaObject->state() == Phonon::PlayingState)
slider->setValue(time * slider->maximum() / totalTime);
slider->blockSignals(false);
+#endif
+
+#endif
}
void MainWindow::totalTimeChanged(qint64 time) {
if (time <= 0) {
- totalTime->clear();
+ // totalTime->clear();
return;
}
- totalTime->setText(formatTime(time));
+ // totalTime->setText(formatTime(time));
/*
slider->blockSignals(true);
}
void MainWindow::volumeUp() {
+#ifdef APP_PHONON
qreal newVolume = volumeSlider->audioOutput()->volume() + .1;
if (newVolume > volumeSlider->maximumVolume())
newVolume = volumeSlider->maximumVolume();
volumeSlider->audioOutput()->setVolume(newVolume);
+#endif
}
void MainWindow::volumeDown() {
+#ifdef APP_PHONON
qreal newVolume = volumeSlider->audioOutput()->volume() - .1;
- if (newVolume < 0)
- newVolume = 0;
+ if (newVolume < 0.)
+ newVolume = 0.;
volumeSlider->audioOutput()->setVolume(newVolume);
+#endif
}
void MainWindow::volumeMute() {
+#ifdef APP_PHONON
volumeSlider->audioOutput()->setMuted(!volumeSlider->audioOutput()->isMuted());
+#endif
}
void MainWindow::volumeChanged(qreal newVolume) {
+#ifdef APP_PHONON
// automatically unmute when volume changes
if (volumeSlider->audioOutput()->isMuted())
volumeSlider->audioOutput()->setMuted(false);
+
+ bool isZero = volumeSlider->property("zero").toBool();
+ bool styleChanged = false;
+ if (newVolume == 0. && !isZero) {
+ volumeSlider->setProperty("zero", true);
+ styleChanged = true;
+ } else if (newVolume > 0. && isZero) {
+ volumeSlider->setProperty("zero", false);
+ styleChanged = true;
+ }
+ if (styleChanged) {
+ QSlider* volumeQSlider = volumeSlider->findChild<QSlider*>();
+ style()->unpolish(volumeQSlider);
+ style()->polish(volumeQSlider);
+ }
+#endif
statusBar()->showMessage(tr("Volume at %1%").arg((int)(newVolume*100)));
}
void MainWindow::volumeMutedChanged(bool muted) {
if (muted) {
- volumeMuteAct->setIcon(Utils::icon("audio-volume-muted"));
+ volumeMuteAct->setIcon(IconUtils::icon("audio-volume-muted"));
statusBar()->showMessage(tr("Volume is muted"));
} else {
- volumeMuteAct->setIcon(Utils::icon("audio-volume-high"));
+ volumeMuteAct->setIcon(IconUtils::icon("audio-volume-high"));
statusBar()->showMessage(tr("Volume is unmuted"));
}
}
else goBack();
}
-void MainWindow::startToolbarSearch(QString query) {
- query = query.trimmed();
-
- // check for empty query
- if (query.length() == 0) {
- return;
- }
+void MainWindow::suggestionAccepted(Suggestion *suggestion) {
+ search(suggestion->value);
+}
+void MainWindow::search(const QString &query) {
+ QString q = query.trimmed();
+ if (q.length() == 0) return;
SearchParams *searchParams = new SearchParams();
- searchParams->setKeywords(query);
-
- // go!
+ searchParams->setKeywords(q);
showMedia(searchParams);
}
void MainWindow::dragEnterEvent(QDragEnterEvent *event) {
if (event->mimeData()->hasFormat("text/uri-list")) {
QList<QUrl> urls = event->mimeData()->urls();
- if (urls.isEmpty())
- return;
+ if (urls.isEmpty()) return;
QUrl url = urls.first();
QString videoId = YTSearch::videoIdFromUrl(url.toString());
- if (!videoId.isNull())
+ if (!videoId.isEmpty())
event->acceptProposedAction();
}
}
return;
QUrl url = urls.first();
QString videoId = YTSearch::videoIdFromUrl(url.toString());
- if (!videoId.isNull()) {
+ if (!videoId.isEmpty()) {
setWindowTitle(url.toString());
SearchParams *searchParams = new SearchParams();
searchParams->setKeywords(videoId);
#endif
}
+#ifdef APP_MAC_STORE
+void MainWindow::rateOnAppStore() {
+ QDesktopServices::openUrl(QUrl("macappstore://userpub.itunes.apple.com"
+ "/WebObjects/MZUserPublishing.woa/wa/addUserReview"
+ "?id=422006190&type=Purple+Software"));
+}
+#endif
+
void MainWindow::printHelp() {
QString msg = QString("%1 %2\n\n").arg(Constants::NAME, Constants::VERSION);
msg += "Usage: minitube [options]\n";