vm-manager: add empty list screen
This commit is contained in:
@@ -4,5 +4,5 @@ from typing import Union
|
||||
loc: Path = Path(__file__).parent
|
||||
|
||||
|
||||
def get_asset(name: Union[str, Path]) -> Path:
|
||||
def get_asset(name: str | Path) -> Path:
|
||||
return loc / name
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import logging
|
||||
from collections.abc import Callable
|
||||
from typing import Any, Generic, TypeVar, ClassVar
|
||||
from typing import Any, ClassVar, Generic, TypeVar
|
||||
|
||||
import gi
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import logging
|
||||
from typing import Callable, Optional, TypeVar
|
||||
from collections.abc import Callable
|
||||
from typing import TypeVar
|
||||
|
||||
import gi
|
||||
|
||||
from clan_vm_manager import assets
|
||||
|
||||
gi.require_version("Adw", "1")
|
||||
from gi.repository import Adw, Gio, GObject, Gtk, GdkPixbuf
|
||||
from gi.repository import Adw, GdkPixbuf, Gio, GObject, Gtk
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -53,7 +54,7 @@ class EmptySplash(Gtk.Box):
|
||||
|
||||
self.append(clamp)
|
||||
|
||||
def load_image(self, file_path: str) -> Optional[GdkPixbuf.Pixbuf]:
|
||||
def load_image(self, file_path: str) -> GdkPixbuf.Pixbuf | None:
|
||||
try:
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file(file_path)
|
||||
return pixbuf
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import logging
|
||||
import threading
|
||||
from typing import Callable
|
||||
from collections.abc import Callable
|
||||
|
||||
import gi
|
||||
from clan_cli.history.list import list_history
|
||||
|
||||
Reference in New Issue
Block a user