diff options
author | Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> | 2020-04-25 14:18:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 14:18:10 +0300 |
commit | 061ca2d713a67a5e20c54ba4c064d50399780777 (patch) | |
tree | a28b6ee9831b2affc3842dd978ec691f6dd9c784 /shell_integration | |
parent | a482e3c83485b53152844f8ca1192c241cce9758 (diff) | |
parent | ddee26084dfd389a770ca500b82af7fba67d0192 (diff) |
Merge branch 'master' into menuaction
Diffstat (limited to 'shell_integration')
4 files changed, 12 insertions, 5 deletions
diff --git a/shell_integration/dolphin/ownclouddolphinactionplugin.cpp b/shell_integration/dolphin/ownclouddolphinactionplugin.cpp index c8f918586..4e5966e7f 100644 --- a/shell_integration/dolphin/ownclouddolphinactionplugin.cpp +++ b/shell_integration/dolphin/ownclouddolphinactionplugin.cpp @@ -90,8 +90,9 @@ public: delete menu; return {}; } - + menu->setTitle(helper->contextMenuTitle()); + menu->setIcon(QIcon::fromTheme(helper->contextMenuIconName())); return { menu->menuAction() }; } diff --git a/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp b/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp index 56300f4df..d89aa9174 100644 --- a/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp +++ b/shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp @@ -83,14 +83,16 @@ private: void slotCommandRecieved(const QByteArray &line) { QList<QByteArray> tokens = line.split(':'); - if (tokens.count() != 3) + if (tokens.count() < 3) return; if (tokens[0] != "STATUS" && tokens[0] != "BROADCAST") return; if (tokens[2].isEmpty()) return; - const QByteArray name = tokens[2]; + // We can't use tokens[2] because the filename might contain ':' + int secondColon = line.indexOf(":", line.indexOf(":") + 1); + const QByteArray name = line.mid(secondColon + 1); QByteArray &status = m_status[name]; // reference to the item in the hash if (status == tokens[1]) return; diff --git a/shell_integration/dolphin/ownclouddolphinpluginhelper.cpp b/shell_integration/dolphin/ownclouddolphinpluginhelper.cpp index 1bb10e6c5..59d2308e2 100644 --- a/shell_integration/dolphin/ownclouddolphinpluginhelper.cpp +++ b/shell_integration/dolphin/ownclouddolphinpluginhelper.cpp @@ -22,7 +22,6 @@ #include <QStandardPaths> #include <QFile> #include "ownclouddolphinpluginhelper.h" -#include "config.h" OwncloudDolphinPluginHelper* OwncloudDolphinPluginHelper::instance() { diff --git a/shell_integration/dolphin/ownclouddolphinpluginhelper.h b/shell_integration/dolphin/ownclouddolphinpluginhelper.h index 92d9fcdf8..f6659e417 100644 --- a/shell_integration/dolphin/ownclouddolphinpluginhelper.h +++ b/shell_integration/dolphin/ownclouddolphinpluginhelper.h @@ -23,6 +23,7 @@ #include <QLocalSocket> #include <QRegularExpression> #include "ownclouddolphinpluginhelper_export.h" +#include "config.h" class OWNCLOUDDOLPHINPLUGINHELPER_EXPORT OwncloudDolphinPluginHelper : public QObject { Q_OBJECT @@ -35,12 +36,16 @@ public: QString contextMenuTitle() const { - return _strings.value("CONTEXT_MENU_TITLE", "Nextcloud"); + return _strings.value("CONTEXT_MENU_TITLE", APPLICATION_NAME); } QString shareActionTitle() const { return _strings.value("SHARE_MENU_TITLE", "Share …"); } + QString contextMenuIconName() const + { + return _strings.value("CONTEXT_MENU_ICON", APPLICATION_ICON_NAME); + } QString copyPrivateLinkTitle() const { return _strings["COPY_PRIVATE_LINK_MENU_TITLE"]; } QString emailPrivateLinkTitle() const { return _strings["EMAIL_PRIVATE_LINK_MENU_TITLE"]; } |