move the log file viewer to its own plugin
We plan to have multiple different types of tabs.
This commit is contained in:
@@ -8,6 +8,7 @@ from raven.pluginbase import PluginBase
|
||||
from raven.pluginregistry import PluginRegistry
|
||||
from raven.plugins.domain.menucontribution import MenuContribution
|
||||
from raven.plugins.domain.raction import RAction
|
||||
from raven.plugins.ravenlog.Tab import Tab
|
||||
|
||||
|
||||
class RavenLogPlugin(PluginBase):
|
||||
@@ -29,9 +30,8 @@ class RavenLogPlugin(PluginBase):
|
||||
def current_file(self) -> Optional[str]:
|
||||
return self.main_window.tabs.current_file()
|
||||
|
||||
def create_tab(self, file: str):
|
||||
self.main_window.tabs.create_tab(file)
|
||||
PluginRegistry.execute("after_open_file", file)
|
||||
def add_tab(self, tab: Tab):
|
||||
self.main_window.tabs.add_tab(tab)
|
||||
|
||||
def _action_about(self) -> RAction:
|
||||
about_action = RAction(
|
||||
|
||||
Reference in New Issue
Block a user