summaryrefslogtreecommitdiff
path: root/gtk2_ardour/sfdb_ui.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/sfdb_ui.cc')
-rw-r--r--gtk2_ardour/sfdb_ui.cc24
1 files changed, 21 insertions, 3 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index c79ad5c128..891a8dad19 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -20,7 +20,7 @@
*/
#include <map>
-#include <errno.h>
+#include <cerrno>
#include <sndfile.h>
@@ -34,8 +34,9 @@
#include <ardour/sndfile_helpers.h>
#include <ardour/sndfilesource.h>
-#include "sfdb_ui.h"
#include "gui_thread.h"
+#include "prompter.h"
+#include "sfdb_ui.h"
#include "i18n.h"
@@ -235,7 +236,24 @@ SoundFileBox::stop_btn_clicked ()
void
SoundFileBox::add_field_clicked ()
-{}
+{
+ ArdourPrompter prompter (true);
+ string name;
+
+ prompter.set_prompt (_("Name for field"));
+
+ switch (prompter.run ()) {
+ case Gtk::RESPONSE_ACCEPT:
+ cout << name << endl;
+ prompter.get_result (name);
+ Library->add_field (name);
+ Library->save_changes ();
+ break;
+
+ default:
+ break;
+ }
+}
void
SoundFileBox::remove_field_clicked ()