File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1- import os
2- import sys
31from libs .windows .Calculator import *
42from PyQt6 .QtGui import *
53from PyQt6 .QtCore import *
64
7- def restart (title , text ):
5+ def exit_app (title , text ):
86 QMessageBox .information (calculator , title , text )
9- sys .exit (0 )
7+ calculator .setVisible (False )
8+ app .quit ()
Original file line number Diff line number Diff line change 1818def enable ():
1919 def _enable (plugin ):
2020 os .rename ("plugins/%s.disabled" % plugin , "plugins/%s.py" % plugin )
21- restart ("重启" , "已启用此插件,本次操作需要手动重启程序" )
21+ exit_app ("重启" , "已启用此插件,本次操作需要手动重启程序" )
2222 return _enable
2323
2424def info ():
@@ -29,7 +29,7 @@ def _info(i):
2929
3030 def disable (plugin ):
3131 os .rename ("plugins/%s.py" % plugin , "plugins/%s.disabled" % plugin )
32- restart ("重启" , "已禁用此插件,本次操作需要手动重启程序" )
32+ exit_app ("重启" , "已禁用此插件,本次操作需要手动重启程序" )
3333
3434 return {
3535 "name" : plugins [i ].__name__ ,
You can’t perform that action at this time.
0 commit comments