mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Added menu cloning.
Introduced the ability to clone a menu, along with its submenus, in Linux-based web applications to create a full deep copy. This fixes reusing the application menu for window menus.
This commit is contained in:
committed by
Travis McLane
parent
758c4c2c8d
commit
a048233f4c
@@ -37,14 +37,6 @@ type linuxWebviewWindow struct {
|
||||
gtkmenu pointer
|
||||
}
|
||||
|
||||
func (w *linuxWebviewWindow) setMinimiseButtonEnabled(enabled bool) {
|
||||
// Not available in Linux
|
||||
}
|
||||
|
||||
func (w *linuxWebviewWindow) setMaximiseButtonEnabled(enabled bool) {
|
||||
// Not available in Linux
|
||||
}
|
||||
|
||||
var (
|
||||
registered bool = false // avoid 'already registered message' about 'wails://'
|
||||
)
|
||||
@@ -276,7 +268,7 @@ func (w *linuxWebviewWindow) run() {
|
||||
w.gtkmenu = (menu.impl).(*linuxMenu).native
|
||||
}
|
||||
|
||||
w.window, w.webview, w.vbox = windowNew(app.application, menu, w.parent.id, w.parent.options.Linux.WebviewGpuPolicy)
|
||||
w.window, w.webview, w.vbox = windowNew(app.application, w.gtkmenu, w.parent.id, w.parent.options.Linux.WebviewGpuPolicy)
|
||||
app.registerWindow(w.window, w.parent.id) // record our mapping
|
||||
w.connectSignals()
|
||||
if w.parent.options.EnableDragAndDrop {
|
||||
|
||||
Reference in New Issue
Block a user