Skip to content

Commit

Permalink
Fix rebase error
Browse files Browse the repository at this point in the history
  • Loading branch information
Heran Yang committed Nov 28, 2024
1 parent 0e58e5c commit 8b8477e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/rpc/rpc-client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,10 @@ bool SeafileRpcClient::addAccount(const Account& account)
}

searpc_client_call__int(seadrive_rpc_client_, "seafile_add_account", &error,
5,
6,
"string", toCStr(serverAddr),
"string", toCStr(account.username),
"string", toCStr(account.accountInfo.name),
"string", toCStr(account.token),
"string", toCStr(account.displayName),
"int", account.isPro() ? 1 : 0);
Expand Down
2 changes: 1 addition & 1 deletion src/seadrive-gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ void SeadriveGui::onDaemonStarted()
message_pollers_.insert(EMPTY_DOMAIN_ID, message_poller);
}
#if defined(Q_OS_WIN32) || defined(Q_OS_LINUX)
rpc_client_->connectDaemon();
rpc_client->connectDaemon();
#endif

auto accounts = account_mgr_->activeAccounts();
Expand Down
6 changes: 6 additions & 0 deletions src/ui/search-dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,9 @@ void SearchItemsTableView::openDirectory(bool open_file)
#endif
#ifdef Q_OS_WIN32
QString root = search_model_->account_.syncRoot;
#endif
#ifdef Q_OS_LINUX
QString root = gui->seadriveRoot();
#endif
if (root.isEmpty()) {
qWarning() << "failed to get root path";
Expand Down Expand Up @@ -561,6 +564,9 @@ void SearchItemsTableView::onItemDoubleClick(const QModelIndex& index)
#endif
#ifdef Q_OS_WIN32
QString root = search_model_->account_.syncRoot;
#endif
#ifdef Q_OS_LINUX
QString root = gui->seadriveRoot();
#endif
if (root.isEmpty()) {
qWarning() << "failed to get root path";
Expand Down
2 changes: 1 addition & 1 deletion src/ui/transfer-progress-dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ TransferItemsTableModel::TransferItemsTableModel(QObject* parent)

}

#if defined(Q_OS_WIN32)
#if defined(Q_OS_WIN32) || defined(Q_OS_LINUX)
void TransferItemsTableModel::setTransferItems()
{
TransferProgress transfer_progress;
Expand Down
4 changes: 4 additions & 0 deletions src/ui/tray-icon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,10 +709,12 @@ void SeafileTrayIcon::deleteAccount()
}
#endif

#ifndef Q_OS_LINUX
if (rpc_client && rpc_client->isAccountUploading(account)) {
gui->warningBox(tr("There are changes being uploaded under the account, please try again later"));
return;
}
#endif

#if defined(Q_OS_WIN32) || defined(Q_OS_LINUX)
QString question = tr("Are you sure to remove account from \"%1\"?").arg(account.serverUrl.toString());
Expand All @@ -739,11 +741,13 @@ void SeafileTrayIcon::resyncAccount()
return;
}

#ifndef Q_OS_LINUX
bool is_uploading = rpc_client->isAccountUploading (account);
if (is_uploading) {
gui->warningBox (tr("There are changes being uploaded under the account, please try again later"));
return;
}
#endif

QString question = tr("The account will be synced to a new sync root folder. Are you sure to resync account from \"%1\"?").arg(account.serverUrl.toString());

Expand Down

0 comments on commit 8b8477e

Please sign in to comment.