~ubuntu-branches/ubuntu/jaunty/psi/jaunty

« back to all changes in this revision

Viewing changes to src/discodlg.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:
45
45
#include "psiaccount.h"
46
46
#include "psicon.h"
47
47
#include "busywidget.h"
48
 
#include "common.h"
49
48
#include "iconaction.h"
50
49
#include "psiiconset.h"
51
50
#include "psitooltip.h"
1430
1429
        : QDialog(0)
1431
1430
{
1432
1431
        setAttribute(Qt::WA_DeleteOnClose);
1433
 
        setupUi(this);
 
1432
        setupUi(this);
1434
1433
        // restore options
1435
 
        ck_autoItems->setChecked(option.discoItems);
1436
 
        ck_autoInfo->setChecked(option.discoInfo);
 
1434
        ck_autoItems->setChecked(PsiOptions::instance()->getOption("options.ui.service-discovery.automatically-get-items").toBool());
 
1435
        ck_autoInfo->setChecked(PsiOptions::instance()->getOption("options.ui.service-discovery.automatically-get-info").toBool());
1437
1436
 
1438
1437
        // initialize
1439
1438
        d = new Private(this, pa);
1440
1439
        d->jid  = jid;
1441
1440
        d->node = node;
 
1441
        d->data.pa->dialogRegister(this);
1442
1442
 
1443
1443
        setWindowTitle(CAP(caption()));
1444
1444
        setWindowIcon(PsiIconset::instance()->transportStatus("transport", STATUS_ONLINE).icon());
1467
1467
 
1468
1468
DiscoDlg::~DiscoDlg()
1469
1469
{
 
1470
        d->data.pa->dialogUnregister(this);
1470
1471
        delete d;
1471
1472
 
1472
1473
        // save options
1473
 
        option.discoItems = ck_autoItems->isChecked();
1474
 
        option.discoInfo  = ck_autoInfo->isChecked();
 
1474
        PsiOptions::instance()->setOption("options.ui.service-discovery.automatically-get-items", (bool) ck_autoItems->isChecked());
 
1475
        PsiOptions::instance()->setOption("options.ui.service-discovery.automatically-get-info", (bool) ck_autoInfo->isChecked());
1475
1476
}
1476
1477
 
1477
1478
void DiscoDlg::doDisco(QString host, QString node)