diff --git a/src/persistence/settings.cpp b/src/persistence/settings.cpp index 4b4749bc6..60326601e 100644 --- a/src/persistence/settings.cpp +++ b/src/persistence/settings.cpp @@ -207,7 +207,6 @@ void Settings::loadGlobal() s.beginGroup("GUI"); { showWindow = s.value("showWindow", true).toBool(); - showInFront = s.value("showInFront", false).toBool(); notify = s.value("notify", true).toBool(); groupAlwaysNotify = s.value("groupAlwaysNotify", true).toBool(); groupchatPosition = s.value("groupchatPosition", true).toBool(); @@ -526,7 +525,6 @@ void Settings::saveGlobal() s.beginGroup("GUI"); { s.setValue("showWindow", showWindow); - s.setValue("showInFront", showInFront); s.setValue("notify", notify); s.setValue("groupAlwaysNotify", groupAlwaysNotify); s.setValue("separateWindow", separateWindow); @@ -1063,22 +1061,6 @@ void Settings::setSpellCheckingEnabled(bool newValue) } } -bool Settings::getShowInFront() const -{ - QMutexLocker locker{&bigLock}; - return showInFront; -} - -void Settings::setShowInFront(bool newValue) -{ - QMutexLocker locker{&bigLock}; - - if (newValue != showInFront) { - showInFront = newValue; - emit showInFrontChanged(showInFront); - } -} - bool Settings::getNotifySound() const { QMutexLocker locker{&bigLock}; diff --git a/src/persistence/settings.h b/src/persistence/settings.h index a20555a8a..39b314223 100644 --- a/src/persistence/settings.h +++ b/src/persistence/settings.h @@ -164,7 +164,6 @@ signals: void autorunChanged(bool enabled); void autoSaveEnabledChanged(bool enabled); void autostartInTrayChanged(bool enabled); - void showInFrontChanged(bool enabled); void closeToTrayChanged(bool enabled); void lightTrayIconChanged(bool enabled); void minimizeToTrayChanged(bool enabled); @@ -325,9 +324,6 @@ public: bool getShowWindow() const; void setShowWindow(bool newValue); - bool getShowInFront() const; - void setShowInFront(bool newValue); - bool getNotifySound() const; void setNotifySound(bool newValue); @@ -594,7 +590,6 @@ private: bool checkUpdates; bool notify; bool showWindow; - bool showInFront; bool notifySound; bool busySound; bool groupAlwaysNotify; diff --git a/src/widget/form/settings/userinterfaceform.cpp b/src/widget/form/settings/userinterfaceform.cpp index e4dbdda0b..0bceada60 100644 --- a/src/widget/form/settings/userinterfaceform.cpp +++ b/src/widget/form/settings/userinterfaceform.cpp @@ -84,11 +84,7 @@ UserInterfaceForm::UserInterfaceForm(SettingsWidget* myParent) bodyUI->busySound->setChecked(s.getBusySound()); bodyUI->busySound->setEnabled(s.getNotifySound() && s.getNotify()); - bool showWindow = s.getShowWindow(); - - bodyUI->showWindow->setChecked(showWindow); - bodyUI->showInFront->setChecked(s.getShowInFront()); - bodyUI->showInFront->setEnabled(showWindow); + bodyUI->showWindow->setChecked(s.getShowWindow()); bodyUI->cbGroupchatPosition->setChecked(s.getGroupchatPosition()); bodyUI->cbCompactLayout->setChecked(s.getCompactLayout()); @@ -291,14 +287,7 @@ void UserInterfaceForm::on_busySound_stateChanged() void UserInterfaceForm::on_showWindow_stateChanged() { - bool isChecked = bodyUI->showWindow->isChecked(); - Settings::getInstance().setShowWindow(isChecked); - bodyUI->showInFront->setEnabled(isChecked); -} - -void UserInterfaceForm::on_showInFront_stateChanged() -{ - Settings::getInstance().setShowInFront(bodyUI->showInFront->isChecked()); + Settings::getInstance().setShowWindow(bodyUI->showWindow->isChecked()); } void UserInterfaceForm::on_groupOnlyNotfiyWhenMentioned_stateChanged() diff --git a/src/widget/form/settings/userinterfaceform.h b/src/widget/form/settings/userinterfaceform.h index 084d0ba58..7da4f5f21 100644 --- a/src/widget/form/settings/userinterfaceform.h +++ b/src/widget/form/settings/userinterfaceform.h @@ -52,7 +52,6 @@ private slots: void on_notifySound_stateChanged(); void on_busySound_stateChanged(); void on_showWindow_stateChanged(); - void on_showInFront_stateChanged(); void on_groupOnlyNotfiyWhenMentioned_stateChanged(); void on_cbCompactLayout_stateChanged(); void on_cbSeparateWindow_stateChanged(); diff --git a/src/widget/form/settings/userinterfacesettings.ui b/src/widget/form/settings/userinterfacesettings.ui index 6883dbf3e..899ccf3a0 100644 --- a/src/widget/form/settings/userinterfacesettings.ui +++ b/src/widget/form/settings/userinterfacesettings.ui @@ -219,23 +219,6 @@ - - - - 40 - - - - - Focus qTox when you receive message. - - - Focus window - - - - - @@ -615,7 +598,6 @@ notifySound busySound showWindow - showInFront cbGroupchatPosition cbCompactLayout cbSeparateWindow diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 51047e744..ab418b23e 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -1448,9 +1448,6 @@ bool Widget::newMessageAlert(QWidget* currentWindow, bool isActive, bool sound, if (notify) { if (Settings::getInstance().getShowWindow()) { currentWindow->show(); - if (inactiveWindow && Settings::getInstance().getShowInFront()) { - currentWindow->activateWindow(); - } } if (Settings::getInstance().getNotify()) {