Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3e30e23
Add Shared checkbox.
DinCahill Nov 19, 2018
90e7b65
Add GetDriveSharedWithMe() calls.
DinCahill Nov 19, 2018
5a2e652
Disable Rename, Move, and Delete buttons if Shared is enabled.
DinCahill Nov 20, 2018
a5f9241
Update .appveyor.yml
LORDofDOOM Nov 30, 2017
0df60b3
Update .appveyor.yml
LORDofDOOM Nov 30, 2017
ae1320a
Update .appveyor.yml
LORDofDOOM Nov 30, 2017
1a5bb53
Update .appveyor.yml
LORDofDOOM Nov 30, 2017
70abc42
Update .appveyor.yml
LORDofDOOM Nov 30, 2017
397a2d1
Use VS2013 AppVeyor image.
DinCahill Nov 20, 2018
748ff12
Only package the exe as an artifact.
DinCahill Nov 20, 2018
07f009b
Disable Upload button for Shared.
DinCahill Nov 20, 2018
9335dc0
Add Mega icon.
DinCahill Nov 20, 2018
eb6d080
Add event for toggling Shared.
DinCahill Nov 20, 2018
f3c38d4
Refresh when Shared is toggled.
DinCahill Nov 20, 2018
e8e6c01
Add Show Hidden preference box.
DinCahill Nov 20, 2018
1fadb15
Implement Show Hidden preference.
DinCahill Nov 20, 2018
f8cebda
Fix crash when toggling Shared due to improper row selection.
DinCahill Nov 20, 2018
13f545c
Update links and CI badges in README.md.
DinCahill Nov 21, 2018
f174246
Revert "Merge pull request #3 from fsaimon/master" - Seems fine witho…
DinCahill Nov 22, 2018
dc0a88b
Revert "Handle changed version output of Rclone 1.38." - Doesn't seem…
DinCahill Nov 22, 2018
281add2
Add Xcode 9.4 to Travis. [skip appveyor]
DinCahill Nov 22, 2018
d7299ee
Put Shared toggle crashfix in the right place. Oops!
DinCahill Nov 22, 2018
8f2b5a9
Add a Public Link option to the right-click menu.
DinCahill Nov 22, 2018
910f3c0
Handle changed version output of Rclone 1.38.
JanHellwig Oct 3, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
version: '#{build}'
image: 'Visual Studio 2013'
branches:
only:
- master
Expand All @@ -7,7 +8,9 @@ clone_depth: 1
build_script:
- mkdir build
- cd build
- cmake -G "Visual Studio 12 Win64" -DCMAKE_PREFIX_PATH=C:\Qt\5.8\msvc2013_64 ..
- cmake --build .
- cmake -G "Visual Studio 12 Win64" -DCMAKE_CONFIGURATION_TYPES="Release" -DCMAKE_PREFIX_PATH=C:\Qt\5.8\msvc2013_64 ..
- cmake --build . --config Release
artifacts:
- path: build/build/Release/RcloneBrowser.exe
test: off
deploy: off
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ matrix:

- os: osx
language: cpp
osx_image: xcode8.2
osx_image: xcode8.3
install:
- brew update
- brew install qt5
script:
- mkdir build && cd build
- cmake -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5/lib/cmake ..
- cmake --build .
- os: osx
language: cpp
osx_image: xcode9.4
install:
- brew update
- brew install qt5
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,21 @@ This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

[1]: https://travis-ci.org/mmozeiko/RcloneBrowser/
[2]: https://ci.appveyor.com/project/mmozeiko/RcloneBrowser
[3]: https://github.com/mmozeiko/RcloneBrowser/releases
[4]: https://github.com/mmozeiko/RcloneBrowser/releases/latest
[5]: https://github.com/mmozeiko/RcloneBrowser/blob/master/LICENSE
[1]: https://travis-ci.org/DinCahill/RcloneBrowser/
[2]: https://ci.appveyor.com/project/DinCahill/RcloneBrowser
[3]: https://github.com/DinCahill/RcloneBrowser/releases
[4]: https://github.com/DinCahill/RcloneBrowser/releases/latest
[5]: https://github.com/DinCahill/RcloneBrowser/blob/master/LICENSE
[6]: https://mpv.io/
[7]: https://aur.archlinux.org/packages/rclone-browser
[8]: https://www.visualstudio.com/en-us/news/releasenotes/vs2013-community-vs
[9]: http://www.cmake.org/
[10]: https://www.qt.io/download-open-source/
[img1]: https://api.travis-ci.org/mmozeiko/RcloneBrowser.svg?branch=master
[img2]: https://ci.appveyor.com/api/projects/status/7s24ixolrk3ueggm/branch/master?svg=true
[img3]: https://img.shields.io/github/downloads/mmozeiko/RcloneBrowser/total.svg?maxAge=3600
[img4]: https://img.shields.io/github/release/mmozeiko/RcloneBrowser.svg?maxAge=3600
[img5]: https://img.shields.io/github/license/mmozeiko/RcloneBrowser.svg?maxAge=2592000
[img1]: https://api.travis-ci.org/DinCahill/RcloneBrowser.svg?branch=master
[img2]: https://ci.appveyor.com/api/projects/status/github/DinCahill/RcloneBrowser?branch=master&svg=true
[img3]: https://img.shields.io/github/downloads/DinCahill/RcloneBrowser/total.svg?maxAge=3600
[img4]: https://img.shields.io/github/release/DinCahill/RcloneBrowser.svg?maxAge=3600
[img5]: https://img.shields.io/github/license/DinCahill/RcloneBrowser.svg?maxAge=2592000
[screenshot1]: https://raw.githubusercontent.com/wiki/mmozeiko/RcloneBrowser/screenshot1.png
[screenshot2]: https://raw.githubusercontent.com/wiki/mmozeiko/RcloneBrowser/screenshot2.png
[screenshot3]: https://raw.githubusercontent.com/wiki/mmozeiko/RcloneBrowser/screenshot3.png
Expand Down
Binary file added src/images/mega.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/item_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,9 @@ void ItemModel::load(const QPersistentModelIndex& parentIndex, Item* parent)
else if (path.at(0) != '/') {
path = "/" + path;
}
lsd->start(GetRclone(), QStringList() << "lsd" << GetRcloneConf() << mRemote + ":" + path, QIODevice::ReadOnly);
lsl->start(GetRclone(), QStringList() << "lsl" << GetRcloneConf() << "--max-depth" << "1" << mRemote + ":" + path, QIODevice::ReadOnly);

lsd->start(GetRclone(), QStringList() << "lsd" << GetRcloneConf() << GetDriveSharedWithMe() << GetShowHidden() << mRemote + ":" + path, QIODevice::ReadOnly);
lsl->start(GetRclone(), QStringList() << "lsl" << GetRcloneConf() << GetDriveSharedWithMe() << GetShowHidden() << "--max-depth" << "1" << mRemote + ":" + path, QIODevice::ReadOnly);
}

void ItemModel::sortRecursive(Item* item, const ItemSorter& sorter)
Expand Down
1 change: 1 addition & 0 deletions src/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ MainWindow::MainWindow()
settings->setValue("Settings/showFolderIcons", dialog.getShowFolderIcons());
settings->setValue("Settings/showFileIcons", dialog.getShowFileIcons());
settings->setValue("Settings/rowColors", dialog.getRowColors());
settings->setValue("Settings/showHidden", dialog.getShowHidden());
SetRclone(dialog.getRclone());
SetRcloneConf(dialog.getRcloneConf());
mFirstTime = true;
Expand Down
6 changes: 6 additions & 0 deletions src/preferences_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ PreferencesDialog::PreferencesDialog(QWidget* parent)
}
ui.showFileIcons->setChecked(settings->value("Settings/showFileIcons", true).toBool());
ui.rowColors->setChecked(settings->value("Settings/rowColors", false).toBool());
ui.showHidden->setChecked(settings->value("Settings/showHidden", true).toBool());

#ifdef Q_OS_WIN32
ui.mount->hide();
Expand Down Expand Up @@ -124,3 +125,8 @@ bool PreferencesDialog::getRowColors() const
{
return ui.rowColors->isChecked();
}

bool PreferencesDialog::getShowHidden() const
{
return ui.showHidden->isChecked();
}
1 change: 1 addition & 0 deletions src/preferences_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class PreferencesDialog : public QDialog
bool getShowFolderIcons() const;
bool getShowFileIcons() const;
bool getRowColors() const;
bool getShowHidden() const;

private:
Ui::PreferencesDialog ui;
Expand Down
13 changes: 10 additions & 3 deletions src/preferences_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>475</width>
<height>407</height>
<height>547</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -128,7 +128,7 @@
<string>User Interface</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="0" colspan="3">
<item row="5" column="0" colspan="3">
<widget class="QLabel" name="info">
<property name="text">
<string>Changing these options will require reopening remote tab.</string>
Expand All @@ -148,7 +148,7 @@
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="rowColors">
<property name="text">
<string>Alternating row colors</string>
Expand All @@ -168,6 +168,13 @@
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="showHidden">
<property name="text">
<string>Show hidden files and folders</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down
6 changes: 5 additions & 1 deletion src/progress_dialog.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "progress_dialog.h"

ProgressDialog::ProgressDialog(const QString& title, const QString& operation, const QString& message, QProcess* process, QWidget* parent, bool close)
ProgressDialog::ProgressDialog(const QString& title, const QString& operation, const QString& message, QProcess* process, QWidget* parent, bool close, bool trim)
: QDialog(parent)
{
ui.setupUi(this);
Expand Down Expand Up @@ -45,6 +45,10 @@ ProgressDialog::ProgressDialog(const QString& title, const QString& operation, c
QObject::connect(process, &QProcess::readyRead, this, [=]()
{
QString output = process->readAll();
if (trim)
{
output = output.trimmed();
}
ui.output->appendPlainText(output);
emit outputAvailable(output);
});
Expand Down
2 changes: 1 addition & 1 deletion src/progress_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ProgressDialog : public QDialog
Q_OBJECT

public:
ProgressDialog(const QString& title, const QString& operation, const QString& message, QProcess* process, QWidget* parent = nullptr, bool close = true);
ProgressDialog(const QString& title, const QString& operation, const QString& message, QProcess* process, QWidget* parent = nullptr, bool close = true, bool trim = false);
~ProgressDialog();

void expand();
Expand Down
59 changes: 52 additions & 7 deletions src/remote_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ RemoteWidget::RemoteWidget(IconCache* iconCache, const QString& remote, bool isL
#endif
auto settings = GetSettings();
ui.tree->setAlternatingRowColors(settings->value("Settings/rowColors", false).toBool());
ui.checkBoxShared->setChecked(settings->value("Settings/driveShared", false).toBool());

QStyle* style = QApplication::style();
ui.refresh->setIcon(style->standardIcon(QStyle::SP_BrowserReload));
Expand All @@ -32,6 +33,7 @@ RemoteWidget::RemoteWidget(IconCache* iconCache, const QString& remote, bool isL
ui.download->setIcon(style->standardIcon(QStyle::SP_ArrowDown));
ui.getSize->setIcon(style->standardIcon(QStyle::SP_FileDialogInfoView));
ui.export_->setIcon(style->standardIcon(QStyle::SP_FileDialogDetailedView));
ui.link->setIcon(style->standardIcon(QStyle::SP_FileLinkIcon));

ui.buttonRefresh->setDefaultAction(ui.refresh);
ui.buttonMkdir->setDefaultAction(ui.mkdir);
Expand Down Expand Up @@ -91,9 +93,11 @@ RemoteWidget::RemoteWidget(IconCache* iconCache, const QString& remote, bool isL
else
{
ui.refresh->setDisabled(false);
ui.rename->setDisabled(topLevel);
ui.move->setDisabled(topLevel);
ui.purge->setDisabled(topLevel);
bool driveShared = ui.checkBoxShared->checkState();
ui.rename->setDisabled(topLevel || driveShared);
ui.move->setDisabled(topLevel || driveShared);
ui.purge->setDisabled(topLevel || driveShared);
ui.upload->setDisabled(driveShared);
ui.mount->setDisabled(!isFolder);
ui.stream->setDisabled(isFolder);
path = model->path(index);
Expand Down Expand Up @@ -129,7 +133,7 @@ RemoteWidget::RemoteWidget(IconCache* iconCache, const QString& remote, bool isL
QProcess process;
UseRclonePassword(&process);
process.setProgram(GetRclone());
process.setArguments(QStringList() << "mkdir" << GetRcloneConf() << remote + ":" + folder);
process.setArguments(QStringList() << "mkdir" << GetRcloneConf() << GetDriveSharedWithMe() << remote + ":" + folder);
process.setReadChannelMode(QProcess::MergedChannels);

ProgressDialog progress("New Folder", "Creating...", folderMsg, &process, this);
Expand Down Expand Up @@ -157,6 +161,7 @@ RemoteWidget::RemoteWidget(IconCache* iconCache, const QString& remote, bool isL
process.setArguments(QStringList()
<< "moveto"
<< GetRcloneConf()
<< GetDriveSharedWithMe()
<< remote + ":" + path
<< remote + ":" + model->path(index.parent()).filePath(name));
process.setReadChannelMode(QProcess::MergedChannels);
Expand Down Expand Up @@ -186,6 +191,7 @@ RemoteWidget::RemoteWidget(IconCache* iconCache, const QString& remote, bool isL
process.setArguments(QStringList()
<< "move"
<< GetRcloneConf()
<< GetDriveSharedWithMe()
<< remote + ":" + path
<< remote + ":" + name);
process.setReadChannelMode(QProcess::MergedChannels);
Expand All @@ -211,7 +217,7 @@ RemoteWidget::RemoteWidget(IconCache* iconCache, const QString& remote, bool isL
QProcess process;
UseRclonePassword(&process);
process.setProgram(GetRclone());
process.setArguments(QStringList() << (model->isFolder(index) ? "purge" : "delete") << GetRcloneConf() << remote + ":" + path);
process.setArguments(QStringList() << (model->isFolder(index) ? "purge" : "delete") << GetRcloneConf() << GetDriveSharedWithMe() << remote + ":" + path);
process.setReadChannelMode(QProcess::MergedChannels);

ProgressDialog progress("Delete", "Deleting...", pathMsg, &process, this);
Expand Down Expand Up @@ -268,6 +274,44 @@ RemoteWidget::RemoteWidget(IconCache* iconCache, const QString& remote, bool isL
emit addStream(remote + ":" + path, stream);
});

QObject::connect(ui.checkBoxShared, &QCheckBox::toggled, ui.shared, &QAction::toggled);

QObject::connect(ui.shared, &QAction::toggled, this, [=](const bool checked)
{
auto settings = GetSettings();
settings->setValue("Settings/driveShared", checked);
ui.checkBoxShared->setChecked(checked);

QModelIndex index = ui.tree->selectionModel()->selectedRows().front();
QModelIndex top = index;
while (!model->isTopLevel(top))
{
top = top.parent();
}
ui.tree->selectionModel()->clear();
ui.tree->selectionModel()->select(top, QItemSelectionModel::Select | QItemSelectionModel::Rows);
model->refresh(top);
});

QObject::connect(ui.link, &QAction::triggered, this, [=]()
{
QModelIndex index = ui.tree->selectionModel()->selectedRows().front();

QString path = model->path(index).path();
QString pathMsg = isLocal ? QDir::toNativeSeparators(path) : path;

QProcess process;
UseRclonePassword(&process);
process.setProgram(GetRclone());
process.setArguments(QStringList() << "link" << GetRcloneConf() << GetDriveSharedWithMe() << remote + ":" + path);
process.setReadChannelMode(QProcess::MergedChannels);

ProgressDialog progress("Fetch Public Link", "Fetching link for...", pathMsg, &process, this, false, true);
progress.expand();
progress.allowToClose();
progress.exec();
});

QObject::connect(ui.upload, &QAction::triggered, this, [=]()
{
QModelIndex index = ui.tree->selectionModel()->selectedRows().front();
Expand Down Expand Up @@ -314,7 +358,7 @@ RemoteWidget::RemoteWidget(IconCache* iconCache, const QString& remote, bool isL
QProcess process;
UseRclonePassword(&process);
process.setProgram(GetRclone());
process.setArguments(QStringList() << "size" << GetRcloneConf() << remote + ":" + path);
process.setArguments(QStringList() << "size" << GetRcloneConf() << GetDriveSharedWithMe() << remote + ":" + path);
process.setReadChannelMode(QProcess::MergedChannels);

ProgressDialog progress("Get Size", "Calculating...", pathMsg, &process, this, false);
Expand Down Expand Up @@ -347,7 +391,7 @@ RemoteWidget::RemoteWidget(IconCache* iconCache, const QString& remote, bool isL
QProcess process;
UseRclonePassword(&process);
process.setProgram(GetRclone());
process.setArguments(QStringList() << GetRcloneConf() << e.getOptions());
process.setArguments(QStringList() << GetRcloneConf() << GetDriveSharedWithMe() << e.getOptions());
process.setReadChannelMode(QProcess::MergedChannels);

ProgressDialog progress("Export", "Exporting...", dst, &process, this);
Expand Down Expand Up @@ -417,6 +461,7 @@ RemoteWidget::RemoteWidget(IconCache* iconCache, const QString& remote, bool isL
menu.addAction(ui.stream);
menu.addAction(ui.upload);
menu.addAction(ui.download);
menu.addAction(ui.link);
menu.exec(ui.tree->viewport()->mapToGlobal(pos));
});

Expand Down
22 changes: 21 additions & 1 deletion src/remote_widget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>784</width>
<width>879</width>
<height>552</height>
</rect>
</property>
Expand Down Expand Up @@ -161,6 +161,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxShared">
<property name="toolTip">
<string>Shared with Me (Google Drive)</string>
</property>
<property name="text">
<string>Shared</string>
</property>
</widget>
</item>
<item>
<spacer name="spacer">
<property name="orientation">
Expand Down Expand Up @@ -290,6 +300,16 @@
<string>M&amp;ove</string>
</property>
</action>
<action name="shared">
<property name="text">
<string>Shared</string>
</property>
</action>
<action name="link">
<property name="text">
<string>Public Link</string>
</property>
</action>
</widget>
<tabstops>
<tabstop>buttonRefresh</tabstop>
Expand Down
1 change: 1 addition & 0 deletions src/resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<file>images/google_cloud_storage.png</file>
<file>images/hubic.png</file>
<file>images/local.png</file>
<file>images/mega.png</file>
<file>images/onedrive.png</file>
<file>images/s3.png</file>
<file>images/swift.png</file>
Expand Down
2 changes: 2 additions & 0 deletions src/transfer_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ QStringList TransferDialog::getOptions() const
}
}

list << GetDriveSharedWithMe();

list << "--stats" << "1s";

list << ui.textSource->text();
Expand Down
Loading