brummer10 / guitarix

guitarix virtual versatile amplification for Jack/Linux
263 stars 29 forks source link

[Feature Request] As I user I want to download all "Online Presets" at once #139

Open relascope opened 9 months ago

relascope commented 9 months ago

Using and trying out many different banks is much click-wait-work in the beginning and also when you reinstall OS.

Having this feature can save a lot of boring work.

It would be just an iteration over the "Online Preset"-items, the download and the button.

I didn't have time to dig into the look-and-feel-usage of GTK in guitarix to find a place for the button, but for anybody, who wants it quick and dirty, I just modified PresetWindow::create_preset_menu() in gx_preset_window.cpp to add the line this->downloadPreset(presetMenu, f); It downloads every "Online Preset" found (and then shows the menu).

    for(std::vector<std::tuple<std::string,std::string,std::string> >::iterator it = olp.begin(); it != olp.end(); it++) {
        item = Gtk::manage(new Gtk::MenuItem(get<0>(*it), true));
        item->set_tooltip_text(get<2>(*it));
        std::string f = get<1>(*it);
        item->signal_activate().connect(
            sigc::bind(sigc::mem_fun(*this, &PresetWindow::downloadPreset),
               presetMenu, f));

        this->downloadPreset(presetMenu, f); ////////////////////////// QUICK AND DIRTY HACK

        presetMenu->append(*item);
    }
brummer10 commented 9 months ago

Maybe it could become a additional menu entry -> Download All