ui/gtk/dnd.c

branch
newapi
changeset 174
0358f1d9c506
parent 164
1d912f78fd1d
child 253
087cc9216f28
--- a/ui/gtk/dnd.c	Sat Apr 15 21:06:45 2023 +0200
+++ b/ui/gtk/dnd.c	Mon May 22 16:17:26 2023 +0200
@@ -31,20 +31,20 @@
 #include <string.h>
 
 #include "dnd.h"
-#include <ucx/buffer.h>
+#include <cx/buffer.h>
 
 #ifdef UI_GTK2LEGACY
 static gboolean selection_data_set_uris(GtkSelectionData *selection_data, char **uris) {
-    UcxBuffer *buf = ucx_buffer_new(NULL, 1024, UCX_BUFFER_AUTOEXTEND);
+    CxBuffer *buf = cxBufferCreate(NULL, 1024, cxDefaultAllocator, CX_BUFFER_FREE_CONTENTS|CX_BUFFER_AUTO_EXTEND);
     char *uri;
     int i = 0;
     while((uri = uris[i]) != NULL) {
-        ucx_buffer_puts(buf, uri);
-        ucx_buffer_puts(buf, "\r\n");
+        cxBufferPutString(buf, uri);
+        cxBufferPutString(buf, "\r\n");
     }
     GdkAtom type = gdk_atom_intern("text/uri-list", FALSE);
     gtk_selection_data_set(selection_data, type, 8, (guchar*)buf->space, buf->pos);
-    ucx_buffer_free(buf);
+    cxBufferFree(buf);
     return TRUE;
 }
 static char** selection_data_get_uris(GtkSelectionData *selection_data) {

mercurial