From 45f538e07ba9fb5fefca8a234a2c9adea9dad82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CRobert?= Date: Thu, 18 May 2023 13:35:14 +0000 Subject: [PATCH 1/7] updated workflow - generates_locales.yml --- .github/workflows/generates_locales.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/generates_locales.yml b/.github/workflows/generates_locales.yml index 2c31b2ef5a31..f2ec543ccbcd 100644 --- a/.github/workflows/generates_locales.yml +++ b/.github/workflows/generates_locales.yml @@ -17,9 +17,9 @@ jobs: pre-build-command: pip install -r requirements.txt build-command: make gettext - uses: actions/checkout@v2 - - name: Commit report - run: | - git config --global user.name 'Nextcloud Bot' - git config --global user.email 'bot@nextcloud.com' - git commit -am "Updates catalog templates (POT files fetched automatically by transifex)" - git push \ No newline at end of file + - name: Commit report + run: | + git config --global user.name 'Nextcloud Bot' + git config --global user.email 'bot@nextcloud.com' + git commit -am "Updates catalog templates (POT files fetched automatically by transifex)" + git push \ No newline at end of file From f6ab69fadc5c0af29dcdb2ff57cf093f9ee48e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CRobert?= Date: Fri, 30 Jun 2023 08:23:59 +0000 Subject: [PATCH 2/7] Revert "updated workflow" This reverts commit 25eaf93bf16d26e69fd0a362854ef4ea890536a1. --- .github/workflows/generates_locales.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/generates_locales.yml b/.github/workflows/generates_locales.yml index f2ec543ccbcd..2c31b2ef5a31 100644 --- a/.github/workflows/generates_locales.yml +++ b/.github/workflows/generates_locales.yml @@ -17,9 +17,9 @@ jobs: pre-build-command: pip install -r requirements.txt build-command: make gettext - uses: actions/checkout@v2 - - name: Commit report - run: | - git config --global user.name 'Nextcloud Bot' - git config --global user.email 'bot@nextcloud.com' - git commit -am "Updates catalog templates (POT files fetched automatically by transifex)" - git push \ No newline at end of file + - name: Commit report + run: | + git config --global user.name 'Nextcloud Bot' + git config --global user.email 'bot@nextcloud.com' + git commit -am "Updates catalog templates (POT files fetched automatically by transifex)" + git push \ No newline at end of file From b8d41d5863658b68ab5eea6e547bd65d7f400456 Mon Sep 17 00:00:00 2001 From: TSI-pranalideshpande <110465779+TSI-pranalideshpande@users.noreply.github.com> Date: Tue, 13 Jun 2023 18:55:04 +0530 Subject: [PATCH 3/7] Nmc/2244-ActivityListModel --- src/gui/tray/activitylistmodel.cpp | 37 +++++++++++++++++++----------- src/gui/tray/activitylistmodel.h | 2 ++ theme.qrc.in | 4 ++++ theme/black/add-circle.svg | 7 ++++++ theme/black/delete.svg | 7 ++++++ theme/black/refresh.svg | 7 ++++++ 6 files changed, 50 insertions(+), 14 deletions(-) create mode 100644 theme/black/add-circle.svg create mode 100644 theme/black/delete.svg create mode 100644 theme/black/refresh.svg diff --git a/src/gui/tray/activitylistmodel.cpp b/src/gui/tray/activitylistmodel.cpp index c1cd0c2c41eb..ac554defb89c 100644 --- a/src/gui/tray/activitylistmodel.cpp +++ b/src/gui/tray/activitylistmodel.cpp @@ -229,16 +229,19 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const auto colorIconPath = role == DarkIconRole ? QStringLiteral("qrc:///client/theme/white/") : QStringLiteral("qrc:///client/theme/black/"); if (a._type == Activity::NotificationType && !a._talkNotificationData.userAvatar.isEmpty()) { return QStringLiteral("qrc:///client/theme/colored/talk-bordered.svg"); - } else if (a._type == Activity::SyncResultType) { + }else if(a._type == Activity::NotificationType){ + return QStringLiteral("qrc:///client/theme/black/bell.svg");//MagentaCustomizationV25 + } + else if (a._type == Activity::SyncResultType) { colorIconPath.append("state-error.svg"); - return colorIconPath; + return QStringLiteral("qrc:///client/theme/black/state-error.svg");//MagentaCustomizationV25 } else if (a._type == Activity::SyncFileItemType) { if (a._syncFileItemStatus == SyncFileItem::NormalError || a._syncFileItemStatus == SyncFileItem::FatalError || a._syncFileItemStatus == SyncFileItem::DetailError || a._syncFileItemStatus == SyncFileItem::BlacklistedError) { colorIconPath.append("state-error.svg"); - return colorIconPath; + return QStringLiteral("qrc:///client/theme/black/state-error.svg");//MagentaCustomizationV25 } else if (a._syncFileItemStatus == SyncFileItem::SoftError || a._syncFileItemStatus == SyncFileItem::Conflict || a._syncFileItemStatus == SyncFileItem::Restoration @@ -247,21 +250,23 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const || a._syncFileItemStatus == SyncFileItem::FileNameInvalidOnServer || a._syncFileItemStatus == SyncFileItem::FileNameClash) { colorIconPath.append("state-warning.svg"); - return colorIconPath; + return QStringLiteral("qrc:///client/theme/black/state-warning.svg");//MagentaCustomizationV25 } else if (a._syncFileItemStatus == SyncFileItem::FileIgnored) { colorIconPath.append("state-info.svg"); - return colorIconPath; + return QStringLiteral("qrc:///client/theme/black/state-info.svg");//MagentaCustomizationV25 } else { // File sync successful if (a._fileAction == "file_created") { - return a._previews.empty() ? QStringLiteral("qrc:///client/theme/colored/add.svg") - : QStringLiteral("qrc:///client/theme/colored/add-bordered.svg"); + return QStringLiteral("qrc:///client/theme/black/add-circle.svg");//MagentaCustomizationV25/*a._previews.empty() ? QStringLiteral("qrc:///client/theme/colored/add.svg") + // : QStringLiteral("qrc:///client/theme/colored/add-bordered.svg");*/ } else if (a._fileAction == "file_deleted") { - return a._previews.empty() ? QStringLiteral("qrc:///client/theme/colored/delete.svg") - : QStringLiteral("qrc:///client/theme/colored/delete-bordered.svg"); + return QStringLiteral("qrc:///client/theme/black/delete.svg");//MagentaCustomizationV25 + /*return a._previews.empty() ? QStringLiteral("qrc:///client/theme/colored/delete.svg") + : QStringLiteral("qrc:///client/theme/colored/delete-bordered.svg");*/ } else { - return a._previews.empty() ? colorIconPath % QStringLiteral("change.svg") - : QStringLiteral("qrc:///client/theme/colored/change-bordered.svg"); + return QStringLiteral("qrc:///client/theme/refresh.svg");//MagentaCustomizationV25 + /* return a._previews.empty() ? colorIconPath % QStringLiteral("change.svg") + : QStringLiteral("qrc:///client/theme/colored/change-bordered.svg");*/ } } } else { @@ -401,8 +406,11 @@ int ActivityListModel::rowCount(const QModelIndex &parent) const if(parent.isValid()) { return 0; } - - return _finalList.count(); + //MagentaCustomizationV25 + if(_finalList.count()theme/black/user.svg theme/white/add.svg theme/black/add.svg + theme/black/add-circle.svg theme/black/activity.svg theme/black/bell.svg theme/black/wizard-talk.svg theme/black/calendar.svg theme/black/deck.svg + theme/black/refresh.svg theme/black/state-info.svg + theme/lock.svg + theme/black/delete.svg theme/close.svg theme/black/close.svg theme/white/close.svg diff --git a/theme/black/add-circle.svg b/theme/black/add-circle.svg new file mode 100644 index 000000000000..c141d9eac8af --- /dev/null +++ b/theme/black/add-circle.svg @@ -0,0 +1,7 @@ + + + icon/action/circle-add/default@svg + + + + \ No newline at end of file diff --git a/theme/black/delete.svg b/theme/black/delete.svg new file mode 100644 index 000000000000..c9aa2edd4f24 --- /dev/null +++ b/theme/black/delete.svg @@ -0,0 +1,7 @@ + + + icon/action/remove/default@svg + + + + \ No newline at end of file diff --git a/theme/black/refresh.svg b/theme/black/refresh.svg new file mode 100644 index 000000000000..edded120148b --- /dev/null +++ b/theme/black/refresh.svg @@ -0,0 +1,7 @@ + + + icon/action/refresh/default@svg + + + + \ No newline at end of file From 3c4372637bcec725e1046c4c0f16777119ef5b2f Mon Sep 17 00:00:00 2001 From: TSI-pranalideshpande <110465779+TSI-pranalideshpande@users.noreply.github.com> Date: Wed, 14 Jun 2023 13:12:43 +0530 Subject: [PATCH 4/7] Resolve test case issue for limit of 30 activity list --- test/CMakeLists.txt | 2 +- test/testactivitylistmodel.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2dbb5a9b7f13..68351f75358c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -99,7 +99,7 @@ if (WIN32) ) nextcloud_add_test(SyncCfApi) - nextcloud_add_test(CfApiShellExtensionsIPC) + nextcloud_add_test(CfApiShellExtensionsIPC) target_sources(CfApiShellExtensionsIPCTest PRIVATE "${CMAKE_SOURCE_DIR}/src/libsync/vfs/cfapi/shellext/thumbnailprovideripc.cpp" "${CMAKE_SOURCE_DIR}/src/libsync/vfs/cfapi/shellext/customstateprovideripc.cpp" "${CMAKE_SOURCE_DIR}/src/libsync/vfs/cfapi/shellext/ipccommon.cpp") elseif(LINUX) # elseif(LINUX OR APPLE) nextcloud_add_test(SyncXAttr) diff --git a/test/testactivitylistmodel.cpp b/test/testactivitylistmodel.cpp index a98db6b6123c..5359d26cfe57 100644 --- a/test/testactivitylistmodel.cpp +++ b/test/testactivitylistmodel.cpp @@ -564,7 +564,7 @@ private slots: model->startFetchJob(); QSignalSpy activitiesJob(model.data(), &TestingALM::activitiesProcessed); QVERIFY(activitiesJob.wait(3000)); - QCOMPARE(model->rowCount(), 50); + QCOMPARE(model->rowCount(), 30); }; // Test receiving activity from local user action @@ -620,7 +620,7 @@ private slots: QSignalSpy activitiesJob(model.data(), &TestingALM::activitiesProcessed); QVERIFY(activitiesJob.wait(3000)); // Test the dummy was removed - QCOMPARE(model->rowCount(), 50); + QCOMPARE(model->rowCount(), 30); } // Test getting the data from the model @@ -632,19 +632,19 @@ private slots: model->startFetchJob(); QSignalSpy activitiesJob(model.data(), &TestingALM::activitiesProcessed); QVERIFY(activitiesJob.wait(3000)); - QCOMPARE(model->rowCount(), 50); + QCOMPARE(model->rowCount(), 30); model->addSyncFileItemToActivityList(testSyncFileItemActivity); - QCOMPARE(model->rowCount(), 51); + QCOMPARE(model->rowCount(), 30); model->addErrorToActivityList(testSyncResultErrorActivity, OCC::ActivityListModel::ErrorType::SyncError); - QCOMPARE(model->rowCount(), 52); + QCOMPARE(model->rowCount(), 30); model->addIgnoredFileToList(testFileIgnoredActivity); - QCOMPARE(model->rowCount(), 53); + QCOMPARE(model->rowCount(), 30); model->addNotificationToActivityList(testNotificationActivity); - QCOMPARE(model->rowCount(), 54); + QCOMPARE(model->rowCount(), 30); // Test all rows for things in common for (int i = 0; i < model->rowCount(); i++) { From d536b1799b70fcba8626bad742cd5cb0d005e074 Mon Sep 17 00:00:00 2001 From: TSI-pranalideshpande <110465779+TSI-pranalideshpande@users.noreply.github.com> Date: Wed, 5 Jul 2023 11:07:16 +0530 Subject: [PATCH 5/7] merge conflict resolved --- src/gui/tray/activitylistmodel.cpp | 36 +++++++++++++----------------- src/gui/tray/activitylistmodel.h | 4 ++-- theme/colored/talk-bordered.svg | 22 +++--------------- 3 files changed, 20 insertions(+), 42 deletions(-) diff --git a/src/gui/tray/activitylistmodel.cpp b/src/gui/tray/activitylistmodel.cpp index ac554defb89c..71f87c78e335 100644 --- a/src/gui/tray/activitylistmodel.cpp +++ b/src/gui/tray/activitylistmodel.cpp @@ -229,19 +229,16 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const auto colorIconPath = role == DarkIconRole ? QStringLiteral("qrc:///client/theme/white/") : QStringLiteral("qrc:///client/theme/black/"); if (a._type == Activity::NotificationType && !a._talkNotificationData.userAvatar.isEmpty()) { return QStringLiteral("qrc:///client/theme/colored/talk-bordered.svg"); - }else if(a._type == Activity::NotificationType){ - return QStringLiteral("qrc:///client/theme/black/bell.svg");//MagentaCustomizationV25 - } - else if (a._type == Activity::SyncResultType) { + } else if (a._type == Activity::SyncResultType) { colorIconPath.append("state-error.svg"); - return QStringLiteral("qrc:///client/theme/black/state-error.svg");//MagentaCustomizationV25 + return colorIconPath; } else if (a._type == Activity::SyncFileItemType) { if (a._syncFileItemStatus == SyncFileItem::NormalError || a._syncFileItemStatus == SyncFileItem::FatalError || a._syncFileItemStatus == SyncFileItem::DetailError || a._syncFileItemStatus == SyncFileItem::BlacklistedError) { colorIconPath.append("state-error.svg"); - return QStringLiteral("qrc:///client/theme/black/state-error.svg");//MagentaCustomizationV25 + return colorIconPath; } else if (a._syncFileItemStatus == SyncFileItem::SoftError || a._syncFileItemStatus == SyncFileItem::Conflict || a._syncFileItemStatus == SyncFileItem::Restoration @@ -250,23 +247,21 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const || a._syncFileItemStatus == SyncFileItem::FileNameInvalidOnServer || a._syncFileItemStatus == SyncFileItem::FileNameClash) { colorIconPath.append("state-warning.svg"); - return QStringLiteral("qrc:///client/theme/black/state-warning.svg");//MagentaCustomizationV25 + return colorIconPath; } else if (a._syncFileItemStatus == SyncFileItem::FileIgnored) { colorIconPath.append("state-info.svg"); - return QStringLiteral("qrc:///client/theme/black/state-info.svg");//MagentaCustomizationV25 + return colorIconPath; } else { // File sync successful if (a._fileAction == "file_created") { - return QStringLiteral("qrc:///client/theme/black/add-circle.svg");//MagentaCustomizationV25/*a._previews.empty() ? QStringLiteral("qrc:///client/theme/colored/add.svg") - // : QStringLiteral("qrc:///client/theme/colored/add-bordered.svg");*/ + return a._previews.empty() ? QStringLiteral("qrc:///client/theme/colored/add.svg") + : QStringLiteral("qrc:///client/theme/colored/add-bordered.svg"); } else if (a._fileAction == "file_deleted") { - return QStringLiteral("qrc:///client/theme/black/delete.svg");//MagentaCustomizationV25 - /*return a._previews.empty() ? QStringLiteral("qrc:///client/theme/colored/delete.svg") - : QStringLiteral("qrc:///client/theme/colored/delete-bordered.svg");*/ + return a._previews.empty() ? QStringLiteral("qrc:///client/theme/colored/delete.svg") + : QStringLiteral("qrc:///client/theme/colored/delete-bordered.svg"); } else { - return QStringLiteral("qrc:///client/theme/refresh.svg");//MagentaCustomizationV25 - /* return a._previews.empty() ? colorIconPath % QStringLiteral("change.svg") - : QStringLiteral("qrc:///client/theme/colored/change-bordered.svg");*/ + return a._previews.empty() ? colorIconPath % QStringLiteral("change.svg") + : QStringLiteral("qrc:///client/theme/colored/change-bordered.svg"); } } } else { @@ -408,9 +403,9 @@ int ActivityListModel::rowCount(const QModelIndex &parent) const } //MagentaCustomizationV25 if(_finalList.count() - - - - + + + \ No newline at end of file From d0990f96a08d07d77a13ee41de745fdadbb03948 Mon Sep 17 00:00:00 2001 From: TSI-pranalideshpande <110465779+TSI-pranalideshpande@users.noreply.github.com> Date: Mon, 10 Jul 2023 15:32:00 +0530 Subject: [PATCH 6/7] Blank space issue in activitylist resolved --- src/gui/tray/activitylistmodel.h | 2 +- src/gui/tray/sortedactivitylistmodel.cpp | 8 ++++++++ src/gui/tray/sortedactivitylistmodel.h | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gui/tray/activitylistmodel.h b/src/gui/tray/activitylistmodel.h index ef18d1c49cfc..ca2cce9f1c39 100644 --- a/src/gui/tray/activitylistmodel.h +++ b/src/gui/tray/activitylistmodel.h @@ -82,7 +82,7 @@ class ActivityListModel : public QAbstractListModel }; Q_ENUM(DataRole) - int maxVisibleActivities = 30; + static const int maxVisibleActivities = 30; enum class ErrorType { SyncError, diff --git a/src/gui/tray/sortedactivitylistmodel.cpp b/src/gui/tray/sortedactivitylistmodel.cpp index fcd58d1385c2..a7ec7b79c8e3 100644 --- a/src/gui/tray/sortedactivitylistmodel.cpp +++ b/src/gui/tray/sortedactivitylistmodel.cpp @@ -24,6 +24,14 @@ SortedActivityListModel::SortedActivityListModel(QObject *parent) sort(0, Qt::AscendingOrder); } +bool SortedActivityListModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const +{ + if ( sourceRow < 30) + return true; + + return false; +} + bool SortedActivityListModel::lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const { if (!sourceLeft.isValid() || !sourceRight.isValid()) { diff --git a/src/gui/tray/sortedactivitylistmodel.h b/src/gui/tray/sortedactivitylistmodel.h index faf490d434d8..922496072e19 100644 --- a/src/gui/tray/sortedactivitylistmodel.h +++ b/src/gui/tray/sortedactivitylistmodel.h @@ -26,6 +26,8 @@ class SortedActivityListModel : public QSortFilterProxyModel public: explicit SortedActivityListModel(QObject *parent = nullptr); + bool filterAcceptsRow(int sourceRow,const QModelIndex &sourceParent) const override; + protected: [[nodiscard]] bool lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const override; From 549e0f77c72c30b5bb8a0bee9ae6aae34b254305 Mon Sep 17 00:00:00 2001 From: TSI-pranalideshpande <110465779+TSI-pranalideshpande@users.noreply.github.com> Date: Mon, 10 Jul 2023 17:55:36 +0530 Subject: [PATCH 7/7] Changed icons for activity list --- src/gui/tray/activitylistmodel.cpp | 21 ++++++++------------- theme/black/state-info.svg | 2 +- theme/black/state-offline.svg | 21 ++++++++++++++++++++- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/gui/tray/activitylistmodel.cpp b/src/gui/tray/activitylistmodel.cpp index 71f87c78e335..3c6f574f5cd6 100644 --- a/src/gui/tray/activitylistmodel.cpp +++ b/src/gui/tray/activitylistmodel.cpp @@ -227,18 +227,17 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const const auto generateIconPath = [&]() { auto colorIconPath = role == DarkIconRole ? QStringLiteral("qrc:///client/theme/white/") : QStringLiteral("qrc:///client/theme/black/"); - if (a._type == Activity::NotificationType && !a._talkNotificationData.userAvatar.isEmpty()) { + if (a._type == Activity::NotificationType /*&& !a._talkNotificationData.userAvatar.isEmpty()*/) { return QStringLiteral("qrc:///client/theme/colored/talk-bordered.svg"); } else if (a._type == Activity::SyncResultType) { - colorIconPath.append("state-error.svg"); + return QStringLiteral("qrc:///client/theme/black/state-error.svg");//colorIconPath.append("state-error.svg"); return colorIconPath; } else if (a._type == Activity::SyncFileItemType) { if (a._syncFileItemStatus == SyncFileItem::NormalError || a._syncFileItemStatus == SyncFileItem::FatalError || a._syncFileItemStatus == SyncFileItem::DetailError || a._syncFileItemStatus == SyncFileItem::BlacklistedError) { - colorIconPath.append("state-error.svg"); - return colorIconPath; + return QStringLiteral("qrc:///client/theme/black/state-error.svg");//colorIconPath.append("state-error.svg"); } else if (a._syncFileItemStatus == SyncFileItem::SoftError || a._syncFileItemStatus == SyncFileItem::Conflict || a._syncFileItemStatus == SyncFileItem::Restoration @@ -246,22 +245,18 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const || a._syncFileItemStatus == SyncFileItem::FileNameInvalid || a._syncFileItemStatus == SyncFileItem::FileNameInvalidOnServer || a._syncFileItemStatus == SyncFileItem::FileNameClash) { - colorIconPath.append("state-warning.svg"); + return QStringLiteral("qrc:///client/theme/black/state-warning.svg");//colorIconPath.append("state-warning.svg"); return colorIconPath; } else if (a._syncFileItemStatus == SyncFileItem::FileIgnored) { - colorIconPath.append("state-info.svg"); - return colorIconPath; + return QStringLiteral("qrc:///client/theme/black/state-info.svg");// colorIconPath.append("state-info.svg"); } else { // File sync successful if (a._fileAction == "file_created") { - return a._previews.empty() ? QStringLiteral("qrc:///client/theme/colored/add.svg") - : QStringLiteral("qrc:///client/theme/colored/add-bordered.svg"); + return QStringLiteral("qrc:///client/theme/black/add-circle.svg"); } else if (a._fileAction == "file_deleted") { - return a._previews.empty() ? QStringLiteral("qrc:///client/theme/colored/delete.svg") - : QStringLiteral("qrc:///client/theme/colored/delete-bordered.svg"); + return QStringLiteral("qrc:///client/theme/black/delete.svg"); } else { - return a._previews.empty() ? colorIconPath % QStringLiteral("change.svg") - : QStringLiteral("qrc:///client/theme/colored/change-bordered.svg"); + return QStringLiteral("qrc:///client/theme/refresh.svg"); } } } else { diff --git a/theme/black/state-info.svg b/theme/black/state-info.svg index fb9f81505014..762de0370ff5 100644 --- a/theme/black/state-info.svg +++ b/theme/black/state-info.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/theme/black/state-offline.svg b/theme/black/state-offline.svg index a1336e59f460..39d94df4f13f 100644 --- a/theme/black/state-offline.svg +++ b/theme/black/state-offline.svg @@ -1 +1,20 @@ - + + + + + +