[Pkg-owncloud-commits] [owncloud-client] 12/484: Add a sign in button in the settings window

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:02 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 bcfc16c0f6145ea14b73f463b555f46054712115
Author: Jocelyn Turcotte <jturcotte at woboq.com>
Date:   Sat Aug 29 13:32:36 2015 +0200

    Add a sign in button in the settings window
    
    It's not obvious for users that they should sign in through
    the tray icon, especially if they were automatically signed out.
---
 src/gui/accountsettings.cpp |  7 +++++++
 src/gui/accountsettings.h   |  1 +
 src/gui/accountsettings.ui  | 16 ++++++++++++++++
 3 files changed, 24 insertions(+)

diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index de8baa3..1b39ce7 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -120,6 +120,7 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent) :
     connect( &_quotaInfo, SIGNAL(quotaUpdated(qint64,qint64)),
             this, SLOT(slotUpdateQuota(qint64,qint64)));
 
+    connect(ui->signInButton, SIGNAL(clicked()) , this, SLOT(slotSignInAccount()));
     connect(ui->deleteButton, SIGNAL(clicked()) , this, SLOT(slotDeleteAccount()));
 }
 
@@ -443,6 +444,7 @@ void AccountSettings::slotAccountStateChanged(int state)
            serverWithUser = tr("%1 as <i>%2</i>").arg(server, cred->user());
         }
 
+        ui->signInButton->setVisible(state == AccountState::SignedOut);
         if (state == AccountState::Connected) {
             showConnectionLabel( tr("Connected to %1.").arg(serverWithUser) );
         } else if (state == AccountState::ServiceUnavailable) {
@@ -509,6 +511,11 @@ void AccountSettings::refreshSelectiveSyncStatus()
     }
 }
 
+void AccountSettings::slotSignInAccount()
+{
+    _accountState->setSignedOut(false);
+}
+
 void AccountSettings::slotDeleteAccount()
 {
     // Deleting the account potentially deletes 'this', so
diff --git a/src/gui/accountsettings.h b/src/gui/accountsettings.h
index c20c464..80a8545 100644
--- a/src/gui/accountsettings.h
+++ b/src/gui/accountsettings.h
@@ -77,6 +77,7 @@ protected slots:
     void slotOpenCurrentFolder();
     void slotFolderWizardAccepted();
     void slotFolderWizardRejected();
+    void slotSignInAccount();
     void slotDeleteAccount();
     void refreshSelectiveSyncStatus();
     void slotCustomContextMenuRequested(const QPoint&);
diff --git a/src/gui/accountsettings.ui b/src/gui/accountsettings.ui
index 43bac57..94e3e65 100644
--- a/src/gui/accountsettings.ui
+++ b/src/gui/accountsettings.ui
@@ -62,6 +62,22 @@
        </widget>
       </item>
       <item>
+       <widget class="QPushButton" name="signInButton">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="toolTip">
+         <string>Enter your credentials to connect to the server</string>
+        </property>
+        <property name="text">
+         <string>Sign in</string>
+        </property>
+       </widget>
+      </item>
+      <item>
        <widget class="QPushButton" name="deleteButton">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Preferred" vsizetype="Fixed">

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