Fix some mistakes

This commit is contained in:
李通洲
2022-10-09 17:47:30 +08:00
parent 661c174348
commit 6e190c6f7c
3 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ typedef struct FFFontResult
/**
* Linux / BSD: QT, GTK2, GTK3, GTK4
* MacOS: System, User, Monospace, Application
* Windows: Desktop, User, Unset, Unset
* Windows: Desktop, Unset, Unset, Unset
* Other: Unset, Unset, Unset, Unset
*/
FFstrbuf fonts[FF_DETECT_FONT_NUM_FONTS];
@@ -352,7 +352,8 @@ void ffDetectTerminalFontPlatform(const FFinstance* instance, const FFTerminalSh
detectFromGSettings(instance, "/com/gexperts/Tilix/profiles/", "com.gexperts.Tilix.ProfilesList", "com.gexperts.Tilix.Profile", terminalFont);
else if(ffStrbufIgnCaseCompS(&terminalShell->terminalProcessName, "gnome-terminal-") == 0)
detectFromGSettings(instance, "/org/gnome/terminal/legacy/profiles:/:", "org.gnome.Terminal.ProfilesList", "org.gnome.Terminal.Legacy.Profile", terminalFont);
else if(ffStrbufIgnCaseCompS(&terminalShell->terminalProcessName, "Windows Terminal") == 0)
else if(ffStrbufIgnCaseCompS(&terminalShell->terminalProcessName, "Windows Terminal") == 0 ||
ffStrbufIgnCaseCompS(&terminalShell->terminalProcessName, "WindowsTerminal.exe") == 0)
detectFromWindowsTeriminal(instance, terminalFont);
else if(ffStrbufIgnCaseCompS(&terminalShell->terminalProcessName, "mintty") == 0)
detectMintty(instance, terminalFont);
@@ -91,11 +91,11 @@ static uint32_t getTerminalInfo(FFTerminalShellResult* result, uint32_t pid)
ffStrbufSet(&result->terminalPrettyName, &result->terminalProcessName);
if(ffStrbufEndsWithIgnCaseS(&result->terminalPrettyName, ".exe"))
result->terminalProcessName.length -= 4;
ffStrbufSubstrBefore(&result->terminalPrettyName, result->terminalPrettyName.length - 4);
if(ffStrbufIgnCaseCompS(&result->terminalPrettyName, "WindowsTerminal"))
if(ffStrbufIgnCaseCompS(&result->terminalPrettyName, "WindowsTerminal") == 0)
ffStrbufSetS(&result->terminalPrettyName, "Windows Terminal");
else if(ffStrbufIgnCaseCompS(&result->terminalPrettyName, "conhost"))
else if(ffStrbufIgnCaseCompS(&result->terminalPrettyName, "conhost") == 0)
ffStrbufSetS(&result->terminalPrettyName, "Console Window Host");
return ppid;