[Pkg-owncloud-commits] [owncloud-client] 203/498: SystemTray menu: remove the quota information

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:50 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 7757886ebc7e98a29b1e2f05bc51432a8794c36e
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Fri Jun 26 13:30:19 2015 +0200

    SystemTray menu: remove the quota information
    
    It makes no sens anymore with multi account and users will see it
    from the dialog anyway.
---
 src/gui/application.cpp |  4 ----
 src/gui/owncloudgui.cpp | 17 -----------------
 src/gui/owncloudgui.h   |  3 ---
 3 files changed, 24 deletions(-)

diff --git a/src/gui/application.cpp b/src/gui/application.cpp
index 657224d..2b83897 100644
--- a/src/gui/application.cpp
+++ b/src/gui/application.cpp
@@ -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()
diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp
index 087d829..39b6af7 100644
--- a/src/gui/owncloudgui.cpp
+++ b/src/gui/owncloudgui.cpp
@@ -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();
diff --git a/src/gui/owncloudgui.h b/src/gui/owncloudgui.h
index 33f7084..a455436 100644
--- a/src/gui/owncloudgui.h
+++ b/src/gui/owncloudgui.h
@@ -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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list