diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/tabs/setup_joystick.cpp | 36 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_joystick.h | 2 |
2 files changed, 1 insertions, 37 deletions
diff --git a/src/gui/widgets/tabs/setup_joystick.cpp b/src/gui/widgets/tabs/setup_joystick.cpp index 16c248c48..3542f39a5 100644 --- a/src/gui/widgets/tabs/setup_joystick.cpp +++ b/src/gui/widgets/tabs/setup_joystick.cpp @@ -44,12 +44,6 @@ Setup_Joystick::Setup_Joystick(const Widget2 *const widget) : SetupTab(widget), - mCalibrateLabel(new Label(this, - // TRANSLATORS: joystick settings tab label - _("Press the button to start calibration"))), - // TRANSLATORS: joystick settings tab button - mCalibrateButton(new Button(this, _("Calibrate"), "calibrate", - BUTTON_SKIN, this)), // TRANSLATORS: joystick settings tab button mDetectButton(new Button(this, _("Detect joysticks"), "detect", BUTTON_SKIN, this)), @@ -76,7 +70,6 @@ Setup_Joystick::Setup_Joystick(const Widget2 *const widget) : mJoystickEnabled->setSelected(mOriginalJoystickEnabled); mJoystickEnabled->setActionEventId("joystick"); mJoystickEnabled->addActionListener(this); - mCalibrateButton->setEnabled(mOriginalJoystickEnabled); int tolerance = config.getIntValue("joystickTolerance"); mToleranceSlider->setValue(tolerance); @@ -114,10 +107,8 @@ Setup_Joystick::Setup_Joystick(const Widget2 *const widget) : place(0, 3, mUseInactiveCheckBox, 1, 1); place(0, 4, mDetectButton, 1, 1); - place(0, 5, mCalibrateLabel, 1, 1); - place(0, 6, mCalibrateButton, 1, 1); - setDimension(Rect(0, 0, 365, 95)); + setDimension(Rect(0, 0, 365, 60)); } Setup_Joystick::~Setup_Joystick() @@ -152,36 +143,11 @@ void Setup_Joystick::action(const ActionEvent &event) else mNamesDropDown->setSelected(0); } - else - { - if (joystick == nullptr) - return; - - if (joystick->isCalibrating()) - { - // TRANSLATORS: joystick settings tab button - mCalibrateButton->setCaption(_("Calibrate")); - mCalibrateLabel->setCaption - // TRANSLATORS: joystick settings tab label - (_("Press the button to start calibration")); - joystick->finishCalibration(); - } - else - { - // TRANSLATORS: joystick settings tab button - mCalibrateButton->setCaption(_("Stop")); - mCalibrateLabel->setCaption( - // TRANSLATORS: joystick settings tab label - _("Rotate the stick and don't press buttons")); - joystick->startCalibration(); - } - } } void Setup_Joystick::setTempEnabled(const bool sel) { Joystick::setEnabled(sel); - mCalibrateButton->setEnabled(sel); if (joystick != nullptr) { if (sel) diff --git a/src/gui/widgets/tabs/setup_joystick.h b/src/gui/widgets/tabs/setup_joystick.h index 8e347d0f6..fce59a02c 100644 --- a/src/gui/widgets/tabs/setup_joystick.h +++ b/src/gui/widgets/tabs/setup_joystick.h @@ -51,8 +51,6 @@ class Setup_Joystick final : public SetupTab void setTempEnabled(const bool sel); private: - Label *mCalibrateLabel A_NONNULLPOINTER; - Button *mCalibrateButton A_NONNULLPOINTER; Button *mDetectButton A_NONNULLPOINTER; CheckBox *mJoystickEnabled A_NONNULLPOINTER; NamesModel *mNamesModel A_NONNULLPOINTER; |