~ubuntu-branches/ubuntu/edgy/psi/edgy

« back to all changes in this revision

Viewing changes to src/accountdlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2005-09-14 16:33:49 UTC
  • mfrom: (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050914163349-3zacov4afysz5cw5
Tags: 0.9.3-2ubuntu1
* Sync with debian
* Applied patch to psi.desktop to start psi without gpg-agent use (known
  issue)
* Updated README.Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
318
318
                setText(2, pa->isActive() ? AccountManageDlg::tr("Active") : AccountManageDlg::tr("Not active"));
319
319
                setOn(pa->enabled());
320
320
        }
321
 
        
 
321
 
322
322
        void stateChange( bool s)
323
323
        {
324
 
 
325
 
                if(s || !pa->isActive() && !pa->eventQueue()->count()){
326
 
                        if(pa->enabled()!=s) pa->setEnabled(s);
327
 
                }else{
328
 
                        setOn(!s);
329
 
                        if(pa->isActive())
330
 
                                QMessageBox::information(listView(), AccountManageDlg::tr("Error"), AccountManageDlg::tr("Unable to disable the account, as it is currently active."));
331
 
                        else
 
324
                if (!s) {
 
325
                        if (pa->eventQueue()->count()) {
 
326
                                setOn(!s);
332
327
                                QMessageBox::information(listView(), AccountManageDlg::tr("Error"), AccountManageDlg::tr("Unable to disable the account, as it has pending events."));
 
328
                                return;
 
329
                        }
 
330
 
 
331
                        if (pa->isActive()) {
 
332
                                if (QMessageBox::information(listView(), AccountManageDlg::tr("Disable Account"), AccountManageDlg::tr("The account is currently active.\nDo you want to log out ?"),QMessageBox::Yes,QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton) == QMessageBox::Yes) {
 
333
                                        pa->logout();
 
334
                                }
 
335
                                else {
 
336
                                        setOn(!s);
 
337
                                        return;
 
338
                                }
 
339
                        }
333
340
                }
 
341
 
 
342
                if (pa->enabled()!=s)
 
343
                        pa->setEnabled(s);
334
344
        }
335
345
 
336
346
        int rtti() const