detached 143d1f0

refactor(browser): migrate workspace_popup.go to gotk4 API

commit
143d1f0be16b8b7370a4e9b433846cd0a6f27800
author
bamen · · 2025-10-09 05:23 UTC
parent
a6a793c
signature
unsigned
1 file · +9 -8
M internal/app/browser/workspace_popup.go +9 -8
@@ -9,6 +9,7 @@ import (
99
1010 "github.com/bnema/dumber/internal/app/messaging"
1111 "github.com/bnema/dumber/pkg/webkit"
12+ "github.com/diamondburned/gotk4/pkg/gtk/v4"
1213 )
1314
1415 const (
@@ -715,17 +716,17 @@ func (wm *WorkspaceManager) applyPopupSizeConstraints(view *webkit.WebView, widt
715716 }
716717
717718 // Apply to container
718- if container := view.RootWidget(); container != 0 && webkit.WidgetIsValid(container) {
719- webkit.WidgetSetSizeRequest(container, minWidth, minHeight)
720- webkit.WidgetQueueResize(container)
721- log.Printf("[workspace] Applied minimum size %dx%d to popup container=%#x", minWidth, minHeight, container)
719+ if container := view.RootWidget(); container != nil {
720+ container.SetSizeRequest(minWidth, minHeight)
721+ container.QueueResize()
722+ log.Printf("[workspace] Applied minimum size %dx%d to popup container=%p", minWidth, minHeight, container)
722723 }
723724
724725 // Apply to WebView widget
725- if webViewWidget := view.Widget(); webViewWidget != 0 && webkit.WidgetIsValid(webViewWidget) {
726- webkit.WidgetSetSizeRequest(webViewWidget, minWidth, minHeight)
727- webkit.WidgetQueueResize(webViewWidget)
728- log.Printf("[workspace] Applied minimum size %dx%d to popup webview=%#x", minWidth, minHeight, webViewWidget)
726+ if webViewWidget := view.Widget(); webViewWidget != nil {
727+ webViewWidget.SetSizeRequest(minWidth, minHeight)
728+ webViewWidget.QueueResize()
729+ log.Printf("[workspace] Applied minimum size %dx%d to popup webview=%p", minWidth, minHeight, webViewWidget)
729730 }
730731 }
731732
@@ -9,6 +9,7 @@ import (
9 9
10 "github.com/bnema/dumber/internal/app/messaging"10 "github.com/bnema/dumber/internal/app/messaging"
11 "github.com/bnema/dumber/pkg/webkit"11 "github.com/bnema/dumber/pkg/webkit"
12+ "github.com/diamondburned/gotk4/pkg/gtk/v4"
12 )13 )
13 14
14 const (15 const (
@@ -715,17 +716,17 @@ func (wm *WorkspaceManager) applyPopupSizeConstraints(view *webkit.WebView, widt
715 }716 }
716 717
717 // Apply to container718 // Apply to container
718- if container := view.RootWidget(); container != 0 && webkit.WidgetIsValid(container) {719+ if container := view.RootWidget(); container != nil {
719- webkit.WidgetSetSizeRequest(container, minWidth, minHeight)720+ container.SetSizeRequest(minWidth, minHeight)
720- webkit.WidgetQueueResize(container)721+ container.QueueResize()
721- log.Printf("[workspace] Applied minimum size %dx%d to popup container=%#x", minWidth, minHeight, container)722+ log.Printf("[workspace] Applied minimum size %dx%d to popup container=%p", minWidth, minHeight, container)
722 }723 }
723 724
724 // Apply to WebView widget725 // Apply to WebView widget
725- if webViewWidget := view.Widget(); webViewWidget != 0 && webkit.WidgetIsValid(webViewWidget) {726+ if webViewWidget := view.Widget(); webViewWidget != nil {
726- webkit.WidgetSetSizeRequest(webViewWidget, minWidth, minHeight)727+ webViewWidget.SetSizeRequest(minWidth, minHeight)
727- webkit.WidgetQueueResize(webViewWidget)728+ webViewWidget.QueueResize()
728- log.Printf("[workspace] Applied minimum size %dx%d to popup webview=%#x", minWidth, minHeight, webViewWidget)729+ log.Printf("[workspace] Applied minimum size %dx%d to popup webview=%p", minWidth, minHeight, webViewWidget)
729 }730 }
730 }731 }
731 732

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close