Merge pull request #845 from donfranio/apt-view-update-on-click

add updating view on apt-cache on click
This commit is contained in:
tobi-wan-kenobi 2022-01-13 11:37:36 +01:00 committed by GitHub
commit 1089792bc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,7 @@ import threading
import core.module import core.module
import core.widget import core.widget
import core.decorators import core.decorators
import core.input
import util.cli import util.cli
@ -56,6 +57,8 @@ class Module(core.module.Module):
def __init__(self, config, theme): def __init__(self, config, theme):
super().__init__(config, theme, core.widget.Widget(self.updates)) super().__init__(config, theme, core.widget.Widget(self.updates))
self.__thread = None self.__thread = None
core.input.register(self, button=core.input.RIGHT_MOUSE,
cmd=self.updates)
def updates(self, widget): def updates(self, widget):
if widget.get("error"): if widget.get("error"):