gui: Show current wallet name in window title #15149
pull promag wants to merge 3 commits into bitcoin:master from promag:2019-01-updatewindowtitle changing 4 files +53 −36-
promag commented at 0:00 am on January 12, 2019: member
-
fanquake added the label GUI on Jan 12, 2019
-
in src/qt/bitcoingui.cpp:570 in aa513aec74 outdated
566@@ -567,10 +567,9 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel) 567 } 568 569 #ifdef ENABLE_WALLET 570-bool BitcoinGUI::addWallet(WalletModel *walletModel) 571+void BitcoinGUI::addWallet(WalletModel *walletModel)
promag commented at 0:05 am on January 12, 2019:nit,WalletModel* walletModel
.in src/qt/bitcoingui.h:83 in aa513aec74 outdated
79@@ -80,8 +80,8 @@ class BitcoinGUI : public QMainWindow 80 The wallet model represents a bitcoin wallet, and offers access to the list of transactions, address book and sending 81 functionality. 82 */ 83- bool addWallet(WalletModel *walletModel); 84- bool removeWallet(WalletModel* walletModel); 85+ void addWallet(WalletModel *walletModel);
promag commented at 0:08 am on January 12, 2019:Same as above.jonasschnelli commented at 0:14 am on January 12, 2019: contributorYeah. Why not. Concept ACK. I suggest removing the text part “Wallet” | “Node”.promag commented at 0:19 am on January 12, 2019: memberI suggest removing the text part “Wallet” | “Node”. @jonasschnelli I kind of agree, not very helpful I guess.
promag force-pushed on Jan 12, 2019promag force-pushed on Jan 12, 2019promag force-pushed on Jan 12, 2019DrahtBot commented at 1:05 am on January 12, 2019: memberThe following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #15153 (gui: Add Open Wallet menu by promag)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
promag commented at 3:32 am on January 12, 2019: memberNow with Jonas suggestion.benthecarman commented at 6:11 am on January 12, 2019: contributortACK530ec6c
hebasto commented at 2:56 pm on January 13, 2019: memberConcept ACK.in src/qt/bitcoingui.cpp:1213 in 530ec6ca06 outdated
1206+ QString window_title = tr(PACKAGE_NAME) + " - "; 1207+#ifdef ENABLE_WALLET 1208+ if (enableWallet) { 1209+ WalletView* const walletView = walletFrame ? walletFrame->currentWalletView() : nullptr; 1210+ if (walletView) window_title += walletView->getWalletModel()->getDisplayName() + " - "; 1211+ }
hebasto commented at 4:14 pm on January 13, 2019:0 if (walletFrame) { 1 window_title += walletFrame->currentWalletView()->getWalletModel()->getDisplayName() + " - "; 2 }
in src/qt/bitcoingui.h:164 in 530ec6ca06 outdated
160@@ -161,6 +161,7 @@ class BitcoinGUI : public QMainWindow 161 int spinnerFrame = 0; 162 163 const PlatformStyle *platformStyle; 164+ const NetworkStyle *m_network_style;
hebasto commented at 4:19 pm on January 13, 2019:0 const NetworkStyle* m_network_style;
hebasto changes_requestedpromag force-pushed on Jan 13, 2019luke-jr commented at 6:16 pm on January 13, 2019: memberIMO this doesn’t really make sense, since the same window is used for all loaded wallets currently.jonasschnelli commented at 7:16 pm on January 13, 2019: contributorIMO this doesn’t really make sense, since the same window is used for all loaded wallets currently.
IMHO, window titles are okay to be context sensitive.
promag commented at 8:14 am on January 14, 2019: member@hebasto dropped
enableWallet
check,walletFrame
is indeed sufficient: https://github.com/bitcoin/bitcoin/blob/a9b71a09a0bbbdebc4c0b10d287bf2d53f628cf4/src/qt/bitcoingui.cpp#L101-L104Still checking
walletView
for the case the last wallet is unloaded.Let me know so I can squash.
hebasto commented at 8:42 am on January 14, 2019: membertACK c1e8f74f326f862adbf5a326eb1b9a65e6eb1edd
Checked the case when all wallets are unloaded:
laanwj commented at 1:39 pm on January 14, 2019: memberConcept ACK, agree it’s fine for window titles to be dynamic and context sensitive.promag force-pushed on Jan 14, 2019hebasto commented at 10:38 pm on January 14, 2019: memberre-tACK b0b2d112550817e31e469a19a2d69bcef97ae4beSjors commented at 12:08 pm on January 15, 2019: memberConcept ACK, code changes look fine, tested.
I don’t like the default behavior:
“- [default wallet]” is visual clutter. If there’s only one wallet loaded and it doesn’t have a custom name, I would just show nothing.
promag commented at 2:29 pm on January 15, 2019: memberIf there’s only one wallet loaded and it doesn’t have a custom name, I would just show nothing
That would be the same as no wallet is loaded. Beside, we already use that wording for the default wallet name. And this won’t be an issue if the goal is to avoid creating the default wallet.
gui: Remove unused return type in some BitcoinGUI methods f411c8b35bpromag force-pushed on Jan 15, 2019Sjors commented at 3:35 pm on January 15, 2019: memberThat would be the same as no wallet is loaded.
That shouldn’t cause any confusion. Either a wallet is visible or not.
It’s not clear yet what we’re going to do about the default wallet, e.g. do we force users to give it a name? I expect only a fraction of users to care about the multi-wallet stuff, so a term like “default wallet” is confusing.
gui: Keep network style in BitcoinGUI 8a79261124gui: Show current wallet name in window title fe7048b39bpromag force-pushed on Jan 15, 2019Sjors commented at 5:53 pm on January 15, 2019: membertACK fe7048bjonasschnelli commented at 7:01 pm on January 15, 2019: contributorTested ACK fe7048b39bc655d65557ca95dda37c364947ddbfjonasschnelli merged this on Jan 15, 2019jonasschnelli closed this on Jan 15, 2019
jonasschnelli referenced this in commit c7c84209bb on Jan 15, 2019promag deleted the branch on Jan 15, 2019Sjors commented at 3:06 pm on January 19, 2019: memberOops, now we have a trailing-
on mainnet.laanwj referenced this in commit 7455ca2ae6 on Jan 21, 2019PastaPastaPasta referenced this in commit 39bea9bbe6 on Sep 8, 2021PastaPastaPasta referenced this in commit 1e8cb1116b on Sep 8, 2021PastaPastaPasta referenced this in commit 062e065f4c on Sep 9, 2021vijaydasmp referenced this in commit feba11e9c8 on Sep 13, 2021vijaydasmp referenced this in commit c46ea0f427 on Sep 13, 2021DrahtBot locked this on Dec 16, 2021
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 09:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me