Project

General

Profile

search-tool-dnd.patch

Paul Franke, August 13, 2016 11:33

View differences:

src/search-tool/search-tool.cc
647 647
    gtk_menu_popup ((GtkMenu *) menu, nullptr, nullptr, nullptr, nullptr, event->button, event->time);
648 648
}
649 649

  
650
static Index<char> list_get_data (void * user)
651
{
652
    if (search_pending)
653
        search_timeout ();
654

  
655
    int list = aud_playlist_by_unique_id (playlist_id);
656
    int n_items = items.len ();
657

  
658
    Index<char> buf;
659

  
660
    for (int i = 0; i < n_items; i ++)
661
    {
662
        if (! selection[i])
663
            continue;
664

  
665
        const Item * item = items[i];
666

  
667
        for (int entry : item->matches)
668
        {
669
            if (buf.len ())
670
                buf.append ('\n');
671

  
672
            String filename = aud_playlist_entry_get_filename (list, entry);
673

  
674
            buf.insert (filename, -1, strlen (filename));
675
        }
676
    }
677

  
678
    return buf;
679
}
680

  
681
void list_receive_data (void * user, int row, const char * data, int len)
682
{
683
}
684

  
650 685
static const AudguiListCallbacks list_callbacks = {
651 686
    list_get_value,
652 687
    list_get_selected,
653 688
    list_set_selected,
654 689
    list_select_all,
655 690
    list_activate_row,
656
    list_right_click
691
    list_right_click,
692
    nullptr,  // shift_rows
693
    "text/uri-list",
694
    list_get_data,
695
    list_receive_data
657 696
};
658 697

  
659 698
static void entry_cb (GtkEntry * entry, void * unused)
660
-