mirror of https://github.com/procxx/kepka.git
Moved album files filter to FileDialog namespace.
This commit is contained in:
parent
faef5d8af6
commit
627a105ba9
|
@ -518,12 +518,12 @@ void EditCaptionBox::createEditMediaButton() {
|
||||||
|
|
||||||
const auto buttonCallback = [=] {
|
const auto buttonCallback = [=] {
|
||||||
const auto filters = _isAlbum
|
const auto filters = _isAlbum
|
||||||
? QStringList(qsl("Image and Video Files (*.png *.jpg *.mp4)"))
|
? FileDialog::AlbumFilesFilter()
|
||||||
: QStringList(FileDialog::AllFilesFilter());
|
: FileDialog::AllFilesFilter();
|
||||||
FileDialog::GetOpenPath(
|
FileDialog::GetOpenPath(
|
||||||
this,
|
this,
|
||||||
tr::lng_choose_file(tr::now),
|
tr::lng_choose_file(tr::now),
|
||||||
filters.join(qsl(";;")),
|
filters,
|
||||||
crl::guard(this, callback));
|
crl::guard(this, callback));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1667,7 +1667,7 @@ void SendFilesBox::addThumbButtonHandlers() {
|
||||||
FileDialog::GetOpenPath(
|
FileDialog::GetOpenPath(
|
||||||
this,
|
this,
|
||||||
tr::lng_choose_file(tr::now),
|
tr::lng_choose_file(tr::now),
|
||||||
qsl("Image and Video Files (*.png *.jpg *.mp4)"),
|
FileDialog::AlbumFilesFilter(),
|
||||||
crl::guard(this, callback));
|
crl::guard(this, callback));
|
||||||
|
|
||||||
}, _albumPreview->lifetime());
|
}, _albumPreview->lifetime());
|
||||||
|
|
|
@ -295,6 +295,10 @@ QString AllFilesFilter() {
|
||||||
#endif // Q_OS_WIN
|
#endif // Q_OS_WIN
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString AlbumFilesFilter() {
|
||||||
|
return qsl("Image and Video Files (*.png *.jpg *.mp4 *.jpeg)");
|
||||||
|
}
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
void InitLastPathDefault() {
|
void InitLastPathDefault() {
|
||||||
|
|
|
@ -82,6 +82,7 @@ void GetFolder(
|
||||||
Fn<void()> failed = Fn<void()>());
|
Fn<void()> failed = Fn<void()>());
|
||||||
|
|
||||||
QString AllFilesFilter();
|
QString AllFilesFilter();
|
||||||
|
QString AlbumFilesFilter();
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue