Skip to content

Commit

Permalink
launcher: Suggest thematic packs before creating projects from scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
tchx84 committed Feb 15, 2024
1 parent 2f40243 commit 268c888
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/gameeky/launcher/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
from gi.repository import GLib, Gio, Adw, Gdk, Gtk

from .widgets.window import Window
from .widgets.confirmation_create_window import ConfirmationCreateWindow
from .models.session import Session
from .models.service import GNOMESoftware

from ..common.scanner import Description
from ..common.widgets.about_window import present_about
Expand All @@ -48,6 +50,14 @@ def __init__(self) -> None:
self._session: Optional[Session] = None

def __on_new(self, action: Gio.SimpleAction, data: Optional[Any] = None) -> None:
if GNOMESoftware.available():
dialog = ConfirmationCreateWindow(transient_for=self._window)
dialog.connect("confirmed", self.__on_create_confirmed)
dialog.present()
else:
self._window.add()

def __on_create_confirmed(self, dialog: ConfirmationCreateWindow) -> None:
self._window.add()

def __on_about(self, action: Gio.SimpleAction, data: Optional[Any] = None) -> None:
Expand Down

0 comments on commit 268c888

Please sign in to comment.