videoSceneMenu->volumeSlider()->setAudioOutput(videoPlayer->audioOutput());
#endif
- setWindowTitle(qApp->applicationName() + " v" + qApp->applicationVersion());
+ updateWindowTitle();
#ifndef BROWSERPLUGIN_BUILD
loadSettings();
#endif
m_closeOnStop = closeOnStop;
+
+ updateWindowTitle(fileInfo);
}
void VideoWindow::openUrl(const QString &urlstr)
#endif
}
+void VideoWindow::updateWindowTitle(const QFileInfo &file)
+{
+ static const QString appTitle = qApp->applicationName() + QLatin1String(" v") + qApp->applicationVersion();
+ if (!file.exists())
+ {
+ setWindowTitle(appTitle);
+ return;
+ }
+ setWindowTitle(file.fileName() + QLatin1Char(' ') + QChar(0x2014) + QLatin1Char(' ') + appTitle);
+ setWindowFilePath(file.absoluteFilePath());
+}
+
void VideoWindow::updateCursor()
{
#ifdef Q_WS_X11
#include <QKeySequence>
#include <QMap>
#include <QUrl>
+#include <QFileInfo>
#ifdef BROWSERPLUGIN_BUILD
# include <QMetaClassInfo>
void saveSettings();
void loadSettings();
+ void updateWindowTitle(const QFileInfo &file = QFileInfo());
void updateCursor();
Menu *menu;