Add open with dialog

This commit is contained in:
reionwong 2021-07-29 17:38:47 +08:00
parent 8f9b973b2d
commit a57f67cba2
12 changed files with 636 additions and 201 deletions

View file

@ -28,6 +28,7 @@ add_executable(cutefish-filemanager
dialogs/createfolderdialog.cpp dialogs/createfolderdialog.cpp
dialogs/filepropertiesdialog.cpp dialogs/filepropertiesdialog.cpp
dialogs/openwithdialog.cpp
widgets/rubberband.cpp widgets/rubberband.cpp
widgets/itemviewadapter.cpp widgets/itemviewadapter.cpp

View file

@ -0,0 +1,45 @@
/*
* Copyright (C) 2021 CutefishOS Team.
*
* Author: Reion Wong <reionwong@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "openwithdialog.h"
#include "../mimetype/mimeappmanager.h"
#include "../helper/filelauncher.h"
#include <QQmlEngine>
#include <QQmlContext>
OpenWithDialog::OpenWithDialog(const QUrl &url, QQuickView *parent)
: QQuickView(parent)
, m_url(url.toLocalFile())
{
setFlag(Qt::Dialog);
setTitle(tr("Open With"));
setResizeMode(QQuickView::SizeViewToRootObject);
engine()->rootContext()->setContextProperty("main", this);
engine()->rootContext()->setContextProperty("mimeAppManager", MimeAppManager::self());
engine()->rootContext()->setContextProperty("launcher", FileLauncher::self());
setSource(QUrl("qrc:/qml/Dialogs/OpenWithDialog.qml"));
}
QString OpenWithDialog::url() const
{
return m_url;
}

39
dialogs/openwithdialog.h Normal file
View file

@ -0,0 +1,39 @@
/*
* Copyright (C) 2021 CutefishOS Team.
*
* Author: Reion Wong <reionwong@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPENWITHDIALOG_H
#define OPENWITHDIALOG_H
#include <QQuickView>
class OpenWithDialog : public QQuickView
{
Q_OBJECT
Q_PROPERTY(QString url READ url CONSTANT)
public:
explicit OpenWithDialog(const QUrl &url, QQuickView *parent = nullptr);
QString url() const;
private:
QString m_url;
};
#endif // OPENWITHDIALOG_H

View file

@ -268,6 +268,8 @@ QString MimeAppManager::getDefaultAppDesktopByMimeType(const QString &mimeType)
bool MimeAppManager::setDefaultAppForType(const QString &mimeType, const QString &app) bool MimeAppManager::setDefaultAppForType(const QString &mimeType, const QString &app)
{ {
Q_UNUSED(mimeType);
// ref: https://specifications.freedesktop.org/mime-apps-spec/1.0.1/ar01s03.html // ref: https://specifications.freedesktop.org/mime-apps-spec/1.0.1/ar01s03.html
QString mimeappsFile = mimeAppsListFilePath(); QString mimeappsFile = mimeAppsListFilePath();
@ -397,11 +399,11 @@ QVariantList MimeAppManager::recommendedApps(const QUrl &url)
for (const QString &path : getRecommendedAppsByFilePath(filePath)) { for (const QString &path : getRecommendedAppsByFilePath(filePath)) {
XdgDesktopFile desktop(path); XdgDesktopFile desktop(path);
if (desktop.valid()) if (!desktop.valid())
continue; continue;
QVariantMap item; QVariantMap item;
item["icon"] = desktop.value("IconName").toString(); item["icon"] = desktop.value("Icon").toString();
item["name"] = desktop.localeName(); item["name"] = desktop.localeName();
item["desktopFile"] = path; item["desktopFile"] = path;

View file

@ -94,15 +94,20 @@ bool XdgDesktopFile::save()
return true; return true;
} }
QStringList XdgDesktopFile::keys() const
{
return m_items.keys();
}
QString XdgDesktopFile::localeName() const QString XdgDesktopFile::localeName() const
{ {
QString localeKey = QString("Name[%1]").arg(QLocale::system().name()); QString localeKey = QString("Name[%1]").arg(QLocale::system().name());
if (m_items.contains(localeKey)) { if (m_items.contains(localeKey)) {
return m_items[localeKey].toString(); return XdgDesktopFile::value("Name").toString();
} }
return m_items["Name"].toString(); return XdgDesktopFile::value("Name").toString();
} }
QString XdgDesktopFile::prefix() const QString XdgDesktopFile::prefix() const

View file

@ -37,8 +37,9 @@ public:
bool load(); bool load();
bool save(); bool save();
QString localeName() const; QStringList keys() const;
QString localeName() const;
QString prefix() const; QString prefix() const;
private: private:

View file

@ -27,6 +27,7 @@
#include "../dialogs/filepropertiesdialog.h" #include "../dialogs/filepropertiesdialog.h"
#include "../dialogs/createfolderdialog.h" #include "../dialogs/createfolderdialog.h"
#include "../dialogs/openwithdialog.h"
#include "../helper/datehelper.h" #include "../helper/datehelper.h"
#include "../helper/filelauncher.h" #include "../helper/filelauncher.h"
@ -754,6 +755,17 @@ void FolderModel::openSelected()
} }
} }
void FolderModel::showOpenWithDialog()
{
if (!m_selectionModel->hasSelection())
return;
const QList<QUrl> urls = selectedUrls();
OpenWithDialog *dlg = new OpenWithDialog(urls.first());
dlg->show();
}
void FolderModel::deleteSelected() void FolderModel::deleteSelected()
{ {
if (!m_selectionModel->hasSelection()) { if (!m_selectionModel->hasSelection()) {
@ -899,6 +911,7 @@ void FolderModel::openContextMenu(QQuickItem *visualParent, Qt::KeyboardModifier
} else { } else {
// Open the items menu. // Open the items menu.
menu->addAction(m_actionCollection.action("open")); menu->addAction(m_actionCollection.action("open"));
menu->addAction(m_actionCollection.action("openWith"));
menu->addAction(m_actionCollection.action("cut")); menu->addAction(m_actionCollection.action("cut"));
menu->addAction(m_actionCollection.action("copy")); menu->addAction(m_actionCollection.action("copy"));
menu->addAction(m_actionCollection.action("trash")); menu->addAction(m_actionCollection.action("trash"));
@ -1094,6 +1107,9 @@ void FolderModel::createActions()
QAction *open = new QAction(tr("Open"), this); QAction *open = new QAction(tr("Open"), this);
connect(open, &QAction::triggered, this, &FolderModel::openSelected); connect(open, &QAction::triggered, this, &FolderModel::openSelected);
QAction *openWith = new QAction(tr("Open with"), this);
connect(openWith, &QAction::triggered, this, &FolderModel::showOpenWithDialog);
QAction *cut = new QAction(tr("Cut"), this); QAction *cut = new QAction(tr("Cut"), this);
connect(cut, &QAction::triggered, this, &FolderModel::cut); connect(cut, &QAction::triggered, this, &FolderModel::cut);
@ -1131,6 +1147,7 @@ void FolderModel::createActions()
QObject::connect(changeBackground, &QAction::triggered, this, &FolderModel::openChangeWallpaperDialog); QObject::connect(changeBackground, &QAction::triggered, this, &FolderModel::openChangeWallpaperDialog);
m_actionCollection.addAction(QStringLiteral("open"), open); m_actionCollection.addAction(QStringLiteral("open"), open);
m_actionCollection.addAction(QStringLiteral("openWith"), openWith);
m_actionCollection.addAction(QStringLiteral("cut"), cut); m_actionCollection.addAction(QStringLiteral("cut"), cut);
m_actionCollection.addAction(QStringLiteral("copy"), copy); m_actionCollection.addAction(QStringLiteral("copy"), copy);
m_actionCollection.addAction(QStringLiteral("paste"), paste); m_actionCollection.addAction(QStringLiteral("paste"), paste);
@ -1179,6 +1196,10 @@ void FolderModel::updateActions()
} }
} }
if (QAction *openWith = m_actionCollection.action(QStringLiteral("openWith"))) {
openWith->setVisible(items.count() == 1);
}
if (QAction *newFolder = m_actionCollection.action(QStringLiteral("newFolder"))) { if (QAction *newFolder = m_actionCollection.action(QStringLiteral("newFolder"))) {
newFolder->setVisible(!isTrash); newFolder->setVisible(!isTrash);
newFolder->setEnabled(rootItem().isWritable()); newFolder->setEnabled(rootItem().isWritable());

View file

@ -164,6 +164,7 @@ public:
Q_INVOKABLE void paste(); Q_INVOKABLE void paste();
Q_INVOKABLE void cut(); Q_INVOKABLE void cut();
Q_INVOKABLE void openSelected(); Q_INVOKABLE void openSelected();
Q_INVOKABLE void showOpenWithDialog();
Q_INVOKABLE void deleteSelected(); Q_INVOKABLE void deleteSelected();
Q_INVOKABLE void moveSelectedToTrash(); Q_INVOKABLE void moveSelectedToTrash();
Q_INVOKABLE void emptyTrash(); Q_INVOKABLE void emptyTrash();

View file

@ -57,5 +57,6 @@
<file>images/dark/user-trash.svg</file> <file>images/dark/user-trash.svg</file>
<file>images/dark/drive-optical.svg</file> <file>images/dark/drive-optical.svg</file>
<file>images/light/drive-optical.svg</file> <file>images/light/drive-optical.svg</file>
<file>qml/Dialogs/OpenWithDialog.qml</file>
</qresource> </qresource>
</RCC> </RCC>

View file

@ -0,0 +1,167 @@
/*
* Copyright (C) 2021 CutefishOS Team.
*
* Author: Reion Wong <reionwong@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.12
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import FishUI 1.0 as FishUI
Item {
id: control
property string url: main.url
width: 320 + FishUI.Units.largeSpacing * 2
height: _mainLayout.implicitHeight + FishUI.Units.largeSpacing * 2
Rectangle {
anchors.fill: parent
color: FishUI.Theme.secondBackgroundColor
}
Component.onCompleted: {
var items = mimeAppManager.recommendedApps(control.url)
for (var i in items) {
listView.model.append(items[i])
}
defaultCheckBox.checked = false
doneButton.focus = true
}
Keys.enabled: true
Keys.onEscapePressed: main.close()
ColumnLayout {
id: _mainLayout
anchors.fill: parent
anchors.margins: FishUI.Units.largeSpacing
spacing: FishUI.Units.largeSpacing * 2
ListView {
id: listView
Layout.fillWidth: true
Layout.preferredHeight: 200
model: ListModel {}
clip: true
spacing: FishUI.Units.largeSpacing
ScrollBar.vertical: ScrollBar {}
Label {
anchors.centerIn: parent
text: qsTr("No applications")
visible: listView.count === 0
}
delegate: Item {
id: item
width: ListView.view.width
height: 45
scale: mouseArea.pressed ? 0.95 : 1.0
Behavior on scale {
NumberAnimation {
duration: 100
}
}
property bool isSelected: listView.currentIndex === index
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: {
listView.currentIndex = index
}
}
Rectangle {
anchors.fill: parent
radius: FishUI.Theme.bigRadius
color: isSelected ? FishUI.Theme.highlightColor
: mouseArea.containsMouse ? Qt.rgba(FishUI.Theme.textColor.r,
FishUI.Theme.textColor.g,
FishUI.Theme.textColor.b,
0.1) : "transparent"
smooth: true
}
RowLayout {
anchors.fill: parent
anchors.margins: FishUI.Units.smallSpacing
spacing: FishUI.Units.largeSpacing
Image {
id: icon
source: "image://icontheme/" + model.icon
width: item.height * 0.7
height: width
sourceSize: Qt.size(width, height)
Layout.alignment: Qt.AlignLeft
}
Label {
text: model.name
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeft
color: isSelected ? FishUI.Theme.highlightedTextColor : FishUI.Theme.textColor
}
}
}
}
CheckBox {
id: defaultCheckBox
focusPolicy: Qt.NoFocus
text: qsTr("Set as default")
enabled: listView.count >= 1
padding: 0
}
RowLayout {
spacing: FishUI.Units.largeSpacing
Button {
text: qsTr("Cancel")
Layout.fillWidth: true
onClicked: main.close()
}
Button {
id: doneButton
focus: true
flat: true
text: qsTr("Open")
Layout.fillWidth: true
onClicked: {
if (defaultCheckBox.checked)
mimeAppManager.setDefaultAppForFile(control.url, listView.model.get(listView.currentIndex).desktopFile)
launcher.launchApp(listView.model.get(listView.currentIndex).desktopFile, control.url)
main.close()
}
}
}
}
}

View file

@ -14,12 +14,12 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/CreateFolderDialog.qml" line="70"/> <location filename="../qml/Dialogs/CreateFolderDialog.qml" line="79"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/CreateFolderDialog.qml" line="76"/> <location filename="../qml/Dialogs/CreateFolderDialog.qml" line="85"/>
<source>OK</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -94,84 +94,102 @@
</message> </message>
</context> </context>
<context> <context>
<name>FolderModel</name> <name>FilePropertiesDialog</name>
<message> <message>
<location filename="../model/foldermodel.cpp" line="166"/> <location filename="../dialogs/filepropertiesdialog.cpp" line="178"/>
<source>%1 item</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="166"/>
<source>%1 items</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="830"/>
<source>Select All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1042"/>
<source>Open</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1045"/>
<source>Cut</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1048"/>
<source>Copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1051"/>
<source>Paste</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1054"/>
<source>New Folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1057"/>
<source>Move To Trash</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1060"/>
<source>Empty Trash</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1063"/>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1066"/>
<source>Rename</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1069"/>
<source>Open in Terminal</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1072"/>
<source>Set as Wallpaper</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1075"/>
<source>Properties</source> <source>Properties</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../model/foldermodel.cpp" line="1078"/> <location filename="../dialogs/filepropertiesdialog.cpp" line="226"/>
<source>%1 files</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FolderModel</name>
<message>
<location filename="../model/foldermodel.cpp" line="168"/>
<source>%1 item</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="168"/>
<source>%1 items</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="892"/>
<source>Select All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1107"/>
<source>Open</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1110"/>
<source>Open with</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1113"/>
<source>Cut</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1116"/>
<source>Copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1119"/>
<source>Paste</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1122"/>
<source>New Folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1125"/>
<source>Move To Trash</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1128"/>
<source>Empty Trash</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1131"/>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1134"/>
<source>Rename</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1137"/>
<source>Open in Terminal</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1140"/>
<source>Set as Wallpaper</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1143"/>
<source>Properties</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1146"/>
<source>Change background</source> <source>Change background</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -179,41 +197,105 @@
<context> <context>
<name>FolderPage</name> <name>FolderPage</name>
<message> <message>
<location filename="../qml/FolderPage.qml" line="54"/> <location filename="../qml/FolderPage.qml" line="117"/>
<source>Empty folder</source> <source>Empty folder</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/FolderPage.qml" line="85"/> <location filename="../qml/FolderPage.qml" line="148"/>
<source>Open</source> <source>Open</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/FolderPage.qml" line="90"/> <location filename="../qml/FolderPage.qml" line="60"/>
<location filename="../qml/FolderPage.qml" line="153"/>
<source>Properties</source> <source>Properties</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/FolderPage.qml" line="146"/> <location filename="../qml/FolderPage.qml" line="50"/>
<source>File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="53"/>
<source>New Folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="67"/>
<source>Quit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="73"/>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="76"/>
<source>Select All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="82"/>
<source>Help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="85"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="215"/>
<source>%1 item</source> <source>%1 item</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/FolderPage.qml" line="147"/> <location filename="../qml/FolderPage.qml" line="216"/>
<source>%1 items</source> <source>%1 items</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/FolderPage.qml" line="153"/> <location filename="../qml/FolderPage.qml" line="222"/>
<source>%1 selected</source> <source>%1 selected</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/FolderPage.qml" line="164"/> <location filename="../qml/FolderPage.qml" line="233"/>
<source>Empty Trash</source> <source>Empty Trash</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>OpenWithDialog</name>
<message>
<location filename="../qml/Dialogs/OpenWithDialog.qml" line="70"/>
<source>No applications</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/Dialogs/OpenWithDialog.qml" line="136"/>
<source>Set as default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/Dialogs/OpenWithDialog.qml" line="145"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/Dialogs/OpenWithDialog.qml" line="154"/>
<source>Open</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dialogs/openwithdialog.cpp" line="32"/>
<source>Open With</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>OptionsMenu</name> <name>OptionsMenu</name>
<message> <message>
@ -288,60 +370,50 @@
<context> <context>
<name>PropertiesDialog</name> <name>PropertiesDialog</name>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="28"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="95"/>
<source>Properties</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="103"/>
<source>Type:</source> <source>Type:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="116"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="108"/>
<source>Location:</source> <source>Location:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="127"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="119"/>
<source>Size:</source> <source>Size:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="135"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="126"/>
<source>Calculating...</source> <source>Calculating...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="140"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="130"/>
<source>Created:</source> <source>Created:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="153"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="143"/>
<source>Modified:</source> <source>Modified:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="166"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="156"/>
<source>Accessed:</source> <source>Accessed:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="188"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="178"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="197"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="184"/>
<source>OK</source> <source>OK</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../dialogs/propertiesdialog.cpp" line="209"/>
<source>%1 files</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>main</name> <name>main</name>

View file

@ -14,12 +14,12 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/CreateFolderDialog.qml" line="70"/> <location filename="../qml/Dialogs/CreateFolderDialog.qml" line="79"/>
<source>Cancel</source> <source>Cancel</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/CreateFolderDialog.qml" line="76"/> <location filename="../qml/Dialogs/CreateFolderDialog.qml" line="85"/>
<source>OK</source> <source>OK</source>
<translation></translation> <translation></translation>
</message> </message>
@ -94,84 +94,102 @@
</message> </message>
</context> </context>
<context> <context>
<name>FolderModel</name> <name>FilePropertiesDialog</name>
<message> <message>
<location filename="../model/foldermodel.cpp" line="166"/> <location filename="../dialogs/filepropertiesdialog.cpp" line="178"/>
<source>%1 item</source>
<translation>%1 </translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="166"/>
<source>%1 items</source>
<translation>%1 </translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="830"/>
<source>Select All</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1042"/>
<source>Open</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1045"/>
<source>Cut</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1048"/>
<source>Copy</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1051"/>
<source>Paste</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1054"/>
<source>New Folder</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1057"/>
<source>Move To Trash</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1060"/>
<source>Empty Trash</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1063"/>
<source>Delete</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1066"/>
<source>Rename</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1069"/>
<source>Open in Terminal</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1072"/>
<source>Set as Wallpaper</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1075"/>
<source>Properties</source> <source>Properties</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../model/foldermodel.cpp" line="1078"/> <location filename="../dialogs/filepropertiesdialog.cpp" line="226"/>
<source>%1 files</source>
<translation>%1 </translation>
</message>
</context>
<context>
<name>FolderModel</name>
<message>
<location filename="../model/foldermodel.cpp" line="168"/>
<source>%1 item</source>
<translation>%1 </translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="168"/>
<source>%1 items</source>
<translation>%1 </translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="892"/>
<source>Select All</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1107"/>
<source>Open</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1110"/>
<source>Open with</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1113"/>
<source>Cut</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1116"/>
<source>Copy</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1119"/>
<source>Paste</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1122"/>
<source>New Folder</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1125"/>
<source>Move To Trash</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1128"/>
<source>Empty Trash</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1131"/>
<source>Delete</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1134"/>
<source>Rename</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1137"/>
<source>Open in Terminal</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1140"/>
<source>Set as Wallpaper</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1143"/>
<source>Properties</source>
<translation></translation>
</message>
<message>
<location filename="../model/foldermodel.cpp" line="1146"/>
<source>Change background</source> <source>Change background</source>
<translation></translation> <translation></translation>
</message> </message>
@ -179,41 +197,105 @@
<context> <context>
<name>FolderPage</name> <name>FolderPage</name>
<message> <message>
<location filename="../qml/FolderPage.qml" line="54"/> <location filename="../qml/FolderPage.qml" line="117"/>
<source>Empty folder</source> <source>Empty folder</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../qml/FolderPage.qml" line="85"/> <location filename="../qml/FolderPage.qml" line="148"/>
<source>Open</source> <source>Open</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../qml/FolderPage.qml" line="90"/> <location filename="../qml/FolderPage.qml" line="60"/>
<location filename="../qml/FolderPage.qml" line="153"/>
<source>Properties</source> <source>Properties</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../qml/FolderPage.qml" line="146"/> <location filename="../qml/FolderPage.qml" line="50"/>
<source>File</source>
<translation></translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="53"/>
<source>New Folder</source>
<translation></translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="67"/>
<source>Quit</source>
<translation>退</translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="73"/>
<source>Edit</source>
<translation></translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="76"/>
<source>Select All</source>
<translation></translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="82"/>
<source>Help</source>
<translation></translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="85"/>
<source>About</source>
<translation></translation>
</message>
<message>
<location filename="../qml/FolderPage.qml" line="215"/>
<source>%1 item</source> <source>%1 item</source>
<translation>%1 </translation> <translation>%1 </translation>
</message> </message>
<message> <message>
<location filename="../qml/FolderPage.qml" line="147"/> <location filename="../qml/FolderPage.qml" line="216"/>
<source>%1 items</source> <source>%1 items</source>
<translation>%1 </translation> <translation>%1 </translation>
</message> </message>
<message> <message>
<location filename="../qml/FolderPage.qml" line="153"/> <location filename="../qml/FolderPage.qml" line="222"/>
<source>%1 selected</source> <source>%1 selected</source>
<translation> %1 </translation> <translation> %1 </translation>
</message> </message>
<message> <message>
<location filename="../qml/FolderPage.qml" line="164"/> <location filename="../qml/FolderPage.qml" line="233"/>
<source>Empty Trash</source> <source>Empty Trash</source>
<translation></translation> <translation></translation>
</message> </message>
</context> </context>
<context>
<name>OpenWithDialog</name>
<message>
<location filename="../qml/Dialogs/OpenWithDialog.qml" line="70"/>
<source>No applications</source>
<translation></translation>
</message>
<message>
<location filename="../qml/Dialogs/OpenWithDialog.qml" line="136"/>
<source>Set as default</source>
<translation></translation>
</message>
<message>
<location filename="../qml/Dialogs/OpenWithDialog.qml" line="145"/>
<source>Cancel</source>
<translation></translation>
</message>
<message>
<location filename="../qml/Dialogs/OpenWithDialog.qml" line="154"/>
<source>Open</source>
<translation></translation>
</message>
<message>
<location filename="../dialogs/openwithdialog.cpp" line="32"/>
<source>Open With</source>
<translation></translation>
</message>
</context>
<context> <context>
<name>OptionsMenu</name> <name>OptionsMenu</name>
<message> <message>
@ -288,59 +370,57 @@
<context> <context>
<name>PropertiesDialog</name> <name>PropertiesDialog</name>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="28"/>
<source>Properties</source> <source>Properties</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="103"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="95"/>
<source>Type:</source> <source>Type:</source>
<translation>:</translation> <translation>:</translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="116"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="108"/>
<source>Location:</source> <source>Location:</source>
<translation>:</translation> <translation>:</translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="127"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="119"/>
<source>Size:</source> <source>Size:</source>
<translation>:</translation> <translation>:</translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="135"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="126"/>
<source>Calculating...</source> <source>Calculating...</source>
<translation>...</translation> <translation>...</translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="140"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="130"/>
<source>Created:</source> <source>Created:</source>
<translation>:</translation> <translation>:</translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="153"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="143"/>
<source>Modified:</source> <source>Modified:</source>
<translation>:</translation> <translation>:</translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="166"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="156"/>
<source>Accessed:</source> <source>Accessed:</source>
<translation>访:</translation> <translation>访:</translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="188"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="178"/>
<source>Cancel</source> <source>Cancel</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../qml/Dialogs/PropertiesDialog.qml" line="197"/> <location filename="../qml/Dialogs/PropertiesDialog.qml" line="184"/>
<source>OK</source> <source>OK</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../dialogs/propertiesdialog.cpp" line="209"/>
<source>%1 files</source> <source>%1 files</source>
<translation>%1 </translation> <translation type="vanished">%1 </translation>
</message> </message>
</context> </context>
<context> <context>