summaryrefslogtreecommitdiff
path: root/gtk2_ardour/template_dialog.cc
diff options
context:
space:
mode:
authorJohannes Mueller <github@johannes-mueller.org>2017-07-12 17:44:35 +0200
committerRobin Gareus <robin@gareus.org>2017-07-15 11:37:24 +0200
commitccff1c5dbd4da2f63ee6ba9ce6af09a93f8f1b2c (patch)
tree4b4520d00ba1273e1ca7d6bb1a7393bb28d8d049 /gtk2_ardour/template_dialog.cc
parent0da2d7bf8af5e7cd0d15f4c1f8cbbd99a23cd186 (diff)
Only make the export button sensitive if there's something to export
Diffstat (limited to 'gtk2_ardour/template_dialog.cc')
-rw-r--r--gtk2_ardour/template_dialog.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk2_ardour/template_dialog.cc b/gtk2_ardour/template_dialog.cc
index daba8bdd7f..52db6fb1db 100644
--- a/gtk2_ardour/template_dialog.cc
+++ b/gtk2_ardour/template_dialog.cc
@@ -114,7 +114,7 @@ TemplateManager::TemplateManager ()
vb_btns->pack_start (_export_all_templates_button, false, false);
vb_btns->pack_start (_import_template_set_button, false, false);
- _export_all_templates_button.set_sensitive (true);
+ _export_all_templates_button.set_sensitive (false);
_export_all_templates_button.signal_clicked().connect (sigc::mem_fun (*this, &TemplateManager::export_all_templates));
_import_template_set_button.set_sensitive (true);
@@ -145,6 +145,8 @@ TemplateManager::setup_model (const vector<TemplateInfo>& templates)
row[_template_columns.name] = it->name;
row[_template_columns.path] = it->path;
}
+
+ _export_all_templates_button.set_sensitive (!templates.empty ());
}
void