From f271355437a7d08e2914341603003772af5eb430 Mon Sep 17 00:00:00 2001 From: laggykiller Date: Fri, 6 Oct 2023 03:21:48 +0800 Subject: [PATCH] - Warn about tkinter bug if macOS 14 python3.11 - Notify about uploading a sticker pack --- src/sticker_convert/gui.py | 4 ++-- src/sticker_convert/uploaders/upload_signal.py | 1 + src/sticker_convert/uploaders/upload_telegram.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sticker_convert/gui.py b/src/sticker_convert/gui.py index b589206..2330159 100755 --- a/src/sticker_convert/gui.py +++ b/src/sticker_convert/gui.py @@ -179,13 +179,13 @@ def pack_frames(self): def warn_tkinter_bug(self): if (platform.system() == 'Darwin' and - platform.machine() == 'x86_64' and + platform.mac_ver().split('.')[0] == '14' and sys.version_info[0] == 3 and sys.version_info[1] == 11): msg = 'NOTICE: If buttons are not responsive, try to press ' msg += 'on title bar or move mouse cursor away from window for a while.' self.cb_msg(msg) - msg = '(This is due to a bug in tkinter specific to x86_64 macOS python3.11)' + msg = '(This is due to a bug in tkinter specific to macOS 14 python3.11)' self.cb_msg(msg) msg = '(https://github.com/python/cpython/issues/110218)' self.cb_msg(msg) diff --git a/src/sticker_convert/uploaders/upload_signal.py b/src/sticker_convert/uploaders/upload_signal.py index 9d6bc2b..1b5fe20 100755 --- a/src/sticker_convert/uploaders/upload_signal.py +++ b/src/sticker_convert/uploaders/upload_signal.py @@ -114,6 +114,7 @@ def upload_stickers_signal(self) -> list[str]: packs = MetadataHandler.split_sticker_packs(self.in_dir, title=title, file_per_pack=200, separate_image_anim=False) for pack_title, stickers in packs.items(): + self.cb_msg(f'Uploading pack {pack_title}') pack = LocalStickerPack() pack.title = pack_title pack.author = author diff --git a/src/sticker_convert/uploaders/upload_telegram.py b/src/sticker_convert/uploaders/upload_telegram.py index fca1c82..73251ca 100755 --- a/src/sticker_convert/uploaders/upload_telegram.py +++ b/src/sticker_convert/uploaders/upload_telegram.py @@ -227,6 +227,7 @@ def upload_stickers_telegram(self) -> list[str]: packs = MetadataHandler.split_sticker_packs(self.in_dir, title=title, file_per_anim_pack=50, file_per_image_pack=120, separate_image_anim=not self.fake_vid) for pack_title, stickers in packs.items(): + self.cb_msg(f'Uploading pack {pack_title}') result = anyio.run(self.upload_pack, pack_title, stickers, emoji_dict) self.cb_msg(result) urls.append(result)