diff --git a/src/const.py b/src/const.py index 6e8d84e..75da51f 100644 --- a/src/const.py +++ b/src/const.py @@ -1,8 +1,9 @@ #!@PYTHON@ # SPDX-License-Identifier: GPL-3.0-only + class Config: - DEVEL = '@DEVEL@' == 'Development' - PROFILE = '@DEVEL@' - APP_ID = '@APPID@' - VERSION = '@VERSION@' + DEVEL = "@DEVEL@" == "Development" + PROFILE = "@DEVEL@" + APP_ID = "@APPID@" + VERSION = "@VERSION@" diff --git a/src/main.py b/src/main.py index 3aef120..fc4d5d2 100644 --- a/src/main.py +++ b/src/main.py @@ -32,6 +32,7 @@ import gettext _ = gettext.gettext + class WarehouseApplication(Adw.Application): """The main application singleton class.""" diff --git a/src/main_window/window.py b/src/main_window/window.py index 958fdce..df35cf1 100644 --- a/src/main_window/window.py +++ b/src/main_window/window.py @@ -29,6 +29,7 @@ import gettext _ = gettext.gettext + @Gtk.Template(resource_path="/io/github/flattool/Warehouse/main_window/window.ui") class WarehouseWindow(Adw.ApplicationWindow): __gtype_name__ = "WarehouseWindow" diff --git a/src/packages_page/filters_page.py b/src/packages_page/filters_page.py index ba087ab..ca4972e 100644 --- a/src/packages_page/filters_page.py +++ b/src/packages_page/filters_page.py @@ -4,6 +4,7 @@ import gettext _ = gettext.gettext + class FilterRow(Adw.ActionRow): __gtype_name__ = "FilterRow" diff --git a/src/packages_page/packages_page.py b/src/packages_page/packages_page.py index 24aeca6..2dac202 100644 --- a/src/packages_page/packages_page.py +++ b/src/packages_page/packages_page.py @@ -14,6 +14,7 @@ import gettext _ = gettext.gettext + @Gtk.Template(resource_path="/io/github/flattool/Warehouse/packages_page/packages_page.ui") class PackagesPage(Adw.BreakpointBin): __gtype_name__ = "PackagesPage" diff --git a/src/packages_page/uninstall_dialog.py b/src/packages_page/uninstall_dialog.py index f530b2b..84a1473 100644 --- a/src/packages_page/uninstall_dialog.py +++ b/src/packages_page/uninstall_dialog.py @@ -3,6 +3,7 @@ import gettext _ = gettext.gettext + @Gtk.Template(resource_path="/io/github/flattool/Warehouse/packages_page/uninstall_dialog.ui") class UninstallDialog(Adw.AlertDialog): __gtype_name__ = "UninstallDialog" diff --git a/src/properties_page/properties_page.py b/src/properties_page/properties_page.py index 76bb0e8..01f8359 100644 --- a/src/properties_page/properties_page.py +++ b/src/properties_page/properties_page.py @@ -10,6 +10,7 @@ import gettext _ = gettext.gettext + @Gtk.Template(resource_path="/io/github/flattool/Warehouse/properties_page/properties_page.ui") class PropertiesPage(Adw.NavigationPage): __gtype_name__ = "PropertiesPage" diff --git a/src/snapshot_page/new_snapshot_dialog.py b/src/snapshot_page/new_snapshot_dialog.py index f40f727..3e5b8e0 100644 --- a/src/snapshot_page/new_snapshot_dialog.py +++ b/src/snapshot_page/new_snapshot_dialog.py @@ -8,6 +8,7 @@ import gettext _ = gettext.gettext + @Gtk.Template(resource_path="/io/github/flattool/Warehouse/snapshot_page/new_snapshot_dialog.ui") class NewSnapshotDialog(Adw.Dialog): __gtype_name__ = "NewSnapshotDialog" diff --git a/src/snapshot_page/snapshot_box.py b/src/snapshot_page/snapshot_box.py index bdbee46..1c27ade 100644 --- a/src/snapshot_page/snapshot_box.py +++ b/src/snapshot_page/snapshot_box.py @@ -7,6 +7,7 @@ import gettext _ = gettext.gettext + @Gtk.Template(resource_path="/io/github/flattool/Warehouse/snapshot_page/snapshot_box.ui") class SnapshotBox(Gtk.Box): __gtype_name__ = "SnapshotBox" diff --git a/src/snapshot_page/snapshot_page.py b/src/snapshot_page/snapshot_page.py index 51bda96..e292c15 100644 --- a/src/snapshot_page/snapshot_page.py +++ b/src/snapshot_page/snapshot_page.py @@ -13,6 +13,7 @@ import gettext _ = gettext.gettext + class LeftoverSnapshotRow(Adw.ActionRow): __gtype_name__ = "LeftoverSnapshotRow" diff --git a/src/snapshot_page/snapshots_list_page.py b/src/snapshot_page/snapshots_list_page.py index 30eafdb..6b1a583 100644 --- a/src/snapshot_page/snapshots_list_page.py +++ b/src/snapshot_page/snapshots_list_page.py @@ -9,6 +9,7 @@ import gettext _ = gettext.gettext + @Gtk.Template(resource_path="/io/github/flattool/Warehouse/snapshot_page/snapshots_list_page.ui") class SnapshotsListPage(Adw.NavigationPage): __gtype_name__ = "SnapshotsListPage" diff --git a/src/snapshot_page/tar_worker.py b/src/snapshot_page/tar_worker.py index 0e6a94b..ef26225 100644 --- a/src/snapshot_page/tar_worker.py +++ b/src/snapshot_page/tar_worker.py @@ -6,6 +6,7 @@ import gettext _ = gettext.gettext + class TarWorker: def compress_thread(self, *args): try: diff --git a/src/user_data_page/data_box.py b/src/user_data_page/data_box.py index 29c51dd..f64b1ab 100644 --- a/src/user_data_page/data_box.py +++ b/src/user_data_page/data_box.py @@ -7,6 +7,7 @@ import gettext _ = gettext.gettext + @Gtk.Template(resource_path="/io/github/flattool/Warehouse/user_data_page/data_box.ui") class DataBox(Gtk.ListBox): __gtype_name__ = "DataBox" diff --git a/src/user_data_page/data_subpage.py b/src/user_data_page/data_subpage.py index 8a639b8..105f2bd 100644 --- a/src/user_data_page/data_subpage.py +++ b/src/user_data_page/data_subpage.py @@ -6,6 +6,7 @@ import gettext _ = gettext.gettext + @Gtk.Template(resource_path="/io/github/flattool/Warehouse/user_data_page/data_subpage.ui") class DataSubpage(Gtk.Stack): __gtype_name__ = "DataSubpage" diff --git a/src/warehouse.py b/src/warehouse.py index b2fb566..951fded 100755 --- a/src/warehouse.py +++ b/src/warehouse.py @@ -25,22 +25,24 @@ import signal import locale import gettext -VERSION = '@VERSION@' -pkgdatadir = '@pkgdatadir@' -localedir = '@localedir@' +VERSION = "@VERSION@" +pkgdatadir = "@pkgdatadir@" +localedir = "@localedir@" sys.path.insert(1, pkgdatadir) signal.signal(signal.SIGINT, signal.SIG_DFL) -locale.bindtextdomain('warehouse', localedir) -locale.textdomain('warehouse') -gettext.install('warehouse', localedir) +locale.bindtextdomain("warehouse", localedir) +locale.textdomain("warehouse") +gettext.install("warehouse", localedir) -if __name__ == '__main__': +if __name__ == "__main__": import gi from gi.repository import Gio - resource = Gio.Resource.load(os.path.join(pkgdatadir, 'warehouse.gresource')) + + resource = Gio.Resource.load(os.path.join(pkgdatadir, "warehouse.gresource")) resource._register() from src import main + sys.exit(main.main(VERSION))