diff --git a/src/apps/deskflow-gui/dialogs/ActionDialog.cpp b/src/apps/deskflow-gui/dialogs/ActionDialog.cpp index f6e6b1710..d3731ce98 100644 --- a/src/apps/deskflow-gui/dialogs/ActionDialog.cpp +++ b/src/apps/deskflow-gui/dialogs/ActionDialog.cpp @@ -60,10 +60,7 @@ ActionDialog::ActionDialog(QWidget *parent, const ServerConfig &config, Hotkey & ui->m_pComboSwitchInDirection->setCurrentIndex(m_action.switchDirection()); ui->m_pComboLockCursorToScreen->setCurrentIndex(m_action.lockCursorMode()); - if (m_action.activeOnRelease()) - ui->m_pRadioHotkeyReleased->setChecked(true); - else - ui->m_pRadioHotkeyPressed->setChecked(true); + ui->comboTriggerOn->setCurrentIndex(m_action.haveScreens()); ui->m_pGroupBoxScreens->setChecked(m_action.haveScreens()); @@ -99,7 +96,7 @@ void ActionDialog::accept() m_action.setSwitchScreenName(ui->m_pComboSwitchToScreen->currentText()); m_action.setSwitchDirection(ui->m_pComboSwitchInDirection->currentIndex()); m_action.setLockCursorMode(ui->m_pComboLockCursorToScreen->currentIndex()); - m_action.setActiveOnRelease(ui->m_pRadioHotkeyReleased->isChecked()); + m_action.setActiveOnRelease(ui->comboTriggerOn->currentIndex()); m_action.setRestartServer(ui->m_pRadioRestartAllConnections->isChecked()); QDialog::accept(); diff --git a/src/apps/deskflow-gui/dialogs/ActionDialog.ui b/src/apps/deskflow-gui/dialogs/ActionDialog.ui index c675b0c7d..564fe02e7 100644 --- a/src/apps/deskflow-gui/dialogs/ActionDialog.ui +++ b/src/apps/deskflow-gui/dialogs/ActionDialog.ui @@ -13,7 +13,21 @@ Configure Action - + + + + + + When the hotkey is pressed + + + + + When the hotkey is released + + + + @@ -258,37 +272,6 @@ - - - - - false - - - - This action is performed when - - - - - - the hotkey is pressed - - - true - - - - - - - the hotkey is released - - - - - - @@ -310,118 +293,6 @@ - - m_pGroupType - toggled(bool) - keySequenceWidget - setDisabled(bool) - - - 104 - 194 - - - 110 - 132 - - - - - m_pRadioSwitchInDirection - toggled(bool) - keySequenceWidget - setDisabled(bool) - - - 118 - 322 - - - 81 - 129 - - - - - m_pRadioLockCursorToScreen - toggled(bool) - keySequenceWidget - setDisabled(bool) - - - 101 - 353 - - - 68 - 126 - - - - - m_pRadioRestartAllConnections - toggled(bool) - keySequenceWidget - setDisabled(bool) - - - 101 - 353 - - - 68 - 126 - - - - - m_pRadioPress - toggled(bool) - keySequenceWidget - setEnabled(bool) - - - 48 - 48 - - - 45 - 129 - - - - - m_pRadioRelease - toggled(bool) - keySequenceWidget - setEnabled(bool) - - - 135 - 70 - - - 148 - 125 - - - - - m_pRadioPressAndRelease - toggled(bool) - keySequenceWidget - setEnabled(bool) - - - 194 - 100 - - - 201 - 125 - - - m_pRadioSwitchToScreen toggled(bool) @@ -582,21 +453,5 @@ - - m_pRadioSwitchToScreen - toggled(bool) - keySequenceWidget - setDisabled(bool) - - - 84 - 280 - - - 185 - 123 - - -