- update to 2.2 * Subscriptions context menu: Unsubscribe, Mark as Watched * Added --stop-after-this command line switch * Added Stop After This Video Unity & Gnome 3 action * Fixed painting errors when scrolling playlist on Linux * Fixed bug with dragging playlist items from the thumbnail * Fixed some videos not playing * Updated translations - added patch for disable update check OBS-URL: https://build.opensuse.org/request/show/243638 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/minitube?expand=0&rev=13
58 lines
1.8 KiB
Diff
58 lines
1.8 KiB
Diff
--- src/mainwindow.cpp.orig 2014-07-20 11:07:09.000000000 +0200
|
|
+++ src/mainwindow.cpp 2014-08-04 20:03:32.755652274 +0200
|
|
@@ -52,6 +52,7 @@
|
|
#else
|
|
#include "searchlineedit.h"
|
|
#endif
|
|
+#include <QProcess>
|
|
#include <iostream>
|
|
#ifdef APP_EXTRA
|
|
#include "extra.h"
|
|
@@ -1035,11 +1036,13 @@
|
|
pauseAct->setText(tr("&Pause"));
|
|
pauseAct->setStatusTip(tr("Pause playback") + " (" + pauseAct->shortcut().toString(QKeySequence::NativeText) + ")");
|
|
// stopAct->setEnabled(true);
|
|
+ inhibitScreensaver(new QString("suspend"));
|
|
break;
|
|
|
|
case Phonon::StoppedState:
|
|
pauseAct->setEnabled(false);
|
|
// stopAct->setEnabled(false);
|
|
+ inhibitScreensaver(new QString("resume"));
|
|
break;
|
|
|
|
case Phonon::PausedState:
|
|
@@ -1048,6 +1051,7 @@
|
|
pauseAct->setText(tr("&Play"));
|
|
pauseAct->setStatusTip(tr("Resume playback") + " (" + pauseAct->shortcut().toString(QKeySequence::NativeText) + ")");
|
|
// stopAct->setEnabled(true);
|
|
+ inhibitScreensaver(new QString("resume"));
|
|
break;
|
|
|
|
case Phonon::BufferingState:
|
|
@@ -1063,6 +1067,14 @@
|
|
}
|
|
}
|
|
|
|
+void MainWindow::inhibitScreensaver(QString *action) {
|
|
+ QStringList arguments;
|
|
+ QString s = QString::number(winId());
|
|
+ arguments << *action << s;
|
|
+ QProcess *screensaver = new QProcess();
|
|
+ screensaver->start("xdg-screensaver", arguments);
|
|
+}
|
|
+
|
|
void MainWindow::stop() {
|
|
mediaView->stop();
|
|
showHome();
|
|
--- src/mainwindow.h.orig 2014-07-20 11:07:09.000000000 +0200
|
|
+++ src/mainwindow.h 2014-08-04 20:05:37.008172348 +0200
|
|
@@ -103,6 +103,7 @@
|
|
void setDefinitionMode(QString definitionName);
|
|
void toggleDefinitionMode();
|
|
void clearRecentKeywords();
|
|
+ void inhibitScreensaver(QString *action);
|
|
|
|
// volume shortcuts
|
|
void volumeUp();
|