summaryrefslogtreecommitdiff
path: root/callbacks_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-08 11:50:11 -0400
committerPietro Gagliardi <[email protected]>2014-06-08 11:50:11 -0400
commit10f55564d0770ca5d5803026f6c3190c3b2fdd69 (patch)
treee65e36b44588e2e548fa7bda90f46776781851da /callbacks_unix.go
parent54966a38238b0c72412fee2778a1a62a3c84df9c (diff)
Fixed modality issues on the GTK+ MsgBox() changes. The system introduced here has the advantage of scaling out to all other types of dialogs.
Diffstat (limited to 'callbacks_unix.go')
-rw-r--r--callbacks_unix.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/callbacks_unix.go b/callbacks_unix.go
index 8c441e1..cef088b 100644
--- a/callbacks_unix.go
+++ b/callbacks_unix.go
@@ -67,6 +67,12 @@ func g_signal_connect(obj *C.GtkWidget, sig string, callback C.GCallback, sysDat
C.gSignalConnect(obj, csig, callback, unsafe.Pointer(sysData))
}
+func g_signal_connect_pointer(obj *C.GtkWidget, sig string, callback C.GCallback, p unsafe.Pointer) {
+ csig := C.CString(sig)
+ defer C.free(unsafe.Pointer(csig))
+ C.gSignalConnect(obj, csig, callback, p)
+}
+
// there are two issues we solve here:
// 1) we need to make sure the uitask request gets garbage collected when we're done so as to not waste memory, but only when we're done so as to not have craziness happen
// 2) we need to make sure one idle function runs and finishes running before we start the next; otherwise we could wind up with weird things like the ret channel being closed early