- removed unneeded patch for missing locale files in last minitube version (2.1.5) - update to 2.1.6 * Fix some videos not playing * Remove obsolete categories in the Browse tab OBS-URL: https://build.opensuse.org/request/show/221305 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/minitube?expand=0&rev=12
58 lines
1.8 KiB
Diff
58 lines
1.8 KiB
Diff
--- src/mainwindow.cpp.orig 2014-02-05 23:39:02.000000000 +0100
|
|
+++ src/mainwindow.cpp 2014-02-07 17:59:49.881179373 +0100
|
|
@@ -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-02-05 23:39:02.000000000 +0100
|
|
+++ src/mainwindow.h 2014-02-07 17:55:56.229563829 +0100
|
|
@@ -103,6 +103,7 @@
|
|
void setDefinitionMode(QString definitionName);
|
|
void toggleDefinitionMode();
|
|
void clearRecentKeywords();
|
|
+ void inhibitScreensaver(QString *action);
|
|
|
|
// volume shortcuts
|
|
void volumeUp();
|