From 370ad3a9ae2decf701c28a895e50d7a7ecbc12f1 Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Sun, 31 Dec 2023 10:47:35 +0100 Subject: [PATCH] Show config file path in window title --- npbackup/customization.py | 1 + npbackup/gui/__main__.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/npbackup/customization.py b/npbackup/customization.py index 181af8d..5ce9b0e 100644 --- a/npbackup/customization.py +++ b/npbackup/customization.py @@ -29,6 +29,7 @@ COPYRIGHT = "NetInvent 2022-2023" FILE_DESCRIPTION = "Network Backup Client" TRADEMARKS = "NetInvent (C)" PRODUCT_NAME = "NPBackup Network Backup Client" +SHORT_PRODUCT_NAME = "NPBackup" # Arbitrary string ID_STRING = "__NPBACKUP__" diff --git a/npbackup/gui/__main__.py b/npbackup/gui/__main__.py index 21cd581..13280e1 100644 --- a/npbackup/gui/__main__.py +++ b/npbackup/gui/__main__.py @@ -43,6 +43,7 @@ from npbackup.customization import ( LICENSE_FILE, PYSIMPLEGUI_THEME, OEM_ICON, + SHORT_PRODUCT_NAME ) from npbackup.gui.config import config_gui from npbackup.gui.operations import operations_gui @@ -675,7 +676,7 @@ def _main_gui(viewer_mode: bool): ] window = sg.Window( - "npbackup", + SHORT_PRODUCT_NAME, layout, default_element_size=(12, 1), text_justification="r", @@ -702,6 +703,8 @@ def _main_gui(viewer_mode: bool): backup_tz = None snapshot_list = [] gui_update_state() + # Show which config file is loaded + window.set_title(f"{SHORT_PRODUCT_NAME} - {config_file}") while True: event, values = window.read(timeout=60000) @@ -762,6 +765,7 @@ def _main_gui(viewer_mode: bool): backup_destination = _t("main_gui.local_folder") backend_type, repo_uri = get_anon_repo_uri(repo_config.g("repo_uri")) + window.set_title(f"{SHORT_PRODUCT_NAME} - {config_file}") event = "--STATE-BUTTON--" if event == _t("generic.destination"): try: