diff options
| author | 2019-05-29 00:29:43 +0200 | |
|---|---|---|
| committer | 2019-05-29 23:31:55 +0200 | |
| commit | d9c1b94f03b0a9ad0207cfe37af2c201d9dec045 (patch) | |
| tree | e5011704390e63cff34618d64fd36006954d3305 /src | |
| parent | Merge pull request #2519 from lioncash/sign (diff) | |
| download | yuzu-d9c1b94f03b0a9ad0207cfe37af2c201d9dec045.tar.gz yuzu-d9c1b94f03b0a9ad0207cfe37af2c201d9dec045.tar.xz yuzu-d9c1b94f03b0a9ad0207cfe37af2c201d9dec045.zip | |
yuzu: Remove unused birthday setting
Fixes #2522.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/configure_system.cpp | 45 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_system.h | 3 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_system.ui | 166 |
3 files changed, 44 insertions, 170 deletions
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index ff18ace40..e588b21f2 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp | |||
| @@ -16,28 +16,8 @@ | |||
| 16 | #include "ui_configure_system.h" | 16 | #include "ui_configure_system.h" |
| 17 | #include "yuzu/configuration/configure_system.h" | 17 | #include "yuzu/configuration/configure_system.h" |
| 18 | 18 | ||
| 19 | namespace { | ||
| 20 | constexpr std::array<int, 12> days_in_month = {{ | ||
| 21 | 31, | ||
| 22 | 29, | ||
| 23 | 31, | ||
| 24 | 30, | ||
| 25 | 31, | ||
| 26 | 30, | ||
| 27 | 31, | ||
| 28 | 31, | ||
| 29 | 30, | ||
| 30 | 31, | ||
| 31 | 30, | ||
| 32 | 31, | ||
| 33 | }}; | ||
| 34 | } // Anonymous namespace | ||
| 35 | |||
| 36 | ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) { | 19 | ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) { |
| 37 | ui->setupUi(this); | 20 | ui->setupUi(this); |
| 38 | connect(ui->combo_birthmonth, | ||
| 39 | static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, | ||
| 40 | &ConfigureSystem::UpdateBirthdayComboBox); | ||
| 41 | connect(ui->button_regenerate_console_id, &QPushButton::clicked, this, | 21 | connect(ui->button_regenerate_console_id, &QPushButton::clicked, this, |
| 42 | &ConfigureSystem::RefreshConsoleID); | 22 | &ConfigureSystem::RefreshConsoleID); |
| 43 | 23 | ||
| @@ -101,31 +81,6 @@ void ConfigureSystem::applyConfiguration() { | |||
| 101 | Settings::Apply(); | 81 | Settings::Apply(); |
| 102 | } | 82 | } |
| 103 | 83 | ||
| 104 | void ConfigureSystem::UpdateBirthdayComboBox(int birthmonth_index) { | ||
| 105 | if (birthmonth_index < 0 || birthmonth_index >= 12) | ||
| 106 | return; | ||
| 107 | |||
| 108 | // store current day selection | ||
| 109 | int birthday_index = ui->combo_birthday->currentIndex(); | ||
| 110 | |||
| 111 | // get number of days in the new selected month | ||
| 112 | int days = days_in_month[birthmonth_index]; | ||
| 113 | |||
| 114 | // if the selected day is out of range, | ||
| 115 | // reset it to 1st | ||
| 116 | if (birthday_index < 0 || birthday_index >= days) | ||
| 117 | birthday_index = 0; | ||
| 118 | |||
| 119 | // update the day combo box | ||
| 120 | ui->combo_birthday->clear(); | ||
| 121 | for (int i = 1; i <= days; ++i) { | ||
| 122 | ui->combo_birthday->addItem(QString::number(i)); | ||
| 123 | } | ||
| 124 | |||
| 125 | // restore the day selection | ||
| 126 | ui->combo_birthday->setCurrentIndex(birthday_index); | ||
| 127 | } | ||
| 128 | |||
| 129 | void ConfigureSystem::RefreshConsoleID() { | 84 | void ConfigureSystem::RefreshConsoleID() { |
| 130 | QMessageBox::StandardButton reply; | 85 | QMessageBox::StandardButton reply; |
| 131 | QString warning_text = tr("This will replace your current virtual Switch with a new one. " | 86 | QString warning_text = tr("This will replace your current virtual Switch with a new one. " |
diff --git a/src/yuzu/configuration/configure_system.h b/src/yuzu/configuration/configure_system.h index cf1e54de5..41d03c56f 100644 --- a/src/yuzu/configuration/configure_system.h +++ b/src/yuzu/configuration/configure_system.h | |||
| @@ -26,14 +26,11 @@ public: | |||
| 26 | private: | 26 | private: |
| 27 | void ReadSystemSettings(); | 27 | void ReadSystemSettings(); |
| 28 | 28 | ||
| 29 | void UpdateBirthdayComboBox(int birthmonth_index); | ||
| 30 | void RefreshConsoleID(); | 29 | void RefreshConsoleID(); |
| 31 | 30 | ||
| 32 | std::unique_ptr<Ui::ConfigureSystem> ui; | 31 | std::unique_ptr<Ui::ConfigureSystem> ui; |
| 33 | bool enabled = false; | 32 | bool enabled = false; |
| 34 | 33 | ||
| 35 | int birthmonth = 0; | ||
| 36 | int birthday = 0; | ||
| 37 | int language_index = 0; | 34 | int language_index = 0; |
| 38 | int sound_index = 0; | 35 | int sound_index = 0; |
| 39 | }; | 36 | }; |
diff --git a/src/yuzu/configuration/configure_system.ui b/src/yuzu/configuration/configure_system.ui index 073327298..65745a2f8 100644 --- a/src/yuzu/configuration/configure_system.ui +++ b/src/yuzu/configuration/configure_system.ui | |||
| @@ -22,14 +22,21 @@ | |||
| 22 | <string>System Settings</string> | 22 | <string>System Settings</string> |
| 23 | </property> | 23 | </property> |
| 24 | <layout class="QGridLayout" name="gridLayout"> | 24 | <layout class="QGridLayout" name="gridLayout"> |
| 25 | <item row="2" column="0"> | 25 | <item row="1" column="0"> |
| 26 | <widget class="QLabel" name="label_sound"> | 26 | <widget class="QLabel" name="label_sound"> |
| 27 | <property name="text"> | 27 | <property name="text"> |
| 28 | <string>Sound output mode</string> | 28 | <string>Sound output mode</string> |
| 29 | </property> | 29 | </property> |
| 30 | </widget> | 30 | </widget> |
| 31 | </item> | 31 | </item> |
| 32 | <item row="1" column="1"> | 32 | <item row="2" column="0"> |
| 33 | <widget class="QLabel" name="label_console_id"> | ||
| 34 | <property name="text"> | ||
| 35 | <string>Console ID:</string> | ||
| 36 | </property> | ||
| 37 | </widget> | ||
| 38 | </item> | ||
| 39 | <item row="0" column="1"> | ||
| 33 | <widget class="QComboBox" name="combo_language"> | 40 | <widget class="QComboBox" name="combo_language"> |
| 34 | <property name="toolTip"> | 41 | <property name="toolTip"> |
| 35 | <string>Note: this can be overridden when region setting is auto-select</string> | 42 | <string>Note: this can be overridden when region setting is auto-select</string> |
| @@ -121,108 +128,14 @@ | |||
| 121 | </item> | 128 | </item> |
| 122 | </widget> | 129 | </widget> |
| 123 | </item> | 130 | </item> |
| 124 | <item row="0" column="1"> | 131 | <item row="4" column="0"> |
| 125 | <layout class="QHBoxLayout" name="horizontalLayout_birthday2"> | 132 | <widget class="QCheckBox" name="rng_seed_checkbox"> |
| 126 | <item> | ||
| 127 | <widget class="QComboBox" name="combo_birthmonth"> | ||
| 128 | <item> | ||
| 129 | <property name="text"> | ||
| 130 | <string>January</string> | ||
| 131 | </property> | ||
| 132 | </item> | ||
| 133 | <item> | ||
| 134 | <property name="text"> | ||
| 135 | <string>February</string> | ||
| 136 | </property> | ||
| 137 | </item> | ||
| 138 | <item> | ||
| 139 | <property name="text"> | ||
| 140 | <string>March</string> | ||
| 141 | </property> | ||
| 142 | </item> | ||
| 143 | <item> | ||
| 144 | <property name="text"> | ||
| 145 | <string>April</string> | ||
| 146 | </property> | ||
| 147 | </item> | ||
| 148 | <item> | ||
| 149 | <property name="text"> | ||
| 150 | <string>May</string> | ||
| 151 | </property> | ||
| 152 | </item> | ||
| 153 | <item> | ||
| 154 | <property name="text"> | ||
| 155 | <string>June</string> | ||
| 156 | </property> | ||
| 157 | </item> | ||
| 158 | <item> | ||
| 159 | <property name="text"> | ||
| 160 | <string>July</string> | ||
| 161 | </property> | ||
| 162 | </item> | ||
| 163 | <item> | ||
| 164 | <property name="text"> | ||
| 165 | <string>August</string> | ||
| 166 | </property> | ||
| 167 | </item> | ||
| 168 | <item> | ||
| 169 | <property name="text"> | ||
| 170 | <string>September</string> | ||
| 171 | </property> | ||
| 172 | </item> | ||
| 173 | <item> | ||
| 174 | <property name="text"> | ||
| 175 | <string>October</string> | ||
| 176 | </property> | ||
| 177 | </item> | ||
| 178 | <item> | ||
| 179 | <property name="text"> | ||
| 180 | <string>November</string> | ||
| 181 | </property> | ||
| 182 | </item> | ||
| 183 | <item> | ||
| 184 | <property name="text"> | ||
| 185 | <string>December</string> | ||
| 186 | </property> | ||
| 187 | </item> | ||
| 188 | </widget> | ||
| 189 | </item> | ||
| 190 | <item> | ||
| 191 | <widget class="QComboBox" name="combo_birthday"/> | ||
| 192 | </item> | ||
| 193 | </layout> | ||
| 194 | </item> | ||
| 195 | <item row="3" column="0"> | ||
| 196 | <widget class="QLabel" name="label_console_id"> | ||
| 197 | <property name="text"> | ||
| 198 | <string>Console ID:</string> | ||
| 199 | </property> | ||
| 200 | </widget> | ||
| 201 | </item> | ||
| 202 | <item row="0" column="0"> | ||
| 203 | <widget class="QLabel" name="label_birthday"> | ||
| 204 | <property name="text"> | ||
| 205 | <string>Birthday</string> | ||
| 206 | </property> | ||
| 207 | </widget> | ||
| 208 | </item> | ||
| 209 | <item row="3" column="1"> | ||
| 210 | <widget class="QPushButton" name="button_regenerate_console_id"> | ||
| 211 | <property name="sizePolicy"> | ||
| 212 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
| 213 | <horstretch>0</horstretch> | ||
| 214 | <verstretch>0</verstretch> | ||
| 215 | </sizepolicy> | ||
| 216 | </property> | ||
| 217 | <property name="layoutDirection"> | ||
| 218 | <enum>Qt::RightToLeft</enum> | ||
| 219 | </property> | ||
| 220 | <property name="text"> | 133 | <property name="text"> |
| 221 | <string>Regenerate</string> | 134 | <string>RNG Seed</string> |
| 222 | </property> | 135 | </property> |
| 223 | </widget> | 136 | </widget> |
| 224 | </item> | 137 | </item> |
| 225 | <item row="2" column="1"> | 138 | <item row="1" column="1"> |
| 226 | <widget class="QComboBox" name="combo_sound"> | 139 | <widget class="QComboBox" name="combo_sound"> |
| 227 | <item> | 140 | <item> |
| 228 | <property name="text"> | 141 | <property name="text"> |
| @@ -241,49 +154,37 @@ | |||
| 241 | </item> | 154 | </item> |
| 242 | </widget> | 155 | </widget> |
| 243 | </item> | 156 | </item> |
| 244 | <item row="5" column="0"> | 157 | <item row="0" column="0"> |
| 245 | <widget class="QCheckBox" name="rng_seed_checkbox"> | ||
| 246 | <property name="text"> | ||
| 247 | <string>RNG Seed</string> | ||
| 248 | </property> | ||
| 249 | </widget> | ||
| 250 | </item> | ||
| 251 | <item row="1" column="0"> | ||
| 252 | <widget class="QLabel" name="label_language"> | 158 | <widget class="QLabel" name="label_language"> |
| 253 | <property name="text"> | 159 | <property name="text"> |
| 254 | <string>Language</string> | 160 | <string>Language</string> |
| 255 | </property> | 161 | </property> |
| 256 | </widget> | 162 | </widget> |
| 257 | </item> | 163 | </item> |
| 258 | <item row="5" column="1"> | 164 | <item row="2" column="1"> |
| 259 | <widget class="QLineEdit" name="rng_seed_edit"> | 165 | <widget class="QPushButton" name="button_regenerate_console_id"> |
| 260 | <property name="sizePolicy"> | 166 | <property name="sizePolicy"> |
| 261 | <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | 167 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
| 262 | <horstretch>0</horstretch> | 168 | <horstretch>0</horstretch> |
| 263 | <verstretch>0</verstretch> | 169 | <verstretch>0</verstretch> |
| 264 | </sizepolicy> | 170 | </sizepolicy> |
| 265 | </property> | 171 | </property> |
| 266 | <property name="font"> | 172 | <property name="layoutDirection"> |
| 267 | <font> | 173 | <enum>Qt::RightToLeft</enum> |
| 268 | <family>Lucida Console</family> | ||
| 269 | </font> | ||
| 270 | </property> | ||
| 271 | <property name="inputMask"> | ||
| 272 | <string notr="true">HHHHHHHH</string> | ||
| 273 | </property> | 174 | </property> |
| 274 | <property name="maxLength"> | 175 | <property name="text"> |
| 275 | <number>8</number> | 176 | <string>Regenerate</string> |
| 276 | </property> | 177 | </property> |
| 277 | </widget> | 178 | </widget> |
| 278 | </item> | 179 | </item> |
| 279 | <item row="4" column="0"> | 180 | <item row="3" column="0"> |
| 280 | <widget class="QCheckBox" name="custom_rtc_checkbox"> | 181 | <widget class="QCheckBox" name="custom_rtc_checkbox"> |
| 281 | <property name="text"> | 182 | <property name="text"> |
| 282 | <string>Custom RTC</string> | 183 | <string>Custom RTC</string> |
| 283 | </property> | 184 | </property> |
| 284 | </widget> | 185 | </widget> |
| 285 | </item> | 186 | </item> |
| 286 | <item row="4" column="1"> | 187 | <item row="3" column="1"> |
| 287 | <widget class="QDateTimeEdit" name="custom_rtc_edit"> | 188 | <widget class="QDateTimeEdit" name="custom_rtc_edit"> |
| 288 | <property name="minimumDate"> | 189 | <property name="minimumDate"> |
| 289 | <date> | 190 | <date> |
| @@ -297,6 +198,27 @@ | |||
| 297 | </property> | 198 | </property> |
| 298 | </widget> | 199 | </widget> |
| 299 | </item> | 200 | </item> |
| 201 | <item row="4" column="1"> | ||
| 202 | <widget class="QLineEdit" name="rng_seed_edit"> | ||
| 203 | <property name="sizePolicy"> | ||
| 204 | <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||
| 205 | <horstretch>0</horstretch> | ||
| 206 | <verstretch>0</verstretch> | ||
| 207 | </sizepolicy> | ||
| 208 | </property> | ||
| 209 | <property name="font"> | ||
| 210 | <font> | ||
| 211 | <family>Lucida Console</family> | ||
| 212 | </font> | ||
| 213 | </property> | ||
| 214 | <property name="inputMask"> | ||
| 215 | <string notr="true">HHHHHHHH</string> | ||
| 216 | </property> | ||
| 217 | <property name="maxLength"> | ||
| 218 | <number>8</number> | ||
| 219 | </property> | ||
| 220 | </widget> | ||
| 221 | </item> | ||
| 300 | </layout> | 222 | </layout> |
| 301 | </widget> | 223 | </widget> |
| 302 | </item> | 224 | </item> |