mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2026-04-04 20:34:17 +02:00
Compare commits
5 Commits
v2.7.0-bet
...
v1.4.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14a25f9d3f | ||
|
|
4e777aae33 | ||
|
|
5a84452102 | ||
|
|
8aa75ba4a4 | ||
|
|
2f24172bac |
16
ChangeLog
16
ChangeLog
@@ -1,5 +1,21 @@
|
|||||||
ChangeLog
|
ChangeLog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
version 1.4.2 (release 2013-10-18 ), csync 0.90.4 required
|
||||||
|
|
||||||
|
* Do not show the warning icon in the tray (#944)
|
||||||
|
* Fix manual proxy support when switching (#1016)
|
||||||
|
* Add folder column to detailed sync protocol (#1037)
|
||||||
|
* Fix possible endless loop in inotify (#1041)
|
||||||
|
* Do not elide the progress text (#1049)
|
||||||
|
* Fix high CPU load (#1073)
|
||||||
|
* Reconnect if network is unavailable after startup (#1080)
|
||||||
|
* Ensure paused folder stays paused when syncing with more than one folder (#1083)
|
||||||
|
* Don't show desktop notification when the user doesn't want to (#1093)
|
||||||
|
* System tray: Avoid quick flickering up of the ok-icon for the sync prepare state
|
||||||
|
* Progress: Do not show progress if nothing is transmitted
|
||||||
|
* Progress: Show number of deletes.
|
||||||
|
|
||||||
version 1.4.1 (release 2013-09-24 ), csync 0.90.1 required
|
version 1.4.1 (release 2013-09-24 ), csync 0.90.1 required
|
||||||
|
|
||||||
* Translation and documentation fixes.
|
* Translation and documentation fixes.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
set( VERSION_MAJOR 1 )
|
set( VERSION_MAJOR 1 )
|
||||||
set( VERSION_MINOR 4 )
|
set( VERSION_MINOR 4 )
|
||||||
set( VERSION_PATCH 2 )
|
set( VERSION_PATCH 2 )
|
||||||
set( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX}beta1")
|
set( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX}")
|
||||||
set( SOVERSION 0 )
|
set( SOVERSION 0 )
|
||||||
|
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ void AccountSettings::folderToModelItem( QStandardItem *item, Folder *f )
|
|||||||
item->setData( f->nativePath(), FolderStatusDelegate::FolderPathRole );
|
item->setData( f->nativePath(), FolderStatusDelegate::FolderPathRole );
|
||||||
item->setData( f->secondPath(), FolderStatusDelegate::FolderSecondPathRole );
|
item->setData( f->secondPath(), FolderStatusDelegate::FolderSecondPathRole );
|
||||||
item->setData( f->alias(), FolderStatusDelegate::FolderAliasRole );
|
item->setData( f->alias(), FolderStatusDelegate::FolderAliasRole );
|
||||||
item->setData( f->syncEnabled(), FolderStatusDelegate::FolderSyncEnabled );
|
item->setData( f->userSyncEnabled() && f->syncEnabled(), FolderStatusDelegate::FolderSyncEnabled );
|
||||||
|
|
||||||
SyncResult res = f->syncResult();
|
SyncResult res = f->syncResult();
|
||||||
SyncResult::Status status = res.status();
|
SyncResult::Status status = res.status();
|
||||||
@@ -228,7 +228,7 @@ void AccountSettings::folderToModelItem( QStandardItem *item, Folder *f )
|
|||||||
|
|
||||||
Theme *theme = Theme::instance();
|
Theme *theme = Theme::instance();
|
||||||
item->setData( theme->statusHeaderText( status ), Qt::ToolTipRole );
|
item->setData( theme->statusHeaderText( status ), Qt::ToolTipRole );
|
||||||
if( f->syncEnabled() ) {
|
if( f->syncEnabled() && f->userSyncEnabled() ) {
|
||||||
if( status == SyncResult::SyncPrepare ) {
|
if( status == SyncResult::SyncPrepare ) {
|
||||||
if( _wasDisabledBefore ) {
|
if( _wasDisabledBefore ) {
|
||||||
// if the folder was disabled before, set the sync icon
|
// if the folder was disabled before, set the sync icon
|
||||||
@@ -445,7 +445,7 @@ void AccountSettings::slotEnableCurrentFolder()
|
|||||||
if ( f->isBusy() && terminate )
|
if ( f->isBusy() && terminate )
|
||||||
folderMan->terminateSyncProcess( alias );
|
folderMan->terminateSyncProcess( alias );
|
||||||
|
|
||||||
folderMan->slotEnableFolder( alias, !folderEnabled );
|
folderMan->slotGuiPauseFolder( alias, !folderEnabled );
|
||||||
|
|
||||||
// keep state for the icon setting.
|
// keep state for the icon setting.
|
||||||
if( !folderEnabled ) _wasDisabledBefore = true;
|
if( !folderEnabled ) _wasDisabledBefore = true;
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ Folder::Folder(const QString &alias, const QString &path, const QString& secondP
|
|||||||
, _secondPath(secondPath)
|
, _secondPath(secondPath)
|
||||||
, _alias(alias)
|
, _alias(alias)
|
||||||
, _enabled(true)
|
, _enabled(true)
|
||||||
|
, _userSyncEnabled(true)
|
||||||
, _thread(0)
|
, _thread(0)
|
||||||
, _csync(0)
|
, _csync(0)
|
||||||
, _csyncError(false)
|
, _csyncError(false)
|
||||||
@@ -200,16 +201,32 @@ void Folder::setSyncEnabled( bool doit )
|
|||||||
{
|
{
|
||||||
_enabled = doit;
|
_enabled = doit;
|
||||||
|
|
||||||
if( doit ) {
|
if( doit && userSyncEnabled() ) {
|
||||||
// qDebug() << "Syncing enabled on folder " << name();
|
// qDebug() << "Syncing enabled on folder " << name();
|
||||||
|
_pollTimer.start();
|
||||||
|
_watcher->clearPendingEvents(); // FIXME 1.5: Why isn't that happening in setEventsEnabled?
|
||||||
|
_watcher->setEventsEnabled(true);
|
||||||
|
_timeSinceLastSync.restart();
|
||||||
} else {
|
} else {
|
||||||
// do not stop or start the watcher here, that is done internally by
|
// do not stop or start the watcher here, that is done internally by
|
||||||
// folder class. Even if the watcher fires, the folder does not
|
// folder class. Even if the watcher fires, the folder does not
|
||||||
// schedule itself because it checks the var. _enabled before.
|
// schedule itself because it checks the var. _enabled before.
|
||||||
_pollTimer.stop();
|
_pollTimer.stop();
|
||||||
|
_watcher->setEventsEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Folder::userSyncEnabled()
|
||||||
|
{
|
||||||
|
return _userSyncEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Folder::slotSetSyncUserEnabled( bool enable )
|
||||||
|
{
|
||||||
|
_userSyncEnabled = enable;
|
||||||
|
setSyncEnabled( syncEnabled() ); // no change on the system enable flag.
|
||||||
|
}
|
||||||
|
|
||||||
void Folder::setSyncState(SyncResult::Status state)
|
void Folder::setSyncState(SyncResult::Status state)
|
||||||
{
|
{
|
||||||
_syncResult.setStatus(state);
|
_syncResult.setStatus(state);
|
||||||
@@ -222,11 +239,15 @@ SyncResult Folder::syncResult() const
|
|||||||
|
|
||||||
void Folder::evaluateSync(const QStringList &/*pathList*/)
|
void Folder::evaluateSync(const QStringList &/*pathList*/)
|
||||||
{
|
{
|
||||||
if( !_enabled ) {
|
if( !syncEnabled() ) {
|
||||||
qDebug() << "*" << alias() << "sync skipped, disabled!";
|
qDebug() << "*" << alias() << "sync skipped, disabled!";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !userSyncEnabled() ) {
|
||||||
|
qDebug() << "*" << alias() << "sync skipped, user disabled!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
_syncResult.setStatus( SyncResult::NotYetStarted );
|
_syncResult.setStatus( SyncResult::NotYetStarted );
|
||||||
_syncResult.clearErrors();
|
_syncResult.clearErrors();
|
||||||
emit scheduleToSync( alias() );
|
emit scheduleToSync( alias() );
|
||||||
@@ -237,8 +258,9 @@ void Folder::slotPollTimerTimeout()
|
|||||||
{
|
{
|
||||||
qDebug() << "* Polling" << alias() << "for changes. (time since next sync:" << (_timeSinceLastSync.elapsed() / 1000) << "s)";
|
qDebug() << "* Polling" << alias() << "for changes. (time since next sync:" << (_timeSinceLastSync.elapsed() / 1000) << "s)";
|
||||||
|
|
||||||
|
// Force sync if the last sync is a long time ago or if there was a serious problem.
|
||||||
if (quint64(_timeSinceLastSync.elapsed()) > MirallConfigFile().forceSyncInterval() ||
|
if (quint64(_timeSinceLastSync.elapsed()) > MirallConfigFile().forceSyncInterval() ||
|
||||||
_syncResult.status() != SyncResult::Success ) {
|
!(_syncResult.status() == SyncResult::Success || _syncResult.status() == SyncResult::Problem)) {
|
||||||
qDebug() << "** Force Sync now";
|
qDebug() << "** Force Sync now";
|
||||||
evaluateSync(QStringList());
|
evaluateSync(QStringList());
|
||||||
} else {
|
} else {
|
||||||
@@ -627,10 +649,13 @@ void Folder::slotCsyncUnavailable()
|
|||||||
|
|
||||||
void Folder::slotCSyncFinished()
|
void Folder::slotCSyncFinished()
|
||||||
{
|
{
|
||||||
qDebug() << "-> CSync Finished slot with error " << _csyncError;
|
qDebug() << "-> CSync Finished slot for" << alias() << "with error" << _csyncError;
|
||||||
_watcher->setEventsEnabledDelayed(2000);
|
if( syncEnabled() && userSyncEnabled() ) {
|
||||||
_pollTimer.start();
|
qDebug() << "Sync is enabled - starting the polltimer again.";
|
||||||
_timeSinceLastSync.restart();
|
_watcher->setEventsEnabledDelayed(2000);
|
||||||
|
_pollTimer.start();
|
||||||
|
_timeSinceLastSync.restart();
|
||||||
|
}
|
||||||
|
|
||||||
bubbleUpSyncResult();
|
bubbleUpSyncResult();
|
||||||
|
|
||||||
|
|||||||
@@ -153,6 +153,13 @@ public slots:
|
|||||||
void setProxyDirty(bool value);
|
void setProxyDirty(bool value);
|
||||||
bool proxyDirty();
|
bool proxyDirty();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief slotSetSyncUserEnabled - slot that sets the enable/disable flag from the GUI
|
||||||
|
* @param enable
|
||||||
|
*/
|
||||||
|
void slotSetSyncUserEnabled( bool enable );
|
||||||
|
bool userSyncEnabled();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void slotCSyncStarted();
|
void slotCSyncStarted();
|
||||||
void slotCSyncError(const QString& );
|
void slotCSyncError(const QString& );
|
||||||
@@ -197,6 +204,7 @@ protected:
|
|||||||
QString _configFile;
|
QString _configFile;
|
||||||
QFileSystemWatcher *_pathWatcher;
|
QFileSystemWatcher *_pathWatcher;
|
||||||
bool _enabled;
|
bool _enabled;
|
||||||
|
bool _userSyncEnabled; // enabled by user interaction?
|
||||||
FolderWatcher *_watcher;
|
FolderWatcher *_watcher;
|
||||||
SyncResult _syncResult;
|
SyncResult _syncResult;
|
||||||
QThread *_thread;
|
QThread *_thread;
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ Folder* FolderMan::setupFolderFromConfigFile(const QString &file) {
|
|||||||
return folder;
|
return folder;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FolderMan::slotEnableFolder( const QString& alias, bool enable )
|
void FolderMan::slotGuiPauseFolder( const QString& alias, bool enable )
|
||||||
{
|
{
|
||||||
if( ! _folderMap.contains( alias ) ) {
|
if( ! _folderMap.contains( alias ) ) {
|
||||||
qDebug() << "!! Can not enable alias " << alias << ", can not be found in folderMap.";
|
qDebug() << "!! Can not enable alias " << alias << ", can not be found in folderMap.";
|
||||||
@@ -278,7 +278,7 @@ void FolderMan::slotEnableFolder( const QString& alias, bool enable )
|
|||||||
|
|
||||||
Folder *f = _folderMap[alias];
|
Folder *f = _folderMap[alias];
|
||||||
if( f ) {
|
if( f ) {
|
||||||
f->setSyncEnabled(enable);
|
f->slotSetSyncUserEnabled(enable);
|
||||||
f->evaluateSync(QStringList());
|
f->evaluateSync(QStringList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ signals:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void slotRemoveFolder( const QString& );
|
void slotRemoveFolder( const QString& );
|
||||||
void slotEnableFolder( const QString&, bool );
|
void slotGuiPauseFolder( const QString&, bool );
|
||||||
|
|
||||||
void slotFolderSyncStarted();
|
void slotFolderSyncStarted();
|
||||||
void slotFolderSyncFinished( const SyncResult& );
|
void slotFolderSyncFinished( const SyncResult& );
|
||||||
|
|||||||
Reference in New Issue
Block a user