2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

new open with menu for os x

This commit is contained in:
John Preston
2015-01-21 13:20:23 +03:00
parent 13887d91d9
commit 471d83fb97
11 changed files with 254 additions and 7 deletions

View File

@@ -491,7 +491,10 @@ void VideoSaveLink::doSave(bool forceSavingAs) const {
QString already = data->already(true);
if (!already.isEmpty() && !forceSavingAs) {
psOpenFile(already, true);
QPoint pos(QCursor::pos());
if (!psShowOpenWithMenu(pos.x(), pos.y(), already)) {
psOpenFile(already, true);
}
} else {
QDir alreadyDir(already.isEmpty() ? QDir() : QFileInfo(already).dir());
QString name = already.isEmpty() ? QString(".mov") : already;
@@ -577,7 +580,10 @@ void AudioSaveLink::doSave(bool forceSavingAs) const {
QString already = data->already(true);
if (!already.isEmpty() && !forceSavingAs) {
psOpenFile(already, true);
QPoint pos(QCursor::pos());
if (!psShowOpenWithMenu(pos.x(), pos.y(), already)) {
psOpenFile(already, true);
}
} else {
QDir alreadyDir(already.isEmpty() ? QDir() : QFileInfo(already).dir());
QString name = already.isEmpty() ? QString(".ogg") : already;
@@ -678,7 +684,10 @@ void DocumentSaveLink::doSave(bool forceSavingAs) const {
QString already = data->already(true);
if (!already.isEmpty() && !forceSavingAs) {
psOpenFile(already, true);
QPoint pos(QCursor::pos());
if (!psShowOpenWithMenu(pos.x(), pos.y(), already)) {
psOpenFile(already, true);
}
} else {
QDir alreadyDir(already.isEmpty() ? QDir() : QFileInfo(already).dir());
QString name = already.isEmpty() ? data->name : already, filter;