ui.backend.gtk: add destructor in clipboard-contents

Anton Gorenko 2010-06-13 16:18:51 +06:00
parent 205aa25865
commit 95d9002e73
2 changed files with 5 additions and 1 deletions

View File

@ -72,6 +72,7 @@ IMPLEMENT-STRUCTS: GPollFD GSource GSourceFuncs ;
GIR: vocab:glib/GLib-2.0.gir
DESTRUCTOR: g_source_unref
DESTRUCTOR: g_free
CALLBACK: gboolean GSourceFuncsPrepareFunc ( GSource* source, gint* timeout_ ) ;
CALLBACK: gboolean GSourceFuncsCheckFunc ( GSource* source ) ;

View File

@ -466,7 +466,10 @@ M:: gtk-ui-backend system-alert ( caption text -- )
[ gtk_widget_destroy ] tri ;
M: gtk-clipboard clipboard-contents
handle>> gtk_clipboard_wait_for_text utf8 alien>string ;
[
handle>> gtk_clipboard_wait_for_text
[ &g_free utf8 alien>string ] [ f ] if*
] with-destructors ;
M: gtk-clipboard set-clipboard-contents
swap [ handle>> ] [ utf8 string>alien ] bi*