diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-02 13:13:16 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-02 13:13:16 -0400 |
| commit | 726f047655dfed143918fca1539a972aa4738466 (patch) | |
| tree | 720f2f7ad8df00e6b34173c3dda2aa505660ce63 /gtkcalls_unix.go | |
| parent | e28dff429dfa622e89c2a1460fba07b409dad611 (diff) | |
Null-terminated the GtkLayout stylesheet string. This will be handy for consolidating all the GTK+ stylesheet stuff into a single Go-side init function. (Thanks to mischief, nsf, and dsal in irc.badnik.net/#go-nuts for confirming that this is valid.)
Diffstat (limited to 'gtkcalls_unix.go')
| -rw-r--r-- | gtkcalls_unix.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtkcalls_unix.go b/gtkcalls_unix.go index 21b46b9..72b0dfe 100644 --- a/gtkcalls_unix.go +++ b/gtkcalls_unix.go @@ -96,14 +96,14 @@ func gtk_window_get_size(window *C.GtkWidget) (int, int) { var gtkLayoutCSS = []byte(`GtkLayout { background-color: transparent; } -`) +` + "\000") func makeTransparent(layout *C.GtkWidget) { var err *C.GError = nil provider := C.gtk_css_provider_new() added := C.gtk_css_provider_load_from_data(provider, - (*C.gchar)(unsafe.Pointer(>kLayoutCSS[0])), C.gssize(len(gtkLayoutCSS)), &err) + (*C.gchar)(unsafe.Pointer(>kLayoutCSS[0])), -1, &err) if added == C.FALSE { message := fromgstr(err.message) panic(fmt.Errorf("error loading transparent background CSS for GtkLayout: %s", message)) |
