|
7 | 7 | from qfluentwidgets import FluentIcon as FIF |
8 | 8 | from qfluentwidgets.common.screen import getCurrentScreenGeometry |
9 | 9 | from qframelesswindow import WindowEffect |
10 | | -from app.common.methods import isGreaterEqualWin10 |
11 | 10 |
|
| 11 | +from app.common.methods import isGreaterEqualWin10, attemptRegisterAppID |
12 | 12 | from app.common.methods import openFile, bringWindowToTop, isAbleToShowToast |
13 | 13 | from app.view.Ui_PopUpWindow import Ui_PopUpWindow |
14 | 14 |
|
@@ -252,8 +252,10 @@ def showPopUpWindow(cls, fileResolvePath:str, mainWindow=None): |
252 | 252 | {'activationType': 'protocol', 'arguments': fileResolvePath, 'content': cls.tr('打开文件')}, |
253 | 253 | {'activationType': 'protocol', 'arguments': dirname(fileResolvePath), 'content': cls.tr('打开目录')} |
254 | 254 | ] |
255 | | - |
256 | | - return TaskExecutor.run(toast, cls.tr("下载完成"), fileResolvePath, icon=icon, buttons=buttons) |
| 255 | + |
| 256 | + attemptRegisterAppID() |
| 257 | + |
| 258 | + return TaskExecutor.run(toast, cls.tr("下载完成"), fileResolvePath, icon=icon, buttons=buttons, app_id="GD3") |
257 | 259 | else: |
258 | 260 | w = FinishedPopUpWindow(fileResolvePath, mainWindow) |
259 | 261 | w.show() |
@@ -294,7 +296,10 @@ def showPopUpWindow(cls, receiveContent:str, mainWindow=None): |
294 | 296 | 'src': f"file://{logoTempFile}", |
295 | 297 | 'placement': 'appLogoOverride' |
296 | 298 | } |
297 | | - return TaskExecutor.run(toast, cls.tr("接收到来自浏览器的下载任务:"), receiveContent, icon=icon) # TODO 点击后 bringWindowToTop(mainWindow), 需要信号 |
| 299 | + |
| 300 | + attemptRegisterAppID() |
| 301 | + |
| 302 | + return TaskExecutor.run(toast, cls.tr("接收到来自浏览器的下载任务:"), receiveContent, icon=icon, app_id="GD3") # TODO 点击后 bringWindowToTop(mainWindow), 需要信号 |
298 | 303 | else: |
299 | 304 | w = ReceivedPopUpWindow(receiveContent, mainWindow) |
300 | 305 | w.show() |
|
0 commit comments