Skip to content

Commit 3a4534b

Browse files
committed
fix
1 parent e782503 commit 3a4534b

4 files changed

Lines changed: 24 additions & 13 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ tauri-winres = "0.3.5"
2424
directories = "6.0.0"
2525
single-instance = "0.3.3"
2626
windows-hotkeys = "0.2.1"
27-
toml = "1.1.0+spec-1.1.0"
28-
toml_edit = "0.25.8+spec-1.1.0"
27+
toml = "1.1.0"
28+
toml_edit = "0.25.8"
2929
tray-icon = "0.21.3"
3030
tao = "0.35.0"
3131
mslnk = "0.1.8"

res/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# ①The program will automatically process the configuration file when starting
55
# - 如果文件不存在,会创建默认配置
66
# - If the file does not exist, default settings will be created
7-
# - 如果某项配置缺失,会自动补充默认值
8-
# - If any setting is missing, default values will be added
7+
# - 如果某项配置缺失,会自动补充默认值。同目录下存在一默认配置文件,可自行参考补全过时配置
8+
# - If any setting is missing, default values will be used. A default configuration file exists in the same directory, you can refer to it to complete the outdated configuration
99
#
1010
# ②配置更改后需要重启程序才能生效
1111
# ②Program restart is required after configuration changes

src/file_ops.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ pub fn execute_process(
214214
println!("Exit code: {}", code);
215215
if notification {
216216
if code == 8 {
217-
notify_msgbox_standalone("SC_Starter", "已保存到文件", 1500);
217+
notify_msgbox_standalone("SC_Starter", "已保存到文件", 2000);
218218
} else if code == 9 {
219-
notify_msgbox_standalone("SC_Starter", "已保存到剪贴板", 1500);
219+
notify_msgbox_standalone("SC_Starter", "已保存到剪贴板", 2000);
220220
}
221221
}
222222
}

src/types.rs

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,14 @@ impl SettingsCollection {
229229
let launch_str = {
230230
if self.launch_valid() {
231231
format!(
232-
"\n Launch App Path: {}\n Launch App Args: <{}>",
233-
&self.path.launch_app.path.to_string_lossy(),
232+
"\n Launch App Path: {}\n Launch App Args: <{}>",
233+
&self
234+
.path
235+
.launch_app
236+
.path
237+
.display()
238+
.to_string()
239+
.trim_start_matches(r"\\?\"),
234240
{
235241
let temp = self.path.launch_app.args.join(" ");
236242
if temp.trim().is_empty() {
@@ -246,16 +252,18 @@ impl SettingsCollection {
246252
};
247253
format!(
248254
r#"Sundry:
249-
Save Path: {}{}
250-
Auto Startup: {}
251-
Comp Level: {}
252-
Scale Level: {}
255+
Save Path: {}{}
256+
Auto Startup: {}
257+
Show Notification: {}
258+
Comp Level: {}
259+
Scale Level: {}
253260
GUI:
254261
Normal: {}
255262
Long: {}"#,
256263
path_display(&self.path.save_path, "Manual Select"),
257264
launch_str,
258265
self.sundry.auto_start,
266+
self.sundry.notification,
259267
self.sundry.comp_level,
260268
self.sundry.scale_level,
261269
self.gui
@@ -595,6 +603,9 @@ fn path_display(path: &PathBuf, info: impl ToString) -> String {
595603
if path == &PathBuf::new() {
596604
info.to_string()
597605
} else {
598-
path.display().to_string()
606+
path.display()
607+
.to_string()
608+
.trim_start_matches(r"\\?\")
609+
.into()
599610
}
600611
}

0 commit comments

Comments
 (0)