13
0

PM-UI: show plugin install path in file-browser

This is currently only available in debug builds,
re-arranging plugin files/bundles is not something
that should happen while Mixbus is running.
This commit is contained in:
Robin Gareus 2021-07-13 21:00:23 +02:00
parent d69d918580
commit 30811989ef
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 32 additions and 1 deletions

View File

@ -23,6 +23,7 @@
#include <cassert>
#include <gtkmm/frame.h>
#include "pbd/openuri.h"
#include "pbd/unwind.h"
#include "ardour/types_convert.h"
@ -135,7 +136,7 @@ PluginManagerUI::PluginManagerUI ()
plugin_display.get_selection()->set_mode (Gtk::SELECTION_SINGLE);
plugin_display.get_selection()->signal_changed().connect (sigc::mem_fun(*this, &PluginManagerUI::selection_changed));
//plugin_display.signal_row_activated().connect_notify (sigc::mem_fun(*this, &PluginManagerUI::row_activated));
plugin_display.signal_row_activated().connect_notify (sigc::mem_fun(*this, &PluginManagerUI::row_activated));
_scroller.add (plugin_display);
_scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
@ -449,6 +450,35 @@ PluginManagerUI::selection_changed ()
}
}
void
PluginManagerUI::row_activated (Gtk::TreeModel::Path const& p, Gtk::TreeViewColumn*)
{
#ifndef NDEBUG
Gtk::TreeModel::iterator iter = plugin_model->get_iter (p);
if (!iter) {
return;
}
boost::shared_ptr<PluginScanLogEntry> const& psle ((*iter)[plugin_columns.psle]);
switch (psle->type ()) {
case Windows_VST:
case LXVST:
case MacVST:
case LADSPA:
PBD::open_folder (Glib::path_get_dirname (psle->path ()));
break;
case VST3:
PBD::open_folder (psle->path ());
break;
case AudioUnit:
case LV2:
default:
printf ("%s\n", psle->path ().c_str());
break;
}
#endif
}
void
PluginManagerUI::blacklist_changed (std::string const& path)
{

View File

@ -49,6 +49,7 @@ private:
void blacklist_changed (std::string const&);
void favorite_changed (std::string const&);
void hidden_changed (std::string const&);
void row_activated (Gtk::TreeModel::Path const&, Gtk::TreeViewColumn*);
void rescan_all ();
void rescan_faulty ();