je-editor 0.0.122__py3-none-any.whl → 0.0.124__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- je_editor/pyside_ui/main_ui/main_ui/editor_main_ui/main_editor.py +18 -9
- je_editor/pyside_ui/main_ui/system_tray/__init__.py +0 -0
- je_editor/pyside_ui/main_ui/system_tray/extend_system_tray.py +31 -0
- {je_editor-0.0.122.dist-info → je_editor-0.0.124.dist-info}/METADATA +1 -1
- {je_editor-0.0.122.dist-info → je_editor-0.0.124.dist-info}/RECORD +8 -6
- {je_editor-0.0.122.dist-info → je_editor-0.0.124.dist-info}/LICENSE +0 -0
- {je_editor-0.0.122.dist-info → je_editor-0.0.124.dist-info}/WHEEL +0 -0
- {je_editor-0.0.122.dist-info → je_editor-0.0.124.dist-info}/top_level.txt +0 -0
@@ -1,21 +1,23 @@
|
|
1
|
+
import logging
|
1
2
|
import os
|
2
3
|
import sys
|
3
4
|
from pathlib import Path
|
4
5
|
|
5
6
|
from PySide6.QtCore import QTimer
|
6
7
|
from PySide6.QtGui import QFontDatabase, QAction, QIcon
|
7
|
-
from PySide6.QtWidgets import QMainWindow,
|
8
|
-
from frontengine import FrontEngineMainUI
|
8
|
+
from PySide6.QtWidgets import QMainWindow, QWidget, QGridLayout, QTabWidget
|
9
|
+
from frontengine import FrontEngineMainUI, ChatSceneUI
|
9
10
|
from qt_material import QtStyleTools
|
10
11
|
|
11
12
|
from je_editor.pyside_ui.code.auto_save.auto_save_thread import SaveThread
|
13
|
+
from je_editor.pyside_ui.code.shell_process.shell_exec import default_shell_manager
|
12
14
|
from je_editor.pyside_ui.colors.global_color import error_color, output_color
|
13
15
|
from je_editor.pyside_ui.main_ui.main_ui_setting.ui_setting import set_ui
|
14
16
|
from je_editor.pyside_ui.main_ui.menu.menu_bar.set_menu_bar import set_menu_bar
|
15
|
-
from je_editor.pyside_ui.code.shell_process.shell_exec import default_shell_manager
|
16
|
-
from je_editor.pyside_ui.main_ui.treeview.project_treeview.set_project_treeview import set_project_treeview
|
17
17
|
from je_editor.pyside_ui.main_ui.save_user_setting.user_setting_file import write_user_setting, \
|
18
18
|
user_setting_dict, read_user_setting
|
19
|
+
from je_editor.pyside_ui.main_ui.system_tray.extend_system_tray import ExtendSystemTray
|
20
|
+
from je_editor.pyside_ui.main_ui.treeview.project_treeview.set_project_treeview import set_project_treeview
|
19
21
|
from je_editor.utils.encodings.python_encodings import python_encodings_list
|
20
22
|
from je_editor.utils.file.open.open_file import read_file
|
21
23
|
from je_editor.utils.redirect_manager.redirect_manager_class import redirect_manager_instance
|
@@ -74,8 +76,10 @@ class EditorMain(QMainWindow, QtStyleTools):
|
|
74
76
|
self.icon = QIcon(str(self.icon_path))
|
75
77
|
if self.icon.isNull() is False:
|
76
78
|
self.setWindowIcon(self.icon)
|
77
|
-
|
78
|
-
|
79
|
+
if ExtendSystemTray.isSystemTrayAvailable():
|
80
|
+
system_tray = ExtendSystemTray(main_window=self)
|
81
|
+
system_tray.setIcon(self.icon)
|
82
|
+
system_tray.show()
|
79
83
|
# Init shell manager
|
80
84
|
default_shell_manager.main_window = self
|
81
85
|
default_shell_manager.later_init()
|
@@ -85,6 +89,7 @@ class EditorMain(QMainWindow, QtStyleTools):
|
|
85
89
|
self.add_style_menu()
|
86
90
|
# TAB Add
|
87
91
|
self.tab_widget.addTab(self.main_widget, "Editor")
|
92
|
+
self.tab_widget.addTab(ChatSceneUI(), "Chat")
|
88
93
|
self.tab_widget.addTab(FrontEngineMainUI(), "FrontEngine")
|
89
94
|
self.setCentralWidget(self.tab_widget)
|
90
95
|
# If debug open 10s and close
|
@@ -192,9 +197,13 @@ class EditorMain(QMainWindow, QtStyleTools):
|
|
192
197
|
self.code_result.setTextColor(output_color)
|
193
198
|
|
194
199
|
def closeEvent(self, event) -> None:
|
195
|
-
|
196
|
-
|
197
|
-
|
200
|
+
if self.system_tray.isVisible():
|
201
|
+
self.hide()
|
202
|
+
event.ignore()
|
203
|
+
else:
|
204
|
+
super().closeEvent(event)
|
205
|
+
user_setting_dict.update({"last_file": str(self.current_file)})
|
206
|
+
write_user_setting()
|
198
207
|
|
199
208
|
@classmethod
|
200
209
|
def debug_close(cls):
|
File without changes
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import sys
|
2
|
+
|
3
|
+
from PySide6.QtGui import QAction
|
4
|
+
from PySide6.QtWidgets import QSystemTrayIcon, QMenu, QMainWindow
|
5
|
+
|
6
|
+
|
7
|
+
class ExtendSystemTray(QSystemTrayIcon):
|
8
|
+
|
9
|
+
def __init__(self, main_window: QMainWindow):
|
10
|
+
super().__init__(parent=main_window)
|
11
|
+
self.menu = QMenu()
|
12
|
+
self.main_window = main_window
|
13
|
+
self.hide_main_window_action = QAction("Hide")
|
14
|
+
self.hide_main_window_action.triggered.connect(self.main_window.hide)
|
15
|
+
self.menu.addAction(self.hide_main_window_action)
|
16
|
+
self.maximized_main_window_action = QAction("Maximized")
|
17
|
+
self.maximized_main_window_action.triggered.connect(self.main_window.showMaximized)
|
18
|
+
self.menu.addAction(self.maximized_main_window_action)
|
19
|
+
self.normal_main_window_action = QAction("Normal")
|
20
|
+
self.normal_main_window_action.triggered.connect(self.main_window.showNormal)
|
21
|
+
self.menu.addAction(self.normal_main_window_action)
|
22
|
+
self.close_main_window_action = QAction("Close")
|
23
|
+
self.close_main_window_action.triggered.connect(self.close_all)
|
24
|
+
self.menu.addAction(self.close_main_window_action)
|
25
|
+
self.setContextMenu(self.menu)
|
26
|
+
|
27
|
+
def close_all(self):
|
28
|
+
self.setVisible(False)
|
29
|
+
self.main_window.close()
|
30
|
+
sys.exit(0)
|
31
|
+
|
@@ -30,7 +30,7 @@ je_editor/pyside_ui/dialog/search_ui/search_text_box.py,sha256=DRtJ3QHu-QzvGwIRL
|
|
30
30
|
je_editor/pyside_ui/main_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
31
31
|
je_editor/pyside_ui/main_ui/main_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
32
|
je_editor/pyside_ui/main_ui/main_ui/editor_main_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
33
|
-
je_editor/pyside_ui/main_ui/main_ui/editor_main_ui/main_editor.py,sha256=
|
33
|
+
je_editor/pyside_ui/main_ui/main_ui/editor_main_ui/main_editor.py,sha256=rH-kHpAcIhBlvmSBAvbRbSEldL42fNKc8WM8BjgEhe8,9370
|
34
34
|
je_editor/pyside_ui/main_ui/main_ui_setting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
35
|
je_editor/pyside_ui/main_ui/main_ui_setting/ui_setting.py,sha256=RGOUWL1aY9eL6r8HjDA0Hty2VqdpACJs-AMxDo9U1h8,1754
|
36
36
|
je_editor/pyside_ui/main_ui/menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -48,6 +48,8 @@ je_editor/pyside_ui/main_ui/menu/menu_bar/venv_menu/__init__.py,sha256=47DEQpj8H
|
|
48
48
|
je_editor/pyside_ui/main_ui/menu/menu_bar/venv_menu/build_venv_menu.py,sha256=Xl4YyqKXQush0GkofiqgNEx1ML_Xili56j40T_gPg5w,2432
|
49
49
|
je_editor/pyside_ui/main_ui/save_user_setting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
50
50
|
je_editor/pyside_ui/main_ui/save_user_setting/user_setting_file.py,sha256=yLEnSbZfU4tn_LuBYvCJ4UW86ec-GnNM17ZE8zy7Mbw,680
|
51
|
+
je_editor/pyside_ui/main_ui/system_tray/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
|
+
je_editor/pyside_ui/main_ui/system_tray/extend_system_tray.py,sha256=pNO1L-vkd3aUlxLnrUJtD5pJ4D-FShkzYKtLgkIQBto,1303
|
51
53
|
je_editor/pyside_ui/main_ui/treeview/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
54
|
je_editor/pyside_ui/main_ui/treeview/project_treeview/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
55
|
je_editor/pyside_ui/main_ui/treeview/project_treeview/set_project_treeview.py,sha256=PcaPw0DFdAHsB7s9PZSv1ND_1Vk9tjjZhCANZtRKBkI,2298
|
@@ -70,8 +72,8 @@ je_editor/utils/redirect_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
70
72
|
je_editor/utils/redirect_manager/redirect_manager_class.py,sha256=izziweWPARG9TjvZWNgRYMnZblfHLkSyAaEW4ku9SuE,2057
|
71
73
|
je_editor/utils/venv_check/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
72
74
|
je_editor/utils/venv_check/check_venv.py,sha256=3HjMwqJzqY8Ir6auniyZMlL0h0TAvP3nZkOI-bR4_jA,798
|
73
|
-
je_editor-0.0.
|
74
|
-
je_editor-0.0.
|
75
|
-
je_editor-0.0.
|
76
|
-
je_editor-0.0.
|
77
|
-
je_editor-0.0.
|
75
|
+
je_editor-0.0.124.dist-info/LICENSE,sha256=YcSMBs2sED35BtlErMkfIDye9Oo-3SYmUJiZJOpa34g,1085
|
76
|
+
je_editor-0.0.124.dist-info/METADATA,sha256=Bzm4Ixt7y9mmqjEarhgRmW4jXVo_BGtlAdRyNu9h6Qc,3398
|
77
|
+
je_editor-0.0.124.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
|
78
|
+
je_editor-0.0.124.dist-info/top_level.txt,sha256=_9YA7BgxpkmdLs-5V_UQILxClcMRgPyG1a3qaE-Bkcs,10
|
79
|
+
je_editor-0.0.124.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|