Skip to content

Commit

Permalink
0.11.0 版本 新增关闭OlivOS终端后的气泡消息,避免有些用户不知道自己关掉终端后实际上还开着
Browse files Browse the repository at this point in the history
  • Loading branch information
lunzhiPenxil committed Feb 28, 2023
1 parent adb93b8 commit c2a946d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions OlivOS/infoAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import OlivOS


OlivOS_Version = '0.10.19'
OlivOS_SVN = 119
OlivOS_Version = '0.11.0'
OlivOS_SVN = 120

# Compatible <= Plugin[compatible_svn] : Compatible
# OldCompatible <= Plugin[compatible_svn] < Compatible : OldCompatible Warn
Expand Down
12 changes: 11 additions & 1 deletion OlivOS/nativeWinUIAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ def start(self):
)

self.UIObject['root'].iconbitmap('./resource/tmp_favoricon.ico')
self.UIObject['root'].protocol("WM_DELETE_WINDOW", self.stop)
self.UIObject['root'].protocol("WM_DELETE_WINDOW", self.stopManual)

self.tree_init_line()

Expand Down Expand Up @@ -1104,6 +1104,16 @@ def tree_add_line(self, data):
except:
pass

def stopManual(self):
# 手动关闭时要给用户气泡,不然有些用户不知道自己还开着
try:
self.root.UIObject['root_shallow'].UIObject['shallow_root'].notify(
'已最小化至托盘'
)
except:
pass
self.stop()

def stop(self):
self.exit()
self.UIObject['root'].destroy()
Expand Down

0 comments on commit c2a946d

Please sign in to comment.