1
0
Commit Graph

3558 Commits

Author SHA1 Message Date
Sander van Grieken
fe95a5ec8f qml: sweep: tone down logging 2024-10-08 12:24:03 +02:00
Sander van Grieken
a8833eb650 qml: add sweep icon 2024-10-08 12:16:19 +02:00
ThomasV
f471356278 Merge pull request #9235 from spesmilo/external_plugins
Unix: Import external plugins from /opt/electrum_plugins
2024-10-08 10:49:19 +02:00
ThomasV
333b3db8ea Unix: Import external plugins from /opt/electrum_plugins 2024-10-08 10:32:37 +02:00
Sander van Grieken
70ebe4fc2f qml: wallet name size in wizard 2024-10-07 14:52:48 +02:00
Sander van Grieken
01b38ae5dd qt: use delegate QTranslator to gettext (as in QML) and include Qt standard lib translations for strings
used by QTextEdit.createStandardContextMenu()
2024-10-07 13:08:23 +02:00
Sander van Grieken
c7fc3f295a qt/transaction_dialog: fix translation issues 2024-10-07 11:24:14 +02:00
SomberNight
6d593e3373 qt gui: settings: make two_trampoline cb conditional on trampoline_cb
The setting is irrelevant if trampoline is disabled.
This clears up potential confusion, as per user "js" on irc.
2024-10-04 15:44:34 +00:00
ThomasV
7c6ff6757c plugins dialog: show description and enable buttons in the same dialog 2024-10-02 11:16:59 +02:00
SomberNight
9b1ccb9978 android: add comment that OS push notifications are broken 2024-09-19 16:46:07 +00:00
ThomasV
ad0b5453a3 qml: do not display success if swap failed.. 2024-09-19 13:16:32 +02:00
SomberNight
383f99796a qt gui: follow-up qt6: fix args for QWidget.setFocus()
Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\main_window.py", line 1797, in toggle_search
    self.search_box.setFocus(1)
TypeError: arguments did not match any overloaded call:
  setFocus(self): too many arguments
  setFocus(self, reason: Qt.FocusReason): argument 1 has unexpected type 'int'
2024-09-18 17:39:46 +00:00
ghost43
1e03b4668a Merge pull request #9205 from accumulator/issue9204
qml: add seed passphrase property to QEWallet, show in WalletDetails
2024-09-18 16:16:09 +00:00
Sander van Grieken
0d7ff8635b qml: add seed passphrase property to QEWallet, show in WalletDetails 2024-09-18 18:00:44 +02:00
SomberNight
e8450f014e qt gui: default to QT_QPA_PLATFORM=xcb for AppImage
The wayland plugin would require at least debian 12 (or ubuntu 22.04) at runtime.

see https://github.com/spesmilo/electrum/pull/9189#pullrequestreview-2309983943 :

> I've now tried running the appimage on debian 10 (oldoldstable), and am getting an error with wayland.
>
> ```
>   4.16 | D | util.profiler | Plugins.__init__ 0.0422 sec
>   4.16 | I | daemon.Daemon | launching GUI: qt
>   4.76 | I | gui.qt.ElectrumGui | Qt GUI starting up... Qt=6.7.1, PyQt=6.7.1
> /tmp/.mount_electrFlGFOt/usr/bin/python3: symbol lookup error: /tmp/.mount_electrFlGFOt/usr/lib/python3.11/site-packages/PyQt6/Qt6/plugins/platforms/../../lib/libQt6WaylandClient.so.6: undefined symbol: wl_proxy_marshal_flags
> ```
>
> If I explicitly specify `QT_QPA_PLATFORM=xcb`, it starts and works as expected. But it picks wayland by default.
> I found https://bugreports.qt.io/browse/QTBUG-114635 and it looks like even debian 11 might be affected.
2024-09-18 15:48:57 +00:00
SomberNight
e05d2a5dbe qt gui: clean-up QCheckBox.stateChanged handling
Some checkboxes, e.g. main_window.warn_if_testnet became buggy with pyqt6:
looks like the stateChanged signal passes an int, not a Qt.CheckState.
(and note that Qt.CheckState is an Enum, not an IntEnum).
So `x == Qt.CheckState.Checked` would always evaluate to False.

```
def on_cb(_x):
    print(f"heyheyhey. {_x=!r}, {Qt.CheckState.Checked=!r}, {cb.checkState()=!r}, {cb.isChecked()=!r}")
cb = QCheckBox("")
cb.stateChanged.connect(on_cb)
```

heyheyhey. x=2, Qt.CheckState.Checked=<CheckState.Checked: 2>, cb.checkState()=<CheckState.Checked: 2>, cb.isChecked()=True
heyheyhey. x=0, Qt.CheckState.Checked=<CheckState.Checked: 2>, cb.checkState()=<CheckState.Unchecked: 0>, cb.isChecked()=False
2024-09-18 15:48:54 +00:00
SomberNight
1ee6361c7e qt gui: qt6 migration follow-ups 2024-09-18 15:48:50 +00:00
SomberNight
d791e3a9c8 qt gui: fix: qt6 segfaults on macOS if we add a menu item named "About"
macOS reserves the "About" menu item name, similarly to "Preferences" (see a few lines above).
The "About" keyword seems even more strictly locked down:
not allowed as either a prefix or a suffix.
- With Qt5, a matching menu item is simply auto-recognised as the special "About" item,
- but with Qt6, it seems we explicitly have to do this dance, as directly adding
  a menu item with the "About" name results in a segfault...
2024-09-18 15:48:46 +00:00
SomberNight
cfe8502f96 qt desktop gui: upgrade qt5->qt6
closes https://github.com/spesmilo/electrum/issues/8007
2024-09-18 15:48:38 +00:00
Sander van Grieken
44c0e583d6 qml: SweepDialog 2024-09-17 16:43:38 +02:00
ghost43
ba3935c842 Merge pull request #9201 from accumulator/sweep_privkey_fixes
qt: fix scanning multi (privkeys, addresses) from QR.
2024-09-17 13:33:42 +00:00
Sander van Grieken
eaebcaf383 qml: styling HelpDialog 2024-09-17 13:22:37 +02:00
Sander van Grieken
a01ae99a6f qt: fix scanning multi (privkeys, addresses) from QR. 2024-09-17 11:50:21 +02:00
Sander van Grieken
0b09592ef1 qt: move query_choice to MessageBoxMixin, document ChoiceWidget 2024-09-14 11:12:42 +02:00
Sander van Grieken
0277950247 qt: factor out remaining ChoicesLayout uses 2024-09-13 17:10:52 +02:00
SomberNight
2ebf8fd9ef qt gui: use QGuiApplication.setApplicationName
I noticed that when running from source on macOS, the OS menubar has an "About Python" menu item,
instead of an "About Electrum" menu item. I tried to fix that by this, but actually it is not working :P

Nevertheless, this looks useful at least on Linux and Windows. E.g. when instantiating a new dialog
without an explicit title, the qt application name is used as default.

The application name, without this change AFAICS was already "Electrum" when running any of the binaries.
However when running from source, it was in some cases "python" or "run_electrum" or even "electrum-4"
(depending on OS and how the main script is started).
Now it is consistent -- except on macOS it still is not, as there it really wants to look for a .plist...
2024-09-09 16:34:43 +00:00
SomberNight
a674a22155 follow-up moving some funcs from ecc.py to bitcoin.py
follow-up 2f3d89f415
2024-09-03 16:58:41 +00:00
ghost43
fcb4d06421 Merge pull request #9170 from SomberNight/202408_android_qr_set_max_brightness
qml/android: set max screen brightness when displaying QR codes
2024-09-02 15:45:11 +00:00
SomberNight
a54751ee4f gui: qt: tx dialog: add option to copy scriptpubkey of output
if there is no corresponding address
(otherwise due to "..." elision, the full spk would be inaccessible)
2024-09-02 14:54:15 +00:00
SomberNight
7a7b43c0a8 qml/android: set max screen brightness when displaying QR codes
In some cases this makes it much easier to successfully scan a QR code.
I was trying to scan a PSBT using a laptop camera from my phone screen for 2 minutes, until I realised the screen brightness was the issue.  o.O
2024-08-21 23:37:36 +00:00
SomberNight
1880c6a749 qt wizard WCWalletName: focus password textedit
- between the Back btn and the Next btn, the latter should have priority for focus
- but if the user needs to enter the wallet password, that textedit should have focus

closes https://github.com/spesmilo/electrum/issues/9157
related c6802adbae
2024-08-13 04:05:03 +00:00
timesince
18d90aee4f chore: fix some comments and var name
Signed-off-by: timesince <seekseat@icloud.com>
2024-08-12 01:36:35 +08:00
SomberNight
76f5d6ceb0 qt gui: clean-up efilter when exiting
related: https://github.com/spesmilo/electrum/issues/6889#issuecomment-2184052577
2024-07-09 14:26:24 +00:00
SomberNight
2eb51bcbe6 trustedcoin: sanitize error messages coming from 2fa server
related https://github.com/spesmilo/electrum/issues/9096
2024-06-17 16:52:26 +00:00
ThomasV
2f3d89f415 prepare for separation of ecc module:
- move encrypt/sign functions elsewhere
- remove local dependencies in ecc.py, ecc_fast.py (except logging)
2024-06-17 13:05:57 +02:00
SomberNight
a2d5e31838 mnemonic: rename seed_type() fn
Some functions have an argument named "seed_type" in which it was annoying to call the seed_type() fn.
(especially for functions inside the same module)
2024-06-10 20:00:52 +00:00
accumulator
784f209d02 Merge pull request #9091 from accumulator/channel_backup_import_nolightning
qml: fix handling of channel backup import on lightning-disabled wallets
2024-06-10 17:28:27 +02:00
Sander van Grieken
8d9bcda36f qml: fix handling of channel backup import on lightning-disabled wallets 2024-06-10 15:07:02 +02:00
longxiangqiao
8b6eb24b81 chore: fix some comments
Signed-off-by: longxiangqiao <longxiangqiao@qq.com>
2024-06-10 14:25:22 +08:00
accumulator
15f13ebc66 Merge pull request #9076 from SomberNight/202405_android_config_pin
qml: "wallet_else_pin" auth should only use the wallet pw if is unified
2024-05-31 11:14:50 +02:00
SomberNight
db5f1a11a5 fix typo
note: "everytime" even appears in the old_mnemonic wordlist, but it is a misspelling.
2024-05-30 16:59:28 +00:00
SomberNight
11614f035d qml: "wallet_else_pin" auth should only use the wallet pw if is unified
related https://github.com/spesmilo/electrum/pull/9074
2024-05-30 16:17:21 +00:00
ghost43
183bdd1464 Merge pull request #9073 from accumulator/android_qr_scanner_fix
qml: don't unbind/unregister the ActivityResultListener from within the ActivityResultListener handler func
2024-05-30 15:51:26 +00:00
Sander van Grieken
8085c41cfb qml: don't rely on wallet when deactivating PIN and no wallet loaded (fixes #8366) 2024-05-30 15:23:25 +02:00
Sander van Grieken
450b9a03ce qml: don't unbind/unregister the ActivityResultListener from within the ActivityResultListener handler func.
instead, schedule a queued finished signal to unregister the listener after the handler has finished.
See PythonActivity.java in P4A for why this probably causes the most often occurring crash we see on the Play Store:

```
Exception java.lang.RuntimeException:
  at android.app.ActivityThread.deliverResults (ActivityThread.java:5164)
  at android.app.ActivityThread.handleSendResult (ActivityThread.java:5205)
  at android.app.servertransaction.ActivityResultItem.execute (ActivityResultItem.java:51)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2136)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:236)
  at android.app.ActivityThread.main (ActivityThread.java:8061)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:656)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:967)
Caused by java.util.ConcurrentModificationException:
  at java.util.ArrayList$Itr.next (ArrayList.java:860)
  at org.kivy.android.PythonActivity.onActivityResult (PythonActivity.java:218)
  at android.app.Activity.dispatchActivityResult (Activity.java:8501)
  at android.app.ActivityThread.deliverResults (ActivityThread.java:5157)
```
2024-05-30 14:53:33 +02:00
Sander van Grieken
3d189d99a5 followup 4159ceee35 2024-05-29 16:59:00 +02:00
Sander van Grieken
4159ceee35 qt: fix ReceiveWidget layout (fixes #9049) 2024-05-29 15:14:23 +02:00
SomberNight
7827be17d1 qt wizard: fix offline 2fa wallet creation in some cases
fixes https://github.com/spesmilo/electrum/issues/9037
2024-05-28 15:31:37 +00:00
SomberNight
e8a9e45291 qml wizard: even stricter validation for new wallet name
related: 07dc80dd9a
2024-05-28 14:20:28 +00:00
SomberNight
2f02e0acc3 qt main window: rm dead code 2024-05-23 13:38:18 +00:00