aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
AgeCommit message (Collapse)Author
2019-01-21Merge #15167: qt: Fix wallet selector size adjustmentWladimir J. van der Laan
ca91661adf9fa22bf1c919d118de27bfac04e94c Fix wallet selector size adjustment (Hennadii Stepanov) Pull request description: This PR sets `QComboBox::AdjustToContents` instead of default `QComboBox::AdjustToContentsOnFirstShow` for wallet selectors. Before (in master): ![screenshot from 2019-01-14 20-47-22](https://user-images.githubusercontent.com/32963518/51133771-83d00d80-183e-11e9-812c-3a1119fa766e.png) After (with this PR): ![screenshot from 2019-01-14 20-48-43](https://user-images.githubusercontent.com/32963518/51133788-90546600-183e-11e9-8394-eb62a998b90f.png) Tree-SHA512: c23ac91905bb31aaa32f2fccc02b01f5707d8b094020fe6a75a9e099e78f9191670474920234a01c46480f67d3d311f44ff46f1f4202cd50a4a6d4d09a8342ce
2019-01-19gui: Fix window title updateJoão Barbosa
2019-01-18Merge #15101: gui: Add WalletControllerJonas Schnelli
0dd9bdefa gui: Refactor to use WalletController (João Barbosa) 8fa271f08 gui: Add WalletController (João Barbosa) cefb399e2 gui: Use AutoConnection for WalletModel::unload signal (João Barbosa) Pull request description: This PR is a subset of the work done in the context of #13100. This change consists in extracting from the application class the code that manages the wallet models. The role of the `WalletController` instance is to coordinate wallet operations and the window. Tree-SHA512: 6a824054376730eb7d16c643dd2003f5f60778e8ad3af707b82bc12c48438db179ca4446316b28fb17b206f4b9aba8998419aab8c5dd1f7c32467015732b5094
2019-01-18gui: Refactor to use WalletControllerJoão Barbosa
2019-01-17Merge #15040: qt: Add workaround for QProgressDialog bug on macOSJonas Schnelli
7c572c488 Add workaround for QProgressDialog bug on macOS (Hennadii Stepanov) Pull request description: Fix #15016. Refs: - [QTBUG-65750: QProgressDialog too small width at larger font size on Mac](https://bugreports.qt.io/browse/QTBUG-65750) - [QTBUG-70357: QProgressDialog is too narrow to fit the text of its label](https://bugreports.qt.io/browse/QTBUG-70357) With this PR: ![screenshot from 2018-12-26 22-01-30](https://user-images.githubusercontent.com/32963518/50456571-1aa35b80-095e-11e9-8442-c285555f2bee.png) Tree-SHA512: dde668dfa7d2144973c0e868aea7fdb7d90f78584836d024ffefb8df4a709d6842fa3601954759b4462856a80e81df15b861ea39506599230a16928b621d9f8f
2019-01-15Merge #15149: gui: Show current wallet name in window titleJonas Schnelli
fe7048b39 gui: Show current wallet name in window title (João Barbosa) 8a7926112 gui: Keep network style in BitcoinGUI (João Barbosa) f411c8b35 gui: Remove unused return type in some BitcoinGUI methods (João Barbosa) Pull request description: <img width="876" alt="screenshot 2019-01-11 at 23 58 26" src="https://user-images.githubusercontent.com/3534524/51065458-d7ebaf80-15fc-11e9-9162-e37e9a10d448.png"> Tree-SHA512: 5c43f615834983bc1c5045e07c6e119044dd78ca947fd2679d302b519d5ce1d08d29ca00b1c11e88c4bbc4d56f2e6f4a8adc42084f3503e751e642e8a13112dc
2019-01-15Merge #14556: qt: fix confirmed transaction labeled "open" (#13299)Wladimir J. van der Laan
fb3ce75807c50055a97f573fc72bf44d997ea218 Don't label transactions "Open" while catching up (Hennadii Stepanov) Pull request description: Fix #13299. Since the default `nSequence` is `0xFFFFFFFE` and locktime is enabled, the checking `wtx.is_final` is meaningless until the syncing has completed (ref: #1026). This PR makes the wallet mark a transaction "Unconfirmed" instead of misleading "Open for NNN more blocks" when syncing after a period of being offline. Before this PR (with the issue): ![screenshot from 2018-12-12 15-56-23](https://user-images.githubusercontent.com/32963518/49874288-cdd06880-fe26-11e8-8441-f3ceb479611b.png) With this PR (the issue has been resolved): ![screenshot from 2018-12-12 15-54-41](https://user-images.githubusercontent.com/32963518/49874336-e9d40a00-fe26-11e8-8c05-9aeee2eb1bba.png) Tree-SHA512: 358ec83b43c266a4d32a37a79dda80e80d40a2b77ad38261c84a095e613399f674aa7184805b3f6310e51ddb83ae2636b8849fcc7c4333e1b3ecbb0f70ad86d3
2019-01-15gui: Show current wallet name in window titleJoão Barbosa
2019-01-15gui: Keep network style in BitcoinGUIJoão Barbosa
2019-01-15gui: Remove unused return type in some BitcoinGUI methodsJoão Barbosa
2019-01-15Merge #14594: qt: Fix minimized window bug on LinuxWladimir J. van der Laan
a88640e123ca0c00d81719f9a009699c26e85b90 Fix minimized window bug on Linux (Hennadii Stepanov) Pull request description: Fix #14591 On some Linux systems the minimized to the taskbar (iconified) main window cannot be restored properly using actions from the systray icon menu when `QSystemTrayIcon::contextMenu()` is a child of the main window. Tree-SHA512: 05c9f724fc2278d45dac6fe72b09859f12b5d71f54659bb779403c8cd81b55e610fb7b5aa912ac273d3cd19bf953b0405bbc6451feb00d1827c95dd9f0876aa4
2019-01-15Add workaround for QProgressDialog bug on macOSHennadii Stepanov
See: QTBUG-65750, QTBUG-70357.
2019-01-14Fix wallet selector size adjustmentHennadii Stepanov
2019-01-13Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant)practicalswift
Qt-only changes.
2019-01-09Merge #11625: Add BitcoinApplication & RPCConsole testsMarcoFalke
7e4bd19785 Add BitcoinApplication & RPCConsole tests (Russell Yanofsky) ca20b65cc0 Move BitcoinApplication to header so it can be tested (Russell Yanofsky) Pull request description: Add test coverage for Qt initialization code & basic RPC console functionality Motivation for this change was a bug in #11603 which existing tests failed to catch. Tree-SHA512: f66546ffc84b8e07679c66a73b265023fbf6a0cb8f24f1606a5fcae2dd3b4dc7b2c6d26c69dedcec53398a26ef17c4d5fb28c055698fa6e45e89aa2995cefe2f
2019-01-04Fix minimized window bug on LinuxHennadii Stepanov
On some Linux systems the minimized to the taskbar (iconified) main window cannot be restored properly using actions from the systray icon menu when QSystemTrayIcon::contextMenu() is a child of the main window.
2019-01-04qt: Use WalletModel* instead of wallet name in main windowJoão Barbosa
2019-01-04qt: Factor out WalletModel::getDisplayName()João Barbosa
2019-01-04Add BitcoinApplication & RPCConsole testsRussell Yanofsky
Add test coverage for Qt initialization code & basic RPC console functionality.
2019-01-03Don't label transactions "Open" while catching upHennadii Stepanov
Since the default `nSequence` is `0xFFFFFFFE` and locktime is enabled, the checking `wtx.is_final` is meaningless until the syncing has completed.
2019-01-02Merge #15000: qt: Fix broken notificator on GNOMEMarcoFalke
c8d9d9093b Fix broken notificator on GNOME (Hennadii Stepanov) Pull request description: Fix #14994; that bug was introduced in #14228 (that was my fault). ~Also this commit explicit separates~ There are two functions of the tray icon: - a system tray widget (`QSystemTrayIcon::isSystemTrayAvailable() == true`) - a high-level notificator via balloon messages (`QSystemTrayIcon::supportsMessages() == true`) ~These properties are mutually independent,~ e.g., on Fedora 29 + GNOME: ``` QSystemTrayIcon::isSystemTrayAvailable() == false; QSystemTrayIcon::supportsMessages() == true; ``` UPDATE: `supportsMessages()` makes no sense without `isSystemTrayAvailable()`: `QSystemTrayIcon::showMessage()` just not working on Fedora 29 + GNOME. Tree-SHA512: 3e75ed2dfcef112bd64b8c329227ae68ba57f3be55769629f4eb3b1c52ef1f33db635f00bb5fd57c25f73a692971d6a847ea14c525f41c594fddde6e970a8ad8
2018-12-29Merge #13743: refactor: Replace boost::bind with std::bindMarcoFalke
cb53b825c2 scripted-diff: Replace boost::bind with std::bind (Chun Kuan Lee) 2196c51821 refactor: Use boost::scoped_connection in signal/slot, also prefer range-based loop instead of std::transform (Chun Kuan Lee) Pull request description: Replace boost::bind with std::bind - In `src/rpc/server.cpp`, replace `std::transform` with simple loop. - In `src/validation.cpp`, store the `boost::signals2::connection` object and use it to disconnect. - In `src/validationinterface.cpp`, use 2 map to store the `boost::signals2::scoped_connection` object. Tree-SHA512: 6653cbe00036fecfc495340618efcba6d7be0227c752b37b81a27184433330f817e8de9257774e9b35828026cb55f11ee7f17d6c388aebe22c4a3df13b5092f0
2018-12-19Fix broken notificator on GNOMEHennadii Stepanov
That bug was introduced in #14228.
2018-12-16[Qt] Restore < Qt5.6 compatibility for addActionJonas Schnelli
2018-12-11qt: Remove ellipsis from sending/receiving addressesJoão Barbosa
Considering https://stackoverflow.com/a/637708 the ellipsis in these menu actions should be removed.
2018-12-11qt: Add Window menuJoão Barbosa
2018-12-06Merge #14783: gui: Fix boost::signals2::no_slots_error in early calls to ↵MarcoFalke
InitWarning 6bbdb2077e squashme: connect thru node interface (João Barbosa) a0f8df365d qt: Call noui_connect to prevent boost::signals2::no_slots_error in early calls to InitWarning (João Barbosa) Pull request description: Adding the following to `bitcoin.conf` ``` [xxx] disablewallet=1 ``` And running `bitcoin-qt` gives: ``` libc++abi.dylib: terminating with uncaught exception of type boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::signals2::no_slots_error> >: boost::signals2::no_slots_error ``` Fixes regression in #14708. Tree-SHA512: 7c158376fad6ebcd80fc0dbe549d5b6e893fb82e7dc1e455825633d7f91b14dc34493487cab7642152e88f9eaf99bfa91988972d600e9fb289cf26afd64aff8a
2018-12-01Merge #13966: gui: When private key is disabled, only show watch-only balanceWladimir J. van der Laan
82d6c5aad gui: Show watch-only eye instead of HD disabled (Chun Kuan Lee) fe1ff5026 Hide spendable label if priveate key is disabled (Chun Kuan Lee) Pull request description: If a wallet is in private key disabled mode, the spendable balance is always zero, it does not have to show on GUI. Show the watch-only balance at normal balance column if a wallet is in that mode. ![image](https://user-images.githubusercontent.com/11154118/45662527-dfaab400-bb34-11e8-98c8-c06ac5c0b08a.png) Tree-SHA512: 8b535427d26d3f8e61081f50e4773bd25656be042d378fd34cf647e9a0065cb4dfb67a8ab9fb4fbf5f196390df8cb983ebf2f0fa8a6503b7c046c56bec87ba72
2018-11-22qt: Call noui_connect to prevent boost::signals2::no_slots_error in early ↵João Barbosa
calls to InitWarning
2018-11-12Merge #14228: Qt: Enable system tray icon by default if availableWladimir J. van der Laan
ec1201a36847f7aa942eab1b3a3d082f6daf0031 Don't use systray icon on inappropriate systems (Hennadii Stepanov) Pull request description: Prevent a user from losing access to the main window by minimizing it to the tray on the systems which have not “system tray” or “notification area” available (e.g. GNOME 3.26+). Tested on Fedora 28 + GNOME 3.28. Tree-SHA512: c2dc26ff31c38a882dbd7d1ff71af99f1ba38a04a1c8b7fe7b99b93e4c0719f2916c7db0e620806a36582402d18939c635e1913c276b452ecbf939936067407b
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-10Merge #12783: macOS: disable AppNap during syncWladimir J. van der Laan
1e0f3c44992fb82e6bf36c2ef9277b0759c17c4c macOS: disable AppNap during sync (Alexey Ivanov) Pull request description: Code based on pull/5804. Tested only on macOS 10.13.3 and should support 10.9+. What macOS versions bitcoin core currently supports? Tree-SHA512: 85809b8d8d8a05169437b4268988da0b7372c29c6da3223ebdc106dc16dcb6d3caa5c52ace3591467005b50a63fd8b2ab1cb071cb4f450032932df25d5063315
2018-11-05qt: All tray menu actions call showNormalIfMinimizedJoão Barbosa
2018-11-05qt: Use GUIUtil::bringToFront where possibleJoã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-11-04Remove obj_c for macOS Dock icon menuHennadii Stepanov
Qt `setAsDockMenu()` does this work.
2018-11-04Use Qt signal for macOS Dock icon click eventHennadii Stepanov
This moves the Dock icon click reaction code to the common place and allows some cleanup in obj_c code. According to the Apple's docs `class_replaceMethod` behaves as `class_addMethod`, if the method identified by name does not yet exist; or as `method_setImplementation`, if it does exist.
2018-11-01macOS: disable AppNap during syncAlexey Ivanov
Signed-off-by: Alexey Ivanov <alexey.ivanes@gmail.com>
2018-10-31Remove obj_c for macOS Dock icon settingHennadii Stepanov
Qt `setWindowIcon()` does this work.
2018-10-20scripted-diff: Replace boost::bind with std::bindChun Kuan Lee
-BEGIN VERIFY SCRIPT- for j in $(seq 1 5) do sed -i "s/ _${j}/ std::placeholders::_${j}/g" $(git grep --name-only " _${j}" -- '*.cpp' '*.h') done sed -i "s/boost::bind/std::bind/g" $(git grep --name-only boost::bind -- '*.cpp' '*.h') sed -i "s/boost::ref/std::ref/g" $(git grep --name-only boost::ref -- '*.cpp' '*.h') sed -i '/boost\/bind/d' $(git grep --name-only boost/bind) -END VERIFY SCRIPT-
2018-10-06Clean systray icon menu for -disablewallet modeHennadii Stepanov
Ref #3392
2018-09-27Don't use systray icon on inappropriate systemsHennadii Stepanov
Prevent a user from losing access to the main window by minimizing it to the tray on some systems (e.g. GNOME 3.26+).
2018-09-18gui: Show watch-only eye instead of HD disabledChun Kuan Lee
2018-09-06qt: Also log and print messages or questions like bitcoindMarcoFalke
2018-09-04Merge #13249: Make objects in range declarations immutable by default. Avoid ↵Wladimir J. van der Laan
unnecessary copying of objects in range declarations. f34c8c466a0e514edac2e8683127b4176ad5d321 Make objects in range declarations immutable by default. Avoid unnecessary copying of objects in range declarations. (practicalswift) Pull request description: Make objects in range declarations immutable by default. Rationale: * Immutable objects are easier to reason about. * Prevents accidental or hard-to-notice change of value. Tree-SHA512: cad69d35f0cf8a938b848e65dd537c621d96fe3369be306b65ef0cd1baf6cc0a9f28bc230e1e383d810c555a6743d08cb6b2b0bd51856d4611f537a12e5abb8b
2018-09-02gui: Favor macOS show / hide action in dock menuJoão Barbosa
2018-08-27Make objects in range declarations immutable by default. Avoid unnecessary ↵practicalswift
copying of objects in range declarations.
2018-08-25Merge #13961: util: Replace boost::signals2 with std::functionWladimir J. van der Laan
ddddce0e46e73d4ca369f2ce9696231cc579e1f9 util: Replace boost::signals2 with std::function (MarcoFalke) Pull request description: This removes the `#include <boost/signals2/signal.hpp>` from `util.h` (hopefully speeding up the build time and reducing the memory usage further after #13634) The whole translation interface is replaced by a function `G_TRANSLATION_FUN` that is set to nullptr in units that don't need translation. (Thus only set in the gui) Tree-SHA512: 087c717358bbed8bdb409463e225239d667f1ced381abb10e7cd31a41dcdd2cebe20b43c2ee86f0f8e55d53301f75e963f07421a99a7ff4c0cad2c6a375c5ab1
2018-08-24util: Replace boost::signals2 with std::functionMarcoFalke
2018-08-21qt: Use new Qt5 connect syntaxJoão Barbosa