diff --git a/.cirrus.yml b/.cirrus.yml index 790bfbc50..6e6ef9f2d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -180,34 +180,6 @@ task: depends_on: - Tox Python 3.8 -task: - name: Android build (Kivy $APK_ARCH) - container: - dockerfile: contrib/android/Dockerfile - cpu: 2 - memory: 2G - env: - APK_ARCH: arm64-v8a - packages_tld_folder_cache: - folder: packages - fingerprint_script: - - echo $CIRRUS_TASK_NAME && cat contrib/deterministic-build/requirements.txt && cat contrib/make_packages.sh - - git ls-files -s contrib/android/ - p4a_cache: - folders: - - ".buildozer/android/platform/build-$APK_ARCH/packages" - - ".buildozer/android/platform/build-$APK_ARCH/build" - fingerprint_script: - # note: should *at least* depend on Dockerfile and p4a_recipes/, but contrib/android/ is simplest - - git ls-files -s contrib/android/ - - echo "kivy $APK_ARCH" - build_script: - - ./contrib/android/make_apk.sh kivy "$APK_ARCH" debug - binaries_artifacts: - path: "dist/*" - depends_on: - - Tox Python 3.8 - task: name: Android build (QML $APK_ARCH) container: diff --git a/.gitmodules b/.gitmodules index 1010e0dd9..5bec5e6e2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,3 @@ [submodule "electrum/www"] path = electrum/plugins/payserver/www url = https://github.com/spesmilo/electrum-http.git -[submodule "electrum/gui/kivy/theming/atlas"] - path = electrum/gui/kivy/theming/atlas - url = https://github.com/spesmilo/electrum-kivy-atlas diff --git a/contrib/android/Makefile b/contrib/android/Makefile index 0c277d891..906e47a86 100644 --- a/contrib/android/Makefile +++ b/contrib/android/Makefile @@ -19,13 +19,9 @@ export PYTHONHASHSEED := $(SOURCE_DATE_EPOCH) export BUILD_DATE := $(shell LC_ALL=C TZ=UTC date +'%b %e %Y' -d @$(SOURCE_DATE_EPOCH)) export BUILD_TIME := $(shell LC_ALL=C TZ=UTC date +'%H:%M:%S' -d @$(SOURCE_DATE_EPOCH)) -# needs kivy installed or in PYTHONPATH -.PHONY: theming apk clean +.PHONY: apk clean -theming: - #bash -c 'for i in network lightning; do convert -background none theming/light/$i.{svg,png}; done' - $(PYTHON) -m kivy.atlas ../../electrum/gui/kivy/theming/atlas/light 1024 ../../electrum/gui/kivy/theming/light/*.png prepare: # running pre build setup # copy electrum to main.py diff --git a/contrib/android/Readme.md b/contrib/android/Readme.md index 60b0b0a61..318308d43 100644 --- a/contrib/android/Readme.md +++ b/contrib/android/Readme.md @@ -107,12 +107,6 @@ sudo apt-get install qtvirtualkeyboard-plugin Run electrum with the `-g` switch: `electrum -g qml` -### The Kivy GUI can be run directly on Linux Desktop. How? -Install Kivy. - -Build atlas: `(cd contrib/android/; make theming)` - -Run electrum with the `-g` switch: `electrum -g kivy` ### debug vs release build If you just follow the instructions above, you will build the apk diff --git a/contrib/android/build.sh b/contrib/android/build.sh index 17a5dfcb5..5dea8ede0 100755 --- a/contrib/android/build.sh +++ b/contrib/android/build.sh @@ -17,12 +17,12 @@ BUILD_UID=$(/usr/bin/stat -c %u "$PROJECT_ROOT") # check arguments if [[ -n "$3" \ - && ( "$1" == "kivy" || "$1" == "qml" ) \ + && ( "$1" == "qml" ) \ && ( "$2" == "all" || "$2" == "armeabi-v7a" || "$2" == "arm64-v8a" || "$2" == "x86" || "$2" == "x86_64" ) \ && ( "$3" == "debug" || "$3" == "release" || "$3" == "release-unsigned" ) ]] ; then info "arguments $*" else - fail "usage: build.sh " + fail "usage: build.sh " exit 1 fi diff --git a/contrib/android/buildozer_kivy.spec b/contrib/android/buildozer_kivy.spec deleted file mode 100644 index b40009658..000000000 --- a/contrib/android/buildozer_kivy.spec +++ /dev/null @@ -1,256 +0,0 @@ -[app] - -# (str) Title of your application -title = Electrum - -# (str) Package name -package.name = Electrum - -# (str) Package domain (needed for android/ios packaging) -package.domain = org.electrum - -# (str) Source code where the main.py live -source.dir = . - -# (list) Source files to include (let empty to include all the files) -source.include_exts = py,png,jpg,kv,atlas,ttf,txt,gif,pem,mo,vs,fs,json,csv - -# (list) Source files to exclude (let empty to not exclude anything) -source.exclude_exts = spec - -# (list) List of directory to exclude (let empty to not exclude anything) -source.exclude_dirs = bin, build, dist, contrib, - electrum/tests, - electrum/gui/qt, - electrum/gui/kivy/theming/light, - packages/qdarkstyle, - packages/qtpy -# (list) List of exclusions using pattern matching -source.exclude_patterns = Makefile,setup*, - # not reproducible: - packages/aiohttp-*.dist-info/*, - packages/frozenlist-*.dist-info/* - -# (str) Application versioning (method 1) -version.regex = APK_VERSION = '(.*)' -version.filename = %(source.dir)s/electrum/version.py - -# (str) Application versioning (method 2) -#version = 1.9.8 - -# (list) Application requirements -# note: versions and hashes are pinned in ./p4a_recipes/* -requirements = - hostpython3, - python3, - android, - openssl, - plyer, - kivy, - libffi, - libsecp256k1, - cryptography - -# (str) Presplash of the application -#presplash.filename = %(source.dir)s/gui/kivy/theming/splash.png -presplash.filename = %(source.dir)s/electrum/gui/icons/electrum_presplash.png - -# (str) Icon of the application -icon.filename = %(source.dir)s/electrum/gui/icons/android_electrum_icon_legacy.png -icon.adaptive_foreground.filename = %(source.dir)s/electrum/gui/icons/android_electrum_icon_foreground.png -icon.adaptive_background.filename = %(source.dir)s/electrum/gui/icons/android_electrum_icon_background.png - -# (str) Supported orientation (one of landscape, portrait or all) -orientation = portrait - -# (bool) Indicate if the application should be fullscreen or not -fullscreen = False - - -# -# Android specific -# - -# (list) Permissions -android.permissions = INTERNET, CAMERA, WRITE_EXTERNAL_STORAGE - -# (int) Android API to use (compileSdkVersion) -# note: when changing, Dockerfile also needs to be changed to install corresponding build tools -android.api = 30 - -# (int) Android targetSdkVersion -android.target_sdk_version = 31 - -# (int) Minimum API required. You will need to set the android.ndk_api to be as low as this value. -android.minapi = 21 - -# (str) Android NDK version to use -android.ndk = 22b - -# (int) Android NDK API to use (optional). This is the minimum API your app will support. -android.ndk_api = 21 - -# (bool) Use --private data storage (True) or --dir public storage (False) -android.private_storage = True - -# (str) Android NDK directory (if empty, it will be automatically downloaded.) -android.ndk_path = /opt/android/android-ndk - -# (str) Android SDK directory (if empty, it will be automatically downloaded.) -android.sdk_path = /opt/android/android-sdk - -# (str) ANT directory (if empty, it will be automatically downloaded.) -android.ant_path = /opt/android/apache-ant - -# (bool) If True, then skip trying to update the Android sdk -# This can be useful to avoid excess Internet downloads or save time -# when an update is due and you just want to test/build your package -# note(ghost43): probably needed for reproducibility. versions pinned in Dockerfile. -android.skip_update = True - -# (bool) If True, then automatically accept SDK license -# agreements. This is intended for automation only. If set to False, -# the default, you will be shown the license when first running -# buildozer. -android.accept_sdk_license = True - -# (str) Android entry point, default is ok for Kivy-based app -#android.entrypoint = org.renpy.android.PythonActivity - -# (list) List of Java .jar files to add to the libs so that pyjnius can access -# their classes. Don't add jars that you do not need, since extra jars can slow -# down the build process. Allows wildcards matching, for example: -# OUYA-ODK/libs/*.jar -#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar -#android.add_jars = lib/android/zbar.jar - -# (list) List of Java files to add to the android project (can be java or a -# directory containing the files) -android.add_src = electrum/gui/kivy/data/java-classes/ - -android.gradle_dependencies = me.dm7.barcodescanner:zxing:1.9.8 - -android.add_activities = org.electrum.qr.SimpleScannerActivity - -# (str) python-for-android branch to use, if not master, useful to try -# not yet merged features. -#android.branch = master - -# (str) OUYA Console category. Should be one of GAME or APP -# If you leave this blank, OUYA support will not be enabled -#android.ouya.category = GAME - -# (str) Filename of OUYA Console icon. It must be a 732x412 png image. -#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png - -# (str) XML file to include as an intent filters in tag -android.manifest.intent_filters = contrib/android/bitcoin_intent.xml - -# (str) launchMode to set for the main activity -android.manifest.launch_mode = singleTask - -# (list) Android additionnal libraries to copy into libs/armeabi -#android.add_libs_armeabi = lib/android/*.so - -# (bool) Indicate whether the screen should stay on -# Don't forget to add the WAKE_LOCK permission if you set this to True -#android.wakelock = False - -# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64 -# note: can be overwritten by APP_ANDROID_ARCH env var -#android.arch = armeabi-v7a - -# (int) overrides automatic versionCode computation (used in build.gradle) -# this is not the same as app version and should only be edited if you know what you're doing -# android.numeric_version = 1 - -# (list) Android application meta-data to set (key=value format) -#android.meta_data = - -# (list) Android library project to add (will be added in the -# project.properties automatically.) -#android.library_references = - -android.whitelist = lib-dynload/_csv.so - -# (bool) enables Android auto backup feature (Android API >=23) -android.allow_backup = False - -# -# Python for android (p4a) specific -# - -# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github) -p4a.source_dir = /opt/python-for-android - -# (str) The directory in which python-for-android should look for your own build recipes (if any) -p4a.local_recipes = %(source.dir)s/contrib/android/p4a_recipes/ - -# (str) Filename to the hook for p4a -#p4a.hook = - -# (str) Bootstrap to use for android builds -# p4a.bootstrap = sdl2 - -# (int) port number to specify an explicit --port= p4a argument (eg for bootstrap flask) -#p4a.port = - - -# -# iOS specific -# - -# (str) Name of the certificate to use for signing the debug version -# Get a list of available identities: buildozer ios list_identities -#ios.codesign.debug = "iPhone Developer: ()" - -# (str) Name of the certificate to use for signing the release version -#ios.codesign.release = %(ios.codesign.debug)s - - - -[buildozer] - -# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output)) -log_level = 2 - -# (str) Path to build output (i.e. .apk, .ipa) storage -bin_dir = ./dist - - -# ----------------------------------------------------------------------------- -# List as sections -# -# You can define all the "list" as [section:key]. -# Each line will be considered as a option to the list. -# Let's take [app] / source.exclude_patterns. -# Instead of doing: -# -# [app] -# source.exclude_patterns = license,data/audio/*.wav,data/images/original/* -# -# This can be translated into: -# -# [app:source.exclude_patterns] -# license -# data/audio/*.wav -# data/images/original/* -# - -# ----------------------------------------------------------------------------- -# Profiles -# -# You can extend section / key with a profile -# For example, you want to deploy a demo version of your application without -# HD content. You could first change the title to add "(demo)" in the name -# and extend the excluded directories to remove the HD content. -# -# [app@demo] -# title = My Application (demo) -# -# [app:source.exclude_patterns@demo] -# images/hd/* -# -# Then, invoke the command line with the "demo" profile: -# -# buildozer --profile demo android debug diff --git a/contrib/android/buildozer_qml.spec b/contrib/android/buildozer_qml.spec index e6c3358b5..655b9ae88 100644 --- a/contrib/android/buildozer_qml.spec +++ b/contrib/android/buildozer_qml.spec @@ -61,7 +61,6 @@ requirements = libzbar # (str) Presplash of the application -#presplash.filename = %(source.dir)s/gui/kivy/theming/splash.png presplash.filename = %(source.dir)s/electrum/gui/icons/electrum_presplash.png # (str) Icon of the application diff --git a/contrib/android/p4a_recipes/kivy/__init__.py b/contrib/android/p4a_recipes/kivy/__init__.py deleted file mode 100644 index 2f8fb2670..000000000 --- a/contrib/android/p4a_recipes/kivy/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -from pythonforandroid.recipes.kivy import KivyRecipe - - -assert KivyRecipe.depends == ['sdl2', 'pyjnius', 'setuptools', 'python3'] -assert KivyRecipe.python_depends == ['certifi'] - - -class KivyRecipePinned(KivyRecipe): - # kivy master 2020-12-10 (2.0.0 plus a few bugfixes) - version = "2debbc3b1484b14824112986cb03b1072a60fbfc" - sha512sum = "6cabb77860e63059ab4b0663b87f6396fa9133839b42db754628fc9a55f10b8d759466110e0763fd8dac40a49a03af276cb93b05076471d12db796e679f33d1d" - - # mv "python_depends" into "depends" to ensure we can control what versions get installed - depends = [*KivyRecipe.depends, *KivyRecipe.python_depends] - python_depends = [] - - -recipe = KivyRecipePinned() diff --git a/contrib/android/p4a_recipes/sdl2/__init__.py b/contrib/android/p4a_recipes/sdl2/__init__.py deleted file mode 100644 index 07dc059b8..000000000 --- a/contrib/android/p4a_recipes/sdl2/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -import os - -from pythonforandroid.recipes.sdl2 import LibSDL2Recipe -from pythonforandroid.util import load_source - -util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py')) - - -assert LibSDL2Recipe._version == "2.0.9" -assert LibSDL2Recipe.depends == ['sdl2_image', 'sdl2_mixer', 'sdl2_ttf'] -assert LibSDL2Recipe.python_depends == [] - - -class LibSDL2RecipePinned(util.InheritedRecipeMixin, LibSDL2Recipe): - md5sum = None - sha512sum = "a78a4708b2bb5b35a7c7b7501eb3bd60a9aa3bb95a3d84e57763df4a377185e7312a94b66321eef7ca0d17255e4b402fc950e83ef0dbbd08f14ff1194107dc10" - - -recipe = LibSDL2RecipePinned() diff --git a/contrib/android/p4a_recipes/sdl2_image/__init__.py b/contrib/android/p4a_recipes/sdl2_image/__init__.py deleted file mode 100644 index 3feed45d1..000000000 --- a/contrib/android/p4a_recipes/sdl2_image/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -import os - -from pythonforandroid.recipes.sdl2_image import LibSDL2Image -from pythonforandroid.util import load_source - -util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py')) - - -assert LibSDL2Image._version == "2.0.4" -assert LibSDL2Image.depends == [] -assert LibSDL2Image.python_depends == [] - - -class LibSDL2ImageRecipePinned(util.InheritedRecipeMixin, LibSDL2Image): - sha512sum = "7320a5c9111908d402fbb0c12a49eb359a6db645c0c86839793ebb1a5b75eaca7c85eb96851f3a0b4a68a2f06363c8189555afd4f1048a4a41447370eddd7e6a" - - -recipe = LibSDL2ImageRecipePinned() diff --git a/contrib/android/p4a_recipes/sdl2_mixer/__init__.py b/contrib/android/p4a_recipes/sdl2_mixer/__init__.py deleted file mode 100644 index d018783a2..000000000 --- a/contrib/android/p4a_recipes/sdl2_mixer/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -import os - -from pythonforandroid.recipes.sdl2_mixer import LibSDL2Mixer -from pythonforandroid.util import load_source - -util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py')) - - -assert LibSDL2Mixer._version == "2.0.4" -assert LibSDL2Mixer.depends == [] -assert LibSDL2Mixer.python_depends == [] - - -class LibSDL2MixerPinned(util.InheritedRecipeMixin, LibSDL2Mixer): - sha512sum = "98c56069640668aaececa63748de21fc8f243c7d06386c45c43d0ee472bbb2595ccda644d9886ce5b95c3a3dee3c0a96903cf9a89ddc18d38f041133470699a3" - - -recipe = LibSDL2MixerPinned() diff --git a/contrib/android/p4a_recipes/sdl2_ttf/__init__.py b/contrib/android/p4a_recipes/sdl2_ttf/__init__.py deleted file mode 100644 index 6803e8558..000000000 --- a/contrib/android/p4a_recipes/sdl2_ttf/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -import os - -from pythonforandroid.recipes.sdl2_ttf import LibSDL2TTF -from pythonforandroid.util import load_source - -util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py')) - - -assert LibSDL2TTF._version == "2.0.15" -assert LibSDL2TTF.depends == [] -assert LibSDL2TTF.python_depends == [] - - -class LibSDL2TTFPinned(util.InheritedRecipeMixin, LibSDL2TTF): - sha512sum = "30d685932c3dd6f2c94e2778357a5c502f0421374293d7102a64d92f9c7861229bf36bedf51c1a698b296a58c858ca442d97afb908b7df1592fc8d4f8ae8ddfd" - - -recipe = LibSDL2TTFPinned() diff --git a/electrum/base_wizard.py b/electrum/base_wizard.py index 0accecbcb..bde555e26 100644 --- a/electrum/base_wizard.py +++ b/electrum/base_wizard.py @@ -92,7 +92,6 @@ class BaseWizard(Logger): self._stack = [] # type: List[WizardStackItem] self.plugin = None # type: Optional[BasePlugin] self.keystores = [] # type: List[KeyStore] - self.is_kivy = config.GUI_NAME == 'kivy' self.seed_type = None def set_icon(self, icon): @@ -210,17 +209,15 @@ class BaseWizard(Logger): ('choose_seed_type', _('Create a new seed')), ('restore_from_seed', _('I already have a seed')), ('restore_from_key', _('Use a master key')), + ('choose_hw_device', _('Use a hardware device')), ] - if not self.is_kivy: - choices.append(('choose_hw_device', _('Use a hardware device'))) else: message = _('Add a cosigner to your multi-sig wallet') choices = [ ('restore_from_key', _('Enter cosigner key')), ('restore_from_seed', _('Enter cosigner seed')), + ('choose_hw_device', _('Cosign with hardware device')), ] - if not self.is_kivy: - choices.append(('choose_hw_device', _('Cosign with hardware device'))) self.choice_dialog(title=title, message=message, choices=choices, run_next=self.run) diff --git a/electrum/commands.py b/electrum/commands.py index 191bd123c..993f13d97 100644 --- a/electrum/commands.py +++ b/electrum/commands.py @@ -1589,7 +1589,7 @@ def get_parser(): # gui parser_gui = subparsers.add_parser('gui', description="Run Electrum's Graphical User Interface.", help="Run GUI (default)") parser_gui.add_argument("url", nargs='?', default=None, help="bitcoin URI (or bip70 file)") - parser_gui.add_argument("-g", "--gui", dest=SimpleConfig.GUI_NAME.key(), help="select graphical user interface", choices=['qt', 'kivy', 'text', 'stdio', 'qml']) + parser_gui.add_argument("-g", "--gui", dest=SimpleConfig.GUI_NAME.key(), help="select graphical user interface", choices=['qt', 'text', 'stdio', 'qml']) parser_gui.add_argument("-m", action="store_true", dest=SimpleConfig.GUI_QT_HIDE_ON_STARTUP.key(), default=False, help="hide GUI on startup") parser_gui.add_argument("-L", "--lang", dest=SimpleConfig.LOCALIZATION_LANGUAGE.key(), default=None, help="default language used in GUI") parser_gui.add_argument("--daemon", action="store_true", dest="daemon", default=False, help="keep daemon running after GUI is closed") diff --git a/electrum/gui/__init__.py b/electrum/gui/__init__.py index 4d366879c..dfd309998 100644 --- a/electrum/gui/__init__.py +++ b/electrum/gui/__init__.py @@ -8,7 +8,6 @@ from typing import TYPE_CHECKING, Mapping, Optional if TYPE_CHECKING: from . import qt - from . import kivy from electrum.simple_config import SimpleConfig from electrum.daemon import Daemon from electrum.plugin import Plugins diff --git a/electrum/gui/default_lang.py b/electrum/gui/default_lang.py index ceb030ca8..e8a3e9b8e 100644 --- a/electrum/gui/default_lang.py +++ b/electrum/gui/default_lang.py @@ -31,10 +31,4 @@ def get_default_language(*, gui_name: Optional[str] = None) -> str: except Exception: name = QLocale.system().name() return name if name in languages else "en_GB" - elif gui_name == "kivy": - if "ANDROID_DATA" not in os.environ: - return "en_UK" - # FIXME: CJK/Arabic/etc languages do not work at all with kivy due to font issues, - # so it is easiest to just default to English... (see #2032) - return "en_UK" return "" diff --git a/electrum/gui/kivy/__init__.py b/electrum/gui/kivy/__init__.py deleted file mode 100644 index da2fd2b76..000000000 --- a/electrum/gui/kivy/__init__.py +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env python -# -# Electrum - lightweight Bitcoin client -# Copyright (C) 2012 thomasv@gitorious -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation files -# (the "Software"), to deal in the Software without restriction, -# including without limitation the rights to use, copy, modify, merge, -# publish, distribute, sublicense, and/or sell copies of the Software, -# and to permit persons to whom the Software is furnished to do so, -# subject to the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# -# Kivy GUI - -import sys -import os -from typing import TYPE_CHECKING - -from electrum import GuiImportError - -KIVY_GUI_PATH = os.path.abspath(os.path.dirname(__file__)) -os.environ['KIVY_DATA_DIR'] = os.path.join(KIVY_GUI_PATH, 'data') - -try: - sys.argv = [''] - import kivy -except ImportError as e: - # This error ideally shouldn't be raised with pre-built packages - raise GuiImportError( - "Error: Could not import kivy. Please install it using the " - "instructions mentioned here `https://kivy.org/#download` .") from e - -# minimum required version for kivy -kivy.require('1.8.0') - -from electrum.logging import Logger -from electrum.gui import BaseElectrumGui - -if TYPE_CHECKING: - from electrum.simple_config import SimpleConfig - from electrum.daemon import Daemon - from electrum.plugin import Plugins - - -class ElectrumGui(BaseElectrumGui, Logger): - - def __init__(self, *, config: 'SimpleConfig', daemon: 'Daemon', plugins: 'Plugins'): - BaseElectrumGui.__init__(self, config=config, daemon=daemon, plugins=plugins) - Logger.__init__(self) - self.logger.debug('ElectrumGUI: initialising') - self.network = daemon.network - - def main(self): - self.daemon.start_network() - from .main_window import ElectrumWindow - w = ElectrumWindow( - config=self.config, - network=self.network, - plugins=self.plugins, - gui_object=self, - ) - w.run() - - def stop(self) -> None: - from kivy.app import App - from kivy.clock import Clock - app = App.get_running_app() - if not app: - return - Clock.schedule_once(lambda dt: app.stop()) - - @classmethod - def version_info(cls): - ret = { - "kivy.version": kivy.__version__, - } - if hasattr(kivy, "__path__"): - ret["kivy.path"] = ", ".join(kivy.__path__ or []) - return ret diff --git a/electrum/gui/kivy/data/background.png b/electrum/gui/kivy/data/background.png deleted file mode 100644 index 77f42ccdd..000000000 Binary files a/electrum/gui/kivy/data/background.png and /dev/null differ diff --git a/electrum/gui/kivy/data/fonts/Roboto-Bold.ttf b/electrum/gui/kivy/data/fonts/Roboto-Bold.ttf deleted file mode 100644 index 87d3af3e1..000000000 Binary files a/electrum/gui/kivy/data/fonts/Roboto-Bold.ttf and /dev/null differ diff --git a/electrum/gui/kivy/data/fonts/Roboto-Condensed.ttf b/electrum/gui/kivy/data/fonts/Roboto-Condensed.ttf deleted file mode 100644 index c38f7c881..000000000 Binary files a/electrum/gui/kivy/data/fonts/Roboto-Condensed.ttf and /dev/null differ diff --git a/electrum/gui/kivy/data/fonts/Roboto-Medium.ttf b/electrum/gui/kivy/data/fonts/Roboto-Medium.ttf deleted file mode 100644 index 879834198..000000000 Binary files a/electrum/gui/kivy/data/fonts/Roboto-Medium.ttf and /dev/null differ diff --git a/electrum/gui/kivy/data/fonts/Roboto.ttf b/electrum/gui/kivy/data/fonts/Roboto.ttf deleted file mode 100644 index 153c60882..000000000 Binary files a/electrum/gui/kivy/data/fonts/Roboto.ttf and /dev/null differ diff --git a/electrum/gui/kivy/data/fonts/tron/License.txt b/electrum/gui/kivy/data/fonts/tron/License.txt deleted file mode 100644 index fb4757324..000000000 --- a/electrum/gui/kivy/data/fonts/tron/License.txt +++ /dev/null @@ -1,4 +0,0 @@ -Copyright (c) 2010-2011, Jeff Bell [www.randombell.com] | [jeffbell@randombell.com]. -This font may be distributed freely however must retain this document as well as the Readme.txt file. -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is available with a FAQ at: http://scripts.sil.org/OFL diff --git a/electrum/gui/kivy/data/fonts/tron/Readme.txt b/electrum/gui/kivy/data/fonts/tron/Readme.txt deleted file mode 100644 index 2f3e99f6d..000000000 --- a/electrum/gui/kivy/data/fonts/tron/Readme.txt +++ /dev/null @@ -1,21 +0,0 @@ -TR2N v1.3 - -ABOUT THE FONT: -A font based upon the poster text for TRON LEGACY. - -The font is different from the pre-existing TRON font currently on the web. Similar in minor aspects but different in most. Style based upon text from different region posters. - -UPDATE HISTORY: -3/7/11 - Adjusted the letter B (both lowercase and uppercase), capped off the ends of T, P and R, added a few more punctuation marks, as well as added the TR and TP ligature to allow for the solid bar connect as in the poster art. - -1/22/11 - Made minor corrections to all previous letters and punctuation. Corrected issue with number 8's top filling in. - -ABOUT THE AUTHOR: -Jeff Bell has produced fonts before, but this is the first one in over 10 years. His original 3 fonts were under the name DJ-JOHNNYRKA and include "CASPER", "BEVERLY HILLS COP", "THE GODFATHER" and "FIDDUMS FAMILY". - -For more information on Jeff Bell and his work can be found online: - -www.randombell.com -www.damovieman.deviantart.com -http://www.imdb.com/name/nm3983081/ -http://www.vimeo.com/user4004969/videos diff --git a/electrum/gui/kivy/data/fonts/tron/Tr2n.ttf b/electrum/gui/kivy/data/fonts/tron/Tr2n.ttf deleted file mode 100644 index 8e8c0dec6..000000000 Binary files a/electrum/gui/kivy/data/fonts/tron/Tr2n.ttf and /dev/null differ diff --git a/electrum/gui/kivy/data/glsl/default.fs b/electrum/gui/kivy/data/glsl/default.fs deleted file mode 100644 index 19145d653..000000000 --- a/electrum/gui/kivy/data/glsl/default.fs +++ /dev/null @@ -1,4 +0,0 @@ -$HEADER$ -void main (void){ - gl_FragColor = frag_color * texture2D(texture0, tex_coord0); -} diff --git a/electrum/gui/kivy/data/glsl/default.png b/electrum/gui/kivy/data/glsl/default.png deleted file mode 100644 index a14255e4d..000000000 Binary files a/electrum/gui/kivy/data/glsl/default.png and /dev/null differ diff --git a/electrum/gui/kivy/data/glsl/default.vs b/electrum/gui/kivy/data/glsl/default.vs deleted file mode 100644 index ac9ac4d6d..000000000 --- a/electrum/gui/kivy/data/glsl/default.vs +++ /dev/null @@ -1,6 +0,0 @@ -$HEADER$ -void main (void) { - frag_color = color * vec4(1.0, 1.0, 1.0, opacity); - tex_coord0 = vTexCoords0; - gl_Position = projection_mat * modelview_mat * vec4(vPosition.xy, 0.0, 1.0); -} diff --git a/electrum/gui/kivy/data/glsl/header.fs b/electrum/gui/kivy/data/glsl/header.fs deleted file mode 100644 index e9f887ba6..000000000 --- a/electrum/gui/kivy/data/glsl/header.fs +++ /dev/null @@ -1,10 +0,0 @@ -#ifdef GL_ES - precision highp float; -#endif - -/* Outputs from the vertex shader */ -varying vec4 frag_color; -varying vec2 tex_coord0; - -/* uniform texture samplers */ -uniform sampler2D texture0; diff --git a/electrum/gui/kivy/data/glsl/header.vs b/electrum/gui/kivy/data/glsl/header.vs deleted file mode 100644 index a2638bffc..000000000 --- a/electrum/gui/kivy/data/glsl/header.vs +++ /dev/null @@ -1,17 +0,0 @@ -#ifdef GL_ES - precision highp float; -#endif - -/* Outputs to the fragment shader */ -varying vec4 frag_color; -varying vec2 tex_coord0; - -/* vertex attributes */ -attribute vec2 vPosition; -attribute vec2 vTexCoords0; - -/* uniform variables */ -uniform mat4 modelview_mat; -uniform mat4 projection_mat; -uniform vec4 color; -uniform float opacity; diff --git a/electrum/gui/kivy/data/images/defaulttheme-0.png b/electrum/gui/kivy/data/images/defaulttheme-0.png deleted file mode 100644 index 8cfc82455..000000000 Binary files a/electrum/gui/kivy/data/images/defaulttheme-0.png and /dev/null differ diff --git a/electrum/gui/kivy/data/images/defaulttheme.atlas b/electrum/gui/kivy/data/images/defaulttheme.atlas deleted file mode 100644 index 26ed5d0da..000000000 --- a/electrum/gui/kivy/data/images/defaulttheme.atlas +++ /dev/null @@ -1 +0,0 @@ -{"defaulttheme-0.png": {"progressbar_background": [391, 227, 24, 24], "tab_btn_disabled": [264, 137, 32, 32], "tab_btn_pressed": [366, 137, 32, 32], "image-missing": [152, 171, 48, 48], "splitter_h": [174, 123, 32, 7], "splitter_down": [501, 253, 7, 32], "splitter_disabled_down": [503, 291, 7, 32], "vkeyboard_key_down": [468, 137, 32, 32], "vkeyboard_disabled_key_down": [400, 137, 32, 32], "selector_right": [248, 223, 55, 62], "player-background": [2, 287, 103, 103], "selector_middle": [191, 223, 55, 62], "spinner": [235, 82, 29, 37], "tab_btn_disabled_pressed": [298, 137, 32, 32], "switch-button_disabled": [277, 291, 43, 32], "textinput_disabled_active": [372, 326, 64, 64], "splitter_grip": [36, 50, 12, 26], "vkeyboard_key_normal": [2, 44, 32, 32], "button_disabled": [80, 82, 29, 37], "media-playback-stop": [302, 171, 48, 48], "splitter": [501, 87, 7, 32], "splitter_down_h": [140, 123, 32, 7], "sliderh_background_disabled": [72, 132, 41, 37], "modalview-background": [464, 456, 45, 54], "button": [142, 82, 29, 37], "splitter_disabled": [502, 137, 7, 32], "checkbox_radio_disabled_on": [433, 87, 32, 32], "slider_cursor": [402, 171, 48, 48], "vkeyboard_disabled_background": [68, 221, 64, 64], "checkbox_disabled_on": [297, 87, 32, 32], "sliderv_background_disabled": [2, 78, 37, 41], "button_disabled_pressed": [111, 82, 29, 37], "audio-volume-muted": [102, 171, 48, 48], "close": [417, 231, 20, 20], "action_group_disabled": [452, 171, 33, 48], "vkeyboard_background": [2, 221, 64, 64], "checkbox_off": [331, 87, 32, 32], "tab_disabled": [305, 253, 96, 32], "sliderh_background": [115, 132, 41, 37], "switch-button": [322, 291, 43, 32], "tree_closed": [439, 231, 20, 20], "bubble_btn_pressed": [435, 291, 32, 32], "selector_left": [134, 223, 55, 62], "filechooser_file": [174, 326, 64, 64], "checkbox_radio_disabled_off": [399, 87, 32, 32], "checkbox_radio_on": [196, 137, 32, 32], "checkbox_on": [365, 87, 32, 32], "button_pressed": [173, 82, 29, 37], "audio-volume-high": [464, 406, 48, 48], "audio-volume-low": [2, 171, 48, 48], "progressbar": [305, 227, 32, 24], "previous_normal": [487, 187, 19, 32], "separator": [504, 342, 5, 48], "filechooser_folder": [240, 326, 64, 64], "checkbox_radio_off": [467, 87, 32, 32], "textinput_active": [306, 326, 64, 64], "textinput": [438, 326, 64, 64], "player-play-overlay": [122, 395, 117, 115], "media-playback-pause": [202, 171, 48, 48], "sliderv_background": [41, 78, 37, 41], "ring": [354, 402, 108, 108], "bubble_arrow": [487, 175, 16, 10], "slider_cursor_disabled": [352, 171, 48, 48], "checkbox_disabled_off": [469, 291, 32, 32], "action_group_down": [2, 121, 33, 48], "spinner_disabled": [204, 82, 29, 37], "splitter_disabled_h": [106, 123, 32, 7], "bubble": [107, 325, 65, 65], "media-playback-start": [252, 171, 48, 48], "vkeyboard_disabled_key_normal": [434, 137, 32, 32], "overflow": [230, 137, 32, 32], "tree_opened": [461, 231, 20, 20], "action_item": [339, 227, 24, 24], "bubble_btn": [401, 291, 32, 32], "audio-volume-medium": [52, 171, 48, 48], "action_group": [37, 121, 33, 48], "spinner_pressed": [266, 82, 29, 37], "filechooser_selected": [2, 392, 118, 118], "tab": [403, 253, 96, 32], "action_bar": [158, 133, 36, 36], "action_view": [365, 227, 24, 24], "tab_btn": [332, 137, 32, 32], "switch-background": [192, 291, 83, 32], "splitter_disabled_down_h": [72, 123, 32, 7], "action_item_down": [367, 291, 32, 32], "switch-background_disabled": [107, 291, 83, 32], "textinput_disabled": [241, 399, 111, 111], "splitter_grip_h": [483, 239, 26, 12]}} \ No newline at end of file diff --git a/electrum/gui/kivy/data/java-classes/org/electrum/qr/SimpleScannerActivity.java b/electrum/gui/kivy/data/java-classes/org/electrum/qr/SimpleScannerActivity.java deleted file mode 100644 index 2d29d7f1c..000000000 --- a/electrum/gui/kivy/data/java-classes/org/electrum/qr/SimpleScannerActivity.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.electrum.qr; - -import android.app.Activity; -import android.os.Bundle; -import android.util.Log; -import android.content.Intent; -import android.support.v4.app.ActivityCompat; -import android.Manifest; -import android.content.pm.PackageManager; - -import java.util.Arrays; - -import me.dm7.barcodescanner.zxing.ZXingScannerView; - -import com.google.zxing.Result; -import com.google.zxing.BarcodeFormat; - -public class SimpleScannerActivity extends Activity implements ZXingScannerView.ResultHandler { - private static final int MY_PERMISSIONS_CAMERA = 1002; - - private ZXingScannerView mScannerView = null; - final String TAG = "org.electrum.SimpleScannerActivity"; - - @Override - public void onResume() { - super.onResume(); - if (this.hasPermission()) { - this.startCamera(); - } else { - this.requestPermission(); - } - } - - @Override - public void onPause() { - super.onPause(); - if (null != mScannerView) { - mScannerView.stopCamera(); // Stop camera on pause - } - } - - private void startCamera() { - mScannerView = new ZXingScannerView(this); // Programmatically initialize the scanner view - mScannerView.setFormats(Arrays.asList(BarcodeFormat.QR_CODE)); - setContentView(mScannerView); // Set the scanner view as the content view - mScannerView.setResultHandler(this); // Register ourselves as a handler for scan results. - mScannerView.startCamera(); // Start camera on resume - } - - @Override - public void handleResult(Result rawResult) { - Intent resultIntent = new Intent(); - resultIntent.putExtra("text", rawResult.getText()); - resultIntent.putExtra("format", rawResult.getBarcodeFormat().toString()); - setResult(Activity.RESULT_OK, resultIntent); - this.finish(); - } - - private boolean hasPermission() { - return (ActivityCompat.checkSelfPermission(this, - Manifest.permission.CAMERA) - == PackageManager.PERMISSION_GRANTED); - } - - private void requestPermission() { - ActivityCompat.requestPermissions(this, - new String[]{Manifest.permission.CAMERA}, - MY_PERMISSIONS_CAMERA); - } - - @Override - public void onRequestPermissionsResult(int requestCode, - String permissions[], int[] grantResults) { - switch (requestCode) { - case MY_PERMISSIONS_CAMERA: { - if (grantResults.length > 0 - && grantResults[0] == PackageManager.PERMISSION_GRANTED) { - // permission was granted, yay! - this.startCamera(); - } else { - // permission denied - this.finish(); - } - return; - } - } - } - -} diff --git a/electrum/gui/kivy/data/logo/kivy-icon-32.png b/electrum/gui/kivy/data/logo/kivy-icon-32.png deleted file mode 100644 index 455fa9763..000000000 Binary files a/electrum/gui/kivy/data/logo/kivy-icon-32.png and /dev/null differ diff --git a/electrum/gui/kivy/data/style.kv b/electrum/gui/kivy/data/style.kv deleted file mode 100644 index b8c3e9aea..000000000 --- a/electrum/gui/kivy/data/style.kv +++ /dev/null @@ -1,755 +0,0 @@ -#:kivy 1.0 - -