GUI: allow easier use of the testnet icon #1259

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:GUI_testnet_UX changing 1 files +2 −0
  1. Diapolo commented at 10:36 AM on May 11, 2012: none
    • change global setWindowIcon() calls to qApp->setWindowIcon() as all parent windows will then use this set icon
  2. laanwj commented at 10:47 AM on May 11, 2012: member

    Please don't add non-model arguments to setModel calls.

    Sorry, but I don't think this is important enough to change the interface or introduce extra complexity at all.

  3. laanwj commented at 10:53 AM on May 11, 2012: member

    I also wonder why this doesn't go right by default. Shouldn't it inherit the parent window icon? Or how does this work?

  4. Diapolo commented at 10:53 AM on May 11, 2012: none

    LOL, this can be done just like with the about-Qt dialog ... I don't even need to pass something new ;), so you are right.

  5. Diapolo commented at 10:56 AM on May 11, 2012: none

    Updated to an easy fix, but I don't know, why they don't use the testnet icon as default. At lest now every GUI element uses it, while we are on testnet :).

    Edit: The Main-Window window icon is changed to testnet in BitcoinGUI::setClientModel(), perhaps the following dialogs still use what was default at compile-time?

  6. laanwj commented at 11:01 AM on May 11, 2012: member

    Yeah, I wonder where it gets the 'non-testnet' icon from at all? If new dialogs can somehow still find it, that means it is still stored somewhere, which is not right. We need to figure this out, so all the explicit setWindowIcons can go.

  7. laanwj commented at 11:03 AM on May 11, 2012: member

    maybe qApp->setWindowIcon ?

  8. Diapolo commented at 11:15 AM on May 11, 2012: none

    Can qApp be freely used in bitcoingui.cpp? I'll try this.

  9. Diapolo commented at 11:19 AM on May 11, 2012: none

    Alright this fixes it! Will update this pull.

  10. Diapolo commented at 11:25 AM on May 11, 2012: none

    Updated!

  11. laanwj commented at 11:33 AM on May 11, 2012: member

    You still need to set the window icon of the current window as well... It will only change the default for new dialogs/windows.

  12. Diapolo commented at 11:38 AM on May 11, 2012: none

    That is strange, as this works like it should. If I use normal net, the icon is correct on every dialog, the same for testnet.

    As we call setClientModel() on Init, the icon set should be a global one, what am I understanding wrong here?

  13. laanwj commented at 12:11 PM on May 11, 2012: member

    Ok, maybe this just works then.

  14. laanwj commented at 1:26 PM on May 11, 2012: member

    On Ubuntu, this causes no dock icon to be shown at all anymore (either in testnet or normal net). You do need to set the setWindowIcon on the BitcoinGUI instance as well, in both places where you set it in qApp. The qApp icon is only applied automatically to windows constructed after it is set. The BitcoinGUI instance already exists at that time.

  15. Diapolo commented at 1:28 PM on May 11, 2012: none

    So just re-add setWindowIcon(QIcon(":icons/bitcoin")); below the qApp-> lines?

  16. laanwj commented at 1:28 PM on May 11, 2012: member

    Yes

  17. add calls to qApp->setWindowIcon(), to remove the need to set window icons for testnet with additional calls 37244c2f7f
  18. Diapolo commented at 1:32 PM on May 11, 2012: none

    Done and this work on Ubuntu now, too so that you have testnet-symbol on every dialog while on testnet?

  19. laanwj commented at 1:35 PM on May 11, 2012: member

    Yep it works great with this. However, ubuntu doesn't show a symbol for every window, just for the application, so I can't check the second part. I assume it is OK though everywhere now.

  20. laanwj referenced this in commit 23f59e7023 on May 11, 2012
  21. laanwj merged this on May 11, 2012
  22. laanwj closed this on May 11, 2012

  23. coblee referenced this in commit 8d42a42b4a on Jul 17, 2012
  24. suprnurd referenced this in commit 9114ef7930 on Dec 5, 2017
  25. lateminer referenced this in commit cf1bab30d5 on May 6, 2020
  26. lateminer referenced this in commit 16d7dac5f7 on May 6, 2020
  27. DrahtBot locked this on Sep 8, 2021
Contributors

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: 2026-04-21 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me