From 967b533e372ec06327c7e8b14c92291fc9f619de Mon Sep 17 00:00:00 2001 From: Carla Schroder Date: Mon, 31 Aug 2015 10:48:43 +0200 Subject: [PATCH 01/13] typo corrections, cross-refs --- doc/building.rst | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/building.rst b/doc/building.rst index 1cdd3958f4..486a6ebcf1 100644 --- a/doc/building.rst +++ b/doc/building.rst @@ -1,5 +1,6 @@ .. _building-label: +=============================== Appendix A: Building the Client =============================== @@ -23,7 +24,7 @@ Linux * openSUSE: ``zypper ref; zypper si -d owncloud-client`` * Fedora/CentOS: ``yum install yum-utils; yum-builddep owncloud-client`` -3. Follow the `generic build instructions`_. +3. Follow the :ref:`generic-build-instructions`. 4. (Optional) Call ``make install`` to install the client to the ``/usr/local/bin`` directory. @@ -43,7 +44,7 @@ The tested and preferred way to develop in this environment is through the use of HomeBrew_. The ownCloud team has its own repository containing non-standard recipes. -To set up your build enviroment for development using HomeBrew_: +To set up your build environment for development using HomeBrew_: 1. Add the ownCloud repository using the following command:: @@ -60,7 +61,7 @@ To set up your build enviroment for development using HomeBrew_: Where ``x.z`` is the current version of Qt 5 that brew has installed on your machine. -5. For compilation of the client, follow the `generic build instructions`_. +5. For compilation of the client, follow the :ref:`generic_build_instructions`. 6. In the build directory, run ``admin/osx/create_mac.sh ``. If you have a developer signing certificate, you can specify @@ -118,11 +119,11 @@ follow `Windows Installer Build (Cross-Compile)`_ instead. cmake -G "MinGW Makefiles" ../client mingw32-make - .. note:: You can try using ninja to build parallelly using + .. note:: You can try using ninja to build in parallell using ``cmake -G Ninja ../client`` and ``ninja`` instead. - .. note:: Refer to the `generic build instructions`_ section for additional options. + .. note:: Refer to the :ref:`generic-build-instructions` section for additional options. - The owncloud binary will appear in the ``bin`` directory. + The ownCloud binary will appear in the ``bin`` directory. Windows Installer Build (Cross-Compile) ----------------------- @@ -179,7 +180,8 @@ To cross-compile: you may use the official Microsoft ``signtool`` utility on Microsoft Windows. -.. _`generic build instructions`: +.. _generic-build-instructions + Generic Build Instructions -------------------------- From 916f522010003286f096999fa5aee9f0fefb7e42 Mon Sep 17 00:00:00 2001 From: Carla Schroder Date: Mon, 31 Aug 2015 11:03:14 +0200 Subject: [PATCH 02/13] typo correction --- doc/building.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/building.rst b/doc/building.rst index 486a6ebcf1..f0da4ebbee 100644 --- a/doc/building.rst +++ b/doc/building.rst @@ -119,7 +119,7 @@ follow `Windows Installer Build (Cross-Compile)`_ instead. cmake -G "MinGW Makefiles" ../client mingw32-make - .. note:: You can try using ninja to build in parallell using + .. note:: You can try using ninja to build in parallel using ``cmake -G Ninja ../client`` and ``ninja`` instead. .. note:: Refer to the :ref:`generic-build-instructions` section for additional options. From b3a462d45251dbdced15118a9eec37c714c38a8a Mon Sep 17 00:00:00 2001 From: Carla Schroder Date: Mon, 31 Aug 2015 11:12:47 +0200 Subject: [PATCH 03/13] more typos --- doc/building.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/building.rst b/doc/building.rst index f0da4ebbee..5ee84d1257 100644 --- a/doc/building.rst +++ b/doc/building.rst @@ -61,7 +61,7 @@ To set up your build environment for development using HomeBrew_: Where ``x.z`` is the current version of Qt 5 that brew has installed on your machine. -5. For compilation of the client, follow the :ref:`generic_build_instructions`. +5. For compilation of the client, follow the :ref:`generic-build-instructions`. 6. In the build directory, run ``admin/osx/create_mac.sh ``. If you have a developer signing certificate, you can specify @@ -126,7 +126,7 @@ follow `Windows Installer Build (Cross-Compile)`_ instead. The ownCloud binary will appear in the ``bin`` directory. Windows Installer Build (Cross-Compile) ------------------------ +--------------------------------------- Due to the large number of dependencies, building the client installer for Windows is **currently only officially supported on openSUSE**, by using the MinGW cross compiler. @@ -150,7 +150,7 @@ To cross-compile: zypper install mingw32-cross-nsis mingw32-cross-nsis-plugin-uac mingw32-cross-nsis-plugin-nsprocess -4. Follow the `generic build instructions`_ +4. Follow the :ref:`generic-build-instructions` .. note:: When building for Windows platforms, you must specify a special toolchain file that enables cmake to locate the platform-specific tools. To add @@ -180,7 +180,7 @@ To cross-compile: you may use the official Microsoft ``signtool`` utility on Microsoft Windows. -.. _generic-build-instructions +.. _generic-build-instructions: Generic Build Instructions -------------------------- From d503221b2e22109eb9f2a3d875dcd247dd8b4cf9 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 31 Aug 2015 11:31:20 +0200 Subject: [PATCH 04/13] Desktop file: Add X-GNOME-Autostart-Delay #3686 #1739 --- mirall.desktop.in | 1 + 1 file changed, 1 insertion(+) diff --git a/mirall.desktop.in b/mirall.desktop.in index 726b00a7f2..0c80a760eb 100644 --- a/mirall.desktop.in +++ b/mirall.desktop.in @@ -7,3 +7,4 @@ Comment=@APPLICATION_NAME@ desktop synchronization client GenericName=Folder Sync Icon=@APPLICATION_EXECUTABLE@ Keywords=@APPLICATION_NAME@;syncing;file;sharing; +X-GNOME-Autostart-Delay=3 From c48c5b9286b926ae22d9a4298e8ee39d760a0f34 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Sun, 30 Aug 2015 15:57:33 +0200 Subject: [PATCH 05/13] Move the progress bar to the right of the quota label Also change the label to show the free space and show the used and total space only on a tooltip of the bar. Related to #3644 --- src/gui/accountsettings.cpp | 8 +- src/gui/accountsettings.ui | 193 ++++++++++++++++-------------------- 2 files changed, 90 insertions(+), 111 deletions(-) diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index 56377b41fc..cdc45f6616 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -409,16 +409,18 @@ void AccountSettings::slotUpdateQuota(qint64 total, qint64 used) ui->quotaProgressBar->setVisible(true); ui->quotaProgressBar->setEnabled(true); // workaround the label only accepting ints (which may be only 32 bit wide) - ui->quotaProgressBar->setMaximum(100); const double percent = used/(double)total*100; const int percentInt = qMin(qRound(percent), 100); ui->quotaProgressBar->setValue(percentInt); QString usedStr = Utility::octetsToString(used); QString totalStr = Utility::octetsToString(total); QString percentStr = Utility::compactFormatDouble(percent, 1); - ui->quotaInfoLabel->setText(tr("Storage space: %1 (%3%) of %2 in use").arg(usedStr, totalStr, percentStr)); + QString toolTip = tr("%1 (%3%) of %2 in use. Some folders, including network mounted or shared folders, might have different limits.").arg(usedStr, totalStr, percentStr); + ui->quotaInfoLabel->setText(tr("%1 of %2 in use").arg(usedStr, totalStr)); + ui->quotaInfoLabel->setToolTip(toolTip); + ui->quotaProgressBar->setToolTip(toolTip); } else { - ui->quotaProgressBar->setMaximum(0); + ui->quotaProgressBar->setVisible(false); ui->quotaInfoLabel->setText(tr("Currently there is no storage usage information available.")); } } diff --git a/src/gui/accountsettings.ui b/src/gui/accountsettings.ui index c3921f1ff9..43bac5740a 100644 --- a/src/gui/accountsettings.ui +++ b/src/gui/accountsettings.ui @@ -15,23 +15,8 @@ - - - - 0 - 0 - - - - false - - - - - - true - - + + 0 @@ -45,73 +30,39 @@ 0 - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - Connected with <server> as <user> - - - true - - - true - - - - - - - - 0 - 0 - - - - Remove the account configuration from the client - - - Delete - - - - + + + + 0 + 0 + + + + + - + + + + 0 + 0 + + + + Connected with <server> as <user> + + + true + + + true + + + + + 0 @@ -119,41 +70,67 @@ - Some folders, including network mounted or shared folders, might have different limits. + Remove the account configuration from the client - Storage space: ... - - - true - - - - - - - false - - - - 16777215 - 7 - - - - 0 - - - -1 - - - false + Delete + + + + + + + 0 + 0 + + + + + + + Storage space: ... + + + false + + + + + + + false + + + + 0 + 0 + + + + + 16777215 + 7 + + + + 100 + + + -1 + + + false + + + + + From 7aeb27d5ee6a54716cf43cf0eddecb6252b4de27 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Mon, 31 Aug 2015 16:50:07 +0200 Subject: [PATCH 06/13] Bump 2.0 brancht to 2.0.2 after creation of 2.0.1 branch --- VERSION.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.cmake b/VERSION.cmake index e3214c26b0..e18bc8b343 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -1,6 +1,6 @@ set( MIRALL_VERSION_MAJOR 2 ) set( MIRALL_VERSION_MINOR 0 ) -set( MIRALL_VERSION_PATCH 1 ) +set( MIRALL_VERSION_PATCH 2 ) set( MIRALL_SOVERSION 0 ) if ( NOT DEFINED MIRALL_VERSION_SUFFIX ) From 35318ea9b51d6447158527f99e6a4fcbd23d5366 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Mon, 31 Aug 2015 17:23:15 +0200 Subject: [PATCH 07/13] Fix the Windows build Use an iterator variable declared outside of the loop condition expression. MinGW doesn't support C99 very easily and it's easier to keep our C code C89 compliant. --- csync/src/csync_exclude.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/csync/src/csync_exclude.c b/csync/src/csync_exclude.c index d5cee4368a..c673affb9c 100644 --- a/csync/src/csync_exclude.c +++ b/csync/src/csync_exclude.c @@ -268,23 +268,23 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(c_strlist_t *excludes, const ch c_strlist_t *path_components = c_strlist_new(32); char *path_split = strdup(path); size_t len = strlen(path_split); - for (int j = len; ; --j) { + for (i = len; ; --i) { // read backwards until a path separator is found - if (j != 0 && path_split[j-1] != '/') { + if (i != 0 && path_split[i-1] != '/') { continue; } // check 'basename', i.e. for "/foo/bar/fi" we'd check 'fi', 'bar', 'foo' - if (path_split[j] != 0) { - c_strlist_add_grow(&path_components, path_split + j); + if (path_split[i] != 0) { + c_strlist_add_grow(&path_components, path_split + i); } - if (j == 0 || !check_leading_dirs) { + if (i == 0 || !check_leading_dirs) { break; } // check 'dirname', i.e. for "/foo/bar/fi" we'd check '/foo/bar', '/foo' - path_split[j-1] = '\0'; + path_split[i-1] = '\0'; c_strlist_add_grow(&path_components, path_split); } SAFE_FREE(path_split); From db8f9586cbbd639e1ba1e88a78cb1fc84916a232 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 1 Sep 2015 11:29:37 +0200 Subject: [PATCH 08/13] Tray notification: Don't show a message about modified folder #3613 --- src/gui/folder.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 5b0f4b0c82..ea9056df13 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -441,9 +441,11 @@ void Folder::bubbleUpSyncResult() break; case CSYNC_INSTRUCTION_CONFLICT: case CSYNC_INSTRUCTION_SYNC: - updatedItems++; - if (!firstItemUpdated) - firstItemUpdated = item; + if (!item->_isDirectory) { + updatedItems++; + if (!firstItemUpdated) + firstItemUpdated = item; + } break; case CSYNC_INSTRUCTION_ERROR: qDebug() << "Got Instruction ERROR. " << _syncResult.errorString(); From ebee6f0bc266bd68809a3f553bce14bde5116fdf Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 1 Sep 2015 11:32:59 +0200 Subject: [PATCH 09/13] Settings dialog: remove the close button #3713 --- src/gui/settingsdialog.cpp | 3 --- src/gui/settingsdialog.ui | 26 ++------------------------ 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index d798bd8a4c..f00fd7ad38 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -111,9 +111,6 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) : QTimer::singleShot(1, this, SLOT(showFirstPage())); - QPushButton *closeButton = _ui->buttonBox->button(QDialogButtonBox::Close); - connect(closeButton, SIGNAL(clicked()), SLOT(accept())); - QAction *showLogWindow = new QAction(this); showLogWindow->setShortcut(QKeySequence("F12")); connect(showLogWindow, SIGNAL(triggered()), gui, SLOT(slotToggleLogBrowser())); diff --git a/src/gui/settingsdialog.ui b/src/gui/settingsdialog.ui index cdabf661f9..83590c23bf 100644 --- a/src/gui/settingsdialog.ui +++ b/src/gui/settingsdialog.ui @@ -6,8 +6,8 @@ 0 0 - 693 - 457 + 488 + 342 @@ -29,28 +29,6 @@ 0 - - - - - 0 - - - 0 - - - - - Qt::Horizontal - - - QDialogButtonBox::Close - - - - - - From 0d08bbec747bb26b8a9143ceb590ebe6d347a401 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 1 Sep 2015 11:37:47 +0200 Subject: [PATCH 10/13] AccountSettings: remove unused member Fix a coverity warning --- src/gui/accountsettings.cpp | 1 - src/gui/accountsettings.h | 1 - 2 files changed, 2 deletions(-) diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index cdc45f6616..c929932eb5 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -121,7 +121,6 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent) : this, SLOT(slotUpdateQuota(qint64,qint64))); connect(ui->deleteButton, SIGNAL(clicked()) , this, SLOT(slotDeleteAccount())); - } void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos) diff --git a/src/gui/accountsettings.h b/src/gui/accountsettings.h index 5f4034cf76..c20c464dfa 100644 --- a/src/gui/accountsettings.h +++ b/src/gui/accountsettings.h @@ -92,7 +92,6 @@ private: QUrl _OCUrl; bool _wasDisabledBefore; AccountState *_accountState; - QLabel *_quotaLabel; QuotaInfo _quotaInfo; }; From f77ae28ed1a2299b773962c98173abf2ae697655 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 1 Sep 2015 11:39:55 +0200 Subject: [PATCH 11/13] AccountSettings: Fix coverity warning FolderMan::folder might return null --- src/gui/accountsettings.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index c929932eb5..de8baa3f77 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -286,9 +286,10 @@ void AccountSettings::slotResetCurrentFolder() QMessageBox::Yes|QMessageBox::No ); if( ret == QMessageBox::Yes ) { FolderMan *folderMan = FolderMan::instance(); - Folder *f = folderMan->folder(alias); - f->slotTerminateSync(); - f->wipe(); + if(Folder *f = folderMan->folder(alias)) { + f->slotTerminateSync(); + f->wipe(); + } folderMan->slotScheduleAllFolders(); } } From 688aaadb6050c1698519ad65c6d5f4755706c935 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Sat, 29 Aug 2015 13:04:10 +0200 Subject: [PATCH 12/13] Don't show a sync success status toolip when signed out --- src/gui/folderstatusmodel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index d21d25e3b3..e7f5705570 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -172,7 +172,10 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const case FolderStatusDelegate::FolderSyncPaused : return f->syncPaused(); case FolderStatusDelegate::FolderAccountConnected : return accountConnected; case Qt::ToolTipRole: - return Theme::instance()->statusHeaderText(f->syncResult().status()); + if ( accountConnected ) + return Theme::instance()->statusHeaderText(f->syncResult().status()); + else + return tr("Signed out"); case FolderStatusDelegate::FolderStatusIconRole: if ( accountConnected ) { auto theme = Theme::instance(); From 0fa43538417621e02951e00ca2bdfa8ea0be10cb Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 1 Sep 2015 17:02:23 +0200 Subject: [PATCH 13/13] Remove the accountmigrator.cpp It is not used This was used to convert the config from the community client to the branded client. But we don't need this feature anymore https://github.com/owncloud/client/issues/3515#issuecomment-133394443 --- src/gui/CMakeLists.txt | 1 - src/gui/accountmigrator.cpp | 89 ------------------------------------- src/gui/accountmigrator.h | 39 ---------------- src/gui/folderman.cpp | 1 - 4 files changed, 130 deletions(-) delete mode 100644 src/gui/accountmigrator.cpp delete mode 100644 src/gui/accountmigrator.h diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index e45f8e6a7c..a892ab1f27 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -62,7 +62,6 @@ set(client_SRCS sslerrordialog.cpp syncrunfilelog.cpp systray.cpp - accountmigrator.cpp quotainfo.cpp accountstate.cpp addcertificatedialog.cpp diff --git a/src/gui/accountmigrator.cpp b/src/gui/accountmigrator.cpp deleted file mode 100644 index 8d9a558aa8..0000000000 --- a/src/gui/accountmigrator.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) by Klaas Freitag - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - */ - -#include "accountmigrator.h" -#include "configfile.h" -#include "folderman.h" -#include "theme.h" - - -#include -#include -#include -#include -#include - -namespace OCC { - -// The purpose of this class is to migrate an existing account that -// was set up with an unbranded client to an branded one. -// The usecase is: Usually people try first with the community client, -// later they maybe switch to a branded client. When they install the -// branded client first, it should automatically pick the information -// from the already configured account. - -AccountMigrator::AccountMigrator() -{ - -} - -// the list of folder definitions which are files in the directory "folders" -// underneath the ownCloud configPath (with ownCloud as a last segment) -// need to be copied to the themed path and adjusted. - -QStringList AccountMigrator::migrateFolderDefinitons() -{ - ConfigFile cfg; - QStringList re; - - QString themePath = cfg.configPath(); - // create the original ownCloud config path out of the theme path - // by removing the theme folder and append ownCloud. - QString oCPath = themePath; - if( oCPath.endsWith(QLatin1Char('/')) ) { - oCPath.truncate( oCPath.length()-1 ); - } - oCPath = oCPath.left( oCPath.lastIndexOf('/')); - - themePath += QLatin1String( "folders"); - oCPath += QLatin1String( "/ownCloud/folders" ); - - qDebug() << "Migrator: theme-path: " << themePath; - qDebug() << "Migrator: ownCloud path: " << oCPath; - - // get a dir listing of the ownCloud folder definitions and copy - // them over to the theme dir - QDir oCDir(oCPath); - oCDir.setFilter( QDir::Files ); - QStringList files = oCDir.entryList(); - - foreach( const QString& file, files ) { - QString escapedAlias = FolderMan::instance()->escapeAlias(file); - QString themeFile = themePath + QDir::separator() + file; - QString oCFile = oCPath+QDir::separator()+file; - if( QFile::copy( oCFile, themeFile ) ) { - re.append(file); - qDebug() << "Migrator: Folder definition migrated: " << file; - - // fix the connection entry of the folder definition - QSettings settings(themeFile, QSettings::IniFormat); - settings.beginGroup( escapedAlias ); - settings.setValue(QLatin1String("connection"), Theme::instance()->appName()); - settings.sync(); - } - } - - return re; -} - -} diff --git a/src/gui/accountmigrator.h b/src/gui/accountmigrator.h deleted file mode 100644 index 7a023c700d..0000000000 --- a/src/gui/accountmigrator.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) by Klaas Freitag - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - */ - -#ifndef ACCOUNTMIGRATOR_H -#define ACCOUNTMIGRATOR_H - -#include - -namespace OCC { - -/** - * @brief The AccountSettings class - * @ingroup gui - */ -class AccountMigrator { - -public: - explicit AccountMigrator(); - - /** - * @brief migrateFolderDefinitons - migrate the folder definition files - * @return the list of migrated folder definitions - */ - QStringList migrateFolderDefinitons(); - -}; -} - -#endif // ACCOUNTMIGRATOR_H diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp index 1d949e5d36..3b18a9a1ce 100644 --- a/src/gui/folderman.cpp +++ b/src/gui/folderman.cpp @@ -19,7 +19,6 @@ #include "theme.h" #include "socketapi.h" #include "account.h" -#include "accountmigrator.h" #include "accountstate.h" #include "accountmanager.h" #include "filesystem.h"