mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Fix sensitivity of Tag-reset-button and row activation
This commit is contained in:
parent
d97973925d
commit
fa55e1627a
2 changed files with 9 additions and 1 deletions
|
|
@ -267,7 +267,7 @@ PluginSelector::PluginSelector (PluginManager& mgr)
|
||||||
tag_entry = manage (new Gtk::Entry);
|
tag_entry = manage (new Gtk::Entry);
|
||||||
tag_entry_connection = tag_entry->signal_changed().connect (sigc::mem_fun (*this, &PluginSelector::tag_entry_changed));
|
tag_entry_connection = tag_entry->signal_changed().connect (sigc::mem_fun (*this, &PluginSelector::tag_entry_changed));
|
||||||
|
|
||||||
Gtk::Button* tag_reset_button = manage (new Button (_("Reset")));
|
tag_reset_button = manage (new Button (_("Reset")));
|
||||||
tag_reset_button->signal_clicked().connect (sigc::mem_fun (*this, &PluginSelector::tag_reset_button_clicked));
|
tag_reset_button->signal_clicked().connect (sigc::mem_fun (*this, &PluginSelector::tag_reset_button_clicked));
|
||||||
|
|
||||||
Gtk::Label* tagging_help_label1 = manage (new Label(
|
Gtk::Label* tagging_help_label1 = manage (new Label(
|
||||||
|
|
@ -331,6 +331,7 @@ PluginSelector::PluginSelector (PluginManager& mgr)
|
||||||
plugin_display.grab_focus();
|
plugin_display.grab_focus();
|
||||||
|
|
||||||
build_plugin_menu ();
|
build_plugin_menu ();
|
||||||
|
display_selection_changed ();
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginSelector::~PluginSelector ()
|
PluginSelector::~PluginSelector ()
|
||||||
|
|
@ -699,6 +700,10 @@ PluginSelector::load_plugin (PluginInfoPtr pi)
|
||||||
void
|
void
|
||||||
PluginSelector::btn_add_clicked()
|
PluginSelector::btn_add_clicked()
|
||||||
{
|
{
|
||||||
|
if (plugin_display.get_selection()->count_selected_rows() == 0) {
|
||||||
|
/* may happen with ctrl + double-click un-selecting but activating a row */
|
||||||
|
return;
|
||||||
|
}
|
||||||
std::string name;
|
std::string name;
|
||||||
PluginInfoPtr pi;
|
PluginInfoPtr pi;
|
||||||
TreeModel::Row newrow = *(amodel->append());
|
TreeModel::Row newrow = *(amodel->append());
|
||||||
|
|
@ -739,12 +744,14 @@ PluginSelector::display_selection_changed()
|
||||||
tag_entry->set_text (tags);
|
tag_entry->set_text (tags);
|
||||||
|
|
||||||
tag_entry->set_sensitive (true);
|
tag_entry->set_sensitive (true);
|
||||||
|
tag_reset_button->set_sensitive (true);
|
||||||
btn_add->set_sensitive (true);
|
btn_add->set_sensitive (true);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
tag_entry->set_text ("");
|
tag_entry->set_text ("");
|
||||||
|
|
||||||
tag_entry->set_sensitive (false);
|
tag_entry->set_sensitive (false);
|
||||||
|
tag_reset_button->set_sensitive (false);
|
||||||
btn_add->set_sensitive (false);
|
btn_add->set_sensitive (false);
|
||||||
}
|
}
|
||||||
tag_entry_connection.unblock ();
|
tag_entry_connection.unblock ();
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,7 @@ private:
|
||||||
Gtk::Button search_clear_button;
|
Gtk::Button search_clear_button;
|
||||||
|
|
||||||
Gtk::Entry *tag_entry;
|
Gtk::Entry *tag_entry;
|
||||||
|
Gtk::Button* tag_reset_button;
|
||||||
void tag_reset_button_clicked ();
|
void tag_reset_button_clicked ();
|
||||||
|
|
||||||
void set_sensitive_widgets();
|
void set_sensitive_widgets();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue