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

« back to all changes in this revision

Viewing changes to src/options/opt_application.cpp

  • Committer: Package Import Robot
  • Author(s): Jan Niehusmann
  • Date: 2014-07-01 21:49:34 UTC
  • mfrom: (6.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20140701214934-gt4dkgm94byi4vnn
Tags: 0.15-1
* New upstream version
* set debhelper compat level to 9
* set Standards-Version to 3.9.5 (no further changes)
* add lintian override regarding license-problem-non-free-RFC
* use qconf to regenerate configure script
* implement hardening using buildflags instead of hardening-wrapper

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#include "common.h"
3
3
#include "iconwidget.h"
4
4
#include "psioptions.h"
 
5
#include "proxy.h"
5
6
 
6
 
#include <qcheckbox.h>
7
 
#include <qcombobox.h>
8
 
#include <qlineedit.h>
 
7
#include <QCheckBox>
 
8
#include <QComboBox>
 
9
#include <QLineEdit>
9
10
#include <QList>
10
11
 
11
12
#include "ui_opt_application.h"
42
43
                tr("Makes the main Psi window always be in front of other windows."));
43
44
        d->ck_autoRosterSize->setWhatsThis(
44
45
                tr("Makes the main Psi window resize automatically to fit all contacts."));
45
 
        d->ck_keepSizes->setWhatsThis(
46
 
                tr("Makes Psi remember window size and positions for chats and messages."
47
 
                "  If disabled, the windows will always appear in their default positions and sizes."));
48
46
        d->ck_useleft->setWhatsThis(
49
47
                tr("Normally, right-clicking with the mouse on a contact will activate the context-menu."
50
48
                "  Check this option if you'd rather use a left-click."));
73
71
                d->ck_autoUpdate->hide();
74
72
        }
75
73
 
 
74
        //Proxy
 
75
 
 
76
        ProxyChooser *pc = ProxyManager::instance()->createProxyChooser(w);
 
77
        d->gb_proxy->layout()->addWidget(ProxyManager::instance()->proxyForObject()->getComboBox(pc, w));
 
78
        d->gb_proxy->layout()->addWidget(pc);
 
79
 
 
80
 
76
81
        connect(d->le_dtPort, SIGNAL(textChanged(QString)), this, SLOT(updatePortLabel()));
77
82
 
78
83
        return w;
92
97
 
93
98
        PsiOptions::instance()->setOption("options.ui.contactlist.always-on-top", d->ck_alwaysOnTop->isChecked());
94
99
        PsiOptions::instance()->setOption("options.ui.contactlist.automatically-resize-roster", d->ck_autoRosterSize->isChecked());
95
 
        PsiOptions::instance()->setOption("options.ui.remember-window-sizes",d->ck_keepSizes->isChecked());
96
100
        PsiOptions::instance()->setOption("options.ui.contactlist.use-left-click", d->ck_useleft->isChecked());
97
101
        PsiOptions::instance()->setOption("options.ui.contactlist.show-menubar", d->ck_showMenubar->isChecked());
98
102
 
108
112
        // data transfer
109
113
        PsiOptions::instance()->setOption("options.p2p.bytestreams.listen-port", d->le_dtPort->text().toInt());
110
114
        PsiOptions::instance()->setOption("options.p2p.bytestreams.external-address", d->le_dtExternal->text().trimmed());
 
115
 
 
116
        //Proxy
 
117
        ProxyManager::instance()->proxyForObject()->save();
111
118
}
112
119
 
113
120
void OptionsTabApplication::restoreOptions()
119
126
 
120
127
        d->ck_alwaysOnTop->setChecked( PsiOptions::instance()->getOption("options.ui.contactlist.always-on-top").toBool() );
121
128
        d->ck_autoRosterSize->setChecked( PsiOptions::instance()->getOption("options.ui.contactlist.automatically-resize-roster").toBool() );
122
 
        d->ck_keepSizes->setChecked( PsiOptions::instance()->getOption("options.ui.remember-window-sizes").toBool() );
123
129
        d->ck_showMenubar->setChecked( PsiOptions::instance()->getOption("options.ui.contactlist.show-menubar").toBool() );
124
130
        d->ck_useleft->setChecked( PsiOptions::instance()->getOption("options.ui.contactlist.use-left-click").toBool() );
 
131
        d->ck_useleft->setVisible(false); //currently useless
125
132
        d->ck_autoUpdate->setChecked(PsiOptions::instance()->getOption("options.auto-update.check-on-startup").toBool());
126
133
 
127
134
        // docklet