- ui.setupUi(this);
- initAutoWidgets();
- initStyleComboBox();
- initLanguageComboBox();
-
- foreach(QComboBox *comboBox, findChildren<QComboBox *>()) {
- connect(comboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(widgetHasChanged()));
- }
- foreach(QCheckBox *checkBox, findChildren<QCheckBox *>()) {
- connect(checkBox, SIGNAL(clicked()), this, SLOT(widgetHasChanged()));
- }
-
- connect(ui.chooseStyleSheet, SIGNAL(clicked()), SLOT(chooseStyleSheet()));
+ ui.setupUi(this);
+
+#ifdef QT_NO_SYSTEMTRAYICON
+ ui.useSystemTrayIcon->hide();
+#endif
+
+ // If no system icon theme is given, showing the override option makes no sense.
+ // Also don't mention a "fallback".
+ if (QtUi::instance()->systemIconTheme().isEmpty()) {
+ ui.iconThemeLabel->setText(tr("Icon theme:"));
+ ui.overrideSystemIconTheme->hide();
+ }
+
+ initAutoWidgets();
+ initStyleComboBox();
+ initLanguageComboBox();
+ initIconThemeComboBox();
+
+ foreach(QComboBox *comboBox, findChildren<QComboBox *>()) {
+ connect(comboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(widgetHasChanged()));
+ }
+ foreach(QCheckBox *checkBox, findChildren<QCheckBox *>()) {
+ connect(checkBox, &QAbstractButton::clicked, this, &AppearanceSettingsPage::widgetHasChanged);
+ }
+
+ connect(ui.chooseStyleSheet, &QAbstractButton::clicked, this, &AppearanceSettingsPage::chooseStyleSheet);
+
+ connect(ui.userNoticesInDefaultBuffer, &QAbstractButton::clicked, this, &AppearanceSettingsPage::widgetHasChanged);
+ connect(ui.userNoticesInStatusBuffer, &QAbstractButton::clicked, this, &AppearanceSettingsPage::widgetHasChanged);
+ connect(ui.userNoticesInCurrentBuffer, &QAbstractButton::clicked, this, &AppearanceSettingsPage::widgetHasChanged);
+
+ connect(ui.serverNoticesInDefaultBuffer, &QAbstractButton::clicked, this, &AppearanceSettingsPage::widgetHasChanged);
+ connect(ui.serverNoticesInStatusBuffer, &QAbstractButton::clicked, this, &AppearanceSettingsPage::widgetHasChanged);
+ connect(ui.serverNoticesInCurrentBuffer, &QAbstractButton::clicked, this, &AppearanceSettingsPage::widgetHasChanged);
+
+ connect(ui.errorMsgsInDefaultBuffer, &QAbstractButton::clicked, this, &AppearanceSettingsPage::widgetHasChanged);
+ connect(ui.errorMsgsInStatusBuffer, &QAbstractButton::clicked, this, &AppearanceSettingsPage::widgetHasChanged);
+ connect(ui.errorMsgsInCurrentBuffer, &QAbstractButton::clicked, this, &AppearanceSettingsPage::widgetHasChanged);