✨ 新增: 添加不同平台的通知显示函数
✨ 新增: 实现 Windows、macOS 和 Linux 的通知显示 📝 修改: 调整命令历史记录相关注释 📝 修改: 增加工作目录管理逻辑
This commit is contained in:
+3
-1
@@ -16,7 +16,7 @@ public:
|
||||
void SaveSettings();
|
||||
void ApplySettings();
|
||||
|
||||
// 新增:启动命令历史记录管理
|
||||
// 启动命令历史记录管理
|
||||
void AddCommandToHistory(const std::string& command);
|
||||
void RemoveCommandFromHistory(int index);
|
||||
void ClearCommandHistory();
|
||||
@@ -27,6 +27,8 @@ public:
|
||||
CLIProcess cli_process;
|
||||
char command_input[256]{};
|
||||
char send_command[256]{};
|
||||
char working_directory[256]{};
|
||||
bool auto_working_dir;
|
||||
bool auto_scroll_logs;
|
||||
bool enable_colored_logs;
|
||||
int max_log_lines;
|
||||
|
||||
+7
-1
@@ -35,7 +35,13 @@ public:
|
||||
// 设置回调函数
|
||||
void SetShowWindowCallback(const ShowWindowCallback &callback);
|
||||
void SetExitCallback(const ExitCallback &callback);
|
||||
|
||||
#ifdef _WIN32
|
||||
void ShowWindowsNotification(const std::wstring& title, const std::wstring& message);
|
||||
#elif __APPLE__
|
||||
void ShowMacNotification(const std::string& title, const std::string& message);
|
||||
#else
|
||||
void ShowLinuxNotification(const std::string& title, const std::string& message);
|
||||
#endif
|
||||
private:
|
||||
void CreateMenu();
|
||||
void DestroyMenu();
|
||||
|
||||
Reference in New Issue
Block a user