diff --git a/src/mirall/application.cpp b/src/mirall/application.cpp index 33b002c134..99f710967e 100644 --- a/src/mirall/application.cpp +++ b/src/mirall/application.cpp @@ -480,16 +480,16 @@ void Application::computeOverallSyncStatus() } } + QIcon statusIcon = _theme->syncStateIcon( overallResult.status(), 22 ); - // QIcon statusIcon = _theme->syncStateIcon( overallResult.status(), 22 ); - // if( overallResult.status() == SyncResult::Success ) { + if( overallResult.status() == SyncResult::Success ) { // Rather display the mirall icon instead of the ok icon. #ifdef _WIN32 - QIcon statusIcon = _theme->applicationIcon( 16 ); + statusIcon = _theme->applicationIcon( 16 ); #else - QIcon statusIcon = _theme->applicationIcon( 22 ); + statusIcon = _theme->applicationIcon( 22 ); #endif - // } + } _tray->setIcon( statusIcon ); _tray->setToolTip(trayMessage); diff --git a/src/mirall/csyncthread.cpp b/src/mirall/csyncthread.cpp index a75aada636..2892d848ed 100644 --- a/src/mirall/csyncthread.cpp +++ b/src/mirall/csyncthread.cpp @@ -170,7 +170,34 @@ void CSyncThread::run() _mutex.unlock(); if( csync_init(csync) < 0 ) { - emit csyncError(tr("CSync init failed.")); + CSYNC_ERROR_CODE err = csync_errno(); + QString errStr; + + switch( err ) { + case CSYNC_ERR_LOCK: + errStr = tr("CSync failed to create a lock file."); + break; + case CSYNC_ERR_STATEDB_LOAD: + errStr = tr("CSync failed to load the state db."); + break; + case CSYNC_ERR_MODULE: + errStr = tr("CSync failed to load the ownCloud module."); + break; + case CSYNC_ERR_TIMESKEW: + errStr = tr("The system time between the local machine and the server differs " + "too much. Please use a time syncronization service (ntp) on both machines."); + break; + case CSYNC_ERR_FILESYSTEM: + errStr = tr("CSync could not detect the filesystem type."); + break; + case CSYNC_ERR_TREE: + errStr = tr("CSync got an error while processing internal trees."); + break; + default: + errStr = tr("An internal error number %1 happend.").arg( (int) err ); + } + qDebug() << " #### ERROR String emitted: " << errStr; + emit csyncError(errStr); goto cleanup; } diff --git a/src/mirall/folderman.cpp b/src/mirall/folderman.cpp index 0a319c2026..147a4ef1a8 100644 --- a/src/mirall/folderman.cpp +++ b/src/mirall/folderman.cpp @@ -246,7 +246,6 @@ void FolderMan::slotScheduleSync( const QString& alias ) qDebug() << "Schedule folder " << alias << " to sync!"; if( _currentSyncFolder == alias ) { // the current folder is currently syncing. - qDebug() << "OOOOOOOOOOOOOOOOOOOOOOO Folder is currently syncing"; } if( _scheduleQueue.contains( alias ) ) { diff --git a/src/mirall/owncloudfolder.cpp b/src/mirall/owncloudfolder.cpp index 00a42d305e..0ee7d48d8a 100644 --- a/src/mirall/owncloudfolder.cpp +++ b/src/mirall/owncloudfolder.cpp @@ -189,7 +189,11 @@ void ownCloudFolder::slotCSyncError(const QString& err) void ownCloudFolder::slotCSyncTerminated() { // do not ask csync here for reasons. - emit syncFinished( SyncResult(SyncResult::Error)); + SyncResult res( SyncResult::Error ); + _errors.append( tr("The CSync thread terminated unexpectedly.") ); + res.setErrorStrings(_errors); + + emit syncFinished( res ); } void ownCloudFolder::slotCSyncFinished() diff --git a/src/mirall/theme.cpp b/src/mirall/theme.cpp index db4e19556a..ff177bf245 100644 --- a/src/mirall/theme.cpp +++ b/src/mirall/theme.cpp @@ -78,7 +78,7 @@ QString Theme::statusHeaderText( SyncResult::Status status ) const } else if( status == SyncResult::Success ) { resultStr = tr("Sync Success"); } else if( status == SyncResult::Error ) { - resultStr = tr("Sync Error"); + resultStr = tr("Sync Error - Click info button for details."); } else if( status == SyncResult::Disabled ) { resultStr = tr("Sync Disabled"); } else if( status == SyncResult::SetupError ) {