Browse Source

Preferences code clean up

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
a1272fff82
  1. 35
      src/preferences/options.ui
  2. 9
      src/preferences/options_imp.cpp
  3. 1
      src/preferences/options_imp.h

35
src/preferences/options.ui

@ -985,9 +985,9 @@ QGroupBox { @@ -985,9 +985,9 @@ QGroupBox {
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<y>-84</y>
<width>503</width>
<height>426</height>
<height>462</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_20">
@ -1300,18 +1300,21 @@ QGroupBox { @@ -1300,18 +1300,21 @@ QGroupBox {
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_13">
<item row="0" column="0">
<widget class="QCheckBox" name="checkProxyAuth">
<widget class="QGroupBox" name="checkProxyAuth">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<property name="title">
<string>Authentication</string>
</property>
</widget>
</item>
<item row="0" column="1">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_24">
<item>
<layout class="QGridLayout" name="gridLayout_12">
<item row="0" column="0">
<widget class="QLabel" name="lblProxyUsername">
@ -1367,20 +1370,8 @@ QGroupBox { @@ -1367,20 +1370,8 @@ QGroupBox {
</item>
</layout>
</item>
<item row="0" column="2">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>

9
src/preferences/options_imp.cpp

@ -113,7 +113,6 @@ options_imp::options_imp(QWidget *parent): @@ -113,7 +113,6 @@ options_imp::options_imp(QWidget *parent):
// Connect signals / slots
// Proxy tab
connect(comboProxyType, SIGNAL(currentIndexChanged(int)),this, SLOT(enableProxy(int)));
connect(checkProxyAuth, SIGNAL(toggled(bool)), this, SLOT(enableProxyAuth(bool)));
// Apply button is activated when a value is changed
// General tab
@ -589,7 +588,6 @@ void options_imp::loadOptions(){ @@ -589,7 +588,6 @@ void options_imp::loadOptions(){
checkProxyAuth->setChecked(pref.isProxyAuthEnabled());
textProxyUsername->setText(pref.getProxyUsername());
textProxyPassword->setText(pref.getProxyPassword());
enableProxyAuth(checkProxyAuth->isChecked());
//}
// End Connection preferences
// Bittorrent preferences
@ -863,13 +861,6 @@ void options_imp::enableProxy(int index){ @@ -863,13 +861,6 @@ void options_imp::enableProxy(int index){
}
}
void options_imp::enableProxyAuth(bool checked){
lblProxyUsername->setEnabled(checked);
lblProxyPassword->setEnabled(checked);
textProxyUsername->setEnabled(checked);
textProxyPassword->setEnabled(checked);
}
bool options_imp::isSlashScreenDisabled() const {
return !checkShowSplash->isChecked();
}

1
src/preferences/options_imp.h

@ -56,7 +56,6 @@ public: @@ -56,7 +56,6 @@ public:
protected slots:
void enableProxy(int comboIndex);
void enableProxyAuth(bool checked);
void on_buttonBox_accepted();
void closeEvent(QCloseEvent *e);
void on_buttonBox_rejected();

Loading…
Cancel
Save