Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.6'
Browse files Browse the repository at this point in the history
 Conflicts:
	CHANGELOG.md
	VERSION.cmake
	src/gui/MacOSXBundleInfo.plist
	src/gui/folderstatusmodel.h
	src/gui/settingsdialog.cpp
  • Loading branch information
ogoffart committed Feb 25, 2020
2 parents a86b967 + aab8ee3 commit dc1070d
Show file tree
Hide file tree
Showing 66 changed files with 3,488 additions and 4,588 deletions.
1,426 changes: 0 additions & 1,426 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion VERSION.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set( MIRALL_VERSION_MAJOR 2 )
set( MIRALL_VERSION_MINOR 7 )
set( MIRALL_VERSION_PATCH 0 )
set( MIRALL_VERSION_YEAR 2019 )
set( MIRALL_VERSION_YEAR 2020 )
set( MIRALL_SOVERSION 0 )

if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
Expand Down
20 changes: 0 additions & 20 deletions admin/osx/sign_app.sh

This file was deleted.

5 changes: 5 additions & 0 deletions changelog/unreleased/7247
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fixed bug in public link with password required

In the sharing dialog, "password required" capabilities lead to incorrect behavior

https://github.com/owncloud/client/issues/7247
5 changes: 5 additions & 0 deletions changelog/unreleased/7313
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fixed editing public link expiration date

In the sharing dialog, allow editing public link expiration date when it is enforced

https://github.com/owncloud/client/issues/7313
6 changes: 6 additions & 0 deletions changelog/unreleased/7336
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Expand file tree also when no folders are synced

We have fixed the behaviour of the folder Widget,
when a account was added and none of its folders was selected to be synced, the tree was not expanded.

https://github.com/owncloud/client/issues/7336
6 changes: 6 additions & 0 deletions changelog/unreleased/7700
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fixed bug saving the cookies

Saving the cookies on Windows might fail if the containing folder does not exist


https://github.com/owncloud/client/issues/7700
7 changes: 7 additions & 0 deletions changelog/unreleased/7709
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Fixed crash in the setup wizard

Fixe crash if setup wizard is closed while the virtual file system dialog is open


https://github.com/owncloud/client/issues/7709
https://github.com/owncloud/client/issues/7711
7 changes: 7 additions & 0 deletions changelog/unreleased/7710
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Fixed bug in the Virtual File warning dialog

Don't show virtual file system warning again when the radio button is triggered a second time.
Declining the dialog had no effect as the radio button was already checked

https://github.com/owncloud/client/issues/7710
https://github.com/owncloud/client/issues/7712
4 changes: 4 additions & 0 deletions changelog/unreleased/7722
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bugfix: Fixed a potential crash while discovering moves


https://github.com/owncloud/client/issues/7722
6 changes: 6 additions & 0 deletions changelog/unreleased/7741
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Add Folder Sync Connection sometimes does not warn

Warn when adding a folder sync connection of a remote folder
for which a subdir is already synchronized

https://github.com/owncloud/client/issues/7741
6 changes: 6 additions & 0 deletions changelog/unreleased/7744
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Resize the buttons in the settings view dynamically

Since Qt 5.12 the button text gets elided automatically
if the button text would exceed the button width.

https://github.com/owncloud/client/issues/7744
4 changes: 4 additions & 0 deletions changelog/unreleased/7760
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bugfix: Fixed a potential crash on cancelation of discovery jobs


https://github.com/owncloud/client/pull/7760
6 changes: 6 additions & 0 deletions changelog/unreleased/7761
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix a potential crash on Windows VFS

We've fixed a potential crash where marking a file as
"Always keep on this device" caused the client to crash.

https://github.com/owncloud/client/issues/7761
2 changes: 1 addition & 1 deletion cmake/modules/FindLibcloudproviders.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (c) 2019 Copyright ownCloud GmbH
# (c) 2019-2020 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.

Expand Down
Binary file added docs/fonts/mplus-1mn-bold.ttf
Binary file not shown.
Binary file added docs/fonts/mplus-1mn-medium.ttf
Binary file not shown.
Binary file added docs/fonts/mplus-1mn-regular.ttf
Binary file not shown.
Binary file added docs/fonts/mplus-1mn-thin.ttf
Binary file not shown.
Binary file added docs/fonts/mplus-1p-regular.ttf
Binary file not shown.
12 changes: 6 additions & 6 deletions docs/modules/ROOT/pages/installing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ You will also find links to source code archives and older versions on the downl
== System Requirements

* Windows 7+
* Mac OS X 10.7+ (*64-bit only*)
* CentOS 6 & 7 (64-bit only)
* Debian 8.0 & 9.0
* Fedora 25 & 26 & 27
* Ubuntu 16.04 & 17.04 & 17.10
* openSUSE Leap 42.2 & 42.3
* Mac OS X 10.10+ (64-bit only)
* CentOS 6 & 7 & 8
* Debian 8.0 & 9.0 & 10
* Fedora 27 & 28 & 29 & 30 & 31
* Ubuntu 18.04 & 19.04 & 19.10
* openSUSE Leap 42.2 & 42.3 & 15.0 & 15.1 & 15.2

NOTE: For Linux distributions, we support, if technically feasible, the latest 2 versions per platform and the previous Ubuntu https://wiki.ubuntu.com/LTS[LTS].

Expand Down
20 changes: 10 additions & 10 deletions docs/resources/themes/owncloud-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ font:
normal: notoserif-regular.ttf
bold: notoserif-bold.ttf
italic: notoserif-italic.ttf
bold_italic: notoserif-bold_italic.ttf
bold_italic: notoserif-bolditalic.ttf
# M+ 1mn supports ASCII and the circled numbers used for conums
M+ 1mn:
normal: mplus1mn-regular-ascii-conums.ttf
bold: mplus1mn-bold-ascii.ttf
italic: mplus1mn-italic-ascii.ttf
bold_italic: mplus1mn-bold_italic-ascii.ttf
normal: mplus-1mn-regular.ttf
bold: mplus-1mn-bold.ttf
italic: mplus-1mn-thin.ttf
bold_italic: mplus-1mn-medium.ttf
# M+ 1p supports Latin, Latin-1 Supplement, Latin Extended, Greek, Cyrillic, Vietnamese, Japanese & an assortment of symbols
# It also provides arrows for ->, <-, => and <= replacements in case these glyphs are missing from font
M+ 1p Fallback:
normal: mplus1p-regular-fallback.ttf
bold: mplus1p-regular-fallback.ttf
italic: mplus1p-regular-fallback.ttf
bold_italic: mplus1p-regular-fallback.ttf
normal: mplus-1p-regular.ttf
bold: mplus-1p-regular.ttf
italic: mplus-1p-regular.ttf
bold_italic: mplus-1p-regular.ttf
Open Sans:
normal: opensans-light.ttf
bold: opensans-bold.ttf
Expand Down Expand Up @@ -49,7 +49,7 @@ base:
font_size: 10.5
line_height_length: 11
line_height: $base_line_height_length / $base_font_size
#line_height: 1
#line_height: 1
font_size_large: round($base_font_size * 1.25)
font_size_small: round($base_font_size * 0.85)
font_size_min: $base_font_size * 0.75
Expand Down
2 changes: 1 addition & 1 deletion src/gui/MacOSXBundleInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<key>CFBundleShortVersionString</key>
<string>${MIRALL_VERSION_STRING}</string>
<key>NSHumanReadableCopyright</key>
<string>(C) 2014-2019 ${APPLICATION_VENDOR}</string>
<string>(C) 2014-2020 ${APPLICATION_VENDOR}</string>
<key>SUShowReleaseNotes</key>
<false/>
<key>SUPublicDSAKeyFile</key>
Expand Down
9 changes: 7 additions & 2 deletions src/gui/accountmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ void AccountManager::saveAccountHelper(Account *acc, QSettings &settings, bool s
CookieJar *jar = qobject_cast<CookieJar *>(acc->_am->cookieJar());
if (jar) {
qCInfo(lcAccountManager) << "Saving cookies." << acc->cookieJarPath();
jar->save(acc->cookieJarPath());
if (!jar->save(acc->cookieJarPath()))
{
qCWarning(lcAccountManager) << "Failed to save cookies to" << acc->cookieJarPath();
}
}
}
}
Expand Down Expand Up @@ -294,7 +297,9 @@ AccountPtr AccountManager::loadAccountHelper(QSettings &settings)

// now the server cert, it is in the general group
settings.beginGroup(QLatin1String("General"));
acc->setApprovedCerts(QSslCertificate::fromData(settings.value(caCertsKeyC).toByteArray()));
const auto certs = QSslCertificate::fromData(settings.value(caCertsKeyC).toByteArray());
qCInfo(lcAccountManager) << "Restored: " << certs.count() << " unknown certs.";
acc->setApprovedCerts(certs);
settings.endGroup();

return acc;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/accountsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ void AccountSettings::slotEnableVfsCurrentFolder()
if (!selected.isValid() || !folder)
return;

OwncloudWizard::askExperimentalVirtualFilesFeature([folder, this](bool enable) {
OwncloudWizard::askExperimentalVirtualFilesFeature(this, [folder, this](bool enable) {
if (!enable || !folder)
return;

Expand Down
20 changes: 9 additions & 11 deletions src/gui/folderstatusmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,13 @@ void FolderStatusModel::fetchMore(const QModelIndex &parent)
QTimer::singleShot(1000, this, &FolderStatusModel::slotShowFetchProgress);
}

void FolderStatusModel::resetAndFetch(const QModelIndex &parent)
{
auto info = infoForIndex(parent);
info->resetSubs(this, parent);
fetchMore(parent);
}

void FolderStatusModel::slotGatherPermissions(const QString &href, const QMap<QString, QString> &map)
{
auto it = map.find("permissions");
Expand Down Expand Up @@ -721,11 +728,6 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list)
for (auto it = undecidedIndexes.begin(); it != undecidedIndexes.end(); ++it) {
suggestExpand(index(*it, 0, idx));
}

/* We need lambda function for the following code.
* It's just a small feature that will be missing if the comiler is too old */
#if !(defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG)) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 405)

/* Try to remove the the undecided lists the items that are not on the server. */
auto it = std::remove_if(selectiveSyncUndecidedList.begin(), selectiveSyncUndecidedList.end(),
[&](const QString &s) { return selectiveSyncUndecidedSet.count(s); });
Expand All @@ -735,7 +737,6 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list)
SyncJournalDb::SelectiveSyncUndecidedList, selectiveSyncUndecidedList);
emit dirtyChanged();
}
#endif
}

void FolderStatusModel::slotLscolFinishedWithError(QNetworkReply *r)
Expand Down Expand Up @@ -1096,10 +1097,7 @@ void FolderStatusModel::slotFolderSyncStateChange(Folder *f)
if (f->syncResult().folderStructureWasChanged()
&& (state == SyncResult::Success || state == SyncResult::Problem)) {
// There is a new or a removed folder. reset all data
auto &info = _folders[folderIndex];
auto idx = index(folderIndex);
info.resetSubs(this, idx);
fetchMore(idx);
resetAndFetch(index(folderIndex));
}
}

Expand Down Expand Up @@ -1206,7 +1204,7 @@ void FolderStatusModel::slotNewBigFolder()
return;
}

_folders[folderIndex].resetSubs(this, index(folderIndex));
resetAndFetch(index(folderIndex));

emit suggestExpand(index(folderIndex));
emit dirtyChanged();
Expand Down
1 change: 1 addition & 0 deletions src/gui/folderstatusmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class FolderStatusModel : public QAbstractItemModel
QModelIndex parent(const QModelIndex &child) const override;
bool canFetchMore(const QModelIndex &parent) const override;
void fetchMore(const QModelIndex &parent) override;
void resetAndFetch(const QModelIndex &parent);
bool hasChildren(const QModelIndex &parent = QModelIndex()) const override;

struct SubFolderInfo
Expand Down
4 changes: 3 additions & 1 deletion src/gui/folderwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@ bool FolderWizardRemotePath::isComplete() const
warnStrings.append(tr("This folder is already being synced."));
} else if (dir.startsWith(curDir)) {
warnStrings.append(tr("You are already syncing <i>%1</i>, which is a parent folder of <i>%2</i>.").arg(Utility::escape(curDir), Utility::escape(dir)));
} else if (curDir.startsWith(dir)) {
warnStrings.append(tr("You are already syncing <i>%1</i>, which is a subfolder of <i>%2</i>.").arg(Utility::escape(curDir), Utility::escape(dir)));
}
}

Expand Down Expand Up @@ -538,7 +540,7 @@ void FolderWizardSelectiveSync::virtualFilesCheckboxClicked()
// The click has already had an effect on the box, so if it's
// checked it was newly activated.
if (_virtualFilesCheckBox->isChecked()) {
OwncloudWizard::askExperimentalVirtualFilesFeature([this](bool enable) {
OwncloudWizard::askExperimentalVirtualFilesFeature(this, [this](bool enable) {
if (!enable)
_virtualFilesCheckBox->setChecked(false);
});
Expand Down
28 changes: 9 additions & 19 deletions src/gui/settingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ const QString TOOLBAR_CSS()
"QToolBar QToolButton:checked { background: %3; color: %4; }");
}

const float buttonSizeRatio = 1.618f; // golden ratio
const float BUTTONSIZERATIO = 1.618f; // golden ratio


/** display name with two lines that is displayed in the settings
* If width is bigger than 0, the string will be ellided so it does not exceed that width
*/
QString shortDisplayNameForSettings(OCC::Account *account, int width)
QString shortDisplayNameForSettings(OCC::Account *account)
{
QString user = account->davDisplayName();
if (user.isEmpty()) {
Expand All @@ -70,12 +69,6 @@ QString shortDisplayNameForSettings(OCC::Account *account, int width)
host.append(QLatin1Char(':'));
host.append(QString::number(port));
}
if (width > 0) {
QFont f;
QFontMetrics fm(f);
host = fm.elidedText(host, Qt::ElideMiddle, width);
user = fm.elidedText(user, Qt::ElideRight, width);
}
return QStringLiteral("%1\n%2").arg(user, host);
}
}
Expand Down Expand Up @@ -132,7 +125,7 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent)
_ui->stack->addWidget(networkSettings);

QWidget *spacer = new QWidget();
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
spacer->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
_toolBar->addWidget(spacer);

QAction *quitAction = createColorAwareAction(QLatin1String(":/client/resources/quit.png"), tr("Quit %1").arg(qApp->applicationName()));
Expand Down Expand Up @@ -251,8 +244,6 @@ void SettingsDialog::showIssuesList(const QString &folderAlias)

void SettingsDialog::accountAdded(AccountState *s)
{
auto height = _toolBar->sizeHint().height();

bool brandingSingleAccount = !Theme::instance()->multiAccount();

QAction *accountAction;
Expand All @@ -268,7 +259,7 @@ void SettingsDialog::accountAdded(AccountState *s)

if (!brandingSingleAccount) {
accountAction->setToolTip(s->account()->displayName());
accountAction->setIconText(shortDisplayNameForSettings(s->account().data(), height * buttonSizeRatio));
accountAction->setIconText(shortDisplayNameForSettings(s->account().data()));
}
_toolBar->insertAction(_toolBar->actions().at(0), accountAction);
auto accountSettings = new AccountSettings(s, this);
Expand Down Expand Up @@ -317,8 +308,7 @@ void SettingsDialog::slotAccountDisplayNameChanged()
if (action) {
QString displayName = account->displayName();
action->setText(displayName);
auto height = _toolBar->sizeHint().height();
action->setIconText(shortDisplayNameForSettings(account, height * buttonSizeRatio));
action->setIconText(shortDisplayNameForSettings(account));
}
}
}
Expand Down Expand Up @@ -407,16 +397,16 @@ class ToolButtonAction : public QWidgetAction
return nullptr;
}

QToolButton *btn = new QToolButton(parent);
QToolButton *btn = new QToolButton(toolbar);
QString objectName = QLatin1String("settingsdialog_toolbutton_");
objectName += text();
btn->setObjectName(objectName);

btn->setDefaultAction(this);
btn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
btn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
// btn->setMinimumWidth(qMax<int>(parent->sizeHint().height() * buttonSizeRatio,
// btn->sizeHint().width()));
btn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding);
// icon size is fixed, we can't use the toolbars actual size hint as it might not be defined yet
btn->setMinimumWidth(toolbar->iconSize().height() * BUTTONSIZERATIO);
return btn;
}
};
Expand Down
Loading

0 comments on commit dc1070d

Please sign in to comment.