Hint that plugin-scan may wait for user-interaction after 30sec
This commit is contained in:
parent
1ef0c49aee
commit
4d15326a78
@ -54,7 +54,12 @@ PluginScanDialog::PluginScanDialog (bool just_cached, bool v, Gtk::Window* paren
|
|||||||
vbox->set_size_request(400,-1);
|
vbox->set_size_request(400,-1);
|
||||||
|
|
||||||
message.set_padding (12, 12);
|
message.set_padding (12, 12);
|
||||||
|
timeout_info.set_padding (12, 12);
|
||||||
vbox->pack_start (message);
|
vbox->pack_start (message);
|
||||||
|
vbox->pack_start (timeout_info);
|
||||||
|
|
||||||
|
timeout_info.set_markup (string_compose ("<span weight=\"bold\">%1</span>", _("Scan takes a long time, check for popup dialogs.")));
|
||||||
|
timeout_info.set_no_show_all ();
|
||||||
|
|
||||||
cancel_button.set_name ("EditorGTKButton");
|
cancel_button.set_name ("EditorGTKButton");
|
||||||
cancel_button.signal_clicked().connect (sigc::mem_fun (*this, &PluginScanDialog::cancel_plugin_scan));
|
cancel_button.signal_clicked().connect (sigc::mem_fun (*this, &PluginScanDialog::cancel_plugin_scan));
|
||||||
@ -187,10 +192,14 @@ PluginScanDialog::plugin_scan_timeout (int timeout)
|
|||||||
|
|
||||||
if (timeout > 0) {
|
if (timeout > 0) {
|
||||||
pbar.set_sensitive (true);
|
pbar.set_sensitive (true);
|
||||||
|
if (timeout < scan_timeout / 2 || (scan_timeout - timeout) > 300) {
|
||||||
|
timeout_info.show ();
|
||||||
|
}
|
||||||
if (timeout < scan_timeout) {
|
if (timeout < scan_timeout) {
|
||||||
pbar.set_text(_("Scan Timeout"));
|
pbar.set_text(_("Scan Timeout"));
|
||||||
} else {
|
} else {
|
||||||
pbar.set_text(_("Scanning"));
|
pbar.set_text(_("Scanning"));
|
||||||
|
timeout_info.hide ();
|
||||||
}
|
}
|
||||||
timeout_button.set_sensitive (timeout < scan_timeout);
|
timeout_button.set_sensitive (timeout < scan_timeout);
|
||||||
all_timeout_button.set_sensitive (timeout < scan_timeout);
|
all_timeout_button.set_sensitive (timeout < scan_timeout);
|
||||||
@ -202,11 +211,15 @@ PluginScanDialog::plugin_scan_timeout (int timeout)
|
|||||||
pbar.pulse ();
|
pbar.pulse ();
|
||||||
timeout_button.set_sensitive (false);
|
timeout_button.set_sensitive (false);
|
||||||
tbox.show();
|
tbox.show();
|
||||||
|
if (timeout <= -300) {
|
||||||
|
timeout_info.show ();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
pbar.set_sensitive (false);
|
pbar.set_sensitive (false);
|
||||||
timeout_button.set_sensitive (false);
|
timeout_button.set_sensitive (false);
|
||||||
all_timeout_button.set_sensitive (false);
|
all_timeout_button.set_sensitive (false);
|
||||||
tbox.hide();
|
tbox.hide();
|
||||||
|
timeout_info.hide ();
|
||||||
}
|
}
|
||||||
|
|
||||||
ARDOUR_UI::instance()->gui_idle_handler ();
|
ARDOUR_UI::instance()->gui_idle_handler ();
|
||||||
@ -217,6 +230,8 @@ PluginScanDialog::message_handler (std::string type, std::string plugin, bool ca
|
|||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::GuiStartup, string_compose (X_("plugin scan message: %1 cancel? %2\n"), type, can_cancel));
|
DEBUG_TRACE (DEBUG::GuiStartup, string_compose (X_("plugin scan message: %1 cancel? %2\n"), type, can_cancel));
|
||||||
|
|
||||||
|
timeout_info.hide ();
|
||||||
|
|
||||||
if (type == X_("closeme") && !is_mapped()) {
|
if (type == X_("closeme") && !is_mapped()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ class PluginScanDialog : public ArdourDialog
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Gtk::Label message;
|
Gtk::Label message;
|
||||||
|
Gtk::Label timeout_info;
|
||||||
Gtk::ProgressBar pbar;
|
Gtk::ProgressBar pbar;
|
||||||
Gtk::HBox tbox;
|
Gtk::HBox tbox;
|
||||||
Gtk::Button timeout_button;
|
Gtk::Button timeout_button;
|
||||||
|
Loading…
Reference in New Issue
Block a user