feat: 为只读模式添加专用应用程序标题

在非管理员权限下运行时,将对话框标题从硬编码字符串改为使用配置文件中定义的 APP_NAME_READONLY 宏。这提高了代码的可维护性和一致性,使标题文本集中管理,便于未来修改。
This commit is contained in:
2026-03-18 22:37:33 +08:00
parent 1bbe95582a
commit ac6b409f3a
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ int main(int argc, char **argv)
if (!check_admin())
{
IupMessage("警告", "程序未以管理员身份运行,您只能查看,无法保存更改!");
IupSetAttribute(dlg, "TITLE", "编辑环境变量 (只读模式)");
IupSetAttribute(dlg, "TITLE", APP_NAME_READONLY); // 对话框标题 (只读模式)
IupSetAttribute(lbl_status, "TITLE", "状态: 只读模式 (权限不足)");
// 禁用修改类按钮