adding WIP emoji logic
This commit is contained in:
@@ -38,15 +38,17 @@ class Keys_Column(Gtk.Box):
|
||||
for child in children:
|
||||
pKeys = keys[child]["pKeys"]
|
||||
sKeys = keys[child]["sKeys"]
|
||||
eKeys = keys[child]["eKeys"]
|
||||
|
||||
row_box = self.add_row()
|
||||
if len(pKeys) == len(sKeys):
|
||||
if len(pKeys) == len(sKeys) and len(pKeys) == len(eKeys):
|
||||
for i in range(10):
|
||||
pkey = pKeys[i]
|
||||
sKey = sKeys[i]
|
||||
row_box.add(Key(pkey, sKey))
|
||||
eKey = eKeys[i]
|
||||
row_box.add(Key(pkey, sKey, eKey))
|
||||
else:
|
||||
raise KeyboardRowMatchError("A row in keys_json has missmatched pKeys and sKeys lengths.")
|
||||
raise KeyboardRowMatchError("A row in keys_json has missmatched pKeys, sKeys, or eKeys lengths.")
|
||||
|
||||
self.add(Bottom_Key_Row())
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk
|
||||
|
||||
# Application imports
|
||||
from ..widgets.defined_keys import Backspace_Key, Enter_Key
|
||||
from ..widgets.defined_keys import Emoji_Keys, Backspace_Key, Enter_Key
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class Right_Column(Gtk.Box):
|
||||
|
||||
self.setup_styling()
|
||||
|
||||
for key in [Backspace_Key(), Enter_Key()]:
|
||||
for key in [Emoji_Keys(), Backspace_Key(), Enter_Key()]:
|
||||
self.add(key)
|
||||
|
||||
self.show_all()
|
||||
|
||||
Reference in New Issue
Block a user