mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
SystemTray menu: remove the quota information
It makes no sens anymore with multi account and users will see it from the dialog anyway.
This commit is contained in:
parent
61a1a0bb2d
commit
7757886ebc
3 changed files with 0 additions and 24 deletions
|
@ -222,8 +222,6 @@ void Application::slotAccountStateRemoved(AccountState *accountState)
|
|||
disconnect(accountState, SIGNAL(stateChanged(int)), this, SLOT(slotAccountStateChanged(int)));
|
||||
if (_gui) {
|
||||
disconnect(accountState, SIGNAL(stateChanged(int)), _gui, SLOT(slotAccountStateChanged()));
|
||||
disconnect(accountState->quotaInfo(), SIGNAL(quotaUpdated(qint64,qint64)),
|
||||
_gui, SLOT(slotRefreshQuotaDisplay(qint64,qint64)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -231,8 +229,6 @@ void Application::slotAccountStateAdded(AccountState *accountState)
|
|||
{
|
||||
connect(accountState, SIGNAL(stateChanged(int)), _gui, SLOT(slotAccountStateChanged()));
|
||||
connect(accountState, SIGNAL(stateChanged(int)), this, SLOT(slotAccountStateChanged(int)));
|
||||
connect(accountState->quotaInfo(), SIGNAL(quotaUpdated(qint64,qint64)),
|
||||
_gui, SLOT(slotRefreshQuotaDisplay(qint64,qint64)));
|
||||
}
|
||||
|
||||
void Application::slotCleanup()
|
||||
|
|
|
@ -356,8 +356,6 @@ void ownCloudGui::setupContextMenu()
|
|||
_contextMenu->addSeparator();
|
||||
|
||||
if (isConfigured && isConnected) {
|
||||
_contextMenu->addAction(_actionQuota);
|
||||
_contextMenu->addSeparator();
|
||||
_contextMenu->addAction(_actionStatus);
|
||||
_contextMenu->addMenu(_recentActionsMenu);
|
||||
_contextMenu->addSeparator();
|
||||
|
@ -423,8 +421,6 @@ void ownCloudGui::slotFolderOpenAction( const QString& alias )
|
|||
|
||||
void ownCloudGui::setupActions()
|
||||
{
|
||||
_actionQuota = new QAction(tr("Calculating quota..."), this);
|
||||
_actionQuota->setEnabled( false );
|
||||
_actionStatus = new QAction(tr("Unknown status"), this);
|
||||
_actionStatus->setEnabled( false );
|
||||
_actionSettings = new QAction(tr("Settings..."), this);
|
||||
|
@ -452,19 +448,6 @@ void ownCloudGui::setupActions()
|
|||
|
||||
}
|
||||
|
||||
void ownCloudGui::slotRefreshQuotaDisplay( qint64 total, qint64 used )
|
||||
{
|
||||
if (total == 0) {
|
||||
_actionQuota->setText(tr("Quota n/a"));
|
||||
return;
|
||||
}
|
||||
|
||||
double percent = used/(double)total*100;
|
||||
QString percentFormatted = Utility::compactFormatDouble(percent, 1);
|
||||
QString totalFormatted = Utility::octetsToString(total);
|
||||
_actionQuota->setText(tr("%1% of %2 in use").arg(percentFormatted).arg(totalFormatted));
|
||||
}
|
||||
|
||||
void ownCloudGui::slotRebuildRecentMenus()
|
||||
{
|
||||
_recentActionsMenu->clear();
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "systray.h"
|
||||
#include "connectionvalidator.h"
|
||||
#include "progressdispatcher.h"
|
||||
#include "quotainfo.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QPointer>
|
||||
|
@ -56,7 +55,6 @@ public slots:
|
|||
void slotShowTrayMessage(const QString &title, const QString &msg);
|
||||
void slotShowOptionalTrayMessage(const QString &title, const QString &msg);
|
||||
void slotFolderOpenAction( const QString& alias );
|
||||
void slotRefreshQuotaDisplay( qint64 total, qint64 used );
|
||||
void slotRebuildRecentMenus();
|
||||
void slotUpdateProgress(const QString &folder, const ProgressInfo& progress);
|
||||
void slotShowGuiMessage(const QString &title, const QString &message);
|
||||
|
@ -95,7 +93,6 @@ private:
|
|||
QAction *_actionLogout;
|
||||
|
||||
QAction *_actionSettings;
|
||||
QAction *_actionQuota;
|
||||
QAction *_actionStatus;
|
||||
QAction *_actionEstimate;
|
||||
QAction *_actionRecent;
|
||||
|
|
Loading…
Reference in a new issue