diff --git a/MANIFEST.in b/MANIFEST.in index af97d8e..baa5535 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,7 +3,7 @@ include README.md include requirements.txt include fishy/icon.ico include fishy/ProvisionsChalutier.zip -include fishy/FishybotESO.lnk +include fishy/fishybot_logo.png recursive-include tests * recursive-exclude * __pycache__ diff --git a/fishy/__main__.py b/fishy/__main__.py index 51c2cfb..1cd7a5c 100644 --- a/fishy/__main__.py +++ b/fishy/__main__.py @@ -122,7 +122,7 @@ def initialize_uid(config: Config): logging.error("Couldn't register uid, some features might not work") -def initialize(gui, c: Config): +def initialize(gui, c: Config, The_program_to_hide): create_shortcut_first(gui, c) initialize_uid(c) @@ -145,7 +145,6 @@ def initialize(gui, c: Config): pass if not c.get("debug", False): - The_program_to_hide = win32gui.GetForegroundWindow() win32gui.ShowWindow(The_program_to_hide, win32con.SW_HIDE) helper.install_thread_excepthook() sys.excepthook = helper.unhandled_exception_logging @@ -170,6 +169,8 @@ def ask_terms(): def main(): + The_program_to_hide = win32gui.GetForegroundWindow() + print("launching please wait...") c = Config() @@ -182,7 +183,7 @@ def main(): gui.start() logging.info(f"Fishybot v{fishy.__version__}") - initialize(gui, c) + initialize(gui, c, The_program_to_hide) bot = Fishy(gui, events_buffer, c) bot.start_event_handler() diff --git a/fishy/systems/gui.py b/fishy/systems/gui.py index 43520e8..62d5d8b 100644 --- a/fishy/systems/gui.py +++ b/fishy/systems/gui.py @@ -265,9 +265,9 @@ class GUI: def check(): if web.is_subbed(self.config.get("uid"), False)[0]: - messagebox.showinfo("Note!", "Notification configured successfully!") - web.send_notification(self.config.get("uid"), "Sending a test notification :D") self.notify.set(1) + web.send_notification(self.config.get("uid"), "Sending a test notification :D") + messagebox.showinfo("Note!", "Notification configured successfully!") quit_top() else: messagebox.showerror("Error", "Subscription wasn't successful")