Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt: Add Window menu #14573

Merged
merged 3 commits into from Dec 16, 2018
Merged

qt: Add Window menu #14573

merged 3 commits into from Dec 16, 2018

Conversation

@promag
Copy link
Member

@promag promag commented Oct 25, 2018

Overall this PR does the following:

  • add top level menu Window
  • add Minimize and Zoom actions to Window menu
  • move Sending/Receiving address to Window
  • remove Help->Debug window
  • add one menu entry for each debug window tab

This removes the access to address book from the File menu.

With wallet support:
screenshot 2018-12-11 at 00 33 05

Without wallet support:
screenshot 2018-12-11 at 12 55 21

@fanquake fanquake added the GUI label Oct 25, 2018
Copy link
Contributor

@ken2812221 ken2812221 left a comment

Concept ACK

src/qt/bitcoingui.cpp Outdated Show resolved Hide resolved
@hebasto
Copy link
Member

@hebasto hebasto commented Oct 28, 2018

Concept ACK.
Could move "Backup Wallet..." from File menu to Wallet menu? Agree with @Sjors's comment

From Apple's Human Interface Guidelines:

Provide a Window menu even if your app has only one window. Include the Minimize and Zoom menu items so people using Full Keyboard Access can invoke these functions using their keyboard.

@promag promag changed the title qt: Add Wallet and Window menus qt: Add Window menus Oct 30, 2018
@promag promag changed the title qt: Add Window menus qt: Add Window menu Oct 30, 2018
@DrahtBot
Copy link
Contributor

@DrahtBot DrahtBot commented Oct 30, 2018

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #14879 (qt: Add warning messages to the debug window by hebasto)
  • #9849 (Qt: Network Watch tool by luke-jr)

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 promag mentioned this pull request Oct 30, 2018
@promag promag force-pushed the promag:2018-10-overhaul-menus branch 2 times, most recently Oct 31, 2018
@promag
Copy link
Member Author

@promag promag commented Oct 31, 2018

Removed the changes to the "Settings" menu.

@laanwj
Copy link
Member

@laanwj laanwj commented Nov 12, 2018

I don't know what the conventions around this are, nowadays, but Concept ACK.

Edit: I don't understand why "address book" would belong in the Window menu, it doesn' seem window related functionality but wallet related functionality! oh, because it's an auxiliary window

@meshcollider
Copy link
Member

@meshcollider meshcollider commented Nov 12, 2018

Concept ACK, I would slightly prefer the name "View" but this is fine with me too

@jonasschnelli
Copy link
Member

@jonasschnelli jonasschnelli commented Nov 13, 2018

Tested a bit.
I think the "minimize" entry should toggle to "maximise" once minimized or at least maximises when selecting "minimize" in already minimized state.
Rest looks fine.

@promag
Copy link
Member Author

@promag promag commented Nov 13, 2018

Thanks @jonasschnelli, I'll see if others also toggle.

I have to test in windows.

@promag
Copy link
Member Author

@promag promag commented Nov 14, 2018

@jonasschnelli on macos, if the active window is minimized then "Minimize" action is disabled. And "Zoom" action toggles between maximized and normal.

Also, some software add the main window to this menu, and I think we could too.

@Sjors
Copy link
Member

@Sjors Sjors commented Nov 19, 2018

@hebasto wrote:

Could move "Backup Wallet..." from File menu to Wallet menu?

Why? Loading, saving and backing up the wallet seem like document / File operations.

Moving message signing and verification from File to Window would make more sense to me.

Even more clear IMO, but haven't thought very deeply about it yet, is to have a Wallet top level menu. In that case I'd be more in favour of adding Backup into that, as well as sign/verify, Sending/Receiving address. The Window menu would be used for Minimize, Debug Window.

I would also be fine with dropping the "Address Book" level and just having direct menu items for Sending and Receiving addresses.

Definitely out of scope, but I would still like to see each wallet represented as a window (rather than the little dropdown we have now). However I wouldn't want closing a window to cause unloading a wallet, so it's not obvious how this would work.

@hebasto
Copy link
Member

@hebasto hebasto commented Nov 22, 2018

IMO, it would be better to avoid using native widgets (Native Widgets vs Alien Widgets) and related methods (QWidget::windowHandle()) and objects (QWindow).

@Sjors

Why? Loading, saving and backing up the wallet seem like document / File operations.

Agree.

@jonasschnelli

I think the "minimize" entry should toggle to "maximise" once minimized or at least maximises when selecting "minimize" in already minimized state.

@promag

on macos, if the active window is minimized then "Minimize" action is disabled. And "Zoom" action toggles between maximized and normal.

On macOS, if the active window is minimized the both "Minimize" and "Zoom" actions should be disabled. That is not the case for 3f779b3b99b674b7beecc9a30fa37bda1d722387.

src/qt/bitcoingui.cpp Outdated Show resolved Hide resolved
src/qt/bitcoingui.cpp Outdated Show resolved Hide resolved
@promag
Copy link
Member Author

@promag promag commented Dec 11, 2018

Updated after feedback, thank you! Also updated screenshot. Windows/linux feedback would be awesome.

@promag promag force-pushed the promag:2018-10-overhaul-menus branch Dec 11, 2018
@promag
Copy link
Member Author

@promag promag commented Dec 11, 2018

@Sjors

Definitely out of scope, but I would still like to see each wallet represented as a window (rather than the little dropdown we have now)

I think in the future we could have multiple windows, each could have multiple wallets.

@promag
Copy link
Member Author

@promag promag commented Dec 11, 2018

Pushed a commit to remove ellipsis from the sending/receiving addresses menu actions. Please see rationale in https://stackoverflow.com/a/637708 (also updated screenshot)

@Sjors
Copy link
Member

@Sjors Sjors commented Dec 11, 2018

tACK 6c72f91

A few nits, but don't let that stop anyone from merging:

  • you could move Sign & Verify Message to Window (they do need ellipses)
  • I don't find the Zoom item very useful, but don't mind it either (I'm just not a Bitcoin Core Window Maximalist)
  • when ./configure --disable-wallet or disablewallet=1 you could still show Information, Console, Network Traffic and Peers in the Window menu. There may be some accessibility advantage to that.
@promag
Copy link
Member Author

@promag promag commented Dec 11, 2018

  • you could move Sign & Verify Message to Window (they do need ellipses)

I'll leave that for later after we decide about top level menu "Wallet".

  • I don't find the Zoom item very useful, but don't mind it either (I'm just not a Bitcoin Core Window Maximalist)

Minimize and Zoom operate on the focus window, which can be the main window, address book dialogs, debug window..

  • when ./configure --disable-wallet or disablewallet=1 you could still show Information, Console, Network Traffic and Peers in the Window menu.

I'll update with this suggestion, thanks @Sjors.

@promag promag force-pushed the promag:2018-10-overhaul-menus branch Dec 11, 2018
@promag promag force-pushed the promag:2018-10-overhaul-menus branch to 95a5a9f Dec 11, 2018
@Sjors
Copy link
Member

@Sjors Sjors commented Dec 11, 2018

tACK 9ea38d0

git range-diff `git merge-base --all HEAD 6c72f91`...6c72f91 HEAD~3...HEAD

schermafbeelding 2018-12-11 om 17 39 04

@promag promag deleted the promag:2018-10-overhaul-menus branch Dec 16, 2018
@MarcoFalke
Copy link
Member

@MarcoFalke MarcoFalke commented Dec 17, 2018

This does not compile because the addAction function was only introduced in Qt 5.6.

@Empact
Copy link
Member

@Empact Empact commented Dec 17, 2018

An example of the failure: https://travis-ci.org/bitcoin/bitcoin/jobs/468706526
Min Qt version is 5.2, haven't found those docs readily available but the 5.5 QMenu api is here:
http://doc.qt.io/archives/qt-5.5/qmenu.html

laanwj added a commit that referenced this pull request Dec 17, 2018
3e21b69 [Qt] Restore < Qt5.6 compatibility for addAction (Jonas Schnelli)

Pull request description:

  #14573 broke < Qt5.6 compatibility due to calling the lambda version of `addAction` that was added in Qt5.6.

  This PR re-enables < Qt5.6 compatibility.

Tree-SHA512: b3cf055d88a76713d100be05b2298d4091967e1a43de176af2647f59e76b98b216493dd12a6d68a942ae7946f2026e33dd8e8d20fc44a9a9614a3690ad9a2417
luke-jr added a commit to bitcoinknots/bitcoin that referenced this pull request Dec 24, 2018
luke-jr added a commit to bitcoinknots/bitcoin that referenced this pull request Dec 26, 2018
Github-Pull: bitcoin#14573
Rebased-From: a96c0df
luke-jr added a commit to bitcoinknots/bitcoin that referenced this pull request Dec 26, 2018
Considering https://stackoverflow.com/a/637708 the ellipsis in these
menu actions should be removed.

Github-Pull: bitcoin#14573
Rebased-From: 95a5a9f
@Sjors Sjors mentioned this pull request Apr 23, 2019
@molxyz
Copy link

@molxyz molxyz commented Apr 23, 2019

Hello, I also have a question on that button Main Window on windows bitcoin. If it has no purpose please remove that button before the official release to avoid confusions for windows users.

Thank you.

Please remove this button:

image

@promag
Copy link
Member Author

@promag promag commented Apr 23, 2019

@molxyz from the above #14573 (comment)

  • then comes the main windows — we only allow 1 main window for now — and this is used to bring it to front (I'll remove in windows, maybe linux too?)

Sorry for forgetting about this, but at this stage I'm afraid it won't be removed for 0.18 (unless we have to do RC5).

@molxyz
Copy link

@molxyz molxyz commented Apr 23, 2019

@promag Hi, I'll be happy to run tests for RC5. Thanks.

laanwj added a commit that referenced this pull request Aug 1, 2019
b078067 gui: Remove unused RPCConsole::tabFocus (João Barbosa)

Pull request description:

  Added in #14573 but not used, so begone.

ACKs for top commit:
  practicalswift:
    utACK b078067
  hebasto:
    ACK b078067
  laanwj:
    ACK b078067, there's nothing really to test here

Tree-SHA512: 237276dea4d174b5fca34855447146f79c3faaae7179f4245c70e2070b49282d95f886b1be6d2a33713c81a254f4483a4e4bf850053a8dcb18a3a897bd3da08e
jonasschnelli added a commit that referenced this pull request Oct 10, 2019
f33efa8 GUI: Restore RPC Console to non-wallet tray icon menu (Luke Dashjr)

Pull request description:

  #14383 moved the debug window's menu position, to make it conditional on wallet mode. The rationale given was to match the behaviour of the 'Help' menu.

  #14573 replaced the 'Help' menu's conditional debug window with an unconditional list of items in the new 'Window' menu.

  This PR reverts the no-longer-applicable part of #14383, putting the debug window back on the tray menu unconditionally, and in the position it previously had.

ACKs for top commit:
  jonasschnelli:
    Tested ACK f33efa8 - the debug window is also accessible from the menu (though directly the subpages which counts IMO).

Tree-SHA512: c04a588fed37a8c31cb413baaa346e3c1c18724f9b40d64b8528c517f65290930d577bccf0a794180e968e84d3c52e9fa3fdc8a40bbc5fe3418eaddd73481271
sidhujag added a commit to syscoin/syscoin that referenced this pull request Oct 11, 2019
… menu

f33efa8 GUI: Restore RPC Console to non-wallet tray icon menu (Luke Dashjr)

Pull request description:

  bitcoin#14383 moved the debug window's menu position, to make it conditional on wallet mode. The rationale given was to match the behaviour of the 'Help' menu.

  bitcoin#14573 replaced the 'Help' menu's conditional debug window with an unconditional list of items in the new 'Window' menu.

  This PR reverts the no-longer-applicable part of bitcoin#14383, putting the debug window back on the tray menu unconditionally, and in the position it previously had.

ACKs for top commit:
  jonasschnelli:
    Tested ACK f33efa8 - the debug window is also accessible from the menu (though directly the subpages which counts IMO).

Tree-SHA512: c04a588fed37a8c31cb413baaa346e3c1c18724f9b40d64b8528c517f65290930d577bccf0a794180e968e84d3c52e9fa3fdc8a40bbc5fe3418eaddd73481271
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 12, 2020
Summary:
Overall this PR does the following:

 - add top level menu Window
 - add Minimize and Zoom actions to Window menu
 - move Sending/Receiving address to Window
 - remove Help->Debug menu and add one menu entry for each debug window tab in the Window menu

The ellipsis in the name of `Sending/Receiving addresses` actions are be removed, according to common practices (https://stackoverflow.com/a/637708).
Ellipsis at the end of the name of menu actions suggest that user input is expected.

Backport of Core [[bitcoin/bitcoin#14573 | PR14573]] and [[bitcoin/bitcoin#16514 | PR16514]]

[[bitcoin/bitcoin#16514 | PR16514]] removes the `RPCConsole::tabFocus` method introduced in the first PR, but never used.

Test Plan:
`ninja && ninja check`

Run `src/qt/bitcoin-qt` and check that all menu actions work.

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7892
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 13, 2020
Summary:
[[bitcoin/bitcoin#14573 | PR14573]] / D7892 broke Qt5.6 compatibility due to calling the lambda version of addAction that was added in Qt5.6.

Backport of Core [[bitcoin/bitcoin#14979 | PR14979]]

Test Plan:
`ninja && ninja check`
Run `src/qt/bitcoin-qt` and test all menu actions

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D7894
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 28, 2020
Summary:

This is a backport of Core [[bitcoin/bitcoin#14383 | PR14383]] and  [[bitcoin/bitcoin#15023 | PR15023]]

PR 14383 description:
> There is a Debug window leftover in the system tray icon menu after [[bitcoin/bitcoin#3392 | PR3392]] merging.
> This PR makes both the app menu and the systray icon menu consistent.

PR15023 description:
> [[bitcoin/bitcoin#14383 | PR14383]] moved the debug window's menu position, to make it conditional on wallet mode. The rationale given was to match the behaviour of the 'Help' menu.
>
> [[bitcoin/bitcoin#14573 | PR14573]] replaced the 'Help' menu's conditional debug window with an unconditional list of items in the new 'Window' menu.
>
> This PR reverts the no-longer-applicable part of #14383, putting the debug window back on the tray menu unconditionally, and in the position it previously had.

Note: PR14573 was backported in D7892

Test Plan: `ninja && src/qt/bitcoin-qt  -disablewallet`

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: deadalnix, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8146
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Apr 14, 2021
Summary:
Overall this PR does the following:

 - add top level menu Window
 - add Minimize and Zoom actions to Window menu
 - move Sending/Receiving address to Window
 - remove Help->Debug menu and add one menu entry for each debug window tab in the Window menu

The ellipsis in the name of `Sending/Receiving addresses` actions are be removed, according to common practices (https://stackoverflow.com/a/637708).
Ellipsis at the end of the name of menu actions suggest that user input is expected.

Backport of Core [[bitcoin/bitcoin#14573 | PR14573]] and [[bitcoin/bitcoin#16514 | PR16514]]

[[bitcoin/bitcoin#16514 | PR16514]] removes the `RPCConsole::tabFocus` method introduced in the first PR, but never used.

Test Plan:
`ninja && ninja check`

Run `src/qt/bitcoin-qt` and check that all menu actions work.

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7892
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Apr 14, 2021
Summary:
[[bitcoin/bitcoin#14573 | PR14573]] / D7892 broke Qt5.6 compatibility due to calling the lambda version of addAction that was added in Qt5.6.

Backport of Core [[bitcoin/bitcoin#14979 | PR14979]]

Test Plan:
`ninja && ninja check`
Run `src/qt/bitcoin-qt` and test all menu actions

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D7894
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Apr 14, 2021
Summary:

This is a backport of Core [[bitcoin/bitcoin#14383 | PR14383]] and  [[bitcoin/bitcoin#15023 | PR15023]]

PR 14383 description:
> There is a Debug window leftover in the system tray icon menu after [[bitcoin/bitcoin#3392 | PR3392]] merging.
> This PR makes both the app menu and the systray icon menu consistent.

PR15023 description:
> [[bitcoin/bitcoin#14383 | PR14383]] moved the debug window's menu position, to make it conditional on wallet mode. The rationale given was to match the behaviour of the 'Help' menu.
>
> [[bitcoin/bitcoin#14573 | PR14573]] replaced the 'Help' menu's conditional debug window with an unconditional list of items in the new 'Window' menu.
>
> This PR reverts the no-longer-applicable part of #14383, putting the debug window back on the tray menu unconditionally, and in the position it previously had.

Note: PR14573 was backported in D7892

Test Plan: `ninja && src/qt/bitcoin-qt  -disablewallet`

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: deadalnix, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8146
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet