refactor(browser): complete workspace_pane_ops.go migration to gotk4
Fix remaining webkit widget calls that were missed in previous migration.
- commit
- f92f507f5393108d0f6c3e7e159ea275af2381f7
- author
- bamen · · 2025-10-09 05:41 UTC
- parent
- 364f051
- signature
- unsigned
1 file · +6 -6
M internal/app/browser/workspace_pane_ops.go +6 -6
| @@ -313,18 +313,18 @@ func (wm *WorkspaceManager) insertPopupPane(target *paneNode, newPane *BrowserPa | |||
| 313 | 313 | } | |
| 314 | 314 | ||
| 315 | 315 | newContainer := newPane.webView.RootWidget() | |
| 316 | - | if newContainer == 0 { | |
| 316 | + | if newContainer == nil { | |
| 317 | 317 | return errors.New("new pane missing container") | |
| 318 | 318 | } | |
| 319 | 319 | ||
| 320 | - | webkit.WidgetSetHExpand(newContainer, true) | |
| 321 | - | webkit.WidgetSetVExpand(newContainer, true) | |
| 322 | - | webkit.WidgetRealizeInContainer(newContainer) | |
| 320 | + | newContainer.SetHExpand(true) | |
| 321 | + | newContainer.SetVExpand(true) | |
| 322 | + | newContainer.Realize() | |
| 323 | 323 | ||
| 324 | 324 | // Also realize the WebView widget itself for proper popup rendering | |
| 325 | 325 | webViewWidget := newPane.webView.Widget() | |
| 326 | - | if webViewWidget != 0 { | |
| 327 | - | webkit.WidgetRealizeInContainer(webViewWidget) | |
| 326 | + | if webViewWidget != nil { | |
| 327 | + | webViewWidget.Realize() | |
| 328 | 328 | } | |
| 329 | 329 | ||
| 330 | 330 | // CRITICAL: Handle stacked panes correctly - same logic as splitNode | |
| @@ -313,18 +313,18 @@ func (wm *WorkspaceManager) insertPopupPane(target *paneNode, newPane *BrowserPa | |||||
| 313 | } | 313 | } | ||
| 314 | 314 | ||||
| 315 | newContainer := newPane.webView.RootWidget() | 315 | newContainer := newPane.webView.RootWidget() | ||
| 316 | - | if newContainer == 0 { | 316 | + | if newContainer == nil { |
| 317 | return errors.New("new pane missing container") | 317 | return errors.New("new pane missing container") | ||
| 318 | } | 318 | } | ||
| 319 | 319 | ||||
| 320 | - | webkit.WidgetSetHExpand(newContainer, true) | 320 | + | newContainer.SetHExpand(true) |
| 321 | - | webkit.WidgetSetVExpand(newContainer, true) | 321 | + | newContainer.SetVExpand(true) |
| 322 | - | webkit.WidgetRealizeInContainer(newContainer) | 322 | + | newContainer.Realize() |
| 323 | 323 | ||||
| 324 | // Also realize the WebView widget itself for proper popup rendering | 324 | // Also realize the WebView widget itself for proper popup rendering | ||
| 325 | webViewWidget := newPane.webView.Widget() | 325 | webViewWidget := newPane.webView.Widget() | ||
| 326 | - | if webViewWidget != 0 { | 326 | + | if webViewWidget != nil { |
| 327 | - | webkit.WidgetRealizeInContainer(webViewWidget) | 327 | + | webViewWidget.Realize() |
| 328 | } | 328 | } | ||
| 329 | 329 | ||||
| 330 | // CRITICAL: Handle stacked panes correctly - same logic as splitNode | 330 | // CRITICAL: Handle stacked panes correctly - same logic as splitNode | ||