Skip to content

Commit a1cffd9

Browse files
committed
Update stable version
* New Icon * Add extend param on MainEditor class
1 parent e6bdd6b commit a1cffd9

File tree

5 files changed

+34
-24
lines changed

5 files changed

+34
-24
lines changed

exe/auto_py_to_exe.json

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
},
1616
{
1717
"optionDest": "console",
18-
"value": false
18+
"value": true
1919
},
2020
{
2121
"optionDest": "icon_file",
22-
"value": "C:/CodeWorkspace/Python/JEDITOR/exe/je_driver_icon.ico"
22+
"value": "C:/CodeWorkspace/Python/JEDITOR/exe/python_editor.ico"
2323
},
2424
{
2525
"optionDest": "name",
@@ -57,17 +57,25 @@
5757
"optionDest": "bootloader_ignore_signals",
5858
"value": false
5959
},
60+
{
61+
"optionDest": "pathex",
62+
"value": "C:/CodeWorkspace/Python/JEDITOR/.venv"
63+
},
6064
{
6165
"optionDest": "datas",
62-
"value": "C:/CodeWorkspace/Python/JEDITOR/exe/je_driver_icon.ico;."
66+
"value": "C:\\CodeWorkspace\\Python\\JEDITOR\\.venv\\Lib\\site-packages\\IPython;.IPython/"
6367
},
6468
{
65-
"optionDest": "pathex",
66-
"value": "C:/CodeWorkspace/Python/JEDITOR/.venv"
69+
"optionDest": "datas",
70+
"value": "C:\\CodeWorkspace\\Python\\JEDITOR\\.venv\\Lib\\site-packages\\ipykernel-7.1.0.dist-info;ipykernel-7.1.0.dist-info/"
71+
},
72+
{
73+
"optionDest": "datas",
74+
"value": "C:\\CodeWorkspace\\Python\\JEDITOR\\.venv\\Lib\\site-packages\\ipykernel;ipykernel/"
6775
},
6876
{
6977
"optionDest": "datas",
70-
"value": "C:/CodeWorkspace/Python/JEDITOR/.venv/Lib/site-packages/debugpy;debugpy/"
78+
"value": "C:\\CodeWorkspace\\Python\\JEDITOR\\.venv\\Lib\\site-packages\\ipykernel-7.1.0.dist-info;ipykernel-7.1.0.dist-info/"
7179
}
7280
],
7381
"nonPyinstallerOptions": {

exe/je_driver_icon.ico

-4.19 KB
Binary file not shown.

exe/python_editor.ico

72 KB
Binary file not shown.

je_editor/pyside_ui/main_ui/main_editor.py

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class EditorMain(QMainWindow, QtStyleTools):
5252
繼承 QMainWindow 與 QtStyleTools
5353
"""
5454

55-
def __init__(self, debug_mode: bool = False, show_system_tray_ray: bool = False):
55+
def __init__(self, debug_mode: bool = False, show_system_tray_ray: bool = False, extend: bool = False):
5656
# 初始化時記錄 log
5757
# Log initialization
5858
jeditor_logger.info(f"Init EditorMain "
@@ -95,10 +95,11 @@ def __init__(self, debug_mode: bool = False, show_system_tray_ray: bool = False)
9595

9696
# Windows 系統專用:設定應用程式 ID
9797
# Windows only: set application ID
98-
self.id = language_wrapper.language_word_dict.get("application_name")
99-
if sys.platform in ["win32", "cygwin", "msys"]:
100-
from ctypes import windll
101-
windll.shell32.SetCurrentProcessExplicitAppUserModelID(self.id)
98+
if not extend:
99+
self.id = language_wrapper.language_word_dict.get("application_name")
100+
if sys.platform in ["win32", "cygwin", "msys"]:
101+
from ctypes import windll
102+
windll.shell32.SetCurrentProcessExplicitAppUserModelID(self.id)
102103

103104
# 設定 Python 輸出不緩衝
104105
# Set Python output unbuffered
@@ -144,18 +145,19 @@ def __init__(self, debug_mode: bool = False, show_system_tray_ray: bool = False)
144145

145146
# 設定應用程式圖示
146147
# Set application icon
147-
self.icon_path = Path(os.getcwd() + "/je_driver_icon.ico")
148-
self.icon = QIcon(str(self.icon_path))
149-
if self.icon.isNull() is False:
150-
self.setWindowIcon(self.icon)
151-
# 如果系統支援系統匣,則顯示圖示
152-
# Show system tray icon if available
153-
if ExtendSystemTray.isSystemTrayAvailable() and self.show_system_tray_ray:
154-
self.system_tray = ExtendSystemTray(main_window=self)
155-
self.system_tray.setIcon(self.icon)
156-
self.system_tray.setVisible(True)
157-
self.system_tray.show()
158-
self.system_tray.setToolTip(language_wrapper.language_word_dict.get("application_name"))
148+
if not extend:
149+
self.icon_path = Path(os.getcwd() + "/python_editor.ico")
150+
self.icon = QIcon(str(self.icon_path))
151+
if not self.icon.isNull():
152+
self.setWindowIcon(self.icon)
153+
# 如果系統支援系統匣,則顯示圖示
154+
# Show system tray icon if available
155+
if ExtendSystemTray.isSystemTrayAvailable() and self.show_system_tray_ray:
156+
self.system_tray = ExtendSystemTray(main_window=self)
157+
self.system_tray.setIcon(self.icon)
158+
self.system_tray.setVisible(True)
159+
self.system_tray.show()
160+
self.system_tray.setToolTip(language_wrapper.language_word_dict.get("application_name"))
159161

160162
# 設定輸出重導 (stdout/stderr)
161163
# Setup output redirection (stdout/stderr)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66

77
[project]
88
name = "je_editor"
9-
version = "0.0.232"
9+
version = "0.0.234"
1010
authors = [
1111
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
1212
]

0 commit comments

Comments
 (0)