Files
krowlog/raven/plugins/ravenlogplugin.py
2021-11-26 18:19:57 +01:00

22 lines
570 B
Python

from typing import Optional
from raven.mainwindow import MainWindow
from raven.pluginbase import PluginBase
class RavenLogPlugin(PluginBase):
def __init__(self):
super(RavenLogPlugin, self).__init__()
self.main_window = None
def create_main_window(self):
if not self.main_window:
self.main_window = MainWindow()
return self.main_window
def current_file(self) -> Optional[str]:
return self.main_window.current_file()
def create_tab(self, file: str):
self.main_window.tabs.create_tab(file)