rename ravenlog to krowlog
There is a database named RavenDB. KrowLog starts with a K, which is a) distinctive and b) has an association to KDE.
This commit is contained in:
27
src/plugins/domain/rmenu.py
Normal file
27
src/plugins/domain/rmenu.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from typing import Callable
|
||||
|
||||
from src.plugins.domain.raction import RAction
|
||||
|
||||
|
||||
class RMenu():
|
||||
def __init__(self, label: str, icon_from_theme: str = ""):
|
||||
super(RMenu, self).__init__()
|
||||
self.label = label
|
||||
self.actions = []
|
||||
self.listeners = []
|
||||
self.icon_from_theme = icon_from_theme;
|
||||
|
||||
def add_action(self, action: RAction):
|
||||
self.actions.append(action)
|
||||
self._notify()
|
||||
|
||||
def clear(self):
|
||||
self.actions.clear()
|
||||
self._notify()
|
||||
|
||||
def _notify(self):
|
||||
for listener in self.listeners:
|
||||
listener()
|
||||
|
||||
def add_change_listener(self, listener: Callable[[], None]):
|
||||
self.listeners.append(listener)
|
||||
Reference in New Issue
Block a user