~blue-shell/blue-shell/kfilebox

« back to all changes in this revision

Viewing changes to src/dropboxclient.cpp

  • Committer: Eike Hein
  • Date: 2013-06-07 20:58:54 UTC
  • Revision ID: git-v1:e4785797809e0a5e3b98f13abfd9626956c7db82
More auth url notification fixes.

* Don't show the auth url notification in the initial stage of the first-run wizard.
* Handle more daemon output correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
        dropbox_db = Singleton::instance();
10
10
        prev_status = DropboxUnkown;
11
11
        m_message = m_authUrl = "";
 
12
        m_showAuthUrlNotification = true;
12
13
 
13
14
        m_dropboxDir = Configuration().getValue("DropboxDir").toString();
14
15
 
94
95
    QString swap = m_ps->readAllStandardOutput();
95
96
    if (swap.contains("https://www.dropbox.com/cli_link?host_id=")) {
96
97
        QString prevAuthUrl = m_authUrl;
97
 
        m_authUrl = swap.remove("Please visit ").remove(" to link this machine.").trimmed();
98
 
        if(prevAuthUrl.isEmpty() || prevAuthUrl!=m_authUrl) Notification().send(tr("Please visit <a href=\"%1\">url</a> to link this machine.").arg(m_authUrl));
 
98
        m_authUrl = swap.remove("Please visit ").remove(" to link this machine.").remove("This client is not linked to any account...").trimmed();
 
99
        if(m_showAuthUrlNotification && (prevAuthUrl.isEmpty() || prevAuthUrl!=m_authUrl)) Notification().send(tr("Please visit <a href=\"%1\">url</a> to link this machine.").arg(m_authUrl));
99
100
    }
100
101
}
101
102