Compare commits

..

4 Commits
v2.2 ... v2.2.1

Author SHA1 Message Date
kramo
7c6936503a v2.2.1 2023-08-17 21:06:08 +02:00
kramo
e91d641444 Update screenshots 2023-08-17 21:04:26 +02:00
kramo
57b931200e Object oriented programming 😊 2023-08-17 20:56:29 +02:00
kramo
17d89f444d Object oriented programming 😃 2023-08-17 20:50:25 +02:00
7 changed files with 22 additions and 7 deletions

View File

@@ -44,6 +44,13 @@
</screenshots> </screenshots>
<content_rating type="oars-1.1" /> <content_rating type="oars-1.1" />
<releases> <releases>
<release version="2.2.1" date="2023-08-17">
<description translatable="no">
<ul>
<li>Fixes a small issue with import toasts</li>
</ul>
</description>
</release>
<release version="2.2" date="2023-08-17"> <release version="2.2" date="2023-08-17">
<description translatable="no"> <description translatable="no">
<ul> <ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 KiB

After

Width:  |  Height:  |  Size: 623 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 KiB

After

Width:  |  Height:  |  Size: 291 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -1,5 +1,5 @@
project('cartridges', project('cartridges',
version: '2.2', version: '2.2.1',
meson_version: '>= 0.59.0', meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2', 'werror=false', ], default_options: [ 'warning_level=2', 'werror=false', ],
) )

View File

@@ -41,7 +41,7 @@ class Importer(ErrorProducer):
progressbar: Gtk.ProgressBar progressbar: Gtk.ProgressBar
import_statuspage: Adw.StatusPage import_statuspage: Adw.StatusPage
import_dialog: Adw.MessageDialog import_dialog: Adw.MessageDialog
summary_toast: Adw.Toast summary_toast: Optional[Adw.Toast] = None
sources: set[Source] sources: set[Source]
@@ -50,8 +50,8 @@ class Importer(ErrorProducer):
n_pipelines_done: int = 0 n_pipelines_done: int = 0
game_pipelines: set[Pipeline] game_pipelines: set[Pipeline]
removed_game_ids: set[str] = set() removed_game_ids: set[str]
imported_game_ids: set[str] = set() imported_game_ids: set[str]
def __init__(self) -> None: def __init__(self) -> None:
super().__init__() super().__init__()
@@ -60,6 +60,9 @@ class Importer(ErrorProducer):
shared.store.new_game_ids = set() shared.store.new_game_ids = set()
shared.store.duplicate_game_ids = set() shared.store.duplicate_game_ids = set()
self.removed_game_ids = set()
self.imported_game_ids = set()
self.game_pipelines = set() self.game_pipelines = set()
self.sources = set() self.sources = set()
@@ -100,6 +103,9 @@ class Importer(ErrorProducer):
def run(self) -> None: def run(self) -> None:
"""Use several Gio.Task to import games from added sources""" """Use several Gio.Task to import games from added sources"""
if Importer.summary_toast:
Importer.summary_toast.dismiss()
shared.win.get_application().lookup_action("import").set_enabled(False) shared.win.get_application().lookup_action("import").set_enabled(False)
self.create_dialog() self.create_dialog()
@@ -260,7 +266,7 @@ class Importer(ErrorProducer):
shared.store.new_game_ids = set() shared.store.new_game_ids = set()
shared.store.duplicate_game_ids = set() shared.store.duplicate_game_ids = set()
self.import_dialog.close() self.import_dialog.close()
self.summary_toast = self.create_summary_toast() Importer.summary_toast = self.create_summary_toast()
self.create_error_dialog() self.create_error_dialog()
shared.win.get_application().lookup_action("import").set_enabled(True) shared.win.get_application().lookup_action("import").set_enabled(True)
@@ -329,7 +335,8 @@ class Importer(ErrorProducer):
self.imported_game_ids = set() self.imported_game_ids = set()
self.removed_game_ids = set() self.removed_game_ids = set()
self.summary_toast.dismiss() if Importer.summary_toast:
Importer.summary_toast.dismiss()
logging.info("Import undone") logging.info("Import undone")
@@ -385,7 +392,8 @@ class Importer(ErrorProducer):
def timeout_toast(self, *_args: Any) -> None: def timeout_toast(self, *_args: Any) -> None:
"""Manually timeout the toast after the user has dismissed all warnings""" """Manually timeout the toast after the user has dismissed all warnings"""
GLib.timeout_add_seconds(5, self.summary_toast.dismiss) if Importer.summary_toast:
GLib.timeout_add_seconds(5, Importer.summary_toast.dismiss)
def dialog_response_callback(self, _widget: Any, response: str, *args: Any) -> None: def dialog_response_callback(self, _widget: Any, response: str, *args: Any) -> None:
"""Handle after-import dialogs callback""" """Handle after-import dialogs callback"""