GeneralPane.cpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. // Copyright 2017 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "DolphinQt/Settings/GeneralPane.h"
  4. #include <map>
  5. #include <QCheckBox>
  6. #include <QComboBox>
  7. #include <QFormLayout>
  8. #include <QGroupBox>
  9. #include <QLabel>
  10. #include <QPushButton>
  11. #include <QSlider>
  12. #include <QVBoxLayout>
  13. #include <QWidget>
  14. #include "Core/AchievementManager.h"
  15. #include "Core/Config/MainSettings.h"
  16. #include "Core/Config/UISettings.h"
  17. #include "Core/ConfigManager.h"
  18. #include "Core/Core.h"
  19. #include "Core/DolphinAnalytics.h"
  20. #include "Core/PowerPC/PowerPC.h"
  21. #include "Core/System.h"
  22. #include "DolphinQt/Config/ConfigControls/ConfigBool.h"
  23. #include "DolphinQt/Config/ToolTipControls/ToolTipCheckBox.h"
  24. #include "DolphinQt/Config/ToolTipControls/ToolTipComboBox.h"
  25. #include "DolphinQt/Config/ToolTipControls/ToolTipPushButton.h"
  26. #include "DolphinQt/QtUtils/ModalMessageBox.h"
  27. #include "DolphinQt/QtUtils/SetWindowDecorations.h"
  28. #include "DolphinQt/QtUtils/SignalBlocking.h"
  29. #include "DolphinQt/Settings.h"
  30. #include "UICommon/AutoUpdate.h"
  31. #ifdef USE_DISCORD_PRESENCE
  32. #include "UICommon/DiscordPresence.h"
  33. #endif
  34. constexpr int AUTO_UPDATE_DISABLE_INDEX = 0;
  35. constexpr int AUTO_UPDATE_BETA_INDEX = 1;
  36. constexpr int AUTO_UPDATE_DEV_INDEX = 2;
  37. constexpr const char* AUTO_UPDATE_DISABLE_STRING = "";
  38. constexpr const char* AUTO_UPDATE_BETA_STRING = "beta";
  39. constexpr const char* AUTO_UPDATE_DEV_STRING = "dev";
  40. constexpr int FALLBACK_REGION_NTSCJ_INDEX = 0;
  41. constexpr int FALLBACK_REGION_NTSCU_INDEX = 1;
  42. constexpr int FALLBACK_REGION_PAL_INDEX = 2;
  43. constexpr int FALLBACK_REGION_NTSCK_INDEX = 3;
  44. GeneralPane::GeneralPane(QWidget* parent) : QWidget(parent)
  45. {
  46. CreateLayout();
  47. LoadConfig();
  48. AddDescriptions();
  49. ConnectLayout();
  50. connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
  51. &GeneralPane::OnEmulationStateChanged);
  52. connect(&Settings::Instance(), &Settings::ConfigChanged, this, &GeneralPane::LoadConfig);
  53. OnEmulationStateChanged(Core::GetState(Core::System::GetInstance()));
  54. }
  55. void GeneralPane::CreateLayout()
  56. {
  57. m_main_layout = new QVBoxLayout;
  58. // Create layout here
  59. CreateBasic();
  60. if (AutoUpdateChecker::SystemSupportsAutoUpdates())
  61. CreateAutoUpdate();
  62. CreateFallbackRegion();
  63. #if defined(USE_ANALYTICS) && USE_ANALYTICS
  64. CreateAnalytics();
  65. #endif
  66. m_main_layout->addStretch(1);
  67. setLayout(m_main_layout);
  68. }
  69. void GeneralPane::OnEmulationStateChanged(Core::State state)
  70. {
  71. const bool running = state != Core::State::Uninitialized;
  72. m_checkbox_dualcore->setEnabled(!running);
  73. m_checkbox_cheats->setEnabled(!running);
  74. m_checkbox_override_region_settings->setEnabled(!running);
  75. #ifdef USE_DISCORD_PRESENCE
  76. m_checkbox_discord_presence->setEnabled(!running);
  77. #endif
  78. m_combobox_fallback_region->setEnabled(!running);
  79. }
  80. void GeneralPane::ConnectLayout()
  81. {
  82. connect(m_checkbox_cheats, &QCheckBox::toggled, &Settings::Instance(),
  83. &Settings::EnableCheatsChanged);
  84. #ifdef USE_DISCORD_PRESENCE
  85. connect(m_checkbox_discord_presence, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig);
  86. #endif
  87. if (AutoUpdateChecker::SystemSupportsAutoUpdates())
  88. {
  89. connect(m_combobox_update_track, &QComboBox::currentIndexChanged, this,
  90. &GeneralPane::OnSaveConfig);
  91. connect(&Settings::Instance(), &Settings::AutoUpdateTrackChanged, this,
  92. &GeneralPane::LoadConfig);
  93. }
  94. // Advanced
  95. connect(m_combobox_speedlimit, &QComboBox::currentIndexChanged, [this]() {
  96. Config::SetBaseOrCurrent(Config::MAIN_EMULATION_SPEED,
  97. m_combobox_speedlimit->currentIndex() * 0.1f);
  98. Config::Save();
  99. });
  100. connect(m_combobox_fallback_region, &QComboBox::currentIndexChanged, this,
  101. &GeneralPane::OnSaveConfig);
  102. connect(&Settings::Instance(), &Settings::FallbackRegionChanged, this, &GeneralPane::LoadConfig);
  103. #if defined(USE_ANALYTICS) && USE_ANALYTICS
  104. connect(&Settings::Instance(), &Settings::AnalyticsToggled, this, &GeneralPane::LoadConfig);
  105. connect(m_checkbox_enable_analytics, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig);
  106. connect(m_button_generate_new_identity, &QPushButton::clicked, this,
  107. &GeneralPane::GenerateNewIdentity);
  108. #endif
  109. }
  110. void GeneralPane::CreateBasic()
  111. {
  112. auto* basic_group = new QGroupBox(tr("Basic Settings"));
  113. auto* basic_group_layout = new QVBoxLayout;
  114. basic_group->setLayout(basic_group_layout);
  115. m_main_layout->addWidget(basic_group);
  116. m_checkbox_dualcore = new ConfigBool(tr("Enable Dual Core (speedhack)"), Config::MAIN_CPU_THREAD);
  117. basic_group_layout->addWidget(m_checkbox_dualcore);
  118. m_checkbox_cheats = new ConfigBool(tr("Enable Cheats"), Config::MAIN_ENABLE_CHEATS);
  119. basic_group_layout->addWidget(m_checkbox_cheats);
  120. m_checkbox_override_region_settings =
  121. new ConfigBool(tr("Allow Mismatched Region Settings"), Config::MAIN_OVERRIDE_REGION_SETTINGS);
  122. basic_group_layout->addWidget(m_checkbox_override_region_settings);
  123. m_checkbox_auto_disc_change =
  124. new ConfigBool(tr("Change Discs Automatically"), Config::MAIN_AUTO_DISC_CHANGE);
  125. basic_group_layout->addWidget(m_checkbox_auto_disc_change);
  126. #ifdef USE_DISCORD_PRESENCE
  127. m_checkbox_discord_presence = new ToolTipCheckBox(tr("Show Current Game on Discord"));
  128. basic_group_layout->addWidget(m_checkbox_discord_presence);
  129. #endif
  130. auto* speed_limit_layout = new QFormLayout;
  131. speed_limit_layout->setFormAlignment(Qt::AlignLeft | Qt::AlignTop);
  132. speed_limit_layout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
  133. basic_group_layout->addLayout(speed_limit_layout);
  134. m_combobox_speedlimit = new ToolTipComboBox();
  135. m_combobox_speedlimit->addItem(tr("Unlimited"));
  136. for (int i = 10; i <= 200; i += 10) // from 10% to 200%
  137. {
  138. QString str;
  139. if (i != 100)
  140. str = QStringLiteral("%1%").arg(i);
  141. else
  142. str = tr("%1% (Normal Speed)").arg(i);
  143. m_combobox_speedlimit->addItem(str);
  144. }
  145. speed_limit_layout->addRow(tr("&Speed Limit:"), m_combobox_speedlimit);
  146. }
  147. void GeneralPane::CreateAutoUpdate()
  148. {
  149. auto* auto_update_group = new QGroupBox(tr("Auto Update Settings"));
  150. auto* auto_update_group_layout = new QFormLayout;
  151. auto_update_group->setLayout(auto_update_group_layout);
  152. m_main_layout->addWidget(auto_update_group);
  153. auto_update_group_layout->setFormAlignment(Qt::AlignLeft | Qt::AlignTop);
  154. auto_update_group_layout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
  155. m_combobox_update_track = new ToolTipComboBox();
  156. auto_update_group_layout->addRow(tr("&Auto Update:"), m_combobox_update_track);
  157. for (const QString& option :
  158. {tr("Don't Update"),
  159. // i18n: Releases is a noun.
  160. tr("Releases (every few months)"), tr("Dev (multiple times a day)")})
  161. {
  162. m_combobox_update_track->addItem(option);
  163. }
  164. }
  165. void GeneralPane::CreateFallbackRegion()
  166. {
  167. auto* fallback_region_group = new QGroupBox(tr("Fallback Region"));
  168. auto* fallback_region_group_layout = new QVBoxLayout;
  169. fallback_region_group->setLayout(fallback_region_group_layout);
  170. m_main_layout->addWidget(fallback_region_group);
  171. auto* fallback_region_dropdown_layout = new QFormLayout;
  172. fallback_region_dropdown_layout->setFormAlignment(Qt::AlignLeft | Qt::AlignTop);
  173. fallback_region_dropdown_layout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
  174. fallback_region_group_layout->addLayout(fallback_region_dropdown_layout);
  175. m_combobox_fallback_region = new ToolTipComboBox();
  176. fallback_region_dropdown_layout->addRow(tr("Fallback Region:"), m_combobox_fallback_region);
  177. for (const QString& option : {tr("NTSC-J"), tr("NTSC-U"), tr("PAL"), tr("NTSC-K")})
  178. m_combobox_fallback_region->addItem(option);
  179. }
  180. #if defined(USE_ANALYTICS) && USE_ANALYTICS
  181. void GeneralPane::CreateAnalytics()
  182. {
  183. auto* analytics_group = new QGroupBox(tr("Usage Statistics Reporting Settings"));
  184. auto* analytics_group_layout = new QVBoxLayout;
  185. analytics_group->setLayout(analytics_group_layout);
  186. m_main_layout->addWidget(analytics_group);
  187. m_checkbox_enable_analytics = new ToolTipCheckBox(tr("Enable Usage Statistics Reporting"));
  188. m_button_generate_new_identity = new ToolTipPushButton(tr("Generate a New Statistics Identity"));
  189. analytics_group_layout->addWidget(m_checkbox_enable_analytics);
  190. analytics_group_layout->addWidget(m_button_generate_new_identity);
  191. }
  192. #endif
  193. void GeneralPane::LoadConfig()
  194. {
  195. const QSignalBlocker blocker(this);
  196. if (AutoUpdateChecker::SystemSupportsAutoUpdates())
  197. {
  198. const auto track = Settings::Instance().GetAutoUpdateTrack().toStdString();
  199. // If the track doesn't match any known value, set to "beta" which is the
  200. // default config value on Dolphin release builds.
  201. if (track == AUTO_UPDATE_DISABLE_STRING)
  202. SignalBlocking(m_combobox_update_track)->setCurrentIndex(AUTO_UPDATE_DISABLE_INDEX);
  203. else if (track == AUTO_UPDATE_DEV_STRING)
  204. SignalBlocking(m_combobox_update_track)->setCurrentIndex(AUTO_UPDATE_DEV_INDEX);
  205. else
  206. SignalBlocking(m_combobox_update_track)->setCurrentIndex(AUTO_UPDATE_BETA_INDEX);
  207. }
  208. #if defined(USE_ANALYTICS) && USE_ANALYTICS
  209. SignalBlocking(m_checkbox_enable_analytics)
  210. ->setChecked(Settings::Instance().IsAnalyticsEnabled());
  211. #endif
  212. #ifdef USE_DISCORD_PRESENCE
  213. SignalBlocking(m_checkbox_discord_presence)
  214. ->setChecked(Config::Get(Config::MAIN_USE_DISCORD_PRESENCE));
  215. #endif
  216. int selection = qRound(Config::Get(Config::MAIN_EMULATION_SPEED) * 10);
  217. if (selection < m_combobox_speedlimit->count())
  218. SignalBlocking(m_combobox_speedlimit)->setCurrentIndex(selection);
  219. const auto fallback = Settings::Instance().GetFallbackRegion();
  220. if (fallback == DiscIO::Region::NTSC_J)
  221. SignalBlocking(m_combobox_fallback_region)->setCurrentIndex(FALLBACK_REGION_NTSCJ_INDEX);
  222. else if (fallback == DiscIO::Region::NTSC_U)
  223. SignalBlocking(m_combobox_fallback_region)->setCurrentIndex(FALLBACK_REGION_NTSCU_INDEX);
  224. else if (fallback == DiscIO::Region::PAL)
  225. SignalBlocking(m_combobox_fallback_region)->setCurrentIndex(FALLBACK_REGION_PAL_INDEX);
  226. else if (fallback == DiscIO::Region::NTSC_K)
  227. SignalBlocking(m_combobox_fallback_region)->setCurrentIndex(FALLBACK_REGION_NTSCK_INDEX);
  228. else
  229. SignalBlocking(m_combobox_fallback_region)->setCurrentIndex(FALLBACK_REGION_NTSCJ_INDEX);
  230. }
  231. static QString UpdateTrackFromIndex(int index)
  232. {
  233. QString value;
  234. switch (index)
  235. {
  236. case AUTO_UPDATE_DISABLE_INDEX:
  237. value = QString::fromStdString(AUTO_UPDATE_DISABLE_STRING);
  238. break;
  239. case AUTO_UPDATE_BETA_INDEX:
  240. value = QString::fromStdString(AUTO_UPDATE_BETA_STRING);
  241. break;
  242. case AUTO_UPDATE_DEV_INDEX:
  243. value = QString::fromStdString(AUTO_UPDATE_DEV_STRING);
  244. break;
  245. }
  246. return value;
  247. }
  248. static DiscIO::Region UpdateFallbackRegionFromIndex(int index)
  249. {
  250. DiscIO::Region value = DiscIO::Region::Unknown;
  251. switch (index)
  252. {
  253. case FALLBACK_REGION_NTSCJ_INDEX:
  254. value = DiscIO::Region::NTSC_J;
  255. break;
  256. case FALLBACK_REGION_NTSCU_INDEX:
  257. value = DiscIO::Region::NTSC_U;
  258. break;
  259. case FALLBACK_REGION_PAL_INDEX:
  260. value = DiscIO::Region::PAL;
  261. break;
  262. case FALLBACK_REGION_NTSCK_INDEX:
  263. value = DiscIO::Region::NTSC_K;
  264. break;
  265. default:
  266. value = DiscIO::Region::NTSC_J;
  267. }
  268. return value;
  269. }
  270. void GeneralPane::OnSaveConfig()
  271. {
  272. Config::ConfigChangeCallbackGuard config_guard;
  273. auto& settings = SConfig::GetInstance();
  274. if (AutoUpdateChecker::SystemSupportsAutoUpdates())
  275. {
  276. Settings::Instance().SetAutoUpdateTrack(
  277. UpdateTrackFromIndex(m_combobox_update_track->currentIndex()));
  278. }
  279. #ifdef USE_DISCORD_PRESENCE
  280. Discord::SetDiscordPresenceEnabled(m_checkbox_discord_presence->isChecked());
  281. #endif
  282. #if defined(USE_ANALYTICS) && USE_ANALYTICS
  283. Settings::Instance().SetAnalyticsEnabled(m_checkbox_enable_analytics->isChecked());
  284. DolphinAnalytics::Instance().ReloadConfig();
  285. #endif
  286. Settings::Instance().SetFallbackRegion(
  287. UpdateFallbackRegionFromIndex(m_combobox_fallback_region->currentIndex()));
  288. settings.SaveSettings();
  289. }
  290. #if defined(USE_ANALYTICS) && USE_ANALYTICS
  291. void GeneralPane::GenerateNewIdentity()
  292. {
  293. DolphinAnalytics::Instance().GenerateNewIdentity();
  294. DolphinAnalytics::Instance().ReloadConfig();
  295. ModalMessageBox message_box(this);
  296. message_box.setIcon(QMessageBox::Information);
  297. message_box.setWindowTitle(tr("Identity Generation"));
  298. message_box.setText(tr("New identity generated."));
  299. SetQWidgetWindowDecorations(&message_box);
  300. message_box.exec();
  301. }
  302. #endif
  303. void GeneralPane::AddDescriptions()
  304. {
  305. static constexpr char TR_DUALCORE_DESCRIPTION[] =
  306. QT_TR_NOOP("Separates CPU and GPU emulation work to separate threads. Reduces single-thread "
  307. "burden by spreading Dolphin's heaviest load across two cores, which usually "
  308. "improves performance. However, it can result in glitches and crashes."
  309. "<br><br>This setting cannot be changed while emulation is active."
  310. "<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
  311. static constexpr char TR_CHEATS_DESCRIPTION[] = QT_TR_NOOP(
  312. "Enables the use of AR and Gecko cheat codes which can be used to modify games' behavior. "
  313. "These codes can be configured with the Cheats Manager in the Tools menu."
  314. "<br><br>This setting cannot be changed while emulation is active."
  315. "<br><br><dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
  316. static constexpr char TR_OVERRIDE_REGION_SETTINGS_DESCRIPTION[] =
  317. QT_TR_NOOP("Lets you use languages and other region-related settings that the game may not "
  318. "be designed for. May cause various crashes and bugs."
  319. "<br><br>This setting cannot be changed while emulation is active."
  320. "<br><br><dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
  321. static constexpr char TR_AUTO_DISC_CHANGE_DESCRIPTION[] = QT_TR_NOOP(
  322. "Automatically changes the game disc when requested by games with two discs. This feature "
  323. "requires the game to be launched in one of the following ways:"
  324. "<br>- From the game list, with both discs being present in the game list."
  325. "<br>- With File > Open or the command line interface, with the paths to both discs being "
  326. "provided."
  327. "<br>- By launching an M3U file with File > Open or the command line interface."
  328. "<br><br><dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
  329. #ifdef USE_DISCORD_PRESENCE
  330. static constexpr char TR_DISCORD_PRESENCE_DESCRIPTION[] =
  331. QT_TR_NOOP("Shows which game is active and the duration of your current play session in your "
  332. "Discord status."
  333. "<br><br>This setting cannot be changed while emulation is active."
  334. "<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
  335. #endif
  336. static constexpr char TR_SPEEDLIMIT_DESCRIPTION[] =
  337. QT_TR_NOOP("Controls how fast emulation runs relative to the original hardware."
  338. "<br><br>Values higher than 100% will emulate faster than the original hardware "
  339. "can run, if your hardware is able to keep up. Values lower than 100% will slow "
  340. "emulation instead. Unlimited will emulate as fast as your hardware is able to."
  341. "<br><br><dolphin_emphasis>If unsure, select 100%.</dolphin_emphasis>");
  342. static constexpr char TR_UPDATE_TRACK_DESCRIPTION[] = QT_TR_NOOP(
  343. "Selects which update track Dolphin uses when checking for updates at startup. If a new "
  344. "update is available, Dolphin will show a list of changes made since your current version "
  345. "and ask you if you want to update."
  346. "<br><br>The Dev track has the latest version of Dolphin which often updates multiple times "
  347. "per day. Select this track if you want the newest features and fixes."
  348. "<br><br>The Releases track has an update every few months. Some reasons you might prefer to "
  349. "use this track:"
  350. "<br>- You prefer using versions that have had additional testing."
  351. "<br>- NetPlay requires players to have the same Dolphin version, and the latest Release "
  352. "version will have the most players to match with."
  353. "<br>- You frequently use Dolphin's savestate system, which doesn't guarantee backward "
  354. "compatibility of savestates between Dolphin versions. If this applies to you, make sure you "
  355. "make an in-game save before updating (i.e. save your game in the same way you would on a "
  356. "physical GameCube or Wii), then load the in-game save after updating Dolphin and before "
  357. "making any new savestates."
  358. "<br><br>Selecting \"Don't Update\" will prevent Dolphin from automatically checking for "
  359. "updates."
  360. "<br><br><dolphin_emphasis>If unsure, select Releases.</dolphin_emphasis>");
  361. static constexpr char TR_FALLBACK_REGION_DESCRIPTION[] =
  362. QT_TR_NOOP("Sets the region used for titles whose region cannot be determined automatically."
  363. "<br><br>This setting cannot be changed while emulation is active.");
  364. #if defined(USE_ANALYTICS) && USE_ANALYTICS
  365. static constexpr char TR_ENABLE_ANALYTICS_DESCRIPTION[] = QT_TR_NOOP(
  366. "If selected, Dolphin can collect data on its performance, feature usage, emulated games, "
  367. "and configuration, as well as data on your system's hardware and operating system."
  368. "<br><br>No private data is ever collected. This data helps us understand how people and "
  369. "emulated games use Dolphin and prioritize our efforts. It also helps us identify rare "
  370. "configurations that are causing bugs, performance and stability issues.");
  371. static constexpr char TR_GENERATE_NEW_IDENTITY_DESCRIPTION[] =
  372. QT_TR_NOOP("Generate a new anonymous ID for your usage statistics. This will cause any "
  373. "future statistics to be unassociated with your previous statistics.");
  374. #endif
  375. m_checkbox_dualcore->SetDescription(tr(TR_DUALCORE_DESCRIPTION));
  376. m_checkbox_cheats->SetDescription(tr(TR_CHEATS_DESCRIPTION));
  377. m_checkbox_override_region_settings->SetDescription(tr(TR_OVERRIDE_REGION_SETTINGS_DESCRIPTION));
  378. m_checkbox_auto_disc_change->SetDescription(tr(TR_AUTO_DISC_CHANGE_DESCRIPTION));
  379. #ifdef USE_DISCORD_PRESENCE
  380. m_checkbox_discord_presence->SetDescription(tr(TR_DISCORD_PRESENCE_DESCRIPTION));
  381. #endif
  382. m_combobox_speedlimit->SetTitle(tr("Speed Limit"));
  383. m_combobox_speedlimit->SetDescription(tr(TR_SPEEDLIMIT_DESCRIPTION));
  384. if (AutoUpdateChecker::SystemSupportsAutoUpdates())
  385. {
  386. m_combobox_update_track->SetTitle(tr("Auto Update"));
  387. m_combobox_update_track->SetDescription(tr(TR_UPDATE_TRACK_DESCRIPTION));
  388. }
  389. m_combobox_fallback_region->SetTitle(tr("Fallback Region"));
  390. m_combobox_fallback_region->SetDescription(tr(TR_FALLBACK_REGION_DESCRIPTION));
  391. #if defined(USE_ANALYTICS) && USE_ANALYTICS
  392. m_checkbox_enable_analytics->SetDescription(tr(TR_ENABLE_ANALYTICS_DESCRIPTION));
  393. m_button_generate_new_identity->SetTitle(tr("Generate a New Statistics Identity"));
  394. m_button_generate_new_identity->SetDescription(tr(TR_GENERATE_NEW_IDENTITY_DESCRIPTION));
  395. #endif
  396. }