Commit 02e29ce8 authored by Daniel Brötzmann's avatar Daniel Brötzmann
Browse files

Bookmarks: Typing

parent bbec6ffe
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
class Bookmarks(Gtk.ApplicationWindow): class Bookmarks(Gtk.ApplicationWindow):
def __init__(self, account): def __init__(self, account: str) -> None:
Gtk.ApplicationWindow.__init__(self) Gtk.ApplicationWindow.__init__(self)
self.set_application(app.app) self.set_application(app.app)
self.set_position(Gtk.WindowPosition.CENTER) self.set_position(Gtk.WindowPosition.CENTER)
...@@ -55,10 +55,13 @@ def __init__(self, account): ...@@ -55,10 +55,13 @@ def __init__(self, account):
self.show_all() 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: if event.keyval == Gdk.KEY_Escape:
self.destroy() self.destroy()
@staticmethod @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() return search_text.lower() not in model[iter_][0].lower()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment