forked from wxbool/video-srt-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.修复个别中文视频识别错误问题 2.支持输出翻译进度,优化翻译机制 3.优化软件日志输出机制
- Loading branch information
Showing
5 changed files
with
109 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
package app | ||
|
||
import "strings" | ||
import ( | ||
"github.com/lxn/walk" | ||
) | ||
|
||
type TaskLog struct { | ||
content []string | ||
TextEdit *walk.TextEdit | ||
} | ||
|
||
func NewTasklog() *TaskLog { | ||
func NewTasklog(textEdit *walk.TextEdit) *TaskLog { | ||
task := new(TaskLog) | ||
task.TextEdit = textEdit | ||
return task | ||
} | ||
|
||
func (t *TaskLog) AppendLogText(s string) { | ||
t.content = append(t.content , s) | ||
func (t *TaskLog) SetTextEdit(textEdit *walk.TextEdit) { | ||
t.TextEdit = textEdit | ||
} | ||
|
||
func (t *TaskLog) ClearLogText() { | ||
t.content = []string{} | ||
func (t *TaskLog) AppendLogText(s string) { | ||
t.TextEdit.AppendText(s + "\r\n") | ||
} | ||
|
||
func (t *TaskLog) GetString() string { | ||
return strings.Join(t.content , "\r\n") | ||
} | ||
func (t *TaskLog) ClearLogText() { | ||
t.TextEdit.SetText("") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters