2 Copyright (C) 2005 Paul Davis
3 Written by Taybin Rutkin
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include <gtkmm/box.h>
23 #include <gtkmm/stock.h>
25 #include <ardour/audio_library.h>
31 SoundFileBrowser::SoundFileBrowser (std::string title)
34 chooser(Gtk::FILE_CHOOSER_ACTION_OPEN)
36 get_vbox()->pack_start(chooser);
41 SoundFileChooser::SoundFileChooser (std::string title)
43 SoundFileBrowser(title)
45 add_button (Gtk::Stock::OPEN, Gtk::RESPONSE_OK);
46 add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
51 SoundFileOmega::SoundFileOmega (std::string title)
53 SoundFileBrowser(title),
54 embed_btn (_("Embed")),
55 import_btn (_("Import")),
56 split_check (_("Split Channels"))
58 get_action_area()->pack_start(embed_btn);
59 get_action_area()->pack_start(import_btn);
60 add_button (Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE);
62 chooser.set_extra_widget(split_check);
64 embed_btn.signal_clicked().connect (mem_fun (*this, &SoundFileOmega::embed_clicked));
65 import_btn.signal_clicked().connect (mem_fun (*this, &SoundFileOmega::import_clicked));
71 SoundFileOmega::embed_clicked ()
73 Embedded (chooser.get_filenames(), split_check.get_active());
77 SoundFileOmega::import_clicked ()
79 Imported (chooser.get_filenames(), split_check.get_active());