Skip to content
Snippets Groups Projects
Commit 02e29ce8 authored by Daniel Brötzmann's avatar Daniel Brötzmann
Browse files

Bookmarks: Typing

parent bbec6ffe
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@
class Bookmarks(Gtk.ApplicationWindow):
def __init__(self, account):
def __init__(self, account: str) -> None:
Gtk.ApplicationWindow.__init__(self)
self.set_application(app.app)
self.set_position(Gtk.WindowPosition.CENTER)
......@@ -55,10 +55,13 @@ def __init__(self, account):
self.show_all()
def _on_key_press(self, _widget, event):
def _on_key_press(self, _widget: Gtk.Widget, event: Gdk.EventKey):
if event.keyval == Gdk.KEY_Escape:
self.destroy()
@staticmethod
def _search_func(model, _column, search_text, iter_):
def _search_func(model: Gtk.TreeModel,
_column: int,
search_text: str,
iter_: Gtk.TreeIter):
return search_text.lower() not in model[iter_][0].lower()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment