settings: rename new settings dialog · feather-wallet/feather@6a7da01 · GitHub
Skip to content

Commit 6a7da01

Browse files
committed
settings: rename new settings dialog
1 parent 6437d06 commit 6a7da01

8 files changed

Lines changed: 41 additions & 44 deletions

File tree

‎src/MainWindow.cpp‎

Lines changed: 1 addition & 1 deletion

‎src/MainWindow.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "appcontext.h"
1212
#include "components.h"
1313
#include "CalcWindow.h"
14-
#include "SettingsNewDialog.h"
14+
#include "SettingsDialog.h"
1515

1616
#include "dialog/AboutDialog.h"
1717
#include "dialog/AccountSwitcherDialog.h"
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// SPDX-License-Identifier: BSD-3-Clause
22
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
33

4-
#include "SettingsNewDialog.h"
5-
#include "ui_SettingsNewDialog.h"
4+
#include "SettingsDialog.h"
5+
#include "ui_SettingsDialog.h"
66

77
#include <QCloseEvent>
88
#include <QDesktopServices>
@@ -13,9 +13,9 @@
1313
#include "utils/WebsocketNotifier.h"
1414
#include "widgets/NetworkProxyWidget.h"
1515

16-
SettingsNew::SettingsNew(QSharedPointer<AppContext> ctx, QWidget *parent)
16+
Settings::Settings(QSharedPointer<AppContext> ctx, QWidget *parent)
1717
: QDialog(parent)
18-
, ui(new Ui::SettingsNew)
18+
, ui(new Ui::Settings)
1919
, m_ctx(std::move(ctx))
2020
{
2121
ui->setupUi(this);
@@ -68,7 +68,7 @@ SettingsNew::SettingsNew(QSharedPointer<AppContext> ctx, QWidget *parent)
6868
this->adjustSize();
6969
}
7070

71-
void SettingsNew::setupAppearanceTab() {
71+
void Settings::setupAppearanceTab() {
7272
// [Theme]
7373
this->setupThemeComboBox();
7474
auto settingsTheme = config()->get(Config::skin).toString();
@@ -148,7 +148,7 @@ void SettingsNew::setupAppearanceTab() {
148148
});
149149
}
150150

151-
void SettingsNew::setupNetworkTab() {
151+
void Settings::setupNetworkTab() {
152152
// Node
153153
if (m_ctx) {
154154
ui->nodeWidget->setupUI(m_ctx->nodes);
@@ -161,7 +161,7 @@ void SettingsNew::setupNetworkTab() {
161161
}
162162

163163
// Proxy
164-
connect(ui->proxyWidget, &NetworkProxyWidget::proxySettingsChanged, this, &SettingsNew::onProxySettingsChanged);
164+
connect(ui->proxyWidget, &NetworkProxyWidget::proxySettingsChanged, this, &Settings::onProxySettingsChanged);
165165

166166
// Websocket
167167
// [Obtain third-party data]
@@ -180,7 +180,7 @@ void SettingsNew::setupNetworkTab() {
180180
});
181181
}
182182

183-
void SettingsNew::setupStorageTab() {
183+
void Settings::setupStorageTab() {
184184
// Paths
185185
ui->lineEdit_defaultWalletDir->setText(config()->get(Config::walletDirectory).toString());
186186
ui->lineEdit_configDir->setText(Config::defaultConfigDir().path());
@@ -250,7 +250,7 @@ void SettingsNew::setupStorageTab() {
250250
});
251251
}
252252

253-
void SettingsNew::setupDisplayTab() {
253+
void Settings::setupDisplayTab() {
254254
// [Hide balance]
255255
ui->checkBox_hideBalance->setChecked(config()->get(Config::hideBalance).toBool());
256256
connect(ui->checkBox_hideBalance, &QCheckBox::toggled, [this](bool toggled){
@@ -295,11 +295,11 @@ void SettingsNew::setupDisplayTab() {
295295
});
296296
}
297297

298-
void SettingsNew::setupMemoryTab() {
298+
void Settings::setupMemoryTab() {
299299
// Nothing here, yet
300300
}
301301

302-
void SettingsNew::setupTransactionsTab() {
302+
void Settings::setupTransactionsTab() {
303303
// [Multibroadcast outgoing transactions]
304304
ui->checkBox_multibroadcast->setChecked(config()->get(Config::multiBroadcast).toBool());
305305
connect(ui->checkBox_multibroadcast, &QCheckBox::toggled, [](bool toggled){
@@ -314,7 +314,7 @@ void SettingsNew::setupTransactionsTab() {
314314
ui->checkBox_requirePasswordToSpend->hide();
315315
}
316316

317-
void SettingsNew::setupMiscTab() {
317+
void Settings::setupMiscTab() {
318318
// [Block explorer]
319319
ui->comboBox_blockExplorer->setCurrentIndex(ui->comboBox_blockExplorer->findText(config()->get(Config::blockExplorer).toString()));
320320
connect(ui->comboBox_blockExplorer, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]{
@@ -344,7 +344,7 @@ void SettingsNew::setupMiscTab() {
344344
});
345345
}
346346

347-
void SettingsNew::onProxySettingsChanged() {
347+
void Settings::onProxySettingsChanged() {
348348
ui->closeButton->addButton(QDialogButtonBox::Apply);
349349
connect(ui->closeButton->button(QDialogButtonBox::Apply), &QAbstractButton::clicked, [this](){
350350
ui->proxyWidget->setProxySettings();
@@ -353,12 +353,12 @@ void SettingsNew::onProxySettingsChanged() {
353353
});
354354
}
355355

356-
void SettingsNew::showNetworkProxyTab() {
357-
this->setSelection(SettingsNew::Pages::NETWORK);
356+
void Settings::showNetworkProxyTab() {
357+
this->setSelection(Settings::Pages::NETWORK);
358358
ui->tabWidget_network->setCurrentIndex(1);
359359
}
360360

361-
void SettingsNew::setupThemeComboBox() {
361+
void Settings::setupThemeComboBox() {
362362
#if defined(Q_OS_WIN)
363363
m_themes.removeOne("Breeze/Dark");
364364
m_themes.removeOne("Breeze/Light");
@@ -369,15 +369,15 @@ void SettingsNew::setupThemeComboBox() {
369369
ui->comboBox_theme->insertItems(0, m_themes);
370370
}
371371

372-
void SettingsNew::setSelection(int index) {
372+
void Settings::setSelection(int index) {
373373
// You'd really think there is a better way
374374
QListWidgetItem *item = ui->selector->item(index);
375375
QModelIndex idx = ui->selector->indexFromItem(item);
376376
ui->selector->setCurrentRow(index);
377377
ui->selector->selectionModel()->select(idx, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
378378
}
379379

380-
void SettingsNew::enableWebsocket(bool enabled) {
380+
void Settings::enableWebsocket(bool enabled) {
381381
if (enabled && !config()->get(Config::offlineMode).toBool() && !config()->get(Config::disableWebsocket).toBool()) {
382382
websocketNotifier()->websocketClient.restart();
383383
} else {
@@ -387,4 +387,4 @@ void SettingsNew::enableWebsocket(bool enabled) {
387387
emit websocketStatusChanged(enabled);
388388
}
389389

390-
SettingsNew::~SettingsNew() = default;
390+
Settings::~Settings() = default;
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// SPDX-License-Identifier: BSD-3-Clause
22
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
33

4-
#ifndef FEATHER_SETTINGSNEWDIALOG_H
5-
#define FEATHER_SETTINGSNEWDIALOG_H
4+
#ifndef FEATHER_SettingsDIALOG_H
5+
#define FEATHER_SettingsDIALOG_H
66

77

88
#include <QAbstractButton>
@@ -13,16 +13,16 @@
1313
#include "widgets/NodeWidget.h"
1414

1515
namespace Ui {
16-
class SettingsNew;
16+
class Settings;
1717
}
1818

19-
class SettingsNew : public QDialog
19+
class Settings : public QDialog
2020
{
2121
Q_OBJECT
2222

2323
public:
24-
explicit SettingsNew(QSharedPointer<AppContext> ctx, QWidget *parent = nullptr);
25-
~SettingsNew() override;
24+
explicit Settings(QSharedPointer<AppContext> ctx, QWidget *parent = nullptr);
25+
~Settings() override;
2626

2727
void showNetworkProxyTab();
2828

@@ -66,7 +66,7 @@ private slots:
6666
void setSelection(int index);
6767
void enableWebsocket(bool enabled);
6868

69-
QScopedPointer<Ui::SettingsNew> ui;
69+
QScopedPointer<Ui::Settings> ui;
7070
QSharedPointer<AppContext> m_ctx;
7171
Nodes *m_nodes = nullptr;
7272

@@ -75,4 +75,4 @@ private slots:
7575
QStringList m_timeFormats{"hh:mm", "hh:mm ap"};
7676
};
7777

78-
#endif //FEATHER_SETTINGSNEWDIALOG_H
78+
#endif //FEATHER_SettingsDIALOG_H
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ui version="4.0">
3-
<class>SettingsNew</class>
4-
<widget class="QDialog" name="SettingsNew">
3+
<class>Settings</class>
4+
<widget class="QDialog" name="Settings">
55
<property name="geometry">
66
<rect>
77
<x>0</x>
@@ -1087,7 +1087,7 @@
10871087
<connection>
10881088
<sender>closeButton</sender>
10891089
<signal>accepted()</signal>
1090-
<receiver>SettingsNew</receiver>
1090+
<receiver>Settings</receiver>
10911091
<slot>accept()</slot>
10921092
<hints>
10931093
<hint type="sourcelabel">
@@ -1103,7 +1103,7 @@
11031103
<connection>
11041104
<sender>closeButton</sender>
11051105
<signal>rejected()</signal>
1106-
<receiver>SettingsNew</receiver>
1106+
<receiver>Settings</receiver>
11071107
<slot>reject()</slot>
11081108
<hints>
11091109
<hint type="sourcelabel">

‎src/WindowManager.cpp‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,19 @@ void WindowManager::raise() {
139139
// ######################## SETTINGS ########################
140140

141141
void WindowManager::showSettings(QSharedPointer<AppContext> ctx, QWidget *parent, bool showProxyTab) {
142-
SettingsNew settings{ctx, parent};
142+
Settings settings{ctx, parent};
143143

144-
connect(&settings, &SettingsNew::preferredFiatCurrencyChanged, [this]{
144+
connect(&settings, &Settings::preferredFiatCurrencyChanged, [this]{
145145
for (const auto &window : m_windows) {
146146
window->onPreferredFiatCurrencyChanged();
147147
}
148148
});
149-
connect(&settings, &SettingsNew::skinChanged, this, &WindowManager::onChangeTheme);
150-
connect(&settings, &SettingsNew::updateBalance, this, &WindowManager::updateBalance);
151-
connect(&settings, &SettingsNew::proxySettingsChanged, this, &WindowManager::onProxySettingsChanged);
152-
connect(&settings, &SettingsNew::websocketStatusChanged, this, &WindowManager::onWebsocketStatusChanged);
153-
connect(&settings, &SettingsNew::offlineMode, this, &WindowManager::offlineMode);
154-
connect(&settings, &SettingsNew::hideUpdateNotifications, [this](bool hidden){
149+
connect(&settings, &Settings::skinChanged, this, &WindowManager::onChangeTheme);
150+
connect(&settings, &Settings::updateBalance, this, &WindowManager::updateBalance);
151+
connect(&settings, &Settings::proxySettingsChanged, this, &WindowManager::onProxySettingsChanged);
152+
connect(&settings, &Settings::websocketStatusChanged, this, &WindowManager::onWebsocketStatusChanged);
153+
connect(&settings, &Settings::offlineMode, this, &WindowManager::offlineMode);
154+
connect(&settings, &Settings::hideUpdateNotifications, [this](bool hidden){
155155
for (const auto &window : m_windows) {
156156
window->onHideUpdateNotifications(hidden);
157157
}

‎src/wizard/PageMenu.cpp‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
#include <QFileDialog>
99

10-
#include "SettingsNewDialog.h"
11-
1210
PageMenu::PageMenu(WizardFields *fields, WalletKeysFilesModel *wallets, QWidget *parent)
1311
: QWizardPage(parent)
1412
, ui(new Ui::PageMenu)

‎src/wizard/WalletWizard.cpp‎

Lines changed: 0 additions & 1 deletion

0 commit comments

Comments
 (0)