add reload button

This commit is contained in:
Morgan McMillian 2021-05-13 14:55:00 -07:00
parent 2aaa986c3a
commit 91aec1cf0a

View file

@ -175,6 +175,10 @@ class Application(Gtk.Application):
self.main_popover = Gtk.Popover.new_from_model(menu_button, menu) self.main_popover = Gtk.Popover.new_from_model(menu_button, menu)
self.header.pack_end(menu_button) self.header.pack_end(menu_button)
update_button = Gtk.Button.new_from_icon_name('view-refresh-symbolic', 1)
update_button.connect('clicked', self.on_refresh)
self.header.pack_end(update_button)
self.header.show_all() self.header.show_all()
self.stack.show_all() self.stack.show_all()
@ -192,7 +196,7 @@ class Application(Gtk.Application):
def on_main_popover(self, button): def on_main_popover(self, button):
self.main_popover.popup() self.main_popover.popup()
def on_refresh(self, action, param): def on_refresh(self, action, param=None):
timeline = self.stack.get_visible_child() timeline = self.stack.get_visible_child()
timeline.emit('refresh') timeline.emit('refresh')