2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

fixed custom context menu for os x, fixed file drag-n-drop in os x 10.10

This commit is contained in:
John Preston
2014-09-30 07:13:47 -07:00
parent 0d85f91453
commit 1fd25e8778
9 changed files with 32 additions and 2 deletions

View File

@@ -2471,6 +2471,8 @@ DragState HistoryWidget::getDragState(const QMimeData *d) {
if (!i->isLocalFile()) return DragStateNone;
QString file(i->toLocalFile());
if (file.startsWith(qsl("/.file/id="))) file = psConvertFileUrl(file);
quint64 s = QFileInfo(file).size();
if (s >= MaxUploadDocumentSize) {
return DragStateNone;
@@ -3283,6 +3285,8 @@ QStringList HistoryWidget::getMediasFromMime(const QMimeData *d) {
if (!i->isLocalFile()) return QStringList();
QString file(i->toLocalFile());
if (file.startsWith(qsl("/.file/id="))) file = psConvertFileUrl(file);
QFileInfo info(file);
uint64 s = info.size();
if (s >= MaxUploadDocumentSize) {