mv clan-vm-manager to its own package

This commit is contained in:
Jörg Thalheim
2023-11-23 13:56:25 +01:00
parent 832c41df7e
commit a838c4da17
5 changed files with 2 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ from pathlib import Path
from types import ModuleType
from typing import Any, Optional, Sequence
from . import config, flakes, gtkui, machines, secrets, vms, webui
from . import config, flakes, machines, secrets, vms, webui
from .custom_logger import setup_logging
from .dirs import get_clan_flake_toplevel
from .ssh import cli as ssh_cli
@@ -64,9 +64,6 @@ def create_parser(prog: Optional[str] = None) -> argparse.ArgumentParser:
subparsers = parser.add_subparsers()
parser_gtkui = subparsers.add_parser("gtkui", help="start gtkui")
gtkui.register_parser(parser_gtkui)
parser_flake = subparsers.add_parser(
"flakes", help="create a clan flake inside the current directory"
)

View File

@@ -1,10 +0,0 @@
import argparse
from typing import Callable, Optional
start_app: Optional[Callable] = None
from .app import start_app
def register_parser(parser: argparse.ArgumentParser) -> None:
parser.set_defaults(func=start_app)

View File

@@ -1,49 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkApplicationWindow" id="main-window">
<property name="can-focus">False</property>
<child>
<object class="GtkFixed">
<property name="name">asdasd</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButton" id="help_button">
<property name="label" translatable="yes">May I help you?</property>
<property name="name">asdasd</property>
<property name="width-request">100</property>
<property name="height-request">80</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
<signal name="clicked" handler="on_help_button_clicked" object="coffee_label" swapped="no"/>
</object>
<packing>
<property name="x">21</property>
<property name="y">21</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="coffee_label">
<property name="width-request">100</property>
<property name="height-request">80</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Get me some coffe! </property>
<property name="width-chars">0</property>
</object>
<packing>
<property name="x">178</property>
<property name="y">120</property>
</packing>
</child>
<style>
<class name="asdasd"/>
</style>
</object>
</child>
</object>
</interface>

View File

@@ -1,19 +0,0 @@
# !/usr/bin/env python3
import argparse # noqa
from pathlib import Path # noqa
import gi # noqa
gi.require_version("Gtk", "3.0") # noqa
from gi.repository import Gtk # noqa
def start_app(args: argparse.Namespace) -> None:
builder = Gtk.Builder()
glade_file = Path(__file__).parent / "app.glade"
builder.add_from_file(str(glade_file))
window = builder.get_object("main-window")
window.show_all()
Gtk.main()