GeneralPane.cpp 19 KB

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