ui.backend.gtk: add destructor in clipboard-contents
parent
205aa25865
commit
95d9002e73
|
|
@ -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 ) ;
|
||||
|
|
|
|||
|
|
@ -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*
|
||||
|
|
|
|||
Loading…
Reference in New Issue