aboutsummaryrefslogtreecommitdiff
path: root/src/qt/guiutil.cpp
AgeCommit message (Collapse)Author
2021-07-11qt: Do not use QClipboard::Selection on Windows and macOS.Hennadii Stepanov
Windows and macOS do not support the global mouse selection. Github-Pull: bitcoin-core/gui#277 Rebased-From: 7f3a5980c1d54988a707b961fd2ef647cebb4c5b
2020-08-20Move Win32 defines to configure.ac to ensure they are globally definedLuke Dashjr
common.vcxproj used for MSVC builds
2020-08-12util: make EncodeBase58 consume SpansSebastian Falbesoner
2020-07-15Merge #19210: qt: Get rid of cursor in out-of-focus labelsWladimir J. van der Laan
bd315eb5e27d49d47759ae9417328427426cb269 qt: Get rid of cursor in out-of-focus labels (Hennadii Stepanov) Pull request description: After clicking on `QLabel` with selectable text the cursor remains forever: ![47532924-65e7b200-d8ba-11e8-9254-7bde658961cb](https://user-images.githubusercontent.com/32963518/84038485-ad945200-a9a8-11ea-89e3-c7c17d02a611.png) This PR fixes this visual bug. Earlier attempts to fix this issue: - #14577 - #14810 (combined with other UX feature) ACKs for top commit: promag: Code review ACK bd315eb5e27d49d47759ae9417328427426cb269. laanwj: Tested ACK bd315eb5e27d49d47759ae9417328427426cb269 Tree-SHA512: 6bf89362412e5ce9a4dec6944b62fe44fc31ca49cda7f6e2eb37e847fac9dccb68bca7ac6877b19e42add2333e40d0b4265757ead105ac0a5d28f8ab43b322c3
2020-07-03qt: Get rid of cursor in out-of-focus labelsHennadii Stepanov
This change is a temporary fix of QTBUG-59514.
2020-06-18scripted-diff: Make SeparatorStyle a scoped enumHennadii Stepanov
-BEGIN VERIFY SCRIPT- # General rename helper: $1 -> $2 rename_global() { sed -i "s/\<$1\>/$2/g" $(git grep -l "$1"); } # Helper to rename SeparatorStyle enumerators rename_value() { sed -i "s/ $1/ $2/g" src/qt/bitcoinunits.h; rename_global $1 "SeparatorStyle::$2"; } rename_global 'enum SeparatorStyle' 'enum class SeparatorStyle' rename_value 'separatorNever' 'NEVER' rename_value 'separatorStandard' 'STANDARD' rename_value 'separatorAlways' 'ALWAYS' -END VERIFY SCRIPT-
2020-05-29util: dedup code in callers of serviceFlagToStr()Vasil Dimov
Introduce `serviceFlagsToStr()` which hides the internals of the bitmask and simplifies callers of `serviceFlagToStr()`.
2020-05-29util: simplify the interface of serviceFlagToStr()Vasil Dimov
Don't take two redundant arguments in `serviceFlagToStr()`. As a side effect this fixes an issue introduced in https://github.com/bitcoin/bitcoin/pull/18165 due to which the GUI could print something like `UNKNOWN[1033] & UNKNOWN[1033] & UNKNOWN[2^10]` instead of `NETWORK & WITNESS`.
2020-05-29Merge #18165: Consolidate service flag bit-to-name conversion to a shared ↵Jonas Schnelli
serviceFlagToStr function c31bc5bcfddf440e9a1713f7ba2ca2bf9cfa8e2e Consolidate service flag bit-to-name conversion to a shared serviceFlagToStr function (Luke Dashjr) cea91a1e40e12029140ebfba969ce3ef2965029c Bugfix: GUI: Use unsigned long long type to avoid implicit conversion of MSB check (Luke Dashjr) Pull request description: Side effect: this results in the RPC showing unknown service bits as "UNKNOWN[n]" like the GUI. Note that there is no common mask-to-`vector<string>` function because both GUI and RPC would need to iterate through it to convert to their desired target formats. ACKs for top commit: jonasschnelli: utACK ~~cea91a1e40e12029140ebfba969ce3ef2965029c~~ c31bc5bcfddf440e9a1713f7ba2ca2bf9cfa8e2e Tree-SHA512: 32c7ba8ac7ef2d4087f4f317447ae93a328ec9fb9ad81301df2fbaeeb21a3db7a503187a369552b05a9414251b7cf8e15bcde74c1ea2ef36591ea7ffb6721f60
2020-05-29Merge #17956: gui: Disable unavailable context menu items in transactions tabJonas Schnelli
2b18fd2242a589988fbb68205dae4afa0b8b3d34 Disable unavailable context menu items in transactions tab (Kristaps Kaupe) Pull request description: Fixes #9192. ACKs for top commit: jonatack: Re-ACK 2b18fd2242a5899 jonasschnelli: codereview utACK 2b18fd2242a589988fbb68205dae4afa0b8b3d34 Tree-SHA512: 4ea19c7b5976f1f0b1baecccb3077cf82f078af7257f92162686bcce2188efe49511a5f557853bc5fe0b10616708957d61c006944babbe60b8105e78751e865f
2020-05-13qt: Remove QFont warnings with QPA=minimalHennadii Stepanov
2020-05-04Merge #15768: gui: Add close window shortcutJonas Schnelli
f5a3a5b9ab362c58fa424261f313aa9cf46d2a98 gui: Add close window shortcut (Miguel Herranz) Pull request description: CMD+W is the standard shortcut in macOS to close a window without exiting the program. This adds support to use the shortcut in both main and debug windows. ACKs for top commit: jonasschnelli: Tested ACK f5a3a5b9ab362c58fa424261f313aa9cf46d2a98 hebasto: ACK f5a3a5b9ab362c58fa424261f313aa9cf46d2a98, tested on Linux Mint 19.3 by manually opening available dialogs and sub-windows, and applying the `Ctrl+W` shortcut. Also tested with "Minimize on close" option enabled / disabled. Tree-SHA512: 39851f6680cf97c334d5759c6f8597cb45685359417493ff8b0566672edbd32303fa15ac4260ec8ab5ea1458a600a329153014f25609e1db9cf399aa851ae2f9
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-04-16Disable unavailable context menu items in transactions tabKristaps Kaupe
2020-03-04refactor: Convert ping wait time from double to int64_tBen Woosley
2020-03-04refactor: Convert ping time from double to int64_tBen Woosley
2020-02-21Consolidate service flag bit-to-name conversion to a shared serviceFlagToStr ↵Luke Dashjr
function Side effect: this results in the RPC showing unknown service bits as "UNKNOWN[n]" like the GUI. Note that there is no common mask-to-vector<string> function because both GUI and RPC would need to iterate through it to convert to their desired target formats.
2020-02-21Bugfix: GUI: Use unsigned long long type to avoid implicit conversion of MSB ↵Luke Dashjr
check
2020-02-05gui: Add close window shortcutMiguel Herranz
CMD+W/CTRL+W is the standard shortcut to close a window without exiting the program.
2020-01-05qt: Add LogQtInfo() functionHennadii Stepanov
2019-12-11Merge #17474: Bugfix: GUI: Recognise NETWORK_LIMITED in formatServicesStrMarcoFalke
4341bffb6ef10909f3721329db27c5dc9bc720dd GUI: Refactor formatServicesStr to warn when a ServicesFlag is missing (Luke Dashjr) df77de8c2157fbb4c0898586dacb2215286745c8 Bugfix: GUI: Recognise NETWORK_LIMITED in formatServicesStr (Luke Dashjr) Pull request description: Currently, only the bottom 8 service bits are shown in the GUI peer details view. `NODE_NETWORK_LIMITED` is the 11th bit (2^10). The first commit expands the range to cover the full 64 bits, and properly label `"NETWORK_LIMITED"`. The second commit refactors the code so that any future omitted service bits will trigger a compile warning. ACKs for top commit: jonasschnelli: utACK 4341bffb6ef10909f3721329db27c5dc9bc720dd jonasschnelli: Tested ACK 4341bffb6ef10909f3721329db27c5dc9bc720dd hebasto: Concept ACK 4341bffb6ef10909f3721329db27c5dc9bc720dd Tree-SHA512: 8338737d03fbcd92024159aabd7e632d46e13c72436d935b504d2bf7ee92b7d124e89a5917bf64d51c87f12a64de703270c2d7b4c6711fa8ed08ea7887d817c7
2019-11-22gui: remove macOS start on login codefanquake
The macOS startup item code was disabled for builds targeting macOS > 10.11 in #15208. Now that we require macOS 10.12 as a minimum, #17550, we can remove the startup item code entirely, as the API we were using was removed in macOS 10.12.
2019-11-19refactor: Nuke guiutil circular dependencyHennadii Stepanov
Co-authored-by: Gregory Sanders <gsanders87@gmail.com>
2019-11-19refactor: Move SendCoinsRecipient in own headerHennadii Stepanov
Co-authored-by: Gregory Sanders <gsanders87@gmail.com>
2019-11-14GUI: Refactor formatServicesStr to warn when a ServicesFlag is missingLuke Dashjr
2019-11-14Bugfix: GUI: Recognise NETWORK_LIMITED in formatServicesStrLuke Dashjr
2019-09-06Testchains: Generic selection with -chain=<str> in addition of -testnet and ↵Jorge Timón
-regtest
2019-09-01Merge #16720: qt: Replace objc_msgSend() function calls with the native ↵fanquake
Objective-C syntax 0bb33b5348dbddd65b88a7f00449c965562355d3 qt: Replace objc_msgSend with native syntax (Hennadii Stepanov) Pull request description: Changes in Xcode 11 Objective-C Runtime cause an error (#16387) during building on MacOS 10.15 Catalina. This PR fixes this issue by replacing `objc_msgSend()` function calls with the native Objective-C syntax. Refs: - [changes in `objc_msgSend` function](https://developer.apple.com/documentation/objectivec/1456712-objc_msgsend?changes=latest_minor&language=objc) - [`OBJC_OLD_DISPATCH_PROTOTYPES` macro](https://developer.apple.com/documentation/objectivec/objc_old_dispatch_prototypes?language=objc) ACKs for top commit: l2a5b1: ACK 0bb33b5 - Diff looks good. Sending messages via native Objective-C code feels more robust and is more readable than casting all the `objc_msgSend` function calls to the appropriate function signature (which would also have fixed the issue). jonasschnelli: utACK 0bb33b5348dbddd65b88a7f00449c965562355d3 - Confirmed that the called macOS framework function is available on our build targets. fanquake: ACK 0bb33b5348dbddd65b88a7f00449c965562355d3 - Still works as expected. Tree-SHA512: c09cb684d06bd1da053a17c182b7bb1642e45bb347d26c76e1c5d835c320567caee366d85e34bb7f2be38e63ed041e0d06a56c2a9d89f7e5bece9b19cc5c6772
2019-08-31qt: Replace objc_msgSend with native syntaxHennadii Stepanov
2019-08-29qt: Replace QFontMetrics::width() with TextWidth()Hennadii Stepanov
2019-08-25qt: Replace obsolete functions of QDesktopWidgetHennadii Stepanov
2019-08-23qt: Add TextWidth() wrapperHennadii Stepanov
In Qt 5.12 and before the QFontMetrics::width() is used and it is deprecated since Qt 13.0. In Qt 5.11 the QFontMetrics::horizontalAdvance() was introduced.
2019-07-18Merge #16379: Fix autostart filenames on Linux for testnet/regtestWladimir J. van der Laan
ae311bc036e9461187f5396751d2e63a71248715 Fix autostart filenames on Linux (Hennadii Stepanov) Pull request description: Currently, on master the `bitcoin-test.lnk` and `bitcoin-regtest.lnk` files do not work as autostart application `.desktop` files. This PR fixes it. Refs: - #7045 - [Autostart Of Applications During Startup](https://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html) ACKs for top commit: promag: utACK ae311bc, weird why extension `.lnk` was used in #7045. laanwj: Code review ACK ae311bc036e9461187f5396751d2e63a71248715 Tree-SHA512: 210cc346600d52b0a262c81ed5f258365a3cea2e5522f4b5f4798fd3b54f45ed82aba68eefae59a6b6f1d8e4d00221476c23bdffc038f16f2f45c1acc837f522
2019-07-12Remove unused bits from the service flags enumMarcoFalke
2019-07-12Fix autostart filenames on LinuxHennadii Stepanov
2019-06-03qt: fix opening bitcoin.conf via Preferences on macOS; see #15409shannon1916
2019-04-29Merge #15371: gui: Uppercase bech32 addresses in qr codesJonas Schnelli
3407b446c gui: Uppercase bech32 addresses in qr codes (Ben Carman) Pull request description: Closes #12191 ACKs for commit 3407b4: meshcollider: utACK https://github.com/bitcoin/bitcoin/pull/15371/commits/3407b446cc5ec0725c0505e3b933f43d86286ad5 jonasschnelli: Re utACK 3407b446cc5ec0725c0505e3b933f43d86286ad5 Tree-SHA512: d63ecf8e9805c46c9f554cc929661a37837bc3ba9b7b931331c2a5c2b81468742e1819c9add73966083011709cc15ae1870a454348af8591b3d75d3765dca568
2019-04-23Resolve the qt/guiutil <-> qt/optionsmodal CD251
This pull request attempts to resolve the `qt/guiutil` <-> `qt/optionsmodel` circular dependency. The circular dependency is resolved by moving the `Intro::getDefaultDataDirectory` member function to `GUIUtil::getDefaultDataDirectory`.
2019-02-09gui: Uppercase bech32 addresses in qr codesBen Carman
2019-01-23windows: Set _WIN32_WINNT to 0x0601 (Windows 7)Chun Kuan Lee
Also remove all defines in many places and define it in configure stage to keep consistency.
2019-01-21Fix macOS launch-at-startup memory issueJonas Schnelli
2019-01-21Qt: remove macOS launch-at-startup option when compiled with > macOS 10.11Jonas Schnelli
2019-01-15Add workaround for QProgressDialog bug on macOSHennadii Stepanov
See: QTBUG-65750, QTBUG-70357.
2018-11-25Use window() instead of obsolete topLevelWidget()Hennadii Stepanov
2018-11-14Bump the minimum Qt version to 5.2Hennadii Stepanov
2018-11-12Merge #14123: gui: Add GUIUtil::bringToFrontWladimir J. van der Laan
0a656f85a9c694f25b06c6464d6e986816eecd58 qt: All tray menu actions call showNormalIfMinimized (João Barbosa) 6fc21aca6d5e16c3ece104fec8e5b3df116893b4 qt: Use GUIUtil::bringToFront where possible (João Barbosa) 5796671e1dd8a2d0b1e750c2dce19a10af624095 qt: Add GUIUtil::bringToFront (João Barbosa) 6b1d2972bf9a40f97ba3a5c95831fd179b1054cf Remove obj_c for macOS Dock icon menu (Hennadii Stepanov) 2464925e7be832d4926b6204169bbbc1646c6368 Use Qt signal for macOS Dock icon click event (Hennadii Stepanov) 53bb6be3f8a50ee9e5c4d7e9155236152e7c4b7c Remove obj_c for macOS Dock icon setting (Hennadii Stepanov) Pull request description: The sequence `show -> raise -> activateWindow` is factored out to the new function `GUIUtil::bringToFront` where a macOS fix is added in order to fix #13829. Also included: - simplification of `BitcoinGUI::showNormalIfMinimized` - simplified some connections to `BitcoinGUI::showNormalIfMinimized` - added missing connections to `BitcoinGUI::showNormalIfMinimized`. Tree-SHA512: a8e301aebc359aa353821e2af352ae356f44555724921b01da907e128653ef9dc55d8764a1bff72a579e5ff96df8a681f6804bfe83acba441da92fedff974a55
2018-11-05qt: Add GUIUtil::bringToFrontJoão Barbosa
2018-11-04scripted-diff: Move util files to separate directory.Jim Posen
-BEGIN VERIFY SCRIPT- mkdir -p src/util git mv src/util.h src/util/system.h git mv src/util.cpp src/util/system.cpp git mv src/utilmemory.h src/util/memory.h git mv src/utilmoneystr.h src/util/moneystr.h git mv src/utilmoneystr.cpp src/util/moneystr.cpp git mv src/utilstrencodings.h src/util/strencodings.h git mv src/utilstrencodings.cpp src/util/strencodings.cpp git mv src/utiltime.h src/util/time.h git mv src/utiltime.cpp src/util/time.cpp sed -i 's/<util\.h>/<util\/system\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmemory\.h>/<util\/memory\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmoneystr\.h>/<util\/moneystr\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utiltime\.h>/<util\/time\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h sed -i 's/BITCOIN_UTILMEMORY_H/BITCOIN_UTIL_MEMORY_H/g' src/util/memory.h sed -i 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h sed -i 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h sed -i 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h sed -i 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am sed -i 's/utilmemory\.\(h\|cpp\)/util\/memory\.\1/g' src/Makefile.am sed -i 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am sed -i 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am sed -i 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am sed -i 's/-> util ->/-> util\/system ->/' test/lint/lint-circular-dependencies.sh sed -i 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-format-strings.py test/lint/lint-locale-dependence.sh sed -i 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh sed -i 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh sed -i 's/src\\utilstrencodings\.cpp/src\\util\\strencodings\.cpp/' build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj -END VERIFY SCRIPT-
2018-09-26Move boost/std fstream to fsbridgeChun Kuan Lee
2018-09-23Make fs::path::string() always return utf-8 stringChun Kuan Lee