5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 02:02:55 +08:00

Remove OpenContextMenu

This commit is contained in:
Lea Anthony 2024-06-01 15:03:14 +10:00
parent 45195d5bd6
commit 54140e9adb
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
2 changed files with 0 additions and 20 deletions

View File

@ -1094,25 +1094,6 @@ func (w *WebviewWindow) HandleDragAndDropMessage(filenames []string) {
}
}
func (w *WebviewWindow) OpenContextMenu(data *ContextMenuData) {
menu, ok := w.contextMenus[data.Id]
if !ok {
// try application level context menu
menu, ok = globalApplication.getContextMenu(data.Id)
if !ok {
w.Error("No context menu found for id: %s", data.Id)
return
}
}
menu.setContextData(data)
if w.impl == nil && !w.isDestroyed() {
return
}
InvokeSync(func() {
w.impl.openContextMenu(menu, data)
})
}
// RegisterContextMenu registers a context menu and assigns it the given name.
func (w *WebviewWindow) RegisterContextMenu(name string, menu *Menu) {
w.contextMenusLock.Lock()

View File

@ -44,7 +44,6 @@ type Window interface {
Minimise() Window
Name() string
On(eventType events.WindowEventType, callback func(event *WindowEvent)) func()
OpenContextMenu(data *ContextMenuData)
RegisterContextMenu(name string, menu *Menu)
RelativePosition() (int, int)
Reload()