summaryrefslogtreecommitdiff
path: root/redo/control_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'redo/control_unix.go')
-rw-r--r--redo/control_unix.go15
1 files changed, 4 insertions, 11 deletions
diff --git a/redo/control_unix.go b/redo/control_unix.go
index 715e3d3..2c27b1b 100644
--- a/redo/control_unix.go
+++ b/redo/control_unix.go
@@ -22,17 +22,10 @@ type controlParent struct {
}
func basesetParent(c controlPrivate, p *controlParent) {
- C.gtk_container_add(p.c, c.widget())
+ widget := c.widget() // avoid multiple interface lookups
+ C.gtk_container_add(p.c, widget)
// make sure the new widget is shown if not explicitly hidden
- c.containerShow()
-}
-
-func basecontainerShow(c controlPrivate) {
- C.gtk_widget_show_all(c.widget())
-}
-
-func basecontainerHide(c controlPrivate) {
- C.gtk_widget_hide(c.widget())
+ C.gtk_widget_show_all(widget)
}
func basepreferredSize(c controlPrivate, d *sizing) (int, int) {
@@ -103,7 +96,7 @@ func newScroller(widget *C.GtkWidget, native bool) *scroller {
func (s *scroller) setParent(p *controlParent) {
C.gtk_container_add(p.c, s.scrollwidget)
- // TODO for when hiding/showing is implemented
+ // see basesetParent() above for why we call gtk_widget_show_all()
C.gtk_widget_show_all(s.scrollwidget)
}