- added a new icon to display the waiting-to-be-synced state

- fixed the status display if the status dialog opens
Esse commit está contido em:
Klaas Freitag
2012-03-31 12:44:22 +02:00
commit cd817940ae
6 arquivos alterados com 18 adições e 8 exclusões
+1
Ver Arquivo
@@ -20,5 +20,6 @@
<file>resources/folder-important.png</file>
<file>resources/folder-grey.png</file>
<file>resources/owncloud_splash.png</file>
<file>resources/task-ongoing.png</file>
</qresource>
</RCC>
Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 3.3 KiB

+2 -2
Ver Arquivo
@@ -268,7 +268,6 @@ void Application::slotFolderOpenAction( const QString& alias )
void Application::slotTrayClicked( QSystemTrayIcon::ActivationReason reason )
{
if( reason == QSystemTrayIcon::Trigger ) {
_folderMan->disableFoldersWithRestore();
// check if there is a mirall.cfg already.
if( _owncloudSetupWizard->wizard()->isVisible() ) {
_owncloudSetupWizard->wizard()->show();
@@ -281,10 +280,11 @@ void Application::slotTrayClicked( QSystemTrayIcon::ActivationReason reason )
qDebug() << "No configured folders yet, start the Owncloud integration dialog.";
_owncloudSetupWizard->startWizard();
} else {
qDebug() << "#============# Status dialog starting #=============#";
_statusDialog->setFolderList( _folderMan->map() );
_statusDialog->show();
}
_folderMan->restoreEnabledFolders();
}
}
+12 -5
Ver Arquivo
@@ -19,6 +19,7 @@
#include "mirall/folder.h"
#include "mirall/folderwatcher.h"
#include "mirall/mirallconfigfile.h"
#include "mirall/syncresult.h"
#define DEFAULT_POLL_INTERVAL_SEC 15000
@@ -101,9 +102,10 @@ void Folder::setSyncEnabled( bool doit )
_pollTimer->start();
}
qDebug() << "setSyncEnabled - ############################ " << doit;
if( doit ) {
// undefined until next sync
_syncResult.setStatus( SyncResult::Undefined );
_syncResult.setStatus( SyncResult::NotYetStarted);
evaluateSync( QStringList() );
} else {
// disabled.
@@ -187,8 +189,16 @@ void Folder::evaluateSync(const QStringList &pathList)
// sync finished.
qDebug() << "* " << alias() << "Poll timer disabled";
_pollTimer->stop();
_syncResult.setStatus( SyncResult::NotYetStarted );
emit scheduleToSync( alias() );
// startSync( pathList );
}
void Folder::startSync( const QStringList &pathList )
{
_syncResult = SyncResult( SyncResult::SyncRunning );
emit syncStateChange();
}
void Folder::slotPollTimerTimeout()
@@ -218,9 +228,6 @@ void Folder::slotSyncStarted()
#ifdef USE_WATCHER
_watcher->setEventsEnabled(false);
#endif
_syncResult = SyncResult( SyncResult::SyncRunning );
emit syncStateChange();
}
void Folder::slotSyncFinished(const SyncResult &result)
+2
Ver Arquivo
@@ -99,6 +99,8 @@ void ownCloudFolder::startSync()
void ownCloudFolder::startSync(const QStringList &pathList)
{
Folder::startSync( pathList );
if (_csync && _csync->isRunning()) {
qCritical() << "* ERROR csync is still running and new sync requested.";
return;
+1 -1
Ver Arquivo
@@ -50,7 +50,7 @@ QIcon Theme::syncStateIcon( SyncResult::Status status, int ) const
qDebug() << "Status: " << status;
if( status == SyncResult::NotYetStarted ) {
statusIcon = "dialog-close";
statusIcon = "task-ongoing";
} else if( status == SyncResult::SyncRunning ) {
statusIcon = "view-refresh";
} else if( status == SyncResult::Success ) {