diff options
author | Mateusz Łukasik <mati75@linuxmint.pl> | 2015-04-26 20:41:29 +0200 |
---|---|---|
committer | Mateusz Łukasik <mati75@linuxmint.pl> | 2015-04-26 20:41:29 +0200 |
commit | 6027a8ff2d6ae4eba912427c30c58208009c1ebc (patch) | |
tree | 756eddd2fc9e7a9943b43e6ff3f9e92cbd4c3352 /src/smplayer.cpp | |
parent | 45ee5ac6dc2159352596ce8e8ec744e0c864d492 (diff) |
Imported Upstream version 14.9.0.6887~ds0
Diffstat (limited to 'src/smplayer.cpp')
-rw-r--r-- | src/smplayer.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/smplayer.cpp b/src/smplayer.cpp index 9db8b72..62c0a08 100644 --- a/src/smplayer.cpp +++ b/src/smplayer.cpp @@ -342,6 +342,14 @@ SMPlayer::ExitCode SMPlayer::processArgs(QStringList args) { if (argument == "-defaultgui") { gui_to_use = "DefaultGUI"; } + else + if (argument == "-ontop") { + pref->stay_on_top = Preferences::AlwaysOnTop; + } + else + if (argument == "-no-ontop") { + pref->stay_on_top = Preferences::NeverOnTop; + } #ifdef SKINS else if (argument == "-skingui") { @@ -473,10 +481,20 @@ void SMPlayer::createFontFile() { } QString input = Paths::appPath() + "/mplayer/fonts/fonts.conf"; - qDebug("SMPlayer::createFontFile: input: %s", input.toLatin1().constData()); + if (!QFile::exists(input)) { + qDebug("SMPlayer::createFontFile: %s doesn't exist", input.toUtf8().constData()); + input = Paths::appPath() + "/mplayer/mpv/fonts.conf"; + if (!QFile::exists(input)) { + qDebug("SMPlayer::createFontFile: %s doesn't exist", input.toUtf8().constData()); + qWarning("SMPlayer::createFontFile: failed to create fonts.conf"); + return; + } + } + qDebug("SMPlayer::createFontFile: input: %s", input.toUtf8().constData()); QFile infile(input); if (infile.open(QIODevice::ReadOnly | QIODevice::Text)) { QString text = infile.readAll(); + text = text.replace("<!-- <dir>WINDOWSFONTDIR</dir> -->", "<dir>WINDOWSFONTDIR</dir>"); text = text.replace("<dir>WINDOWSFONTDIR</dir>", "<dir>" + Paths::fontPath() + "</dir>"); //qDebug("SMPlayer::createFontFile: %s", text.toUtf8().constData()); |