refill library download dialog on show
This commit is contained in:
parent
d7a88eecb1
commit
980404d73c
@ -74,9 +74,6 @@ LibraryDownloadDialog::LibraryDownloadDialog ()
|
||||
description_view.set_wrap_mode (Gtk::WRAP_WORD);
|
||||
get_vbox()->pack_start (description_view);
|
||||
|
||||
ARDOUR::LibraryFetcher lf;
|
||||
lf.get_descriptions ();
|
||||
lf.foreach_description (boost::bind (&LibraryDownloadDialog::add_library, this, _1));
|
||||
}
|
||||
|
||||
LibraryDownloadDialog::~LibraryDownloadDialog ()
|
||||
@ -84,6 +81,26 @@ LibraryDownloadDialog::~LibraryDownloadDialog ()
|
||||
delete inflater;
|
||||
}
|
||||
|
||||
void
|
||||
LibraryDownloadDialog::refill ()
|
||||
{
|
||||
ARDOUR::LibraryFetcher lf;
|
||||
lf.get_descriptions ();
|
||||
|
||||
if (lf.n_descriptions()) {
|
||||
_model->clear ();
|
||||
}
|
||||
|
||||
lf.foreach_description (boost::bind (&LibraryDownloadDialog::add_library, this, _1));
|
||||
}
|
||||
|
||||
void
|
||||
LibraryDownloadDialog::on_show ()
|
||||
{
|
||||
ArdourDialog::on_show ();
|
||||
refill ();
|
||||
}
|
||||
|
||||
void
|
||||
LibraryDownloadDialog::library_selected ()
|
||||
{
|
||||
|
@ -47,6 +47,7 @@ class LibraryDownloadDialog : public ArdourDialog
|
||||
~LibraryDownloadDialog ();
|
||||
|
||||
void add_library (ARDOUR::LibraryDescription const &);
|
||||
void on_show ();
|
||||
|
||||
private:
|
||||
class LibraryColumns : public Gtk::TreeModelColumnRecord {
|
||||
@ -115,6 +116,7 @@ class LibraryDownloadDialog : public ArdourDialog
|
||||
|
||||
Gtk::TextView description_view;
|
||||
void library_selected ();
|
||||
void refill ();
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user