[Pkg-owncloud-commits] [owncloud-client] 51/103: Update dynamically the error message in the account settings

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Apr 30 18:08:58 UTC 2014


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 44a04227f10c60d0e10a31bc0351daf1985ba0e4
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Apr 22 14:07:27 2014 +0200

    Update dynamically the error message in the account settings
    
    This let the error be shown when the conneciton is missing at startup
    
    And also remove the red background when there is no longer an error
---
 src/mirall/accountsettings.cpp | 5 +++++
 src/mirall/owncloudgui.cpp     | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/src/mirall/accountsettings.cpp b/src/mirall/accountsettings.cpp
index 0c1b636..cfcd876 100644
--- a/src/mirall/accountsettings.cpp
+++ b/src/mirall/accountsettings.cpp
@@ -241,6 +241,10 @@ void AccountSettings::slotButtonsSetEnabled()
 void AccountSettings::setGeneralErrors( const QStringList& errors )
 {
     _generalErrors = errors;
+    if (_account) {
+        // this will update the message
+        slotAccountStateChanged(_account->state());
+    }
 }
 
 void AccountSettings::folderToModelItem( QStandardItem *item, Folder *f )
@@ -380,6 +384,7 @@ void AccountSettings::showConnectionLabel( const QString& message, const QString
     if( _generalErrors.isEmpty() ) {
         ui->connectLabel->setText( message );
         ui->connectLabel->setToolTip(tooltip);
+        ui->connectLabel->setStyleSheet(QString());
     } else {
         const QString msg = _generalErrors.join(QLatin1String("\n"));
         ui->connectLabel->setText( msg );
diff --git a/src/mirall/owncloudgui.cpp b/src/mirall/owncloudgui.cpp
index bf6a05b..5999a5b 100644
--- a/src/mirall/owncloudgui.cpp
+++ b/src/mirall/owncloudgui.cpp
@@ -161,6 +161,8 @@ void ownCloudGui::startupConnected( bool connected, const QStringList& fails )
     }
 
     _startupFails = fails; // store that for the settings dialog once it appears.
+    if( !_settingsDialog.isNull() )
+        _settingsDialog->setGeneralErrors( _startupFails );
 
 }
 

-- 
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