mirror of
https://github.com/sezanzeb/input-remapper
synced 2024-11-04 12:00:16 +00:00
unhighlight rows on change
This commit is contained in:
parent
80bd7deacd
commit
14267283f3
@ -111,6 +111,10 @@ class Row(Gtk.ListBoxRow):
|
|||||||
"""Mark this row as changed."""
|
"""Mark this row as changed."""
|
||||||
self.get_style_context().add_class('changed')
|
self.get_style_context().add_class('changed')
|
||||||
|
|
||||||
|
def unhighlight(self):
|
||||||
|
"""Mark this row as unchanged."""
|
||||||
|
self.get_style_context().remove_class('changed')
|
||||||
|
|
||||||
def on_character_input_change(self, entry):
|
def on_character_input_change(self, entry):
|
||||||
keycode = self.get_keycode()
|
keycode = self.get_keycode()
|
||||||
character = self.get_character()
|
character = self.get_character()
|
||||||
|
@ -170,6 +170,11 @@ class Window:
|
|||||||
key_list.forall(key_list.remove)
|
key_list.forall(key_list.remove)
|
||||||
custom_mapping.empty()
|
custom_mapping.empty()
|
||||||
|
|
||||||
|
def unhighlight_all_rows(self):
|
||||||
|
"""Remove all rows from the mappings table."""
|
||||||
|
key_list = self.get('key_list')
|
||||||
|
key_list.forall(lambda row: row.unhighlight())
|
||||||
|
|
||||||
def on_apply_system_layout_clicked(self, button):
|
def on_apply_system_layout_clicked(self, button):
|
||||||
"""Load the mapping."""
|
"""Load the mapping."""
|
||||||
setxkbmap(self.selected_device, None)
|
setxkbmap(self.selected_device, None)
|
||||||
@ -315,3 +320,4 @@ class Window:
|
|||||||
)
|
)
|
||||||
|
|
||||||
custom_mapping.changed = False
|
custom_mapping.changed = False
|
||||||
|
self.unhighlight_all_rows()
|
||||||
|
Loading…
Reference in New Issue
Block a user