remove ravenui.py by using plugin registry instead
This commit is contained in:
13
tabs.py
13
tabs.py
@@ -2,11 +2,8 @@ from typing import Optional
|
||||
|
||||
from PySide6.QtWidgets import QWidget, QTabWidget, QVBoxLayout
|
||||
|
||||
from bigtext import BigText
|
||||
from fulltabwidget import FullTabWidget
|
||||
from logFileModel import LogFileModel
|
||||
from raven.pluginregistry import PluginRegistry
|
||||
from raven.plugins.ravenlog.Tab import Tab
|
||||
from ravenui import RavenUI
|
||||
from settings import Settings
|
||||
|
||||
|
||||
@@ -41,11 +38,11 @@ class Tabs(QWidget):
|
||||
def _current_tab_changed(self, tab_index: int):
|
||||
tab: Tab = self.tabs.widget(tab_index)
|
||||
if tab:
|
||||
RavenUI.update_window_title(tab.title)
|
||||
RavenUI.update_status_bar(tab.get_status_text())
|
||||
PluginRegistry.execute("update_window_title", tab.title)
|
||||
PluginRegistry.execute("update_status_bar", tab.get_status_text())
|
||||
else:
|
||||
RavenUI.update_window_title("")
|
||||
RavenUI.update_status_bar("")
|
||||
PluginRegistry.execute("update_window_title", "")
|
||||
PluginRegistry.execute("update_status_bar", "")
|
||||
|
||||
def _close_tab(self, tab_index: int):
|
||||
full_tab: Tab = self.tabs.widget(tab_index)
|
||||
|
||||
Reference in New Issue
Block a user