From 1c2a4333910e11eaf798bff0eadc016359877f4a Mon Sep 17 00:00:00 2001 From: kapitainsky Date: Tue, 10 Mar 2020 19:33:06 +0000 Subject: [PATCH] moved tools button to new location --- src/remote_widget.cpp | 36 ++++++++++++++++++++++++--- src/remote_widget.ui | 58 +++++++++++++++++++++---------------------- 2 files changed, 62 insertions(+), 32 deletions(-) diff --git a/src/remote_widget.cpp b/src/remote_widget.cpp index 551b2f7a..30cd2f97 100644 --- a/src/remote_widget.cpp +++ b/src/remote_widget.cpp @@ -93,7 +93,7 @@ RemoteWidget::RemoteWidget(IconCache *iconCache, const QString &remote, QIcon(":remotes/images/qbutton_icons/link" + img_add + ".png")); ui.export_->setIcon( QIcon(":remotes/images/qbutton_icons/export" + img_add + ".png")); - ui.actionTools->setIcon( + ui.buttonTools->setIcon( QIcon(":remotes/images/qbutton_icons/tools" + img_add + ".png")); ui.getInfo->setIcon( QIcon(":remotes/images/qbutton_icons/info" + img_add + ".png")); @@ -115,7 +115,6 @@ RemoteWidget::RemoteWidget(IconCache *iconCache, const QString &remote, ui.buttonLink->setDefaultAction(ui.link); ui.buttonExport->setDefaultAction(ui.export_); ui.buttonInfo->setDefaultAction(ui.getInfo); - ui.buttonTools->setDefaultAction(ui.actionTools); ui.buttonDedupe->setDefaultAction(ui.actionDedupe); // buttons and icons size @@ -256,6 +255,35 @@ RemoteWidget::RemoteWidget(IconCache *iconCache, const QString &remote, } } + ui.refresh->setStatusTip("Refresh (F5)"); + ui.mkdir->setStatusTip("New Folder (F7) - rclone mkdir"); + ui.rename->setStatusTip("Rename (F2) - rclone moveto"); + ui.move->setStatusTip("Move - rclone move"); + ui.purge->setStatusTip("Delete (Del) - rclone purge|delete"); + ui.mount->setStatusTip("Mount - rclone mount"); + ui.stream->setStatusTip("Stream file - rclone cat | player -"); + ui.upload->setStatusTip("Upload file/directory"); + ui.download->setStatusTip("Download file/directory"); + ui.getSize->setStatusTip("Get folder size - rclone size"); + ui.getTree->setStatusTip("Show folders tree - rclone tree"); + ui.link->setStatusTip("Fetch public link - rclone link"); + ui.export_->setStatusTip("Export files list"); + ui.actionCheck->setStatusTip( + "Check remote's integrity - rclone check/cryptcheck"); + ui.actionDedupe->setStatusTip("Remove duplicated files - rclone dedupe"); + + QMenu *menuMode = new QMenu(this); + menuMode->addAction(ui.getTree); + menuMode->addAction(ui.link); + menuMode->addAction(ui.export_); + menuMode->addAction(ui.actionCheck); + if (remoteType == "drive") { + menuMode->addAction(ui.actionDedupe); + } + + ui.buttonTools->setMenu(menuMode); + ui.buttonTools->setPopupMode(QToolButton::InstantPopup); + ui.tree->sortByColumn(0, Qt::AscendingOrder); ui.tree->header()->setSectionsMovable(false); @@ -907,7 +935,9 @@ RemoteWidget::RemoteWidget(IconCache *iconCache, const QString &remote, menu.addAction(ui.link); menu.addAction(ui.export_); menu.addAction(ui.actionCheck); - menu.addAction(ui.actionDedupe); + if (remoteType == "drive") { + menu.addAction(ui.actionDedupe); + } menu.exec(ui.tree->viewport()->mapToGlobal(pos)); }); diff --git a/src/remote_widget.ui b/src/remote_widget.ui index 2f876779..e62ebab2 100755 --- a/src/remote_widget.ui +++ b/src/remote_widget.ui @@ -36,7 +36,7 @@ 0 - + @@ -71,7 +71,7 @@ - 10 + 15 20 @@ -127,7 +127,7 @@ - 10 + 15 20 @@ -163,7 +163,7 @@ - + Download @@ -183,12 +183,35 @@ - 10 + 15 20 + + + + Size + + + Qt::ToolButtonTextUnderIcon + + + + + + + Tools + + + Qt::ToolButtonTextUnderIcon + + + Qt::NoArrow + + + @@ -199,7 +222,7 @@ - 10 + 15 5 @@ -265,19 +288,6 @@ - - - - Tools - - - false - - - Qt::ToolButtonTextUnderIcon - - - @@ -322,16 +332,6 @@ - - - - Size - - - Qt::ToolButtonTextUnderIcon - - -