v2.2.3 Fixed Chinese input and gtk3 issues for linux packaging

This commit is contained in:
杨红岩 2023-01-06 19:32:46 +08:00
parent 69e03ee8a2
commit 05c4895457
3 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ func main() {
})
})
//在SetBrowserInit中设置cookie事件,这些事件将返回操作后的结果
cef.BrowserWindow.SetBrowserInit(func(event *cef.BrowserEvent, browserWindow cef.ILCLBrowserWindow) {
cef.BrowserWindow.SetBrowserInit(func(event *cef.BrowserEvent, browserWindow cef.IBrowserWindow) {
//获取cookie时触发
event.SetOnCookiesVisited(func(sender lcl.IObject, cookie *cef.ICefCookie) {
fmt.Printf("SetOnCookiesVisited: %+v\n", cookie)

View File

@ -27,10 +27,10 @@ func main() {
//指定一个URL地址或本地html文件目录
cef.BrowserWindow.Config.Url = "http://localhost:22022/download.html"
//在主窗口初始化回调函数里设置浏览器事件
cef.BrowserWindow.SetBrowserInit(func(event *cef.BrowserEvent, browserWindow cef.ILCLBrowserWindow) {
cef.BrowserWindow.SetBrowserInit(func(event *cef.BrowserEvent, browserWindow cef.IBrowserWindow) {
//linux 下载文件 系统弹出保存对话框不启作用
//所以 自己调用系统的保存对话框获得保存路径
linuxDlSave := lcl.NewSaveDialog(browserWindow.BrowserWindow())
linuxDlSave := lcl.NewSaveDialog(browserWindow.AsLCLBrowserWindow().BrowserWindow())
linuxDlSave.SetTitle("保存对话框标题")
//下载之前事件

View File

@ -21,7 +21,7 @@ func main() {
cef.BrowserWindow.Config.Title = "Energy - Key Event"
cef.BrowserWindow.Config.Icon = "resources/icon.ico"
//在主窗口初始化回调函数里设置浏览器事件
cef.BrowserWindow.SetBrowserInit(func(event *cef.BrowserEvent, browserWindow *cef.LCLBrowserWindow) {
cef.BrowserWindow.SetBrowserInit(func(event *cef.BrowserEvent, browserWindow cef.IBrowserWindow) {
event.SetOnKeyEvent(func(sender lcl.IObject, browser *cef.ICefBrowser, event *cef.TCefKeyEvent, result *bool) {
fmt.Printf("%s %+v\n", string(rune(event.Character)), event)
})