Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions src/qt/createwalletdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,28 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
}
});

#ifndef USE_SQLITE
ui->descriptor_checkbox->setToolTip(tr("Compiled without sqlite support (required for descriptor wallets)"));
ui->descriptor_checkbox->setEnabled(false);
ui->descriptor_checkbox->setChecked(false);
#endif
connect(ui->disable_privkeys_checkbox, &QCheckBox::toggled, [this](bool checked) {
// Disable the encrypt_wallet_checkbox when isDisablePrivateKeysChecked is
// set to true, enable it when isDisablePrivateKeysChecked is false.
ui->encrypt_wallet_checkbox->setEnabled(!checked);

// Wallets without private keys start out blank
if (checked) {
ui->blank_wallet_checkbox->setChecked(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also disable blank_wallet_checkbox?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neh, it gets too tedious. It doesn't matter what you do with this checkbox, it's ignored for watch-only.

}

// When the encrypt_wallet_checkbox is disabled, uncheck it.
if (!ui->encrypt_wallet_checkbox->isEnabled()) {
ui->encrypt_wallet_checkbox->setChecked(false);
}
});

#ifndef USE_SQLITE
ui->descriptor_checkbox->setToolTip(tr("Compiled without sqlite support (required for descriptor wallets)"));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also looks like a new string ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's moved. Try viewing with ignored whitespace (add ?w=1 to github URL)

ui->descriptor_checkbox->setEnabled(false);
ui->descriptor_checkbox->setChecked(false);
#endif

}

CreateWalletDialog::~CreateWalletDialog()
Expand Down
32 changes: 26 additions & 6 deletions src/qt/forms/createwalletdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
<height>24</height>
</rect>
</property>
<property name="placeholderText">
<string>Wallet</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
Expand Down Expand Up @@ -68,17 +71,33 @@
<string>Encrypt Wallet</string>
</property>
<property name="checked">
<bool>true</bool>
<bool>false</bool>
</property>
</widget>
<widget class="QLabel" name="advanced_options_label">
<property name="geometry">
<rect>
<x>20</x>
<y>90</y>
<width>130</width>
<height>21</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font-weight:bold;</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(QT newb question: what is notr?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, should have looked it up. Per https://doc.qt.io/qt-5/designer-creating-custom-widgets.html, if the notr optional attribute is true, the value is not meant to be translated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copy-pasted that from another ui file :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string is not translated :)

</property>
<property name="text">
<string>Advanced options</string>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you say that there are no new strings, but this looks like a new string. why is it not a new string?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it not a heading like h1-6? seems like it is supposed to cover multiple items below?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no modified strings, but indeed this is added. It will show in English for all users.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to bold font, same as with Coin Selection in the send screen.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... thats unfortunate. Would using "Options" (already translated) be an option?

</property>
</widget>
<widget class="QCheckBox" name="disable_privkeys_checkbox">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>80</y>
<y>115</y>
<width>171</width>
<height>22</height>
</rect>
Expand All @@ -94,8 +113,8 @@
<property name="geometry">
<rect>
<x>20</x>
<y>110</y>
<width>171</width>
<y>135</y>
<width>220</width>
<height>22</height>
</rect>
</property>
Expand All @@ -110,7 +129,7 @@
<property name="geometry">
<rect>
<x>20</x>
<y>140</y>
<y>155</y>
<width>171</width>
<height>22</height>
</rect>
Expand All @@ -128,6 +147,7 @@
<tabstop>encrypt_wallet_checkbox</tabstop>
<tabstop>disable_privkeys_checkbox</tabstop>
<tabstop>blank_wallet_checkbox</tabstop>
<tabstop>descriptor_checkbox</tabstop>
</tabstops>
<resources/>
<connections>
Expand Down