screen: simplify panel loading

this removes create_panel function from panels and mandates a class name Panel

remove panel_type param and only use a panel_name that is it's filename

remove load_panel dict

always reinit panel, (simpler and safer but slower)
This commit is contained in:
alfrix
2023-07-21 19:35:19 -03:00
committed by Alfredo Monclus
parent cb5b77303f
commit 8d9236a2df
30 changed files with 69 additions and 239 deletions

View File

@@ -2,15 +2,10 @@ import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
from ks_includes.screen_panel import ScreenPanel
def create_panel(*args):
return ExamplePanel(*args)
class ExamplePanel(ScreenPanel):
class Panel(ScreenPanel):
def __init__(self, screen, title):
super().__init__(screen, title)