diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-22 11:39:45 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-22 11:39:45 -0400 |
| commit | 51892c3b7f9a81049607e154e5e2eaad5b93e627 (patch) | |
| tree | cf2d88816de96e8a85e3dc94187110683490cadb /redo/area_unix.go | |
| parent | a48126cec795c08244fa83cbfe71b734c58fae2f (diff) | |
Fixed some flaws in GTK+ Area.OpenTextFieldAt().
Diffstat (limited to 'redo/area_unix.go')
| -rw-r--r-- | redo/area_unix.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/redo/area_unix.go b/redo/area_unix.go index ed52beb..ae64c83 100644 --- a/redo/area_unix.go +++ b/redo/area_unix.go @@ -85,7 +85,7 @@ func newArea(ab *areabase) Area { area_textfield_focus_out_event_callback, C.gpointer(unsafe.Pointer(a))) // the widget shows up initially - C.gtk_widget_hide(a.textfieldw) + C.gtk_widget_set_no_show_all(a.textfieldw, C.TRUE) return a } @@ -115,6 +115,8 @@ func (a *area) OpenTextFieldAt(x, y int) { a.textfieldx = x a.textfieldy = y a.SetTextFieldText("") + // we disabled this for the initial Area show; we don't need to anymore + C.gtk_widget_set_no_show_all(a.textfieldw, C.FALSE) C.gtk_widget_show_all(a.textfieldw) C.gtk_widget_grab_focus(a.textfieldw) } @@ -152,6 +154,7 @@ var area_get_child_position_callback = C.GCallback(C.our_area_get_child_position func our_area_textfield_focus_out_event_callback(widget *C.GtkWidget, event *C.GdkEvent, data C.gpointer) C.gboolean { a := (*area)(unsafe.Pointer(data)) C.gtk_widget_hide(a.textfieldw) + a.textfielddone.fire() return continueEventChain } |
