Compare commits
12 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 151fd37e54 | |||
| b7096177f4 | |||
| d568298e1c | |||
| ff6cda5fb7 | |||
| 35a30e9f59 | |||
| 8d8b9f7e10 | |||
| a4608cfdf8 | |||
| 4fbc067d4f | |||
| eb6ef657fc | |||
| e9433b8bec | |||
| 5f179e530f | |||
| c35f7f1448 |
@@ -1,8 +1,8 @@
|
||||
Index: seadrive-gui-2.0.24/CMakeLists.txt
|
||||
Index: seadrive-gui-3.0.13/CMakeLists.txt
|
||||
===================================================================
|
||||
--- seadrive-gui-2.0.24.orig/CMakeLists.txt
|
||||
+++ seadrive-gui-2.0.24/CMakeLists.txt
|
||||
@@ -128,7 +128,7 @@ ENDIF()
|
||||
--- seadrive-gui-3.0.13.orig/CMakeLists.txt
|
||||
+++ seadrive-gui-3.0.13/CMakeLists.txt
|
||||
@@ -85,7 +85,7 @@ ENDIF()
|
||||
###### BEGIN: QT configuration
|
||||
####################
|
||||
|
||||
@@ -11,7 +11,7 @@ Index: seadrive-gui-2.0.24/CMakeLists.txt
|
||||
EXECUTE_PROCESS(COMMAND
|
||||
bash -c "${qmake_executable} --version | grep -iE '^using qt version [0-9.]+' | awk '{print $4}'"
|
||||
OUTPUT_VARIABLE DETECTED_QT_VERSION
|
||||
@@ -136,7 +136,7 @@ EXECUTE_PROCESS(COMMAND
|
||||
@@ -93,7 +93,7 @@ EXECUTE_PROCESS(COMMAND
|
||||
MESSAGE("Qt version: ${DETECTED_QT_VERSION}")
|
||||
|
||||
EXECUTE_PROCESS(COMMAND
|
||||
|
||||
13
fix-return-value.patch
Normal file
13
fix-return-value.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
Index: seadrive-gui-3.0.16/src/ui/sync-errors-dialog.cpp
|
||||
===================================================================
|
||||
--- seadrive-gui-3.0.16.orig/src/ui/sync-errors-dialog.cpp
|
||||
+++ seadrive-gui-3.0.16/src/ui/sync-errors-dialog.cpp
|
||||
@@ -249,6 +249,8 @@ QString SyncErrorsTableView::findLocalPa
|
||||
}
|
||||
|
||||
return local_path;
|
||||
+#else
|
||||
+ return QString();
|
||||
#endif
|
||||
}
|
||||
|
||||
163
issue446.patch
Normal file
163
issue446.patch
Normal file
@@ -0,0 +1,163 @@
|
||||
From 9e6b66b173d7bac7853b8063c45f1429375c94b2 Mon Sep 17 00:00:00 2001
|
||||
From: yangheran <heran.yang@seafile.com>
|
||||
Date: Wed, 12 Feb 2025 09:33:43 +0800
|
||||
Subject: [PATCH 1/2] Support show number of pending files
|
||||
|
||||
---
|
||||
src/rpc/transfer-progress.cpp | 14 ++++++++++++++
|
||||
src/rpc/transfer-progress.h | 1 +
|
||||
src/ui/transfer-progress-dialog.cpp | 21 +++++++++++++++++++++
|
||||
src/ui/transfer-progress-dialog.h | 5 +++++
|
||||
4 files changed, 41 insertions(+)
|
||||
|
||||
diff --git a/src/rpc/transfer-progress.cpp b/src/rpc/transfer-progress.cpp
|
||||
index 277f394c1..826fbec3c 100644
|
||||
--- a/src/rpc/transfer-progress.cpp
|
||||
+++ b/src/rpc/transfer-progress.cpp
|
||||
@@ -50,6 +50,18 @@ void getTransferringListFromJSON(
|
||||
}
|
||||
}
|
||||
|
||||
+void getPendingFilesFromJSON(
|
||||
+ const json_t *json,
|
||||
+ int *total)
|
||||
+{
|
||||
+ QString json_object_name = "pending_files";
|
||||
+
|
||||
+ json_t* n_pending= json_object_get(
|
||||
+ json, json_object_name.toUtf8().data());
|
||||
+ if (n_pending)
|
||||
+ *total = json_integer_value (n_pending);
|
||||
+}
|
||||
+
|
||||
void getTransferredListFromJSON(
|
||||
const json_t *json, TransferType type,
|
||||
QList<TransferredInfo> *list)
|
||||
@@ -92,6 +104,8 @@ void TransferProgress::fromJSON(
|
||||
upload, UPLOAD, &transfer_progress.uploading_files);
|
||||
getTransferringListFromJSON(
|
||||
download, DOWNLOAD, &transfer_progress.downloading_files);
|
||||
+ getPendingFilesFromJSON(
|
||||
+ upload, &transfer_progress.n_pending_files);
|
||||
getTransferredListFromJSON(
|
||||
upload, UPLOAD, &transfer_progress.uploaded_files);
|
||||
getTransferredListFromJSON(
|
||||
diff --git a/src/rpc/transfer-progress.h b/src/rpc/transfer-progress.h
|
||||
index 136cea971..6bb77ba7c 100644
|
||||
--- a/src/rpc/transfer-progress.h
|
||||
+++ b/src/rpc/transfer-progress.h
|
||||
@@ -29,6 +29,7 @@ class TransferProgress {
|
||||
public:
|
||||
QList<TransferringInfo> uploading_files, downloading_files;
|
||||
QList<TransferredInfo> uploaded_files, downloaded_files;
|
||||
+ int n_pending_files;
|
||||
|
||||
static void fromJSON(const json_t *upload,
|
||||
const json_t *download,
|
||||
diff --git a/src/ui/transfer-progress-dialog.cpp b/src/ui/transfer-progress-dialog.cpp
|
||||
index 0540779c8..3dffed9ff 100644
|
||||
--- a/src/ui/transfer-progress-dialog.cpp
|
||||
+++ b/src/ui/transfer-progress-dialog.cpp
|
||||
@@ -97,6 +97,12 @@ TransferTab::TransferTab(TransferType type, QWidget *parent)
|
||||
QVBoxLayout* vlayout = new QVBoxLayout;
|
||||
createTable(type);
|
||||
vlayout->addWidget(table_);
|
||||
+#ifndef Q_OS_MAC
|
||||
+ if (type == UPLOAD) {
|
||||
+ QLabel *label = model_->totalFilesView();
|
||||
+ vlayout->addWidget(label);
|
||||
+ }
|
||||
+#endif
|
||||
setLayout(vlayout);
|
||||
adjustSize();
|
||||
}
|
||||
@@ -182,6 +188,9 @@ TransferItemsTableModel::TransferItemsTableModel(QObject* parent)
|
||||
name_column_width_(kNameColumnWidth),
|
||||
transfer_type_(UPLOAD)
|
||||
{
|
||||
+ total_files_view_ = new QLabel(tr("%1 files uploading or pending").arg(0));
|
||||
+ total_files_view_->setStyleSheet("color: red;");
|
||||
+ total_files_view_->setAlignment(Qt::AlignLeft);
|
||||
progress_timer_ = new QTimer(this);
|
||||
connect(progress_timer_, SIGNAL(timeout()),
|
||||
this, SLOT(updateTransferringInfo()));
|
||||
@@ -209,6 +218,7 @@ void TransferItemsTableModel::setTransferItems()
|
||||
beginResetModel();
|
||||
TransferProgress::fromJSON(upload.data(), download.data(), transfer_progress);
|
||||
transfer_progress_ = transfer_progress;
|
||||
+ updateTotalFilesView();
|
||||
endResetModel();
|
||||
}
|
||||
#endif
|
||||
@@ -485,6 +495,17 @@ bool TransferItemsTableModel::isTransferringRow(
|
||||
return row < transferring_size;
|
||||
}
|
||||
|
||||
+QLabel* TransferItemsTableModel::totalFilesView() const
|
||||
+{
|
||||
+ return total_files_view_;
|
||||
+}
|
||||
+
|
||||
+void TransferItemsTableModel::updateTotalFilesView() const
|
||||
+{
|
||||
+ int total_files = transfer_progress_.n_pending_files + transfer_progress_.uploading_files.size();
|
||||
+ total_files_view_->setText(tr("%1 files uploading or pending").arg(total_files));
|
||||
+}
|
||||
+
|
||||
void TransferItemsTableModel::setTransferType(TransferType type)
|
||||
{
|
||||
transfer_type_ = type;
|
||||
diff --git a/src/ui/transfer-progress-dialog.h b/src/ui/transfer-progress-dialog.h
|
||||
index eb8c8ba72..b33839c97 100644
|
||||
--- a/src/ui/transfer-progress-dialog.h
|
||||
+++ b/src/ui/transfer-progress-dialog.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <QHeaderView>
|
||||
#include <QTimer>
|
||||
#include <QTabWidget>
|
||||
+#include <QLabel>
|
||||
|
||||
#include "utils/json-utils.h"
|
||||
#include "rpc/transfer-progress.h"
|
||||
@@ -82,6 +83,8 @@ class TransferItemsTableModel : public QAbstractTableModel
|
||||
const TransferringInfo* itemAt(int row) const;
|
||||
uint nameColumnWidth() const;
|
||||
bool isTransferringRow(const QModelIndex& index) const;
|
||||
+ QLabel* totalFilesView() const;
|
||||
+ void updateTotalFilesView() const;
|
||||
|
||||
public slots:
|
||||
void onResize(const QSize& size);
|
||||
@@ -100,6 +103,8 @@ private slots:
|
||||
QTimer *progress_timer_;
|
||||
TransferType transfer_type_;
|
||||
TransferProgress transfer_progress_;
|
||||
+
|
||||
+ QLabel *total_files_view_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
From 87585d1663de616b27fadb1ec42e10b131d5e90b Mon Sep 17 00:00:00 2001
|
||||
From: Heran Yang <heran.yang@seafile.com>
|
||||
Date: Wed, 12 Feb 2025 12:10:08 +0800
|
||||
Subject: [PATCH 2/2] Init pending_files to 0
|
||||
|
||||
---
|
||||
src/rpc/transfer-progress.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/rpc/transfer-progress.h b/src/rpc/transfer-progress.h
|
||||
index 6bb77ba7c..38db513a0 100644
|
||||
--- a/src/rpc/transfer-progress.h
|
||||
+++ b/src/rpc/transfer-progress.h
|
||||
@@ -29,7 +29,7 @@ class TransferProgress {
|
||||
public:
|
||||
QList<TransferringInfo> uploading_files, downloading_files;
|
||||
QList<TransferredInfo> uploaded_files, downloaded_files;
|
||||
- int n_pending_files;
|
||||
+ int n_pending_files = 0;
|
||||
|
||||
static void fromJSON(const json_t *upload,
|
||||
const json_t *download,
|
||||
|
||||
68
issue477.patch
Normal file
68
issue477.patch
Normal file
@@ -0,0 +1,68 @@
|
||||
From 0bce5fe9722cf7f536eecb73c9f73ecbda5f3da8 Mon Sep 17 00:00:00 2001
|
||||
From: yangheran <heran.yang@seafile.com>
|
||||
Date: Wed, 24 Sep 2025 10:31:49 +0800
|
||||
Subject: [PATCH 1/2] Add handle uncache path
|
||||
|
||||
---
|
||||
src/ext-handler.cpp | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
|
||||
diff --git a/src/ext-handler.cpp b/src/ext-handler.cpp
|
||||
index 8260ff1b..a3dfa6f8 100644
|
||||
--- a/src/ext-handler.cpp
|
||||
+++ b/src/ext-handler.cpp
|
||||
@@ -808,6 +808,8 @@ void ExtCommandsHandler::run()
|
||||
} else if (cmd == "is-file-in-repo") {
|
||||
bool is_in_repo = handleIsFileInRepo(args);
|
||||
resp = is_in_repo ? "true" : "false";
|
||||
+ } else if (cmd == "uncache") {
|
||||
+ handleUnCachePath(args);
|
||||
}
|
||||
#ifdef Q_OS_WIN32
|
||||
else if (cmd == "get-thumbnail-from-server") {
|
||||
@@ -1234,6 +1236,22 @@ bool ExtCommandsHandler::isFileInRepo(const QString &path) {
|
||||
return true;
|
||||
}
|
||||
|
||||
+void ExtCommandsHandler::handleUnCachePath(const QStringList& args)
|
||||
+{
|
||||
+ if (args.size() != 1) {
|
||||
+ return;
|
||||
+ }
|
||||
+ QString path = normalizedPath(args[0]);
|
||||
+ Account account;
|
||||
+ QString repo_id, path_in_repo;
|
||||
+ if (!parseRepoFileInfo(path, &account, &repo_id, &path_in_repo)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ QMutexLocker locker(&rpc_client_mutex_);
|
||||
+ rpc_client_->unCachePath(repo_id, path_in_repo);
|
||||
+}
|
||||
+
|
||||
QString ExtCommandsHandler::handleShowAccounts()
|
||||
{
|
||||
auto accounts = gui->accountManager()->allAccounts();
|
||||
|
||||
From 2aee42fd2cb8d0cc8048b4f7e2ce723e54de223d Mon Sep 17 00:00:00 2001
|
||||
From: Heran Yang <heran.yang@seafile.com>
|
||||
Date: Wed, 24 Sep 2025 16:34:47 +0800
|
||||
Subject: [PATCH 2/2] Add handle uncache path
|
||||
|
||||
---
|
||||
src/ext-handler.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/ext-handler.h b/src/ext-handler.h
|
||||
index a8bc9ec5..9b9f2114 100644
|
||||
--- a/src/ext-handler.h
|
||||
+++ b/src/ext-handler.h
|
||||
@@ -167,6 +167,7 @@ class ExtCommandsHandler: public QThread {
|
||||
bool handleIsFileCached(QStringList &args);
|
||||
bool isFileInRepo(const QString &path);
|
||||
bool handleIsFileInRepo(QStringList &args);
|
||||
+ void handleUnCachePath(const QStringList& args);
|
||||
QString handleShowAccounts();
|
||||
void handleDeleteAccount(QStringList args);
|
||||
void handleResyncAccount(QStringList args);
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5de52569bd8d212ce5e915b0bed6df09bc080c27dd6daf98785cbdf0d11a2619
|
||||
size 14281273
|
||||
3
seadrive-gui-3.0.16.tar.gz
Normal file
3
seadrive-gui-3.0.16.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3589575a142e2d11a70102a723285b3829ae2060511408741c78133ac4dae3a5
|
||||
size 11037323
|
||||
@@ -1,3 +1,34 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 20 07:19:04 UTC 2025 - Paolo Stivanin <info@paolostivanin.com>
|
||||
|
||||
- Update to 3.0.13:
|
||||
* https://github.com/haiwen/seadrive-gui/compare/v3.0.13...v3.0.16
|
||||
- Add issue446.patch: Support show number of pending files
|
||||
- Add issue477.patch: Add handle uncache path
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 15 06:57:35 UTC 2025 - Paolo Stivanin <info@paolostivanin.com>
|
||||
|
||||
- Update to 3.0.13:
|
||||
* https://github.com/haiwen/seadrive-gui/compare/v2.0.28...v3.0.13
|
||||
- Add fix-return-value.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 20 02:17:46 UTC 2024 - Gerald Chen <gerald_chen@foxmail.com>
|
||||
|
||||
- Revert to 2.0.28
|
||||
* Fix boo#1232619
|
||||
- Remove fix-return.patch (not needed with this version)
|
||||
- Remove pr404.patch (not needed with this version)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 21 08:54:10 UTC 2024 - Paolo Stivanin <info@paolostivanin.com>
|
||||
|
||||
- Update to 3.0.11:
|
||||
* https://github.com/haiwen/seadrive-gui/compare/v2.0.28...v3.0.11
|
||||
- Add fix-return.patch
|
||||
- Add pr404.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 16 12:23:55 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: seadrive-gui
|
||||
Version: 2.0.28
|
||||
Version: 3.0.16
|
||||
Release: 0
|
||||
Summary: GUI part of seafile drive
|
||||
License: GPL-3.0-only
|
||||
@@ -25,6 +25,12 @@ URL: https://github.com/haiwen/seadrive-gui/
|
||||
Source0: https://github.com/haiwen/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch1: fix-cmake-exec-name.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch2: fix-return-value.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch3: issue446.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch4: issue477.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: cmake
|
||||
@@ -37,15 +43,6 @@ BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
BuildRequires: pkgconfig(libevent)
|
||||
BuildRequires: pkgconfig(uuid)
|
||||
Requires: seadrive-fuse >= 2.0.6
|
||||
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
|
||||
BuildRequires: jansson-devel
|
||||
BuildRequires: qt5-linguist
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: qt5-qtconnectivity-devel
|
||||
BuildRequires: qt5-qtwebkit
|
||||
BuildRequires: sqlite-devel
|
||||
%else
|
||||
BuildRequires: cmake(Qt5Core)
|
||||
BuildRequires: cmake(Qt5DBus)
|
||||
BuildRequires: cmake(Qt5Designer)
|
||||
@@ -59,14 +56,13 @@ BuildRequires: cmake(Qt5WebEngineCore)
|
||||
BuildRequires: cmake(Qt5WebEngineWidgets)
|
||||
BuildRequires: pkgconfig(jansson)
|
||||
BuildRequires: pkgconfig(sqlite3)
|
||||
%endif
|
||||
Requires: seadrive-fuse = %{version}
|
||||
|
||||
%description
|
||||
This package provides a graphical user interface for seadrive-fuse
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autopatch -p1
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags} -fPIE -pie"
|
||||
|
||||
Reference in New Issue
Block a user