ui/gtk/dnd.c

changeset 164
1d912f78fd1d
parent 157
0b33b9396851
child 174
0358f1d9c506
equal deleted inserted replaced
163:b70e2a77dea0 164:1d912f78fd1d
54 #define gtk_selection_data_set_uris selection_data_set_uris 54 #define gtk_selection_data_set_uris selection_data_set_uris
55 #define gtk_selection_data_get_uris selection_data_get_uris 55 #define gtk_selection_data_get_uris selection_data_get_uris
56 #endif 56 #endif
57 57
58 void ui_selection_settext(UiSelection *sel, char *str, int len) { 58 void ui_selection_settext(UiSelection *sel, char *str, int len) {
59 if(!gtk_selection_data_set_text(sel->data, str, len)); 59 // TODO: handle error?
60 gtk_selection_data_set_text(sel->data, str, len);
60 } 61 }
61 62
62 void ui_selection_seturis(UiSelection *sel, char **uris, int nelm) { 63 void ui_selection_seturis(UiSelection *sel, char **uris, int nelm) {
63 char **uriarray = calloc(nelm+1, sizeof(char*)); 64 char **uriarray = calloc(nelm+1, sizeof(char*));
64 for(int i=0;i<nelm;i++) { 65 for(int i=0;i<nelm;i++) {

mercurial