~ubuntu-branches/ubuntu/wily/psi/wily-proposed

« back to all changes in this revision

Viewing changes to src/psicontactlist.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-08-28 18:46:52 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080828184652-iiik12dl91nq7cdi
Tags: 0.12-2
Uploading to unstable (Closes: Bug#494352)

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
 */
94
94
PsiAccount *PsiContactList::defaultAccount() const
95
95
{
 
96
        if (enabledAccounts_.isEmpty()) {
 
97
                return 0;
 
98
        }
96
99
        return enabledAccounts_.first();
97
100
}
98
101
 
99
102
/**
100
103
 * Creates new PsiAccount based on some initial settings. This is used by AccountAddDlg.
101
104
 */
102
 
void PsiContactList::createAccount(const QString& name, const Jid& j, const QString& pass, bool opt_host, const QString& host, int port, bool legacy_ssl_probe, UserAccount::SSLFlag ssl, int proxy, bool modify)
 
105
void PsiContactList::createAccount(const QString& name, const Jid& j, const QString& pass, bool opt_host, const QString& host, int port, bool legacy_ssl_probe, UserAccount::SSLFlag ssl, QString proxyID, bool modify)
103
106
{
104
107
        UserAccount acc;
105
108
        acc.name = name;
114
117
        acc.host = host;
115
118
        acc.port = port;
116
119
        acc.ssl = ssl;
117
 
        acc.proxy_index = proxy;
 
120
        acc.proxyID = proxyID;
118
121
        acc.legacy_ssl_probe = legacy_ssl_probe;
119
122
 
120
123
        PsiAccount *pa = loadAccount(acc);
205
208
UserAccountList PsiContactList::getUserAccountList() const
206
209
{
207
210
        UserAccountList acc;
208
 
        foreach(PsiAccount* account, accounts_)
 
211
        foreach(PsiAccount* account, accounts_) {
209
212
                acc += account->userAccount();
210
 
 
 
213
        }
211
214
        return acc;
212
215
}
213
216
 
243
246
{
244
247
        PsiAccount *low = 0;
245
248
        int low_id = 0;
246
 
        int low_prior = option.EventPriorityDontCare;
 
249
        int low_prior = EventPriorityDontCare;
247
250
 
248
251
        foreach(PsiAccount *account, enabledAccounts_) {
249
252
                int n = account->eventQueue()->nextId();