static void receive_data (void * user, gint row, const void * data, gint length) { gchar * text = g_malloc (length + 1); memcpy (text, data, length); text[length] = 0; audgui_urilist_insert (((PlaylistWidgetData *) user)->list, row, text); g_free (text); }
void playlist_paste (void) { gchar * text = gtk_clipboard_wait_for_text (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD)); if (! text) return; gint list = aud_playlist_get_active (); audgui_urilist_insert (list, playlist_get_focus (list), text); g_free (text); }
static void receive_data (void * user, int row, const void * data, int length) { SNCOPY (text, data, length); audgui_urilist_insert (((PlaylistWidgetData *) user)->list, row, text); }