diff --git a/src/docks/filesdock.cpp b/src/docks/filesdock.cpp index ab6fee2be9..d35c8305e5 100644 --- a/src/docks/filesdock.cpp +++ b/src/docks/filesdock.cpp @@ -509,7 +509,6 @@ FilesDock::FilesDock(QWidget *parent) toggleViewAction()->setIcon(windowIcon()); const auto ls = QStandardPaths::standardLocations(QStandardPaths::HomeLocation); - ui->locationsCombo->addItem(QString()); ui->locationsCombo->addItem(tr("Home", "The user's home folder in the file system"), ls.first()); ui->locationsCombo->addItem(tr("Current Project"), ""); ui->locationsCombo->addItem(tr("Documents"), @@ -543,6 +542,8 @@ FilesDock::FilesDock(QWidget *parent) auto path = Settings.filesLocationPath(name); ui->locationsCombo->addItem(name, path); } + ui->locationsCombo->setEditText(QDir::toNativeSeparators(Settings.filesCurrentDir())); + connect(ui->locationsCombo->lineEdit(), &QLineEdit::editingFinished, this, &FilesDock::onLocationsEditingFinished); m_filesModel = new FilesModel(this); m_filesModel->setOption(QFileSystemModel::DontUseCustomDirectoryIcons); @@ -624,6 +625,11 @@ FilesDock::FilesDock(QWidget *parent) toolbar->addAction(Actions["filesViewIconsAction"]); toolbar->addSeparator(); toolbar->addAction(Actions["filesGoUp"]); + toolbar->addSeparator(); + m_label = new QLabel(toolbar); + toolbar->addWidget(m_label); + connect(m_filesModel, &QAbstractItemModel::rowsInserted, this, &FilesDock::updateStatus); + connect(m_filesModel, &QFileSystemModel::directoryLoaded, this, &FilesDock::updateStatus); ui->verticalLayout->addWidget(toolbar); ui->verticalLayout->addSpacing(2); @@ -1114,8 +1120,10 @@ void FilesDock::changeFilesDirectory(const QModelIndex &index) { m_view->setRootIndex(index); m_iconsView->updateSizes(); - ui->locationsCombo->setCurrentIndex(0); + auto path = QDir::toNativeSeparators(m_filesModel->rootPath()); + ui->locationsCombo->setCurrentText(path); m_view->scrollToTop(); + clearStatus(); } void FilesDock::viewCustomContextMenuRequested(const QPoint &pos) @@ -1282,15 +1290,41 @@ void FilesDock::onOpenOtherRemove() } } -void FilesDock::on_locationsCombo_activated(int index) +void FilesDock::clearStatus() +{ + m_label->setText("..."); +} + +void FilesDock::updateStatus() { - if (0 == index) + auto n = m_filesModel->rowCount(m_filesModel->index(m_filesModel->rootPath())); + m_label->setText(tr("%n item(s)", nullptr, n)); + QCoreApplication::processEvents(); +} + +void FilesDock::onLocationsEditingFinished() +{ + auto path = ui->locationsCombo->currentText(); + LOG_DEBUG() << path; + if (!QFile::exists(path)) return; +#if defined(Q_OS_WIN) + if (QLatin1String("/") == path) + path = QStringLiteral("C:/"); +#endif + changeDirectory(path, false); +} + +void FilesDock::on_locationsCombo_activated(int index) +{ auto path = ui->locationsCombo->currentData().toString(); if (path.isEmpty() && !MAIN.fileName().isEmpty()) path = QFileInfo(MAIN.fileName()).absolutePath(); if (path.isEmpty()) return; + ui->locationsCombo->clearFocus(); + if (!QFile::exists(path)) + return; #if defined(Q_OS_WIN) if (QLatin1String("/") == path) path = QStringLiteral("C:/"); diff --git a/src/docks/filesdock.h b/src/docks/filesdock.h index be75516c59..8ba4ccb154 100644 --- a/src/docks/filesdock.h +++ b/src/docks/filesdock.h @@ -37,6 +37,7 @@ class FilesModel; class FilesProxyModel; class QSortFilterProxyModel; class LineEditClear; +class QLabel; class FilesDock : public QDockWidget { @@ -66,6 +67,9 @@ private slots: void onMediaTypeClicked(); void onOpenOtherAdd(); void onOpenOtherRemove(); + void clearStatus(); + void updateStatus(); + void onLocationsEditingFinished(); void on_locationsCombo_activated(int index); @@ -100,6 +104,7 @@ private slots: QHash m_cache; QMutex m_cacheMutex; LineEditClear *m_searchField; + QLabel *m_label; }; #endif // FILESDOCK_H diff --git a/src/docks/filesdock.ui b/src/docks/filesdock.ui index 8e9496593a..27a0a269d0 100644 --- a/src/docks/filesdock.ui +++ b/src/docks/filesdock.ui @@ -70,6 +70,12 @@ 0 + + true + + + QComboBox::SizeAdjustPolicy::AdjustToMinimumContentsLengthWithIcon + diff --git a/translations/shotcut_en.ts b/translations/shotcut_en.ts index 7bbef79ea3..8559068ce6 100644 --- a/translations/shotcut_en.ts +++ b/translations/shotcut_en.ts @@ -1081,8 +1081,8 @@ If yes, choose a format below and then click OK to choose a file name. After cho second(s) - - + second + seconds @@ -1361,6 +1361,29 @@ leave blank to use the clipboard: + + CurveComboBox + + + Natural + + + + + S-Curve + + + + + Fast-Slow + + + + + Slow-Fast + + + CustomProfileDialog @@ -2323,7 +2346,7 @@ Shotcut will attempt to repair your project. FilesDock - + Files @@ -2333,277 +2356,290 @@ Shotcut will attempt to repair your project. - + Add the current folder to the saved locations - + Remove the selected location - + Home The user's home folder in the file system - + Current Project - + Documents - + Movies The system-provided videos folder called Movies on macOS - + Music - + Pictures The system-provided photos folder - + Volumes The macOS file system location where external drives and network shares are mounted - + Videos - + Select - + Files Controls - + Files Menu - - + + Files Filters - + Only show files whose name contains some text - + search - + Tiles - + View as tiles - + Icons - + View as icons - + Details - + View as details - + Open In Shotcut - + Open the clip in the Source player - + System Default - + Other... - + Remove... - + Show In File Manager - + Update Thumbnails - + Select All - + Select None - + Open Previous - + Open Next - + Video - + Show or hide video files - + Audio - + Show or hide audio files - + Image - + Show or hide image files - + Other - + Show or hide other kinds of files - + Folders - + Hide or show the list of folders - + Go Up - + Show the parent folder - + Refresh Folders + Search + + + + Open With - + Executable Files (*.exe);;All Files (*) - + Choose Executable - + Remove From Open Other + + + %n item(s) + + %n item + %n items + + - + Add Location - + Name - + Delete Location - + Are you sure you want to remove %1? @@ -4301,7 +4337,7 @@ audio (0%) or clip B's audio (100%). - + Enter Full Screen @@ -4313,13 +4349,13 @@ audio (0%) or clip B's audio (100%). - + Properties - + Recent @@ -4331,7 +4367,7 @@ audio (0%) or clip B's audio (100%). - + History @@ -4452,7 +4488,7 @@ audio (0%) or clip B's audio (100%). - + Timeline @@ -4547,7 +4583,7 @@ audio (0%) or clip B's audio (100%). - + Export Chapters @@ -4957,157 +4993,157 @@ Please install it using your package manager. It may be named libsdl2-2.0-0, SDL - + Screen %1 (%2 x %3 @ %4 Hz) - + Off - + Internal - + External - + DeckLink Keyer - + Color - + Text - + Animation - + Noise - + Ising - + Lissajous - + Plasma - + Color Bars - + Audio Tone - + Count - + Blip Flash - + Video4Linux - + PulseAudio - + JACK Audio - + ALSA Audio - + Audio/Video Device - + SDI/HDMI - - - - - - - - - + + + + + + + + + Failed to open - + The file you opened uses GPU effects, but GPU effects are not enabled. - + The file you opened uses CPU effects that are incompatible with GPU effects, but GPU effects are enabled. Do you want to disable GPU effects and restart? - + Repaired - + Save Repaired XML - + Repairing the project failed. - + Shotcut noticed some problems in your project. Do you want Shotcut to try to repair it? @@ -5116,29 +5152,29 @@ with "- Repaired" in the file name and open it. - + Auto-saved files exist. Do you want to recover them now? - + You cannot add a project to itself! - + There was an error saving. Please try again. - + This project file requires a newer version! It was made with version - + You are running low on available memory! Please close other applications or web browser tabs and retry. @@ -5146,143 +5182,143 @@ Or save and restart Shotcut. - + Opening %1 - - + + Open File - + All Files (*);;MLT XML (*.mlt) - + Preferences - + Rename Clip - + Find - + Reload - + Untitled - + About %1 - + Non-Broadcast - + DVD Widescreen NTSC - + DVD Widescreen PAL - + Square 1080p 30 fps - + Square 1080p 60 fps - + Vertical HD 30 fps - + Vertical HD 60 fps - + Custom - - + + Saved %1 - - - + + + Save XML - + Timeline is not loaded - + Range marker not found under the timeline cursor - + There are incomplete jobs. Do you still want to exit? - + An export is in progress. Do you still want to exit? - + Saved backup %1 - + Do you also want to change the Video Mode to %1 x %2? - + Opened Files - + GPU effects are experimental and do not work good on all computers. Plan to do some testing after turning this on. At this time, a project created with GPU effects cannot be converted to a CPU-only project later. @@ -5290,92 +5326,92 @@ Do you want to enable GPU effects and restart Shotcut? - + Add To Timeline - + Include ranges (Duration > 1 frame)? - + Choose Markers - + Text (*.txt);;All Files (*) - + Failed to open export-chapters.js - + This will reset <b>all</b> settings, and Shotcut must restart afterwards. Do you want to reset and restart now? - - + + MLT XML (*.mlt) - + The project has been modified. Do you want to save your changes? - + Exit Full Screen - + Turn Proxy On - + Turn Proxy Off - + Converting - + Do you want to create missing proxies for every file in this project? You must reopen your project after all proxy jobs are finished. - + Proxy Folder - + Do you want to move all files from the old folder to the new folder? - + Moving Files - + GPU effects are not supported @@ -5395,149 +5431,149 @@ You must reopen your project after all proxy jobs are finished. - + Scrolling - + Audio API - + default - + You must restart Shotcut to change the audio API. Do you want to restart now? - + Click here to check for a new version of Shotcut. - + Open Files - + You must restart Shotcut to switch to the new language. Do you want to restart now? - + Failed to connect to JACK. Please verify that JACK is installed and running. - + Shotcut must restart to disable GPU effects. Disable GPU effects and restart? - + You must restart %1 to switch to the new theme. Do you want to restart now? - + <p>Please review your entire project after making this change.</p><p>Shotcut does not automatically adjust things that are sensitive to size and position if you change resolution or aspect ratio.</p<br>The timing of edits and keyframes may be slightly different if you change frame rate.</p><p>It is a good idea to use <b>File > Backup and Save</b> before or after this operation.</p><p>Do you want to change the <b>Video Mode</b> now?</p> - + Do not show this anymore. Change video mode warning dialog - + Do you want to automatically check for updates in the future? - + Do not show this anymore. Automatic upgrade check dialog - + MLT XML (*.mlt);;All Files (*) - + You must restart Shotcut to change the display method. Do you want to restart now? - + Application Log - + Previous - + Shotcut version %1 is available! Click here to get it. - + You are running the latest version of Shotcut. - + Failed to read version.json when checking. Click here to go to the Web site. - + Export EDL - + EDL (*.edl);;All Files (*) - - + + A JavaScript error occurred during export. - + Failed to open export-edl.js - + Export frame from proxy? - + This frame may be from a lower resolution proxy instead of the original source. Do you still want to continue? @@ -5546,48 +5582,48 @@ Do you still want to continue? - + Export Frame - + Unable to export frame. - + You must restart Shotcut to change the data directory. Do you want to continue? - + Data Directory - + Add Custom Layout - + Name - + Remove Video Mode - + Remove Layout - + GPU effects are EXPERIMENTAL, UNSTABLE and UNSUPPORTED! Unsupported means do not report bugs about it. Do you want to disable GPU effects and restart Shotcut? @@ -6818,7 +6854,7 @@ Try again with a different folder. PlaylistDock - + Playlist @@ -6840,448 +6876,458 @@ p, li { white-space: pre-wrap; } - + Add the Source to the playlist - + Remove cut - + Update - + View as tiles - + View as icons - + View as details - + Remove - + Set Creation Time... - - + + Insert - + Playlist Menu - + Append - + Open the clip in the Source player - + Go to the start of this clip in the Project player - + Remove All - + Remove all items from the playlist - + Hidden - + In and Out - Left/Right - + In and Out - Top/Bottom - + In Only - Small - + In Only - Large - + Add Selected to Timeline - + Add Selected to Slideshow - + Play After Open - + Select All - + Select None - + Update Thumbnails - + Sort By Name - + Sort By Date - + Details - + Select - - + + Bins - + Columns - + Playlist Controls - - + + Playlist Filters - + Only show files whose name, path, or comment contains some text - + search - + Add files to playlist - + Tiles - + Icons - + Open - + GoTo - + Copy - + Open a copy of the clip in the Source player - + Move Up - + Move Down - + Open Previous - + Open Next - + Select Clip 1 - + Select Clip 2 - + Select Clip 3 - + Select Clip 4 - + Select Clip 5 - + Select Clip 6 - + Select Clip 7 - + Select Clip 8 - + Select Clip 9 - + Thumbnails - + Clip - + In - + Duration - + Start - + Date - + + Type + + + + Video - + Show or hide video files - + Audio - + Show or hide audio files - + Image - + Show or hide image files - + Other - + Show or hide other kinds of files - - + + New Bin - - + + Name - + Show or hide the list of bins - - + + Remove Bin - - + + Rename Bin + + + Search + + - + Replace %n playlist items - - + Replace %n playlist item + Replace %n playlist items - + Sort - - + + You cannot insert a playlist into a playlist! - + Remove %n playlist items - - + Remove %n playlist item + Remove %n playlist items - - + + Add Files - + Appending - - + + Failed to open - + Dropped Files - + Generating - + Open File - + All Files (*);;MLT XML (*.mlt) @@ -7371,17 +7417,17 @@ p, li { white-space: pre-wrap; } PlaylistProxyModel - + All - + Duplicates - + Not In Timeline @@ -7468,57 +7514,57 @@ p, li { white-space: pre-wrap; } QObject - + Append playlist item %1 - + Insert playist item %1 - + Update playlist item %1 - + Remove playlist item %1 - + Clear playlist - + Move item from %1 to %2 - + Sort playlist by %1 - + Trim playlist item %1 in - + Trim playlist item %1 out - + Replace playlist item %1 - + Add new bin: %1 @@ -7526,8 +7572,8 @@ p, li { white-space: pre-wrap; } Move %n item(s) to bin: %1 - - + Move %n item to bin: %1 + Move %n items to bin: %1 @@ -7774,7 +7820,7 @@ p, li { white-space: pre-wrap; } - + You cannot add a project to itself! @@ -7889,12 +7935,12 @@ If yes, choose a format below and then click OK to choose a file name. After cho - + Generating Playlist for Bin - + Generate Slideshow @@ -8493,7 +8539,7 @@ If yes, choose a format below and then click OK to choose a file name. After cho ShotcutSettings - + Old (before v23) Layout @@ -8822,8 +8868,8 @@ If yes, choose a format below and then click OK to choose a file name. After cho Slideshow Generator - %n Clips - - + Slideshow Generator - %n Clip + Slideshow Generator - %n Clips @@ -10267,8 +10313,8 @@ Remove the subtitle filter before removing this track. Replace %n timeline clips - - + Replace %n timeline clip + Replace %n timeline clips @@ -14581,7 +14627,7 @@ Most users do not need to change this. - + @@ -14928,7 +14974,7 @@ Used to correct for excessive amplitude caused by the extra dynamic range. - + Duration @@ -15464,59 +15510,59 @@ Used to correct for excessive amplitude caused by the extra dynamic range. - - + + Text - + Insert field - + # (Hash sign) - + Timecode (drop frame) - + Timecode (non-drop frame) - + File base name - + Frame # Frame number - + File date - + Creation date - + File name and path - + File name @@ -15547,7 +15593,7 @@ Used to correct for excessive amplitude caused by the extra dynamic range. - + @@ -16818,7 +16864,7 @@ Change top/side distortion bias - + Color @@ -17175,7 +17221,7 @@ Change top/side distortion bias - The amount of blending to apply to the edged of the color range. + The amount of blending to apply to the edges of the color range. @@ -17215,7 +17261,7 @@ Change top/side distortion bias - + Speed @@ -17272,68 +17318,68 @@ Change top/side distortion bias - + Format - + HH:MM:SS - + HH:MM:SS.S - + MM:SS - + MM:SS.SS - + MM:SS.SSS - + SS - + SS.S - + SS.SS - + SS.SSS - + A value of 0 will run the timer to the end of the filter - + When the direction is Down, the timer will count down to Offset. When the direction is Up, the timer will count up starting from Offset. - + Timer seconds per playback second. Scales Duration but does not affect Start Delay or Offset. @@ -17430,7 +17476,7 @@ Blue in RGB mode - + Direction @@ -17471,37 +17517,37 @@ All = 360° + Randomize - + Up - + Down - + Start Delay - + The timer will be frozen from the beginning of the filter until the Start Delay time has elapsed. - + Set start to begin at the current position - + The timer will be frozen after the Duration has elapsed. - + Set duration to end at the current position @@ -17509,7 +17555,7 @@ All = 360° + Randomize - + Offset @@ -18471,12 +18517,12 @@ Values smaller than 1 will zoom into image. - + Insert GPS field - + Extra arguments can be added inside keywords: Distance units: m [km|ft|mi]. Speed units: km/h [mi/h|m/s|ft/s]. @@ -18485,117 +18531,117 @@ Extra keyword: RAW (prints only values from file). - + GPS latitude - + GPS longitude - + Elevation (m) - + Speed (km/h) - + Distance (m) - + GPS date-time - + Video file date-time - + Heart-rate (bpm) - + Bearing (degrees) - + Bearing (compass) - + Elevation gain (m) - + Elevation loss (m) - + Distance uphill (m) - + Distance downhill (m) - + Distance flat (m) - + Cadence - + Temperature (C) - + Grade (%) - + Grade (degrees) - + Vertical speed (m/s) - + 3D Speed (km/h) - + Power (W) - + <b>Advanced options</b> @@ -18618,53 +18664,53 @@ Extra keyword: RAW (prints only values from file). - + Update speed - + Set how many text updates to show per second. Set to 0 to only print real points (no interpolation). - + Fractional times are also allowed (0.25 = update every 4 seconds, 5 = 5 updates per second). - + per second - + Video start time: - + Detected date-time for the video file. - + GPS start time: - + Detected date-time for the GPS file. - + This time will be used for synchronization. @@ -18912,7 +18958,7 @@ Set to 0 to only print real points (no interpolation). - + Subtitle Track @@ -18937,28 +18983,28 @@ Set to 0 to only print real points (no interpolation). - + Sepia - + Thermal - + Color #%1 - + Color: %1 Click to select, drag to change position - + Stop