mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
Minor UI improvements. Status bar now has more information, window title
now reflects the program name and there is at tool tip on the system tray icon.
This commit is contained in:
parent
af0f00d115
commit
3d4d8081b3
1 changed files with 11 additions and 4 deletions
|
@ -33,8 +33,9 @@ SyncWindow::SyncWindow(QWidget *parent) :
|
|||
{
|
||||
mBusy = false;
|
||||
ui->setupUi(this);
|
||||
ui->statusBar->showMessage(tr("Version %1").arg(OCS_VERSION));
|
||||
setWindowTitle("OwnCloud Sync");
|
||||
mEditingConfig = -1;
|
||||
mConflictsExist = false;
|
||||
|
||||
mCurrentAccountEdit = 0;
|
||||
mTotalSyncs = 0;
|
||||
|
@ -49,6 +50,7 @@ SyncWindow::SyncWindow(QWidget *parent) :
|
|||
// Add the tray, if available
|
||||
mSystemTray = new QSystemTrayIcon(this);
|
||||
mSystemTray->setIcon(mDefaultIcon);
|
||||
mSystemTray->setToolTip(tr("OwnCloud Sync Version %1").arg(OCS_VERSION));
|
||||
mSystemTray->show();
|
||||
connect(mSystemTray,SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
|
||||
this,SLOT(systemTrayActivated(QSystemTrayIcon::ActivationReason)));
|
||||
|
@ -86,7 +88,7 @@ SyncWindow::SyncWindow(QWidget *parent) :
|
|||
}
|
||||
rebuildAccountsTable();
|
||||
|
||||
// updateStatus();
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
void SyncWindow::updateStatus()
|
||||
|
@ -95,7 +97,8 @@ void SyncWindow::updateStatus()
|
|||
// return;
|
||||
|
||||
if( !mBusy ) {
|
||||
ui->status->setText("Waiting ");
|
||||
ui->statusBar->showMessage(tr("Version %1: Waiting...").arg(OCS_VERSION));
|
||||
ui->status->setText("Waiting...");
|
||||
ui->progressFile->setValue(0);
|
||||
ui->progressTotal->setValue(0);
|
||||
if(mConflictsExist) {
|
||||
|
@ -518,9 +521,13 @@ void SyncWindow::processNextStep()
|
|||
if( mAccountsReadyToSync.size() != 0 ) {
|
||||
mBusy = true;
|
||||
mTotalSyncs++;
|
||||
mAccountsReadyToSync.dequeue()->sync();
|
||||
OwnCloudSync *account = mAccountsReadyToSync.dequeue();
|
||||
ui->statusBar->showMessage(tr("Version %1: Synchronizing %2")
|
||||
.arg(OCS_VERSION).arg(account->getName()));
|
||||
account->sync();
|
||||
} else {
|
||||
mBusy = false;
|
||||
updateStatus();
|
||||
}
|
||||
if(mTotalSyncs%1000 == 0 ) {
|
||||
saveLogs();
|
||||
|
|
Loading…
Reference in a new issue