diff options
author | Mateusz Łukasik <mati75@linuxmint.pl> | 2018-05-17 21:02:30 +0200 |
---|---|---|
committer | Mateusz Łukasik <mati75@linuxmint.pl> | 2018-05-17 21:02:30 +0200 |
commit | f32f79beb0288871bd88450df90e0f6e85e4a1cc (patch) | |
tree | 1a7af633202234147a53fb0f874026279ee0cba0 /src/basegui.cpp | |
parent | 6c3f8733e9723de625a14670a948419235504e64 (diff) |
New upstream version 18.4.0~ds0
Diffstat (limited to 'src/basegui.cpp')
-rw-r--r-- | src/basegui.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/basegui.cpp b/src/basegui.cpp index b4c3319..e99f47f 100644 --- a/src/basegui.cpp +++ b/src/basegui.cpp @@ -267,6 +267,8 @@ BaseGui::BaseGui( QWidget* parent, Qt::WindowFlags flags ) #ifdef MPRIS2 if (pref->use_mpris2) new Mpris2(this, this); #endif + + MyFileDialog::setNative(pref->use_native_open_dialog); } void BaseGui::setupNetworkProxy() { @@ -839,7 +841,7 @@ void BaseGui::createActions() { useForcedSubsOnlyAct->setCheckable(true); connect( useForcedSubsOnlyAct, SIGNAL(toggled(bool)), core, SLOT(toggleForcedSubsOnly(bool)) ); - subVisibilityAct = new MyAction(Qt::Key_V, this, "subtitle_visibility"); + subVisibilityAct = new MyAction(this, "sub_visibility"); subVisibilityAct->setCheckable(true); connect( subVisibilityAct, SIGNAL(toggled(bool)), core, SLOT(changeSubVisibility(bool)) ); @@ -3199,6 +3201,8 @@ void BaseGui::applyNewPreferences() { if (_interface->fontChanged()) need_apply_styles = true; + MyFileDialog::setNative(pref->use_native_open_dialog); + #ifndef MOUSE_GESTURES mplayerwindow->activateMouseDragTracking(pref->drag_function == Preferences::MoveWindow); #endif @@ -3287,7 +3291,7 @@ void BaseGui::applyNewPreferences() { if (_interface->guiChanged()) { #ifdef GUI_CHANGE_ON_RUNTIME - core->stop(); + if (core->state() != Core::Stopped) core->stop(); emit guiChanged(pref->gui); #else QMessageBox::information(this, tr("Information"), @@ -3300,7 +3304,7 @@ void BaseGui::applyNewPreferences() { // Hack, simulate a change of GUI to restart the interface // FIXME: try to create a new Core::proc in the future #ifdef GUI_CHANGE_ON_RUNTIME - core->stop(); + if (core->state() != Core::Stopped) core->stop(); emit guiChanged(pref->gui); #endif } @@ -4112,7 +4116,7 @@ void BaseGui::open(QString file) { } else #ifdef YT_PLAYLIST_SUPPORT - if (file.contains("http") && file.contains("youtube") && file.contains("list=")) { + if (playlist->isYTPlaylist(file)) { playlist->openUrl(file); } else @@ -4217,7 +4221,7 @@ void BaseGui::openURL() { void BaseGui::openURL(QString url) { #ifdef YT_PLAYLIST_SUPPORT - if (url.contains("http") && url.contains("youtube") && url.contains("list=")) { + if (playlist->isYTPlaylist(url)) { playlist->openUrl(url); return; } @@ -4425,7 +4429,7 @@ void BaseGui::openBluRayFromFolder() { qDebug("BaseGui::openBluRayFromFolder"); if (playlist->maybeSave()) { - QString dir = QFileDialog::getExistingDirectory(this, tr("Select the Blu-ray folder"), + QString dir = MyFileDialog::getExistingDirectory(this, tr("Select the Blu-ray folder"), pref->last_dvd_directory, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); if (!dir.isEmpty()) { openBluRayFromFolder(dir); @@ -4642,8 +4646,6 @@ void BaseGui::shareSMPlayer() { void BaseGui::showGotoDialog() { TimeDialog d(this); - d.setLabel(tr("&Jump to:")); - d.setWindowTitle(tr("SMPlayer - Seek")); d.setMaximumTime( (int) core->mdat.duration); d.setTime( (int) core->mset.current_sec); if (d.exec() == QDialog::Accepted) { @@ -6081,6 +6083,7 @@ void BaseGui::showExitCodeFromMplayer(int exit_code) { if (!pref->report_mplayer_crashes) { qDebug("BaseGui::showExitCodeFromMplayer: not displaying error dialog"); + statusBar()->showMessage(tr("%1 has finished unexpectedly.").arg(PLAYER_NAME) +" "+ tr("More info in the log.")); return; } @@ -6133,6 +6136,7 @@ void BaseGui::showErrorFromMplayer(QProcess::ProcessError e) { if (!pref->report_mplayer_crashes) { qDebug("BaseGui::showErrorFromMplayer: not displaying error dialog"); + statusBar()->showMessage(tr("%1 failed to start.").arg(PLAYER_NAME) +" "+ tr("More info in the log.")); return; } |