diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-04 13:39:33 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-04 13:39:33 -0400 |
| commit | 0ac40be173f9a1410c5149da605ffd1db24fc911 (patch) | |
| tree | c4489c16c36bcba5bb85888615895d43b8f0fa06 /redo/control_unix.go | |
| parent | 0496cf77b52e1713749fe40a8ef1b22f4918ad1d (diff) | |
Removed Control.containerShow() and Control.containerHide() and the overall ability to show and hide Controls in general; too much effort to get right.
Diffstat (limited to 'redo/control_unix.go')
| -rw-r--r-- | redo/control_unix.go | 15 |
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) } |
