Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libfm-qt for openSUSE:Factory checked in at 2023-01-02 15:47:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libfm-qt (Old) and /work/SRC/openSUSE:Factory/.libfm-qt.new.1563 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libfm-qt" Mon Jan 2 15:47:27 2023 rev:17 rq:1046180 version:1.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libfm-qt/libfm-qt.changes 2022-11-09 12:57:53.176500414 +0100 +++ /work/SRC/openSUSE:Factory/.libfm-qt.new.1563/libfm-qt.changes 2023-01-02 15:47:28.476506475 +0100 @@ -1,0 +2,15 @@ +Mon Jan 2 13:18:51 UTC 2023 - Michael Vetter <mvet...@suse.com> + +- Update to 1.2.1: + * Specified the parents of context menus for use on Wayland. + * Fixed launching XWayland apps under Wayland. + * appchooserdialog: do not disable the OK button when Custom Command page is shown. + * Increased the minimum width of name column in detailed list view. + * Fixed the DND menu position under Wayland. + * Fixed crash with DND from outside app under Wayland. + * Fixed unresponsive DND menu under Wayland. + * Workaround for DND keyboard modifiers under Wayland. + * Check mime data of clipboard for nullity (for Wayland). + * Fixed drawing of selection rectangle under Wayland. + +------------------------------------------------------------------- Old: ---- libfm-qt-1.2.0.tar.xz libfm-qt-1.2.0.tar.xz.asc New: ---- libfm-qt-1.2.1.tar.xz libfm-qt-1.2.1.tar.xz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libfm-qt.spec ++++++ --- /var/tmp/diff_new_pack.4t41OL/_old 2023-01-02 15:47:29.380511631 +0100 +++ /var/tmp/diff_new_pack.4t41OL/_new 2023-01-02 15:47:29.384511654 +0100 @@ -1,7 +1,7 @@ # # spec file for package libfm-qt # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: libfm-qt -Version: 1.2.0 +Version: 1.2.1 Release: 0 Summary: Library providing components to build desktop file managers License: BSD-3-Clause AND LGPL-2.1-or-later ++++++ libfm-qt-1.2.0.tar.xz -> libfm-qt-1.2.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/CHANGELOG new/libfm-qt-1.2.1/CHANGELOG --- old/libfm-qt-1.2.0/CHANGELOG 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/CHANGELOG 2023-01-02 10:57:18.000000000 +0100 @@ -1,3 +1,16 @@ +libfm-qt-1.2.1 / 2023-01-02 +============================ + * Specified the parents of context menus for use on Wayland. + * Fixed launching XWayland apps under Wayland. + * appchooserdialog: do not disable the OK button when Custom Command page is shown. + * Increased the minimum width of name column in detailed list view. + * Fixed the DND menu position under Wayland. + * Fixed crash with DND from outside app under Wayland. + * Fixed unresponsive DND menu under Wayland. + * Workaround for DND keyboard modifiers under Wayland. + * Check mime data of clipboard for nullity (for Wayland). + * Fixed drawing of selection rectangle under Wayland. + libfm-qt-1.2.0 / 2022-11-05 ============================ * Support adding of pattern lists to entries of search dialog (such lists are used by `pcmanfm-qt` for having a search history). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/CMakeLists.txt new/libfm-qt-1.2.1/CMakeLists.txt --- old/libfm-qt-1.2.0/CMakeLists.txt 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/CMakeLists.txt 2023-01-02 10:57:18.000000000 +0100 @@ -10,7 +10,7 @@ set(LIBFM_QT_API_VERSION_MAJOR 1) set(LIBFM_QT_API_VERSION_MINOR 2) -set(LIBFM_QT_API_VERSION_PATCH 0) +set(LIBFM_QT_API_VERSION_PATCH 1) set(LIBFM_QT_API_VERSION ${LIBFM_QT_API_VERSION_MAJOR}.${LIBFM_QT_API_VERSION_MINOR}.${LIBFM_QT_API_VERSION_PATCH}) list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/README.md new/libfm-qt-1.2.1/README.md --- old/libfm-qt-1.2.0/README.md 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/README.md 2023-01-02 10:57:18.000000000 +0100 @@ -2,12 +2,12 @@ ## Overview -libfm-qt is the Qt port of libfm, a library providing components to build -desktop file managers which belongs to [LXDE](https://lxde.org). +libfm-qt is the Qt port of libfm, a library that provides components for building +desktop file managers, belonging to [LXDE](https://lxde.org). libfm-qt is licensed under the terms of the [LGPLv2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) -or any later version. See file LICENSE for its full text. +or any later version. See file LICENSE for its full text. fm-qt-config.cmake.in is licensed under the terms of the [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) @@ -16,19 +16,19 @@ ### Compiling source code -Runtime dependencies are Qt X11 Extras and libfm ⥠1.2 -(not all features are provided by libfm-qt yet). +Runtime dependencies are Qt X11 Extras (although libfm-qt works under Wayland too) +and menu-cache (not all libfm features are provided by libfm-qt yet). Additional build dependencies are CMake, -[lxqt-build-tools](https://github.com/lxqt/lxqt-build-tools) and optionally Git -to pull latest VCS checkouts. +[lxqt-build-tools](https://github.com/lxqt/lxqt-build-tools) and, optionally, Git +for pulling latest VCS checkouts. -Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX` -has to be set to `/usr` on most operating systems, depending on the way library -paths are dealt with on 64bit systems variables like `CMAKE_INSTALL_LIBDIR` may -have to be set as well. +Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX` +has to be set to `/usr` on most operating systems. Depending on the way library +paths are dealt with on 64bit systems, variables like `CMAKE_INSTALL_LIBDIR` may +have to be set as well. -To build run `make`, to install `make install` which accepts variable `DESTDIR` -as usual. +To build run `make`, to install `make install`, which accepts variable `DESTDIR` +as usual. ### Binary packages diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/appchooserdialog.cpp new/libfm-qt-1.2.1/src/appchooserdialog.cpp --- old/libfm-qt-1.2.0/src/appchooserdialog.cpp 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/appchooserdialog.cpp 2023-01-02 10:57:18.000000000 +0100 @@ -253,6 +253,11 @@ } void AppChooserDialog::onSelectionChanged() { + if(ui->tabWidget->currentIndex() != 0) { + // the selection may be reset by menu-cache, + // while the app menu view is not shown + return; + } bool isAppSelected = ui->appMenuView->isAppSelected(); ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(isAppSelected); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/applaunchcontext.cpp new/libfm-qt-1.2.1/src/applaunchcontext.cpp --- old/libfm-qt-1.2.0/src/applaunchcontext.cpp 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/applaunchcontext.cpp 2023-01-02 10:57:18.000000000 +0100 @@ -29,10 +29,12 @@ G_DEFINE_TYPE(FmAppLaunchContext, fm_app_launch_context, G_TYPE_APP_LAUNCH_CONTEXT) static char* fm_app_launch_context_get_display(GAppLaunchContext * /*context*/, GAppInfo * /*info*/, GList * /*files*/) { - Display* dpy = QX11Info::display(); - if(dpy) { - char* xstr = DisplayString(dpy); - return g_strdup(xstr); + if(QX11Info::isPlatformX11()) { + Display* dpy = QX11Info::display(); + if(dpy) { + char* xstr = DisplayString(dpy); + return g_strdup(xstr); + } } return nullptr; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/dirtreemodel.cpp new/libfm-qt-1.2.1/src/dirtreemodel.cpp --- old/libfm-qt-1.2.0/src/dirtreemodel.cpp 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/dirtreemodel.cpp 2023-01-02 10:57:18.000000000 +0100 @@ -19,7 +19,6 @@ #include "dirtreemodel.h" #include "dirtreemodelitem.h" -#include "dndactionmenu.h" #include "fileoperation.h" #include "utilities.h" #include <QDebug> @@ -87,12 +86,11 @@ return QVariant(); } -bool DirTreeModel::dropMimeData(const QMimeData* data, Qt::DropAction /*action*/, int /*row*/, int /*column*/, const QModelIndex& parent) { +bool DirTreeModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int /*row*/, int /*column*/, const QModelIndex& parent) { if(auto destPath = filePath(parent)) { if(data->hasUrls()) { // files uris are dropped auto paths = pathListFromQUrls(data->urls()); if(!paths.empty()) { - Qt::DropAction action = DndActionMenu::askUser(Qt::CopyAction | Qt::MoveAction | Qt::LinkAction, QCursor::pos()); switch(action) { case Qt::CopyAction: FileOperation::copyFiles(paths, destPath); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/dirtreeview.cpp new/libfm-qt-1.2.1/src/dirtreeview.cpp --- old/libfm-qt-1.2.0/src/dirtreeview.cpp 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/dirtreeview.cpp 2023-01-02 10:57:18.000000000 +0100 @@ -24,9 +24,13 @@ #include <QGuiApplication> #include <QMouseEvent> #include <QTimer> +#include <QMimeData> #include "dirtreemodel.h" #include "dirtreemodelitem.h" #include "filemenu.h" +#include "fileoperation.h" +#include "dndactionmenu.h" +#include "utilities.h" namespace Fm { @@ -201,7 +205,7 @@ auto path = fileInfo->path(); Fm::FileInfoList files ; files.push_back(fileInfo); - Fm::FileMenu* menu = new Fm::FileMenu(files, fileInfo, path); + Fm::FileMenu* menu = new Fm::FileMenu(files, fileInfo, path, true, QString(), this); // FIXME: apply some settings to the menu and set a proper file launcher to it Q_EMIT prepareFileMenu(menu); @@ -338,5 +342,45 @@ } } +void DirTreeView::dropEvent(QDropEvent* event) { + // NOTE: Under Wayland, serious problems will happen if the DND menu is shown + // while the DND is in progress. Also, the menu needs a parent for correct positioning. + QModelIndex index = indexAt(event->pos()); + if(index.isValid()) { + DirTreeModel* _model = static_cast<DirTreeModel*>(model()); + auto destPath = _model->filePath(index); + if(!destPath) { // maybe a placeholder + destPath = _model->filePath(index.parent()); + } + if(destPath) { + if(event->mimeData()->hasUrls()) { // files uris are dropped + auto srcPaths = pathListFromQUrls(event->mimeData()->urls()); + if(!srcPaths.empty()) { + auto curPos = viewport()->mapToGlobal(event->pos()); + QTimer::singleShot(0, this, [this, curPos, srcPaths, destPath] { + Qt::DropAction action = DndActionMenu::askUser(Qt::CopyAction | Qt::MoveAction | Qt::LinkAction, curPos, viewport()); + switch(action) { + case Qt::CopyAction: + FileOperation::copyFiles(srcPaths, destPath); + break; + case Qt::MoveAction: + FileOperation::moveFiles(srcPaths, destPath); + break; + case Qt::LinkAction: + FileOperation::symlinkFiles(srcPaths, destPath); + break; + default: + break; + } + }); + event->accept(); // prevent further event propagation + } + } + } + } + + QTreeView::dropEvent(event); +} + } // namespace Fm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/dirtreeview.h new/libfm-qt-1.2.1/src/dirtreeview.h --- old/libfm-qt-1.2.0/src/dirtreeview.h 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/dirtreeview.h 2023-01-02 10:57:18.000000000 +0100 @@ -54,6 +54,7 @@ protected: void mousePressEvent(QMouseEvent* event) override; void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) override; + void dropEvent(QDropEvent* event) override; private: void cancelPendingChdir(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/dndactionmenu.cpp new/libfm-qt-1.2.1/src/dndactionmenu.cpp --- old/libfm-qt-1.2.0/src/dndactionmenu.cpp 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/dndactionmenu.cpp 2023-01-02 10:57:18.000000000 +0100 @@ -46,9 +46,9 @@ } -Qt::DropAction DndActionMenu::askUser(Qt::DropActions possibleActions, QPoint pos) { +Qt::DropAction DndActionMenu::askUser(Qt::DropActions possibleActions, QPoint pos, QWidget* parent) { Qt::DropAction result = Qt::IgnoreAction; - DndActionMenu menu{possibleActions}; + DndActionMenu menu{possibleActions, parent}; QAction* action = menu.exec(pos); if(nullptr != action) { if(action == menu.copyAction) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/dndactionmenu.h new/libfm-qt-1.2.1/src/dndactionmenu.h --- old/libfm-qt-1.2.0/src/dndactionmenu.h 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/dndactionmenu.h 2023-01-02 10:57:18.000000000 +0100 @@ -33,7 +33,7 @@ explicit DndActionMenu(Qt::DropActions possibleActions, QWidget* parent = nullptr); ~DndActionMenu() override; - static Qt::DropAction askUser(Qt::DropActions possibleActions, QPoint pos); + static Qt::DropAction askUser(Qt::DropActions possibleActions, QPoint pos, QWidget* parent = nullptr); private: QAction* copyAction; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/foldermodel.cpp new/libfm-qt-1.2.1/src/foldermodel.cpp --- old/libfm-qt-1.2.0/src/foldermodel.cpp 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/foldermodel.cpp 2023-01-02 10:57:18.000000000 +0100 @@ -187,6 +187,9 @@ bool cutPathFound = false; const QClipboard* clipboard = QApplication::clipboard(); const QMimeData* data = clipboard->mimeData(); + if(data == nullptr) { + return; // possible under Wayland + } // Gnome, LXDE, XFCE (see utilities.cpp -> pasteFilesFromClipboard) if(data->hasFormat(QStringLiteral("x-special/gnome-copied-files"))) { @@ -588,7 +591,8 @@ srcPaths = Fm::pathListFromQUrls(data->urls()); } - // FIXME: should we put this in dropEvent handler of FolderView instead? + // NOTE: If the DND is done with no key modifier, the current method will not be called. + // Instead, the dropEvent handler of FolderView will do the job after asking the user. if(!srcPaths.empty()) { //qDebug("drop action: %d", action); switch(action) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/folderview.cpp new/libfm-qt-1.2.1/src/folderview.cpp --- old/libfm-qt-1.2.0/src/folderview.cpp 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/folderview.cpp 2023-01-02 10:57:18.000000000 +0100 @@ -29,6 +29,7 @@ #include "filemenu.h" #include "foldermenu.h" #include "filelauncher.h" +#include "fileoperation.h" #include "utilities.h" #include <QTimer> #include <QDate> @@ -49,7 +50,6 @@ #include <xcb/xcb.h> // for XDS support #include "xdndworkaround.h" // for XDS support #include "folderview_p.h" -#include "utilities.h" #include <algorithm> @@ -85,6 +85,7 @@ } void FolderViewListView::startDrag(Qt::DropActions supportedActions) { + mouseLeftPressed_ = false; // see FolderViewListView::mouseMoveEvent if(movement() != Static) { QListView::startDrag(supportedActions); } @@ -401,7 +402,7 @@ } void FolderViewTreeView::headerContextMenu(const QPoint &p) { - QMenu menu; + QMenu menu(header()); // a parent is needed under Wayland for correct positioning QAction *action = menu.addAction (tr("Auto-resize columns")); action->setCheckable(true); action->setChecked(customColumnWidths_.isEmpty()); @@ -720,8 +721,11 @@ // Compute the width available for the filename column int filenameAvailWidth = availWidth - desiredWidth + widths.at(filenameColumn); - // Compute the minimum acceptable width for the filename column - int filenameMinWidth = qMin(200, sizeHintForColumn(filenameColumn)); + // Compute the minimum acceptable width for the filename column, showing + // whole texts whose lengths are less than 30 times the average font width. + int filenameMinWidth = qMin(iconSize().width() + + 30 * opt.fontMetrics.averageCharWidth(), + sizeHintForColumn(filenameColumn)); if(filenameAvailWidth > filenameMinWidth) { // Shrink the filename column to the available width @@ -1595,23 +1599,86 @@ } if(e->keyboardModifiers() == Qt::NoModifier) { - // if no key modifiers are used, popup a menu + // If no key modifiers are used, pop up a menu // to ask the user for the action he/she wants to perform. - Qt::DropActions actions = Qt::IgnoreAction; + + // NOTE: Under Wayland, serious problems will happen if the DND menu is shown + // while the DND is in progress. Also, the menu needs a parent for correct positioning. + + Fm::FilePath destPath; std::shared_ptr<const Fm::FileInfo> info = nullptr; if(model_) { QModelIndex index = view->indexAt(e->pos()); info = model_->fileInfoFromIndex(index); } - if(!info || !info->isDir()) { + if(info && info->isDir()) { + destPath = info->path(); // drop on a subdirectory + } + else { info = folderInfo(); + destPath = path(); // drop on blank area of the folder } - if(info && info->isWritableDirectory() && info->isWritable()) { - actions = e->possibleActions(); + + Fm::FilePathList srcPaths; + // try to get paths from the original data + if(e->mimeData()->hasFormat(QStringLiteral("libfm/files"))) { + QByteArray _data = e->mimeData()->data(QStringLiteral("libfm/files")); + srcPaths = pathListFromUriList(_data.data()); + } + if(srcPaths.empty() && e->mimeData()->hasUrls()) { + srcPaths = Fm::pathListFromQUrls(e->mimeData()->urls()); + } + + if(!srcPaths.empty()) { + Qt::DropActions actions = Qt::IgnoreAction; + if(info && info->isWritableDirectory() && info->isWritable()) { + actions = e->possibleActions(); + } + auto curPos = view->viewport()->mapToGlobal(e->pos()); + QTimer::singleShot(0, view, [this, curPos, actions, srcPaths, destPath] { + Qt::DropAction action; + // Wayland does not see the modifier if it is pressed after dragging. + // Therefore, it should be checked now, when the DND is finished. + switch(QApplication::keyboardModifiers()) { + case Qt::ControlModifier: + action = Qt::CopyAction; + break; + case Qt::ShiftModifier: + action = Qt::MoveAction; + break; + case Qt::ControlModifier | Qt::ShiftModifier: + action = Qt::LinkAction; + break; + default: + // a parent is needed under Wayland for correct positioning + action = DndActionMenu::askUser(actions, curPos, view); + break; + } + + Q_EMIT dropIsDecided(action != Qt::IgnoreAction); + + switch(action) { + case Qt::CopyAction: + FileOperation::copyFiles(srcPaths, destPath); + break; + case Qt::MoveAction: + FileOperation::moveFiles(srcPaths, destPath); + break; + case Qt::LinkAction: + FileOperation::symlinkFiles(srcPaths, destPath); + break; + default: + break; + } + }); + e->accept(); // prevent further event propagation + return; } - Qt::DropAction action = DndActionMenu::askUser(actions, view->viewport()->mapToGlobal(e->pos())); - e->setDropAction(action); } + + QTimer::singleShot(0, view, [this] { + Q_EMIT dropIsDecided(true); // after finishing drop + }); } bool FolderView::eventFilter(QObject* watched, QEvent* event) { @@ -1950,7 +2017,7 @@ } } if (!menu && folderInfo()) { - Fm::FolderMenu* folderMenu = new Fm::FolderMenu(this); + Fm::FolderMenu* folderMenu = new Fm::FolderMenu(this, this); prepareFolderMenu(folderMenu); menu = folderMenu; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/folderview.h new/libfm-qt-1.2.1/src/folderview.h --- old/libfm-qt-1.2.0/src/folderview.h 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/folderview.h 2023-01-02 10:57:18.000000000 +0100 @@ -192,6 +192,8 @@ void inlineRenamed(const QString& oldName, const QString& newName); + void dropIsDecided(bool accepted); + private: QAbstractItemView* view; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/placesmodel.cpp new/libfm-qt-1.2.1/src/placesmodel.cpp --- old/libfm-qt-1.2.0/src/placesmodel.cpp 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/placesmodel.cpp 2023-01-02 10:57:18.000000000 +0100 @@ -27,7 +27,6 @@ #include <QStandardPaths> #include "utilities.h" #include "placesmodelitem.h" -#include "dndactionmenu.h" #include "fileoperation.h" namespace Fm { @@ -537,7 +536,7 @@ } -bool PlacesModel::dropMimeData(const QMimeData* data, Qt::DropAction /*action*/, int row, int column, const QModelIndex& parent) { +bool PlacesModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) { QStandardItem* item = itemFromIndex(parent); if(data->hasFormat(QStringLiteral("application/x-bookmark-row"))) { // the data being dopped is a bookmark row // decode it and do bookmark reordering @@ -581,7 +580,6 @@ if (item == trashItem_) { auto paths = pathListFromQUrls(data->urls()); if(!paths.empty()) { - Qt::DropAction action = DndActionMenu::askUser(Qt::MoveAction, QCursor::pos()); if (action == Qt::MoveAction) { FileOperation::trashFiles(paths, false); } @@ -593,7 +591,6 @@ if(destPath) { auto paths = pathListFromQUrls(data->urls()); if(!paths.empty()) { - Qt::DropAction action = DndActionMenu::askUser(Qt::CopyAction | Qt::MoveAction | Qt::LinkAction, QCursor::pos()); switch(action) { case Qt::CopyAction: FileOperation::copyFiles(paths, destPath); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/placesview.cpp new/libfm-qt-1.2.1/src/placesview.cpp --- old/libfm-qt-1.2.0/src/placesview.cpp 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/placesview.cpp 2023-01-02 10:57:18.000000000 +0100 @@ -23,12 +23,15 @@ #include "placesmodelitem.h" #include "mountoperation.h" #include "fileoperation.h" +#include "dndactionmenu.h" +#include "utilities.h" #include <QMenu> #include <QContextMenuEvent> #include <QHeaderView> #include <QDebug> #include <QGuiApplication> #include <QTimer> +#include <QMimeData> #include "folderitemdelegate.h" namespace Fm { @@ -326,6 +329,58 @@ } void PlacesView::dropEvent(QDropEvent* event) { + // NOTE: Under Wayland, serious problems will happen if the DND menu is shown + // while the DND is in progress. Also, the menu needs a parent for correct positioning. + if(!event->mimeData()->hasFormat(QStringLiteral("application/x-bookmark-row")) // droppped data is not a bookmark row + && event->mimeData()->hasUrls()) { // file uris are dropped + QModelIndex index = indexAt(event->pos()); + if(index.isValid() + && index.column() == 0 // the real item is at column 0 + && index.parent().isValid()) { // should be a child item + PlacesModelItem* item = static_cast<PlacesModelItem*>(model_->itemFromIndex(proxyModel_->mapToSource(index))); + if(item + && item->type() != PlacesModelItem::Mount + && (item->type() != PlacesModelItem::Volume + || static_cast<PlacesModelVolumeItem*>(item)->isMounted())) { + auto destPath = item->path(); + if(destPath + && strcmp(destPath.toString().get(), "menu://applications/") != 0 + && strcmp(destPath.toString().get(), "network:///") != 0 + && strcmp(destPath.toString().get(), "computer:///") != 0 ) { + auto srcPaths = pathListFromQUrls(event->mimeData()->urls()); + if(!srcPaths.empty()) { + auto curPos = viewport()->mapToGlobal(event->pos()); + QTimer::singleShot(0, this, [this, curPos, srcPaths, destPath] { + if(strcmp(destPath.toString().get(), "trash:///") == 0) { + Qt::DropAction action = DndActionMenu::askUser(Qt::MoveAction, curPos, viewport()); + if (action == Qt::MoveAction) { + FileOperation::trashFiles(srcPaths, false); + } + } + else { + Qt::DropAction action = DndActionMenu::askUser(Qt::CopyAction | Qt::MoveAction | Qt::LinkAction, curPos, viewport()); + switch(action) { + case Qt::CopyAction: + FileOperation::copyFiles(srcPaths, destPath); + break; + case Qt::MoveAction: + FileOperation::moveFiles(srcPaths, destPath); + break; + case Qt::LinkAction: + FileOperation::symlinkFiles(srcPaths, destPath); + break; + default: + break; + } + } + }); + event->accept(); // prevent further event propagation + } + } + } + } + } + QTreeView::dropEvent(event); } @@ -468,12 +523,17 @@ index = index.sibling(index.row(), 0); } - // Do not take the ownership of the menu since - // it will be deleted with deleteLater() upon hidden. - // This is possibly related to #145 - https://github.com/lxqt/pcmanfm-qt/issues/145 - QMenu* menu = new QMenu(); - QAction* action = nullptr; PlacesModelItem* item = static_cast<PlacesModelItem*>(model_->itemFromIndex(proxyModel_->mapToSource(index))); + if(item == nullptr) { + return; + } + + // The ownership of the menu is taken because that may be needed for + // correct positioning under Wayland, especially when the window is + // inactive (it is safe under X11), but the menu will be deleted by + // deleteLater() when it is going to hide. + QMenu* menu = new QMenu(this); + QAction* action = nullptr; if(index.parent().isValid() && item->type() != PlacesModelItem::Mount diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/translations/libfm-qt_ca.ts new/libfm-qt-1.2.1/src/translations/libfm-qt_ca.ts --- old/libfm-qt-1.2.0/src/translations/libfm-qt_ca.ts 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/translations/libfm-qt_ca.ts 2023-01-02 10:57:18.000000000 +0100 @@ -334,12 +334,12 @@ <message> <location filename="../file-props.ui" line="749"/> <source>SetUID</source> - <translation>SetUID</translation> + <translation>Estableix l'UID</translation> </message> <message> <location filename="../file-props.ui" line="756"/> <source>SetGID</source> - <translation>SetGID</translation> + <translation>Estableix el GID</translation> </message> <message> <location filename="../file-props.ui" line="792"/> @@ -1749,7 +1749,7 @@ <message> <location filename="../filesearch.ui" line="51"/> <source>Case sensitive</source> - <translation>Distingeix majúscula / minúscula</translation> + <translation>Distingeix majúscula/minúscula</translation> </message> <message> <location filename="../filesearch.ui" line="125"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/translations/libfm-qt_da.ts new/libfm-qt-1.2.1/src/translations/libfm-qt_da.ts --- old/libfm-qt-1.2.0/src/translations/libfm-qt_da.ts 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/translations/libfm-qt_da.ts 2023-01-02 10:57:18.000000000 +0100 @@ -124,7 +124,7 @@ <message> <location filename="../exec-file.ui" line="99"/> <source>Remember for next files of this kind</source> - <translation type="unfinished"></translation> + <translation>Husk til næste filer af denne art</translation> </message> </context> <context> @@ -558,7 +558,7 @@ <message> <location filename="../filedialog.cpp" line="206"/> <source>Show Hidden</source> - <translation type="unfinished">Vis skjulte</translation> + <translation>Vis skjulte</translation> </message> <message> <location filename="../filedialog.cpp" line="218"/> @@ -1022,7 +1022,7 @@ <message> <location filename="../foldermenu.cpp" line="57"/> <source>Empty Trash</source> - <translation type="unfinished">Tøm papirkurven</translation> + <translation>Tøm papirkurven</translation> </message> <message> <location filename="../foldermenu.cpp" line="69"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/translations/libfm-qt_fr.ts new/libfm-qt-1.2.1/src/translations/libfm-qt_fr.ts --- old/libfm-qt-1.2.0/src/translations/libfm-qt_fr.ts 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/translations/libfm-qt_fr.ts 2023-01-02 10:57:18.000000000 +0100 @@ -37,12 +37,12 @@ <li><b>%u</b>: Represents a single URI of the file</li> <li><b>%U</b>: Represents multiple URIs</li> </ul></source> - <translation><b>Ces codes spéciaux peuvent être utilisés dans la ligne de commande :</b> + <translation><b>Ces codes spéciaux peuvent être utilisés dans la ligne de commandeâ¯:</b> <ul> -<li><b>%f</b>  : Représente un seul nom de fichier,</li> -<li><b>%F</b>  : Représente plusieurs noms de fichiers,</li> -<li><b>%u</b>  : Représente un seul URI du fichier,</li> -<li><b>%U</b>  : Représente plusieurs URI.</li> +<li><b>%f</b>â¯Â : Représente un seul nom de fichier,</li> +<li><b>%F</b> â¯: Représente plusieurs noms de fichiers,</li> +<li><b>%u</b> â¯: Représente un seul URI du fichier,</li> +<li><b>%U</b>â¯Â : Représente plusieurs URI.</li> </ul></translation> </message> <message> @@ -150,7 +150,7 @@ <message> <location filename="../file-operation-dialog.ui" line="32"/> <source>Destination:</source> - <translation>Destination :</translation> + <translation>Destination :</translation> </message> <message> <location filename="../file-operation-dialog.ui" line="55"/> @@ -248,7 +248,7 @@ <message> <location filename="../file-props.ui" line="330"/> <source>Emblem:</source> - <translation>Emblème :</translation> + <translation>Emblème :</translation> </message> <message> <location filename="../file-props.ui" line="342"/> @@ -799,16 +799,16 @@ <location filename="../fileoperation.cpp" line="405"/> <source>Do you want to delete the selected file(s)?</source> <translation> - <numerusform>Voulez-vous supprimer le fichier sélectionné ?</numerusform> - <numerusform>Voulez-vous supprimer les fichiers sélectionnés ?</numerusform> + <numerusform>Voulez-vous supprimer le fichier sélectionné ?</numerusform> + <numerusform>Voulez-vous supprimer les fichiers sélectionnés ?</numerusform> </translation> </message> <message numerus="yes"> <location filename="../fileoperation.cpp" line="423"/> <source>Do you want to move the selected file(s) to trash can?</source> <translation> - <numerusform>Voulez-vous déplacer le fichier sélectionné vers la corbeille ?</numerusform> - <numerusform>Voulez-vous déplacer les fichiers sélectionnés vers la corbeille ?</numerusform> + <numerusform>Voulez-vous déplacer le fichier sélectionné vers la corbeille ?</numerusform> + <numerusform>Voulez-vous déplacer les fichiers sélectionnés vers la corbeille ?</numerusform> </translation> </message> </context> @@ -882,7 +882,7 @@ <message> <location filename="../fileoperationdialog.cpp" line="75"/> <source>Restoring the following files from trash can:</source> - <translation>Restauration des fichiers suivants depuis la corbeille :</translation> + <translation>Restauration des fichiers suivants depuis la corbeille :</translation> </message> <message> <location filename="../fileoperationdialog.cpp" line="149"/> @@ -1381,17 +1381,17 @@ <source>Type: %1 Size: %2 Modified: %3</source> - <translation>Type : %1 -Taille : %2 -Modification : %3</translation> + <translation>Typeâ¯: %1 +Tailleâ¯: %2 +Modificationâ¯: %3</translation> </message> <message> <location filename="../renamedialog.cpp" line="64"/> <location filename="../renamedialog.cpp" line="83"/> <source>Type: %1 Modified: %2</source> - <translation>Type : %1 -Modification : %2</translation> + <translation>Typeâ¯: %1 +Modificationâ¯: %2</translation> </message> <message> <location filename="../renamedialog.cpp" line="96"/> @@ -1427,7 +1427,7 @@ <message> <location filename="../core/untrashjob.cpp" line="35"/> <source>Cannot untrash file '%s': original path not known</source> - <translation>Impossible de sortir le fichier « %s Â» de la corbeille : le chemin d'origine est inconnu</translation> + <translation>Impossible de sortir le fichier '%s' de la corbeilleâ¯: le chemin d'origine est inconnu</translation> </message> </context> <context> @@ -1557,7 +1557,7 @@ <message> <location filename="../core/basicfilelauncher.cpp" line="396"/> <source>Cannot set working directory to '%1': %2</source> - <translation>Impossible de définir le répertoire de travail à « %1 Â» : « %2 Â»</translation> + <translation>Impossible de définir le répertoire de travail à « %1 »â¯: « %2 »</translation> </message> <message> <location filename="../placesmodelitem.cpp" line="127"/> @@ -1581,7 +1581,7 @@ <message> <location filename="../rename-dialog.ui" line="35"/> <source><html><head/><body><p><span style=" font-weight:600;">There is already a file with the same name in this location.</span></p><p>Do you want to replace the existing file?</p></body></html></source> - <translation><html><head/><body><p><span style=" font-weight:600;">Il existe déjà un fichier du même nom à cet emplacement.</span></p><p>Voulez-vous remplacer le fichier existant ?</p></body></html></translation> + <translation><html><head/><body><p><span style=" font-weight:600;">Il existe déjà un fichier du même nom à cet emplacement.</span></p><p>Voulez-vous remplacer le fichier existant ?</p></body></html></translation> </message> <message> <location filename="../rename-dialog.ui" line="63"/> @@ -1591,7 +1591,7 @@ <message> <location filename="../rename-dialog.ui" line="122"/> <source>&File name:</source> - <translation>Nom du &fichier :</translation> + <translation>Nom du &fichier :</translation> </message> <message> <location filename="../rename-dialog.ui" line="137"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/translations/libfm-qt_he.ts new/libfm-qt-1.2.1/src/translations/libfm-qt_he.ts --- old/libfm-qt-1.2.0/src/translations/libfm-qt_he.ts 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/translations/libfm-qt_he.ts 2023-01-02 10:57:18.000000000 +0100 @@ -124,7 +124,7 @@ <message> <location filename="../exec-file.ui" line="99"/> <source>Remember for next files of this kind</source> - <translation type="unfinished"></translation> + <translation>××××ר ××§×צ×× ××××× ××ס×× ×××</translation> </message> </context> <context> @@ -675,6 +675,8 @@ <translation> <numerusform>×פת×× ×ת ××§×××¥ ××× ××××× %1?</numerusform> <numerusform>×פת×× ×ת ××§×צ×× ×××× ××××× %1?</numerusform> + <numerusform>×פת×× ×ת ××§×צ×× ×××× ××××× %1?</numerusform> + <numerusform>×פת×× ×ת ××§×צ×× ×××× ××××× %1?</numerusform> </translation> </message> <message> @@ -801,6 +803,8 @@ <translation> <numerusform>×××××§ ×ת ××§×××¥ ×× ××ר?</numerusform> <numerusform>×××××§ ×ת ××§×צ×× ×× ××ר××?</numerusform> + <numerusform>×××××§ ×ת ××§×צ×× ×× ××ר××?</numerusform> + <numerusform>×××××§ ×ת ××§×צ×× ×× ××ר××?</numerusform> </translation> </message> <message numerus="yes"> @@ -809,6 +813,8 @@ <translation> <numerusform>×××¢××ר ×ת ×פר×× ×× ××ר ××¤× ××שפ×?</numerusform> <numerusform>×××¢××ר ×ת ×פר×××× ×× ××ר×× ××¤× ××שפ×?</numerusform> + <numerusform>×××¢××ר ×ת ×פר×××× ×× ××ר×× ××¤× ××שפ×?</numerusform> + <numerusform>×××¢××ר ×ת ×פר×××× ×× ××ר×× ××¤× ××שפ×?</numerusform> </translation> </message> </context> @@ -961,6 +967,8 @@ <translation> <numerusform>×§×××¥ %Ln</numerusform> <numerusform>%Ln ×§×צ××</numerusform> + <numerusform>%Ln ×§×צ××</numerusform> + <numerusform>%Ln ×§×צ××</numerusform> </translation> </message> <message> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/translations/libfm-qt_kk.ts new/libfm-qt-1.2.1/src/translations/libfm-qt_kk.ts --- old/libfm-qt-1.2.0/src/translations/libfm-qt_kk.ts 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/translations/libfm-qt_kk.ts 2023-01-02 10:57:18.000000000 +0100 @@ -21,12 +21,12 @@ <message> <location filename="../app-chooser-dialog.ui" line="52"/> <source>Command line to execute:</source> - <translation type="unfinished"></translation> + <translation>ÐÑÑндалаÑÑн командалÑÒ Ð¶Ð¾Ð»:</translation> </message> <message> <location filename="../app-chooser-dialog.ui" line="62"/> <source>Application name:</source> - <translation type="unfinished"></translation> + <translation>Òолданба аÑаÑÑ:</translation> </message> <message> <location filename="../app-chooser-dialog.ui" line="72"/> @@ -37,22 +37,28 @@ <li><b>%u</b>: Represents a single URI of the file</li> <li><b>%U</b>: Represents multiple URIs</li> </ul></source> - <translation type="unfinished"></translation> + <translation><b>Ðұл аÑÐ½Ð°Ð¹Ñ ÐºÐ¾Ð´ÑÐ°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð°Ð»ÑÒ Ð¶Ð¾Ð»Ð´Ð° пайдаланÑлÑÑ Ð¼Ò¯Ð¼ÐºÑн:</b> +<ul> +<li><b>%f</b>: ÐÑÑ Ñайл аÑаÑÑн бÑлдÑÑедÑ</li> +<li><b>%F</b>: ÐÑÑнеÑе Ñайл аÑаÑлаÑÑн бÑлдÑÑедÑ</li> +<li><b>%u</b>: ÐÑÑ Ñайл URI-Ñн бÑлдÑÑедÑ</li> +<li><b>%U</b>: ÐÑÑнеÑе URI-Ð´Ñ Ð±ÑлдÑÑедÑ</li> +</ul></translation> </message> <message> <location filename="../app-chooser-dialog.ui" line="91"/> <source>Keep terminal window open after command execution</source> - <translation type="unfinished"></translation> + <translation>Ðоманда оÑÑндалÒаннан кейÑн ÑеÑминал ÑеÑезеÑÑн аÑÑÒ Ò±ÑÑаÑ</translation> </message> <message> <location filename="../app-chooser-dialog.ui" line="98"/> <source>Execute in terminal emulator</source> - <translation type="unfinished"></translation> + <translation>ТеÑминал ÑмÑлÑÑоÑÑнда жөнелÑÑ</translation> </message> <message> <location filename="../app-chooser-dialog.ui" line="109"/> <source>Set selected application as default action of this file type</source> - <translation type="unfinished"></translation> + <translation>ТаңдалÒан ÒÐ¾Ð»Ð´Ð°Ð½Ð±Ð°Ð½Ñ Ð¾ÑÑ Ñайл ÑÒ¯ÑÑнÑÒ£ ÓÐ´ÐµÐ¿ÐºÑ ÓÑекеÑÑ ÑеÑÑнде оÑнаÑÑ</translation> </message> </context> <context> @@ -60,27 +66,27 @@ <message> <location filename="../edit-bookmarks.ui" line="14"/> <source>Edit Bookmarks</source> - <translation type="unfinished"></translation> + <translation>ÐеÑбелгÑлеÑÐ´Ñ ÑүзеÑÑ</translation> </message> <message> <location filename="../edit-bookmarks.ui" line="42"/> <source>Name</source> - <translation type="unfinished"></translation> + <translation>ÐÑаÑÑ</translation> </message> <message> <location filename="../edit-bookmarks.ui" line="47"/> <source>Location</source> - <translation type="unfinished"></translation> + <translation>ÐÑналаÑÑÑ</translation> </message> <message> <location filename="../edit-bookmarks.ui" line="67"/> <source>&Add Item</source> - <translation type="unfinished"></translation> + <translation>ÐÓÑÑÐµÐ½Ñ Ò&оÑÑ</translation> </message> <message> <location filename="../edit-bookmarks.ui" line="77"/> <source>&Remove Item</source> - <translation type="unfinished"></translation> + <translation>ÐÓÑÑÐµÐ½Ñ Ó©ÑÑ&ÑÑ</translation> </message> <message> <location filename="../edit-bookmarks.ui" line="102"/> @@ -93,27 +99,27 @@ <message> <location filename="../exec-file.ui" line="14"/> <source>Execute file</source> - <translation type="unfinished"></translation> + <translation>Ð¤Ð°Ð¹Ð»Ð´Ñ Ð¾ÑÑндаÑ</translation> </message> <message> <location filename="../exec-file.ui" line="39"/> <source>&Open</source> - <translation type="unfinished"></translation> + <translation>&ÐÑÑ</translation> </message> <message> <location filename="../exec-file.ui" line="52"/> <source>E&xecute</source> - <translation type="unfinished"></translation> + <translation>&ÐÑÑндаÑ</translation> </message> <message> <location filename="../exec-file.ui" line="62"/> <source>Execute in &Terminal</source> - <translation type="unfinished"></translation> + <translation>&ТеÑминалда оÑÑндаÑ</translation> </message> <message> <location filename="../exec-file.ui" line="85"/> <source>Cancel</source> - <translation type="unfinished"></translation> + <translation>ÐÐ°Ñ ÑаÑÑÑ</translation> </message> <message> <location filename="../exec-file.ui" line="99"/> @@ -126,17 +132,17 @@ <message> <location filename="../filedialog.ui" line="22"/> <source>Path:</source> - <translation type="unfinished"></translation> + <translation>ÐÑнÑ:</translation> </message> <message> <location filename="../filedialog.ui" line="65"/> <source>File name:</source> - <translation type="unfinished"></translation> + <translation>Файл аÑаÑÑ:</translation> </message> <message> <location filename="../filedialog.ui" line="75"/> <source>File type:</source> - <translation type="unfinished"></translation> + <translation>Файл ÑÒ¯ÑÑ:</translation> </message> </context> <context> @@ -144,17 +150,17 @@ <message> <location filename="../file-operation-dialog.ui" line="32"/> <source>Destination:</source> - <translation type="unfinished"></translation> + <translation>ÐаÒÑаÑÑ:</translation> </message> <message> <location filename="../file-operation-dialog.ui" line="55"/> <source>Processing:</source> - <translation type="unfinished"></translation> + <translation>ӨңдеÑ:</translation> </message> <message> <location filename="../file-operation-dialog.ui" line="68"/> <source>Preparing...</source> - <translation type="unfinished"></translation> + <translation>ÐайÑндаÑ...</translation> </message> <message> <location filename="../file-operation-dialog.ui" line="75"/> @@ -896,29 +902,29 @@ <message> <location filename="../filepropsdialog.cpp" line="167"/> <source>Read</source> - <translation type="unfinished"></translation> + <translation>ÐÒÑ</translation> </message> <message> <location filename="../filepropsdialog.cpp" line="168"/> <source>Read and write</source> - <translation type="unfinished"></translation> + <translation>ÐÒÑ Ð¶Óне жазÑ</translation> </message> <message> <location filename="../filepropsdialog.cpp" line="170"/> <source>Forbidden</source> - <translation type="unfinished"></translation> + <translation>ТÑйÑм ÑалÑнÒан</translation> </message> <message> <location filename="../filepropsdialog.cpp" line="287"/> <source>Files of different types</source> - <translation type="unfinished"></translation> + <translation>ÓÑ ÑÒ¯ÑÐ»Ñ ÑÒ¯ÑÐ´ÐµÐ³Ñ ÑайлдаÑ</translation> </message> <message> <location filename="../filepropsdialog.cpp" line="310"/> <location filename="../filepropsdialog.cpp" line="317"/> <location filename="../filepropsdialog.cpp" line="324"/> <source>N/A</source> - <translation type="unfinished"></translation> + <translation>---</translation> </message> <message> <location filename="../filepropsdialog.cpp" line="328"/> @@ -991,7 +997,7 @@ <message> <location filename="../filesearchdialog.cpp" line="159"/> <source>Select a folder</source> - <translation type="unfinished"></translation> + <translation>ÐÑÐ¼Ð°Ð½Ñ ÑаңдаÑ</translation> </message> </context> <context> @@ -1012,7 +1018,7 @@ <message> <location filename="../foldermenu.cpp" line="57"/> <source>Empty Trash</source> - <translation type="unfinished"></translation> + <translation>ÒоÒÑÑ ÑелегÑн ÑазаÑÑÑ</translation> </message> <message> <location filename="../foldermenu.cpp" line="69"/> @@ -1155,32 +1161,32 @@ <message> <location filename="../foldermodel.cpp" line="321"/> <source>Created:</source> - <translation type="unfinished"></translation> + <translation>ÐаÑалÒан:</translation> </message> <message> <location filename="../foldermodel.cpp" line="326"/> <source>Owner:</source> - <translation type="unfinished"></translation> + <translation>ÐеÑÑ:</translation> </message> <message> <location filename="../foldermodel.cpp" line="327"/> <source>Group:</source> - <translation type="unfinished"></translation> + <translation>Топ:</translation> </message> <message> <location filename="../foldermodel.cpp" line="394"/> <source>Name</source> - <translation type="unfinished"></translation> + <translation>ÐÑÑ</translation> </message> <message> <location filename="../foldermodel.cpp" line="397"/> <source>Type</source> - <translation type="unfinished"></translation> + <translation>ТүÑÑ</translation> </message> <message> <location filename="../foldermodel.cpp" line="400"/> <source>Size</source> - <translation type="unfinished"></translation> + <translation>ӨлÑемÑ</translation> </message> <message> <location filename="../foldermodel.cpp" line="403"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/translations/libfm-qt_pt_BR.ts new/libfm-qt-1.2.1/src/translations/libfm-qt_pt_BR.ts --- old/libfm-qt-1.2.0/src/translations/libfm-qt_pt_BR.ts 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/translations/libfm-qt_pt_BR.ts 2023-01-02 10:57:18.000000000 +0100 @@ -124,7 +124,7 @@ <message> <location filename="../exec-file.ui" line="99"/> <source>Remember for next files of this kind</source> - <translation type="unfinished"></translation> + <translation>Lembrar os próximos arquivos desse tipo</translation> </message> </context> <context> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/translations/libfm-qt_sk.ts new/libfm-qt-1.2.1/src/translations/libfm-qt_sk.ts --- old/libfm-qt-1.2.0/src/translations/libfm-qt_sk.ts 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/translations/libfm-qt_sk.ts 2023-01-02 10:57:18.000000000 +0100 @@ -124,7 +124,7 @@ <message> <location filename="../exec-file.ui" line="99"/> <source>Remember for next files of this kind</source> - <translation type="unfinished"></translation> + <translation>PoužiÅ¥ pre vÅ¡etky súbory tohoto typu</translation> </message> </context> <context> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/translations/libfm-qt_tr.ts new/libfm-qt-1.2.1/src/translations/libfm-qt_tr.ts --- old/libfm-qt-1.2.0/src/translations/libfm-qt_tr.ts 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/translations/libfm-qt_tr.ts 2023-01-02 10:57:18.000000000 +0100 @@ -674,6 +674,7 @@ <source>Do you want to open these %1 files?</source> <translation> <numerusform>Bu %1 dosyasını açmak istiyor musunuz?</numerusform> + <numerusform>Bu %1 dosyalarını açmak istiyor musunuz?</numerusform> </translation> </message> <message> @@ -799,6 +800,7 @@ <source>Do you want to delete the selected file(s)?</source> <translation> <numerusform>Seçilen dosyayı silmek istiyor musunuz?</numerusform> + <numerusform>Seçilen dosyaları silmek istiyor musunuz?</numerusform> </translation> </message> <message numerus="yes"> @@ -806,6 +808,7 @@ <source>Do you want to move the selected file(s) to trash can?</source> <translation> <numerusform>Seçilen dosyayı çöp kutusuna taÅımak istiyor musunuz?</numerusform> + <numerusform>Seçilen dosyaları çöp kutusuna taÅımak istiyor musunuz?</numerusform> </translation> </message> </context> @@ -957,6 +960,7 @@ <source>%Ln files</source> <translation> <numerusform>%Ln dosyası</numerusform> + <numerusform>%Ln dosyalar</numerusform> </translation> </message> <message> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/translations/libfm-qt_zh_CN.ts new/libfm-qt-1.2.1/src/translations/libfm-qt_zh_CN.ts --- old/libfm-qt-1.2.0/src/translations/libfm-qt_zh_CN.ts 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/translations/libfm-qt_zh_CN.ts 2023-01-02 10:57:18.000000000 +0100 @@ -124,7 +124,7 @@ <message> <location filename="../exec-file.ui" line="99"/> <source>Remember for next files of this kind</source> - <translation type="unfinished"></translation> + <translation>è®°ä½å¹¶åºç¨äºå ¶ä»ç¸åç±»åçæä»¶</translation> </message> </context> <context> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfm-qt-1.2.0/src/utilities.cpp new/libfm-qt-1.2.1/src/utilities.cpp --- old/libfm-qt-1.2.0/src/utilities.cpp 2022-11-05 08:59:28.000000000 +0100 +++ new/libfm-qt-1.2.1/src/utilities.cpp 2023-01-02 10:57:18.000000000 +0100 @@ -70,6 +70,9 @@ void pasteFilesFromClipboard(const Fm::FilePath& destPath, QWidget* parent) { QClipboard* clipboard = QApplication::clipboard(); const QMimeData* data = clipboard->mimeData(); + if(data == nullptr) { + return; // possible under Wayland + } Fm::FilePathList paths; bool isCut = false;