fix virtualkeyboard bug
This commit is contained in:
parent
47a6af71f1
commit
d448d8bb27
|
@ -1,10 +1,10 @@
|
|||
from PyQt4.QtGui import *
|
||||
from electrum.plugins import BasePlugin, hook
|
||||
from electrum.i18n import _
|
||||
import random
|
||||
|
||||
class Plugin(BasePlugin):
|
||||
|
||||
|
||||
def fullname(self):
|
||||
return 'Virtual Keyboard'
|
||||
|
||||
|
@ -24,17 +24,16 @@ class Plugin(BasePlugin):
|
|||
vkb_button.clicked.connect(lambda: self.toggle_vkb(grid, pw))
|
||||
grid.addWidget(vkb_button, pos, 2)
|
||||
self.kb_pos = 2
|
||||
|
||||
self.vkb = None
|
||||
|
||||
def toggle_vkb(self, grid, pw):
|
||||
if self.vkb: grid.removeItem(self.vkb)
|
||||
if self.vkb:
|
||||
grid.removeItem(self.vkb)
|
||||
self.vkb = self.virtual_keyboard(self.vkb_index, pw)
|
||||
grid.addLayout(self.vkb, self.kb_pos, 0, 1, 3)
|
||||
self.vkb_index += 1
|
||||
|
||||
|
||||
def virtual_keyboard(self, i, pw):
|
||||
import random
|
||||
i = i%3
|
||||
if i == 0:
|
||||
chars = 'abcdefghijklmnopqrstuvwxyz '
|
||||
|
|
Loading…
Reference in New Issue